On Fri, 11 Oct 2013, KY Srinivasan wrote:

> > From: David Rientjes [mailto:[email protected]]
> > Sent: Friday, October 11, 2013 4:08 PM
> > To: Ingo Molnar; H. Peter Anvin; [email protected]; H. Peter Anvin
> > Cc: KY Srinivasan; Olaf Hering; [email protected]; linux-tip-
> > [email protected]
> > Subject: [patch x86/hyperv] x86, hyperv: Fix build error
> > 
> > 9e7827b5ea4c ("x86, hyperv: Get the local APIC timer frequency from the
> > hypervisor") breaks the build with some configs because apic.h isn't
> > directly included:
> > 
> > arch/x86/kernel/cpu/mshyperv.c: In function 'ms_hyperv_init_platform':
> > arch/x86/kernel/cpu/mshyperv.c:90:3: error: 'lapic_timer_frequency' 
> > undeclared
> > (first use in this function)
> > arch/x86/kernel/cpu/mshyperv.c:90:3: note: each undeclared identifier is
> > reported only once for each function it appears in
> > 
> > Fix it by including asm/apic.h.
> 
> Thank you. The issue was configuration related - local APIC was not 
> configured. This has already been fixed.
> 

Yeah, it's config related as stated in the changelog.  If you're referring 
to 90ab9d551093 ("x86, hyperv: Correctly guard the local APIC calibration 
code ")as "fixing" it, it does not.  (I'm left to wonder what you mean by 
it being fixed since you didn't elaborate.)  You can trigger this build 
breakage even with CONFIG_X86_LOCAL_APIC=y.

Let me be explicit: this file includes desc.h, which includes linux/smp.h, 
which includes asm/smp.h iff CONFIG_SMP is enabled.  That's what you're 
relying upon to get asm/apic.h when CONFIG_X86_LOCAL_APIC is enabled.  It 
will break when CONFIG_SMP is disabled.

So you need to include asm/apic.h directly for such a configuration.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to