* [PATCH tip] Fix build failure x86_default_fixup_cpu_id() with !CONFIG_SMP
@ 2011-12-06 10:47 Kamalesh Babulal
2011-12-06 11:37 ` Srivatsa S. Bhat
0 siblings, 1 reply; 4+ messages in thread
From: Kamalesh Babulal @ 2011-12-06 10:47 UTC (permalink / raw)
To: daniel; +Cc: mingo, sp, jbarnes, linux-kernel
Hi,
tip (a4a7e7e29333) build fails, when compiled with !CONFIG_SMP.
I have only build tested the patch.
x86: Fix x86_default_fixup_cpu_id() build failure with !CONFIG_SMP
arch/x86/kernel/cpu/common.c: In function 'x86_default_fixup_cpu_id':
arch/x86/kernel/cpu/common.c:1149: error: 'struct cpuinfo_x86' has no member named 'phys_proc_id'
make[3]: *** [arch/x86/kernel/cpu/common.o] Error 1
the code was introduced by commit 64be4c1c24. This patch
introduced #ifdef to guard !SMP case.
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
--
arch/x86/kernel/cpu/common.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index ad4da45..1154528 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1146,7 +1146,9 @@ static void dbg_restore_debug_regs(void)
*/
void __cpuinit x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node)
{
+#ifdef CONFIG_SMP
pr_err("NUMA core number %d differs from configured core number %d\n", node, c->phys_proc_id);
+#endif
}
/*
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH tip] Fix build failure x86_default_fixup_cpu_id() with !CONFIG_SMP
2011-12-06 10:47 [PATCH tip] Fix build failure x86_default_fixup_cpu_id() with !CONFIG_SMP Kamalesh Babulal
@ 2011-12-06 11:37 ` Srivatsa S. Bhat
2011-12-06 11:44 ` Steffen Persvold
0 siblings, 1 reply; 4+ messages in thread
From: Srivatsa S. Bhat @ 2011-12-06 11:37 UTC (permalink / raw)
To: Kamalesh Babulal; +Cc: daniel, mingo, sp, jbarnes, linux-kernel
Hi Kamalesh,
On 12/06/2011 04:17 PM, Kamalesh Babulal wrote:
> Hi,
>
> tip (a4a7e7e29333) build fails, when compiled with !CONFIG_SMP.
> I have only build tested the patch.
>
> x86: Fix x86_default_fixup_cpu_id() build failure with !CONFIG_SMP
>
> arch/x86/kernel/cpu/common.c: In function 'x86_default_fixup_cpu_id':
> arch/x86/kernel/cpu/common.c:1149: error: 'struct cpuinfo_x86' has no member named 'phys_proc_id'
> make[3]: *** [arch/x86/kernel/cpu/common.o] Error 1
>
> the code was introduced by commit 64be4c1c24. This patch
> introduced #ifdef to guard !SMP case.
>
> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> ----
There was a similar build-fix patch by Steffen Persvold at:
https://lkml.org/lkml/2011/12/6/28
That would solve your case too, right?
Regards,
Srivatsa S. Bhat
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH tip] Fix build failure x86_default_fixup_cpu_id() with !CONFIG_SMP
2011-12-06 11:37 ` Srivatsa S. Bhat
@ 2011-12-06 11:44 ` Steffen Persvold
2011-12-06 16:21 ` Kamalesh Babulal
0 siblings, 1 reply; 4+ messages in thread
From: Steffen Persvold @ 2011-12-06 11:44 UTC (permalink / raw)
To: Srivatsa S. Bhat; +Cc: Kamalesh Babulal, daniel, mingo, jbarnes, linux-kernel
On 12/6/2011 12:37, Srivatsa S. Bhat wrote:
> Hi Kamalesh,
>
> On 12/06/2011 04:17 PM, Kamalesh Babulal wrote:
>
>> Hi,
>>
>> tip (a4a7e7e29333) build fails, when compiled with !CONFIG_SMP.
>> I have only build tested the patch.
>>
>> x86: Fix x86_default_fixup_cpu_id() build failure with !CONFIG_SMP
>>
>> arch/x86/kernel/cpu/common.c: In function 'x86_default_fixup_cpu_id':
>> arch/x86/kernel/cpu/common.c:1149: error: 'struct cpuinfo_x86' has no member named 'phys_proc_id'
>> make[3]: *** [arch/x86/kernel/cpu/common.o] Error 1
>>
>> the code was introduced by commit 64be4c1c24. This patch
>> introduced #ifdef to guard !SMP case.
>>
>> Signed-off-by: Kamalesh Babulal<kamalesh@linux.vnet.ibm.com>
>> ----
>
>
> There was a similar build-fix patch by Steffen Persvold at:
> https://lkml.org/lkml/2011/12/6/28
>
> That would solve your case too, right?
>
I would hope so (I tested with !CONFIG_SMP also), albeit I used :
#ifdef CONFIG_NUMA
and not
#ifdef CONFIG_SMP
but I don't think you can compile with CONFIG_NUMA without having
CONFIG_SMP (if I read the Kconfig correctly..).
I used CONFIG_NUMA because the code-path doesn't really make sense on
non-numa nodes.
Cheers,
--
Steffen Persvold, Chief Architect NumaChip
Numascale AS - www.numascale.com
Tel: +47 92 49 25 54 Skype: spersvold
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH tip] Fix build failure x86_default_fixup_cpu_id() with !CONFIG_SMP
2011-12-06 11:44 ` Steffen Persvold
@ 2011-12-06 16:21 ` Kamalesh Babulal
0 siblings, 0 replies; 4+ messages in thread
From: Kamalesh Babulal @ 2011-12-06 16:21 UTC (permalink / raw)
To: Steffen Persvold; +Cc: Srivatsa S. Bhat, daniel, mingo, jbarnes, linux-kernel
* Steffen Persvold <sp@numascale.com> [2011-12-06 12:44:46]:
> On 12/6/2011 12:37, Srivatsa S. Bhat wrote:
> >Hi Kamalesh,
> >
> >On 12/06/2011 04:17 PM, Kamalesh Babulal wrote:
> >
> >>Hi,
> >>
> >>tip (a4a7e7e29333) build fails, when compiled with !CONFIG_SMP.
> >>I have only build tested the patch.
> >>
> >>x86: Fix x86_default_fixup_cpu_id() build failure with !CONFIG_SMP
> >>
> >>arch/x86/kernel/cpu/common.c: In function 'x86_default_fixup_cpu_id':
> >>arch/x86/kernel/cpu/common.c:1149: error: 'struct cpuinfo_x86' has no member named 'phys_proc_id'
> >>make[3]: *** [arch/x86/kernel/cpu/common.o] Error 1
> >>
> >>the code was introduced by commit 64be4c1c24. This patch
> >>introduced #ifdef to guard !SMP case.
> >>
> >>Signed-off-by: Kamalesh Babulal<kamalesh@linux.vnet.ibm.com>
> >>----
> >
> >
> >There was a similar build-fix patch by Steffen Persvold at:
> >https://lkml.org/lkml/2011/12/6/28
> >
> >That would solve your case too, right?
> >
Thanks for pointing out the patch.
>
> I would hope so (I tested with !CONFIG_SMP also), albeit I used :
>
> #ifdef CONFIG_NUMA
>
> and not
>
> #ifdef CONFIG_SMP
>
>
> but I don't think you can compile with CONFIG_NUMA without having
> CONFIG_SMP (if I read the Kconfig correctly..).
>
> I used CONFIG_NUMA because the code-path doesn't really make sense
> on non-numa nodes.
agree, cpuinfo_x86->phys_proc_id is protected within CONFIG_SMP but the
right way is to fix using CONFIG_NUMA as explained by you in
https://lkml.org/lkml/2011/12/6/28.
Regards,
Kamalesh.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-06 16:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06 10:47 [PATCH tip] Fix build failure x86_default_fixup_cpu_id() with !CONFIG_SMP Kamalesh Babulal
2011-12-06 11:37 ` Srivatsa S. Bhat
2011-12-06 11:44 ` Steffen Persvold
2011-12-06 16:21 ` Kamalesh Babulal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).