fix ACPI induced voyager compile failure
PATCH 1/1 fix ACPI induced voyager compile failure
Quoted 1 line
From
c339b7cdc39399855ec07dfbff67304f9c7fa49aMon Sep 17 00:00:00 2001
From: James Bottomley <[email protected]>
Date: Wed, 29 Oct 2008 10:58:13 -0500
Subject: [VOYAGER] x86: don't pull asm/acpi.h into fixmap_32.h
If it's not needed it causes compile failures.
--- arch/x86/include/asm/fixmap_32.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/include/asm/fixmap_32.h +2 -0
@@ -25,7 +25,9 @@ extern unsigned long __FIXADDR_TOP;#ifndef __ASSEMBLY__#include <linux/kernel.h> +#ifdef CONFIG_ACPI #include <asm/acpi.h> +#endif #include <asm/apicdef.h> #include <asm/page.h> #ifdef CONFIG_HIGHMEM
Signature · 1 line
1.5.6.5
Quoted 17 lines · James Bottomley
Quoted 1 line
From
c339b7cdc39399855ec07dfbff67304f9c7fa49aMon Sep 17 00:00:00 2001From: James Bottomley <[email protected]>
Date: Wed, 29 Oct 2008 10:58:13 -0500
Subject: [VOYAGER] x86: don't pullasm/acpi.hintofixmap_32.hIf it's not needed it causes compile failures.
Signed-off-by James Bottomley <[email protected]>--- arch/x86/include/asm/fixmap_32.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/include/asm/fixmap_32.h +0
-0
arch/x86/include/asm/fixmap_32.h extern unsigned long __FIXADDR_TOP; · line 30
Quoted 6 lines
arch/x86/include/asm/fixmap_32.h +2
-0@@ -25,7 +25,9 @@ extern unsigned long __FIXADDR_TOP;#ifndef __ASSEMBLY__#include <linux/kernel.h> +#ifdef CONFIG_ACPI #include <asm/acpi.h> +#endif
hm, that's quite ugly - such headers are supposed to be safe even if CONFIG_APIC is not turned on.
What kind of compiler failures are you getting, could you send the .config that triggers it? I'm curious what the real cause of the build failure is - the #ifdef you are adding seems to fix a symptom, not a real bug - and maybe we can do a better fix.
Thanks,
Ingo
Quoted 29 lines · Ingo Molnar
Quoted 17 lines · James Bottomley
Quoted 1 line
From
c339b7cdc39399855ec07dfbff67304f9c7fa49aMon Sep 17 00:00:00 2001From: James Bottomley <[email protected]>
Date: Wed, 29 Oct 2008 10:58:13 -0500
Subject: [VOYAGER] x86: don't pullasm/acpi.hintofixmap_32.hIf it's not needed it causes compile failures.
Signed-off-by James Bottomley <[email protected]>--- arch/x86/include/asm/fixmap_32.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/include/asm/fixmap_32.h +0
-0arch/x86/include/asm/fixmap_32.h extern unsigned long __FIXADDR_TOP; · line 30
Quoted 6 lines
arch/x86/include/asm/fixmap_32.h +2
-0@@ -25,7 +25,9 @@ extern unsigned long __FIXADDR_TOP;#ifndef __ASSEMBLY__#include <linux/kernel.h> +#ifdef CONFIG_ACPI #include <asm/acpi.h> +#endif hm, that's quite ugly - such headers are supposed to be safe even if
CONFIG_APICis not turned on.
Quoted 4 lines
What kind of compiler failures are you getting, could you send the .config that triggers it? I'm curious what the real cause of the build failure is - the #ifdef you are adding seems to fix a symptom, not a real bug - and maybe we can do a better fix.
It's the problem of voyager wanting its own definition of phys_cpu_present_map. acpi.h pulls in mpspec.h which contaminates the voyager_smp.c build.
Realistically, I was surprised that's the only problem, since mpspec.h contains an awful lot of apic related stuff.
It was you who did this with:
commit 4c1cbafb88490757a38119c41229251369bcecbc
Author: Ingo Molnar <[email protected]> Date: Tue Jun 3 09:28:52 2008 +0200
x86 mpparse: build fix
James
Quoted 30 lines · James Bottomley
Quoted 29 lines · Ingo Molnar
Quoted 17 lines · James Bottomley
Quoted 1 line
From
c339b7cdc39399855ec07dfbff67304f9c7fa49aMon Sep 17 00:00:00 2001From: James Bottomley <[email protected]>
Date: Wed, 29 Oct 2008 10:58:13 -0500
Subject: [VOYAGER] x86: don't pullasm/acpi.hintofixmap_32.hIf it's not needed it causes compile failures.
Signed-off-by James Bottomley <[email protected]>--- arch/x86/include/asm/fixmap_32.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/include/asm/fixmap_32.h +0
-0arch/x86/include/asm/fixmap_32.h extern unsigned long __FIXADDR_TOP; · line 30
Quoted 6 lines
arch/x86/include/asm/fixmap_32.h +2
-0@@ -25,7 +25,9 @@ extern unsigned long __FIXADDR_TOP;#ifndef __ASSEMBLY__#include <linux/kernel.h> +#ifdef CONFIG_ACPI #include <asm/acpi.h> +#endif hm, that's quite ugly - such headers are supposed to be safe even if
CONFIG_APICis not turned on.
Quoted 8 lines
Quoted 4 lines
What kind of compiler failures are you getting, could you send the .config that triggers it? I'm curious what the real cause of the build failure is - the #ifdef you are adding seems to fix a symptom, not a real bug - and maybe we can do a better fix.
It's the problem of voyager wanting its own definition of
phys_cpu_present_map.acpi.hpulls inmpspec.hwhich contaminates thevoyager_smp.cbuild.
i guess voyager could use physid_mask_t just fine?
physid_mask_t is MAX_APICS derived - but it should work out fine because AFAICS voyager has a maximum of 4 cpus (but definitely less than say 32), while MAX_APICS never goes below 256.
Ingo
Quoted 41 lines · Ingo Molnar
Quoted 30 lines · James Bottomley
Quoted 29 lines · Ingo Molnar
Quoted 17 lines · James Bottomley
Quoted 1 line
From
c339b7cdc39399855ec07dfbff67304f9c7fa49aMon Sep 17 00:00:00 2001From: James Bottomley <[email protected]>
Date: Wed, 29 Oct 2008 10:58:13 -0500
Subject: [VOYAGER] x86: don't pullasm/acpi.hintofixmap_32.hIf it's not needed it causes compile failures.
Signed-off-by James Bottomley <[email protected]>--- arch/x86/include/asm/fixmap_32.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/include/asm/fixmap_32.h +0
-0arch/x86/include/asm/fixmap_32.h extern unsigned long __FIXADDR_TOP; · line 30
Quoted 6 lines
arch/x86/include/asm/fixmap_32.h +2
-0@@ -25,7 +25,9 @@ extern unsigned long __FIXADDR_TOP;#ifndef __ASSEMBLY__#include <linux/kernel.h> +#ifdef CONFIG_ACPI #include <asm/acpi.h> +#endif hm, that's quite ugly - such headers are supposed to be safe even if
CONFIG_APICis not turned on.Quoted 8 lines
Quoted 4 lines
What kind of compiler failures are you getting, could you send the .config that triggers it? I'm curious what the real cause of the build failure is - the #ifdef you are adding seems to fix a symptom, not a real bug - and maybe we can do a better fix.
It's the problem of voyager wanting its own definition of
phys_cpu_present_map.acpi.hpulls inmpspec.hwhich contaminates thevoyager_smp.cbuild.
Quoted 5 lines
i guess voyager could use
physid_mask_tjust fine?
physid_mask_tisMAX_APICSderived - but it should work out fine because AFAICS voyager has a maximum of 4 cpus (but definitely less than say 32), whileMAX_APICSnever goes below 256.
Voyager has a max of 32 actually. The CPU numbering is also fixed and identifies the processor position (for FRU replacement), so the physical map is what we use throughout the code. The problem with the definition is that it makes a rather pointless distinction between physical and
logical map types ... so there'd be a lot of code churn. It would be
really nice if physmask_t and cpumask_t could become the same type ... then we could do all this and no-one would notice.
James
Quoted 42 lines · James Bottomley
Quoted 41 lines · Ingo Molnar
Quoted 38 lines · James Bottomley
Quoted 29 lines · Ingo Molnar
Quoted 17 lines · James Bottomley
Quoted 1 line
From
c339b7cdc39399855ec07dfbff67304f9c7fa49aMon Sep 17 00:00:00 2001From: James Bottomley <[email protected]>
Date: Wed, 29 Oct 2008 10:58:13 -0500
Subject: [VOYAGER] x86: don't pullasm/acpi.hintofixmap_32.hIf it's not needed it causes compile failures.
Signed-off-by James Bottomley <[email protected]>--- arch/x86/include/asm/fixmap_32.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/include/asm/fixmap_32.h +0
-0arch/x86/include/asm/fixmap_32.h extern unsigned long __FIXADDR_TOP; · line 30
Quoted 6 lines
arch/x86/include/asm/fixmap_32.h +2
-0@@ -25,7 +25,9 @@ extern unsigned long __FIXADDR_TOP;#ifndef __ASSEMBLY__#include <linux/kernel.h> +#ifdef CONFIG_ACPI #include <asm/acpi.h> +#endif hm, that's quite ugly - such headers are supposed to be safe even if
CONFIG_APICis not turned on.Quoted 4 lines
What kind of compiler failures are you getting, could you send the .config that triggers it? I'm curious what the real cause of the build failure is - the #ifdef you are adding seems to fix a symptom, not a real bug - and maybe we can do a better fix.
It's the problem of voyager wanting its own definition of
phys_cpu_present_map.acpi.hpulls inmpspec.hwhich contaminates thevoyager_smp.cbuild.
Quoted 7 lines
Quoted 5 lines
i guess voyager could use
physid_mask_tjust fine?
physid_mask_tisMAX_APICSderived - but it should work out fine because AFAICS voyager has a maximum of 4 cpus (but definitely less than say 32), whileMAX_APICSnever goes below 256.Voyager has a max of 32 actually. [...]
(yes, <= 32 is what i meant.)
Quoted 7 lines
[...] The CPU numbering is also fixed and identifies the processor position (for FRU replacement), so the physical map is what we use throughout the code. The problem with the definition is that it makes a rather pointless distinction between physical and logical map types ... so there'd be a lot of code churn. It would be really nice if
physmask_tandcpumask_tcould become the same type ... then we could do all this and no-one would notice.
if you mean physid_mask_t, i agree that it would be a tempting simplification if we got rid of the physid_mask_t distinction and made it equal to cpumask_t.
If the largest APIC ID in the bootup gets larger than NR_CPUS we should just clip it and print a warning about it in the syslog. (it would likely not boot up though, if that ID is an ioapic's ID)
OTOH, right now there's some practical complications: even on small systems we can easily get a relatively large APIC ID, needlessly driving up the NR_CPUS limit.
Yinghai, Peter, what do you think?
Ingo