Re: [PATCH 3.1-rc2] x86: fix mm/fault.c build

From: H. Peter Anvin
Date: Tue Aug 16 2011 - 01:27:20 EST


On 08/15/2011 07:09 PM, Linus Torvalds wrote:
> On Mon, Aug 15, 2011 at 10:18 AM, Randy Dunlap <rdunlap@xxxxxxxxxxxx> wrote:
>> From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
>>
>> arch/x86/mm/fault.c needs to include asm/vsyscall.h to fix a
>> build error:
>>
>> arch/x86/mm/fault.c: In function '__bad_area_nosemaphore':
>> arch/x86/mm/fault.c:728: error: 'VSYSCALL_START' undeclared (first use in this function)
>
> Grr. This seems to be one of those "under certain configurations
> only". I can trigger it with "allnoconfig", but not with my common
> configuration or "allmodconfig"
>
> I just don't see *why* it ends up being config-related. Can anybody
> fill me in? It looks like some header file does a conditional include
> of fixmap.h or something. Urgh. I *hate* those kinds of "some configs
> work" cases.
>

It's due to the following in <asm/smp.h>:

#ifdef CONFIG_X86_LOCAL_APIC
# include <asm/mpspec.h>
# include <asm/apic.h>
# ifdef CONFIG_X86_IO_APIC
# include <asm/io_apic.h>
# endif
#endif

<asm/apic.h> pulls in <asm/fixmap.h> which pulls in <asm/vsyscall.h>,
bypassing the fact that arch/x86/mm/fault.c is missing <asm/vsyscall.h>.

I'll have a patch for it shortly.

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