linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] MIPS: Add ifdefs to IP22/IP32's Platform files
@ 2017-01-29  4:08 Joshua Kinard
  0 siblings, 0 replies; only message in thread
From: Joshua Kinard @ 2017-01-29  4:08 UTC (permalink / raw)
  To: Ralf Baechle, Maciej W. Rozycki; +Cc: Linux/MIPS

From: Joshua Kinard <kumba@gentoo.org>

Prevent IP22/IP32's Platform directives from mixing into builds of
other MIPS platforms.  The IP27 Platform file wraps its directives in
an ifdef block, but the IP22 and IP32 Platform files do not.  This can
lead to the possibility of directives for IP22 or IP32 getting mixed
into the builds of other MIPS platforms.

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
---
Changes in v2: Re-write the patch description and re-diff the patch
against the correct local branch in git.

---
 arch/mips/sgi-ip22/Platform |    8 +++++---
 arch/mips/sgi-ip32/Platform |    2 ++
 2 files changed, 7 insertions(+), 3 deletions(-)

linux-mips-4.10-add-platform-ifdefs.patch
diff --git a/arch/mips/sgi-ip22/Platform b/arch/mips/sgi-ip22/Platform
index b7a4b7e04c38..5fa3c7a107bd 100644
--- a/arch/mips/sgi-ip22/Platform
+++ b/arch/mips/sgi-ip22/Platform
@@ -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
diff --git a/arch/mips/sgi-ip32/Platform b/arch/mips/sgi-ip32/Platform
index 0fea556f3641..9097238fc0fc 100644
--- a/arch/mips/sgi-ip32/Platform
+++ b/arch/mips/sgi-ip32/Platform
@@ -6,6 +6,8 @@
 # a multiple of the kernel stack size or the handling of the current variable
 # will break.
 #
+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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-29  4:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-29  4:08 [PATCH v2] MIPS: Add ifdefs to IP22/IP32's Platform files Joshua Kinard

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).