2.6.31-rc3-current-git+ build failure

From: Chris Clayton
Date: Wed Jul 22 2009 - 16:03:07 EST


After a git pull about 20 minutes ago (that would be about 20:30 here
in UK) th eresultant kernel fails to build with the message:@

kernel/irq/manage.c: In function 'irq_thread_check_affinity':
kernel/irq/manage.c:475: error: 'struct irq_desc' has no member named 'affinity'
make[2]: *** [kernel/irq/manage.o] Error 1
make[1]: *** [kernel/irq] Error 2
make: *** [kernel] Error 2
make: *** Waiting for unfinished jobs....

I believe this is caused by commit:

591d2fb02ea80472d846c0b8507007806bdd69cc

genirq: Delegate irq affinity setting to the irq thread

irq_set_thread_affinity() calls set_cpus_allowed_ptr() which might
sleep, but irq_set_thread_affinity() is called with desc->lock held
and can be called from hard interrupt context as well. The code has
another bug as it does not hold a ref on the task struct as required
by set_cpus_allowed_ptr().

Just set the IRQTF_AFFINITY bit in action->thread_flags. The next time
the thread runs it migrates itself. Solves all of the above problems
nicely.

Add kerneldoc to irq_set_thread_affinity() while at it.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

The patch introduces an access to the affinity field of struct
irq_desc. Unfortunately the field is included only if CONFIG_SMP is
defined.

OK, I know enough to figure out the problem, but not enough to fix it :-(

Regards

Chris


--
No, Sir; there is nothing which has yet been contrived by man, by which
so much happiness is produced as by a good tavern or inn - Doctor Samuel
Johnson
--
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/