Re: 2.6.9-rc3-mm3

From: J.A. Magallon
Date: Thu Oct 07 2004 - 21:06:47 EST



On 2004.10.07, J.A. Magallon wrote:

This conflicts with kernel/irq/proc.c:

unsigned long prof_cpu_mask = -1;

Shouldn't this be:

cpumask_t prof_cpu_mask = CPU_MASK_NONE;

This will show problems when NR_CPUS > sizeof(long)....


Err....

There is a problem with this -mm:

line 422185:

--- /dev/null 2003-09-15 06:40:47.000000000 -0700
+++ 25/kernel/irq/proc.c 2004-10-07 00:39:41.626877840 -0700
@@ -0,0 +1,183 @@
+/*
+ * linux/kernel/irq/proc.c
+ *
+ * Copyright (C) 1992, 1998-2004 Linus Torvalds, Ingo Molnar
+ *
+ * This file contains the /proc/irq/ handling code.
+ */
+
+#include <linux/irq.h>
+#include <linux/proc_fs.h>
+#include <linux/interrupt.h>
+
+unsigned long prof_cpu_mask = -1;
+
^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^

And then:

line 426061:
--- linux-2.6.9-rc3/kernel/profile.c 2004-09-30 12:56:52.000000000 -0700
+++ 25/kernel/profile.c 2004-10-07 00:41:51.898073608 -0700
...
static int prof_on;
static cpumask_t prof_cpu_mask = CPU_MASK_ALL;
+#ifdef CONFIG_SMP

If you do the change I proposed before:

LD kernel/built-in.o
kernel/irq/built-in.o(.bss+0x20): multiple definition of `prof_cpu_mask'
kernel/profile.o(.data+0x0): first defined here
make[1]: *** [kernel/built-in.o] Error 1
make: *** [kernel] Error 2

And, for example:
werewolf:/usr/src/linux# grep -r "int prof_cpu_mask_read_proc" *
arch/m32r/kernel/irq.c:static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
kernel/profile.c:static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
kernel/irq/proc.c:static int prof_cpu_mask_read_proc(char *page, char **start, off_t off,

Duplicate code ?
the profile.c is in -rc3, and -mm3 adds the one in irq/proc.c.

???

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandrakelinux release 10.1 (Community) for i586
Linux 2.6.9-rc3-mm2 (gcc 3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)) #2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/