lkml.org 
[lkml]   [2013]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [patch x86/hyperv] x86, hyperv: Fix build error
Date


> -----Original Message-----
> From: David Rientjes [mailto:rientjes@google.com]
> Sent: Friday, October 11, 2013 4:29 PM
> To: KY Srinivasan
> Cc: Ingo Molnar; H. Peter Anvin; tglx@linutronix.de; H. Peter Anvin; Olaf Hering;
> linux-kernel@vger.kernel.org; linux-tip-commits@vger.kernel.org
> Subject: RE: [patch x86/hyperv] x86, hyperv: Fix build error
>
> On Fri, 11 Oct 2013, KY Srinivasan wrote:
>
> > > From: David Rientjes [mailto:rientjes@google.com]
> > > Sent: Friday, October 11, 2013 4:08 PM
> > > To: Ingo Molnar; H. Peter Anvin; tglx@linutronix.de; H. Peter Anvin
> > > Cc: KY Srinivasan; Olaf Hering; linux-kernel@vger.kernel.org; linux-tip-
> > > commits@vger.kernel.org
> > > 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.

Thank you for the details.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

Regards,

K. Y




\
 
 \ /
  Last update: 2013-10-12 01:41    [W:0.048 / U:32.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site