From: Mike Travis <travis@sgi.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: include/linux/irq.h:452: error: implicit declaration of function 'cpu_to_node'
Date: Mon, 09 Feb 2009 15:06:35 -0800 [thread overview]
Message-ID: <4990B6FB.5030803@sgi.com> (raw)
In-Reply-To: <20090209224003.GA9795@x200.localdomain>
Alexey Dobriyan wrote:
> On Mon, Feb 09, 2009 at 02:08:42PM -0800, Mike Travis wrote:
>> Mike Travis wrote:
>>> Alexey Dobriyan wrote:
>>>> On Wed, Jan 21, 2009 at 03:38:25PM -0800, Mike Travis wrote:
>>>>> Alexey Dobriyan wrote:
>>>>>> On mips-malta:
>>>>>>
>>>>>> CC arch/mips/mti-malta/malta-int.o
>>>>>> In file included from arch/mips/mti-malta/malta-int.c:25:
>>>>>> include/linux/irq.h: In function 'init_alloc_desc_masks':
>>>>>> include/linux/irq.h:452: error: implicit declaration of function 'cpu_to_node'
>>>>>> include/linux/irq.h:454: error: 'GFP_ATOMIC' undeclared (first use in this function)
>>>>>>
>>>>>> I _think_ init_alloc_desc_masks() should be made out of line to fix this.
>>>>> Hi Alexey,
>>>>>
>>>>> Does adding #include <linux/slab.h> fix the error? If so, I can add this to
>>>>> linux/irq.h.
>>>>>
>>>>> The primary reason it's inline is that unless CONFIG_CPUMASK_OFFSTACK=y, then the
>>>>> entire routine is a NOP which optimizes out more completely as an inline function.
>>>> linux/slab.h helps.
>>> Hi Alexey,
>>>
>>> Since you reported this problem a similar issue was discovered on s390. However
>>> the fix for that was to include interrupt.h instead of irq.h.
>>>
>>> Could you try this as well?
>>>
>>> Here's a tail end pointer to the thread and Andrew's commit msg including the
>>> patch is below.
>>>
>>> http://marc.info/?l=linux-mm-commits&m=123360349631362&w=4
>> Sorry, I should have made a patch specific to mips, and here that is...
>
> This is without slab.h in irq.h
>
> But slab,h in irq.h is not enough for s390 sysrq.
Ahh, I thought it had already passed your testing.
So, you're saying that adding the include of slab.h to irq.h fixes the problem,
and that removing the include of irq.h in malta-int.c is meaningless?
This really is a maze of twisty little passages... ;-)
(Btw, maybe you should submit the fixup patch to Andrew, I seem to only be adding
to the confusion?)
Thanks,
Mike
>
> CC kernel/irq/handle.o
> In file included from kernel/irq/handle.c:13:
> include/linux/irq.h: In function 'init_alloc_desc_masks':
> include/linux/irq.h:444: error: implicit declaration of function 'cpu_to_node'
> include/linux/irq.h:446: error: 'GFP_ATOMIC' undeclared (first use in this function)
> include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
> include/linux/irq.h:446: error: for each function it appears in.)
> make[3]: *** [kernel/irq/handle.o] Error 1
> CC kernel/irq/manage.o
> In file included from kernel/irq/manage.c:10:
> include/linux/irq.h: In function 'init_alloc_desc_masks':
> include/linux/irq.h:444: error: implicit declaration of function 'cpu_to_node'
> include/linux/irq.h:446: error: 'GFP_ATOMIC' undeclared (first use in this function)
> include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
> include/linux/irq.h:446: error: for each function it appears in.)
> make[3]: *** [kernel/irq/manage.o] Error 1
> CC kernel/irq/spurious.o
> In file included from kernel/irq/spurious.c:10:
> include/linux/irq.h: In function 'init_alloc_desc_masks':
> include/linux/irq.h:444: error: implicit declaration of function 'cpu_to_node'
> include/linux/irq.h:446: error: 'GFP_ATOMIC' undeclared (first use in this function)
> include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
> include/linux/irq.h:446: error: for each function it appears in.)
> make[3]: *** [kernel/irq/spurious.o] Error 1
> CC kernel/irq/resend.o
> In file included from kernel/irq/resend.c:16:
> include/linux/irq.h: In function 'init_alloc_desc_masks':
> include/linux/irq.h:444: error: implicit declaration of function 'cpu_to_node'
> include/linux/irq.h:446: error: 'GFP_ATOMIC' undeclared (first use in this function)
> include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
> include/linux/irq.h:446: error: for each function it appears in.)
> make[3]: *** [kernel/irq/resend.o] Error 1
> CC kernel/irq/chip.o
> In file included from kernel/irq/chip.c:13:
> include/linux/irq.h: In function 'init_alloc_desc_masks':
> include/linux/irq.h:444: error: implicit declaration of function 'cpu_to_node'
> include/linux/irq.h:446: error: 'GFP_ATOMIC' undeclared (first use in this function)
> include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
> include/linux/irq.h:446: error: for each function it appears in.)
> make[3]: *** [kernel/irq/chip.o] Error 1
> CC kernel/irq/autoprobe.o
> In file included from kernel/irq/autoprobe.c:9:
> include/linux/irq.h: In function 'init_alloc_desc_masks':
> include/linux/irq.h:444: error: implicit declaration of function 'cpu_to_node'
> include/linux/irq.h:446: error: 'GFP_ATOMIC' undeclared (first use in this function)
> include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
> include/linux/irq.h:446: error: for each function it appears in.)
> make[3]: *** [kernel/irq/autoprobe.o] Error 1
> CC kernel/irq/proc.o
> In file included from kernel/irq/proc.c:9:
> include/linux/irq.h: In function 'init_alloc_desc_masks':
> include/linux/irq.h:444: error: implicit declaration of function 'cpu_to_node'
> include/linux/irq.h:446: error: 'GFP_ATOMIC' undeclared (first use in this function)
> include/linux/irq.h:446: error: (Each undeclared identifier is reported only once
> include/linux/irq.h:446: error: for each function it appears in.)
prev parent reply other threads:[~2009-02-09 23:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 21:53 include/linux/irq.h:452: error: implicit declaration of function 'cpu_to_node' Alexey Dobriyan
2009-01-21 23:38 ` Mike Travis
2009-02-09 20:35 ` Alexey Dobriyan
2009-02-09 22:05 ` Mike Travis
2009-02-09 22:08 ` Mike Travis
2009-02-09 22:29 ` Alexey Dobriyan
2009-02-09 22:32 ` Mike Travis
2009-02-09 22:40 ` Alexey Dobriyan
2009-02-09 23:06 ` Mike Travis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4990B6FB.5030803@sgi.com \
--to=travis@sgi.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox