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 <[email protected]>
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
On Wed, Jul 22, 2009 at 09:02:57PM +0100, Chris Clayton wrote:
> 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
>
Patch here, http://patchwork.kernel.org/patch/36923/
On Thu, Jul 23, 2009 at 12:41:22PM +0100, Matt Fleming wrote:
> On Wed, Jul 22, 2009 at 09:02:57PM +0100, Chris Clayton wrote:
> > 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
> >
>
> Patch here, http://patchwork.kernel.org/patch/36923/
Guh, I should really start reading all of my email before replying. The
patch that's currently queued up in tip is this one,
http://git.kernel.org/tip/61f3826133dc07142935fb5712fc738e19eb5575