Re: 2.6.9-rc3-mm3

From: Andrew Morton
Date: Thu Oct 07 2004 - 20:48:58 EST


"J.A. Magallon" <jamagallon@xxxxxxx> wrote:
>
> 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:

Yes, there seems to be a mingo/wli bunfight over prof_cpu_mask.

Something like this, I think:

--- 25/kernel/irq/proc.c~prof-irq-mask-fixup Thu Oct 7 15:04:14 2004
+++ 25-akpm/kernel/irq/proc.c Thu Oct 7 15:05:30 2004
@@ -10,8 +10,6 @@
#include <linux/proc_fs.h>
#include <linux/interrupt.h>

-unsigned long prof_cpu_mask = -1;
-
static struct proc_dir_entry *root_irq_dir, *irq_dir[NR_IRQS];

#ifdef CONFIG_SMP
@@ -65,34 +63,6 @@ static int irq_affinity_write_proc(struc

#endif

-static int prof_cpu_mask_read_proc(char *page, char **start, off_t off,
- int count, int *eof, void *data)
-{
- int len = cpumask_scnprintf(page, count, *(cpumask_t *)data);
-
- if (count - len < 2)
- return -EINVAL;
- len += sprintf(page + len, "\n");
- return len;
-}
-
-static int prof_cpu_mask_write_proc(struct file *file,
- const char __user *buffer,
- unsigned long count, void *data)
-{
- unsigned long full_count = count, err;
- cpumask_t *mask = (cpumask_t *)data;
- cpumask_t new_value;
-
- err = cpumask_parse(buffer, count, new_value);
- if (err)
- return err;
-
- *mask = new_value;
-
- return full_count;
-}
-
#define MAX_NAMELEN 128

void register_handler_proc(unsigned int irq, struct irqaction *action)
@@ -156,7 +126,6 @@ void unregister_handler_proc(unsigned in

void init_irq_proc(void)
{
- struct proc_dir_entry *entry;
int i;

/* create /proc/irq */
@@ -164,16 +133,6 @@ void init_irq_proc(void)
if (!root_irq_dir)
return;

- /* create /proc/irq/prof_cpu_mask */
- entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
- if (!entry)
- return;
-
- entry->nlink = 1;
- entry->data = (void *)&prof_cpu_mask;
- entry->read_proc = prof_cpu_mask_read_proc;
- entry->write_proc = prof_cpu_mask_write_proc;
-
/*
* Create entries for all existing IRQs.
*/
_

-
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/