MIPS: IP22/IP32: Add missing ifdefs to Platform files
PATCH 1/1 MIPS: IP22/IP32: Add missing ifdefs to Platform files
In arch/mips/sgi-ip22/Platform and arch/mips/sgi-ip32/Platform, ifdefs for CONFIG_SGI_IP22 and CONFIG_SGI_IP32 are missing, which can cause the definitions for these platforms to get included in builds for other platforms.
This patch adds these missing ifdefs, which matches IP27's Platform file.
--- arch/mips/sgi-ip22/Platform | 8 +++++--- arch/mips/sgi-ip32/Platform | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-)
arch/mips/sgi-ip22/Platform +5 -3
@@ -7,7 +7,8 @@ # current variable will break so for 64-bit kernels we have to raise the start # address by 8kb. # -platform-$(CONFIG_SGI_IP22) += sgi-ip22/ +ifdef CONFIG_SGI_IP22 +platform-$(CONFIG_SGI_IP22) += sgi-ip22/ cflags-$(CONFIG_SGI_IP22) += -I$(srctree)/arch/mips/include/asm/mach-ip22 ifdef CONFIG_32BIT load-$(CONFIG_SGI_IP22) += 0xffffffff88002000
@@ -15,6 +16,7 @@ endif ifdef CONFIG_64BIT load-$(CONFIG_SGI_IP22) += 0xffffffff88004000 endif +endif # # SGI IP28 (Indigo2 R10k)
@@ -28,7 +30,7 @@ ifdef CONFIG_SGI_IP28 ifeq ($(call cc-option-yn,-mr10k-cache-barrier=store), n) $(error gcc doesn't support needed option -mr10k-cache-barrier=store) endif -endif -platform-$(CONFIG_SGI_IP28) += sgi-ip22/ +platform-$(CONFIG_SGI_IP28) += sgi-ip22/ cflags-$(CONFIG_SGI_IP28) += -mr10k-cache-barrier=store -I$(srctree)/arch/mips/include/asm/mach-ip28 load-$(CONFIG_SGI_IP28) += 0xa800000020004000 +endif
arch/mips/sgi-ip32/Platform +6 -3
@@ -6,6 +6,9 @@ # a multiple of the kernel stack size or the handling of the current variable # will break. # -platform-$(CONFIG_SGI_IP32) += sgi-ip32/ -cflags-$(CONFIG_SGI_IP32) += -I$(srctree)/arch/mips/include/asm/mach-ip32 -load-$(CONFIG_SGI_IP32) += 0xffffffff80004000 +ifdef CONFIG_SGI_IP32 +platform-$(CONFIG_SGI_IP32) += sgi-ip32/ +cflags-$(CONFIG_SGI_IP32) += -I$(srctree)/arch/mips/include/asm/mach-ip32 +load-$(CONFIG_SGI_IP32) += 0xffffffff80004000 +endif +
Quoted 26 lines · Joshua Kinard
In
arch/mips/sgi-ip22/Platformandarch/mips/sgi-ip32/Platform, ifdefs forCONFIG_SGI_IP22andCONFIG_SGI_IP32are missing, which can cause the definitions for these platforms to get included in builds for other platforms.
This patch adds these missing ifdefs, which matches IP27's Platform file.Signed-off-by Joshua Kinard <[email protected]>--- arch/mips/sgi-ip22/Platform | 8 +++++--- arch/mips/sgi-ip32/Platform | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-)arch/mips/sgi-ip22/Platform +2
-1@@ -7,7 +7,8 @@ # current variable will break so for 64-bit kernels we have to raise the start # address by 8kb. # -platform-$(CONFIG_SGI_IP22) += sgi-ip22/ +ifdef CONFIG_SGI_IP22 +platform-$(CONFIG_SGI_IP22) += sgi-ip22/ cflags-$(CONFIG_SGI_IP22) += -I$(srctree)/arch/mips/include/asm/mach-ip22 ifdef CONFIG_32BIT load-$(CONFIG_SGI_IP22) += 0xffffffff88002000
arch/mips/sgi-ip22/Platform endif · line 20
Quoted 5 lines
arch/mips/sgi-ip22/Platform +1
-0@@ -15,6 +16,7 @@ endif ifdef CONFIG_64BIT load-$(CONFIG_SGI_IP22) += 0xffffffff88004000 endif +endif
I could be wrong but isn't that functionally the same thing? As in, if CONFIG_SGI_IP22 is not enabled, the sgi-ip22 etc are not included. That's the same thing as the original code was doing no? Why do you need to hide all the $FOO-$(CONFIG_SGI_IP22) in a separate #ifdef block. What problem are you trying to solve?
Signature · 1 line
markos
Quoted 30 lines · Markos Chandras
Quoted 29 lines · Joshua Kinard
In
arch/mips/sgi-ip22/Platformandarch/mips/sgi-ip32/Platform, ifdefs forCONFIG_SGI_IP22andCONFIG_SGI_IP32are missing, which can cause the definitions for these platforms to get included in builds for other platforms.
This patch adds these missing ifdefs, which matches IP27's Platform file.Signed-off-by Joshua Kinard <[email protected]>--- arch/mips/sgi-ip22/Platform | 8 +++++--- arch/mips/sgi-ip32/Platform | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-)arch/mips/sgi-ip22/Platform +2
-1@@ -7,7 +7,8 @@ # current variable will break so for 64-bit kernels we have to raise the start # address by 8kb. # -platform-$(CONFIG_SGI_IP22) += sgi-ip22/ +ifdef CONFIG_SGI_IP22 +platform-$(CONFIG_SGI_IP22) += sgi-ip22/ cflags-$(CONFIG_SGI_IP22) += -I$(srctree)/arch/mips/include/asm/mach-ip22 ifdef CONFIG_32BIT load-$(CONFIG_SGI_IP22) += 0xffffffff88002000@@ -15,6 +16,7 @@ endif ifdef CONFIG_64BIT load-$(CONFIG_SGI_IP22) += 0xffffffff88004000 endif
Quoted 8 lines
arch/mips/sgi-ip22/Platform endif · line 20
Quoted 2 lines
arch/mips/sgi-ip22/Platform +1
-0+endifI could be wrong but isn't that functionally the same thing? As in, if
CONFIG_SGI_IP22is not enabled, the sgi-ip22 etc are not included. That's the same thing as the original code was doing no? Why do you need to hide all the $FOO-$(CONFIG_SGI_IP22) in a separate #ifdef block. What problem are you trying to solve?
That's what I thought, but one of my builds in 3.15 for Octane (IP30) was pulling in IP32's Platform file for some reason, which caused a build error. I could not figure it out. I played with building an IP27 kernel some, and figured out it wasn't affected, so after looking at its Platform file, I noticed the ifdef. Looking at IP32, that wasn't there, so I added it, and the build problem went away. I did the same for IP22 just for consistency.
I figure kbuild or make was just getting confused somewhere and globbing IP3*.
IP22 wouldn't be affected because IP27 has an ifdef present, but IP30 was
somehow affected because IP32 lacked the ifdef. No one else has probably run into it because IP30 isn't officially in the tree.
Signature · 9 lines
Joshua Kinard Gentoo/MIPS [email protected] 4096R/D25D95E3 2011-03-28 "The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between." --Emperor Turhan, Centauri Republic