From: Joshua Kinard <kumba@gentoo.org>
To: Ralf Baechle <ralf@linux-mips.org>,
"Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Linux/MIPS <linux-mips@linux-mips.org>
Subject: [PATCH] MIPS: Add ifdefs to IP22/IP32's Platform files
Date: Sat, 28 Jan 2017 22:38:59 -0500 [thread overview]
Message-ID: <b290b37d-b136-0766-44ce-a094b336779a@gentoo.org> (raw)
From: Joshua Kinard <kumba@gentoo.org>
Prevent IP22/IP32's Platform directives from mixing into builds of
other MIPS platforms. During a recent IP27 build, erroneous R10K
cache barrier instructions were being emitted before every load or
store instruction. This was caused by IP27 accidentally picking up
the -mr10k-cache-barrier option from arch/mips/sgi-ip32/Platform.
By wrapping the directives in both IP22 and IP32's Platform file
inside an 'ifdef' block, as is already done in IP27's Platform file,
this prevents the R10K cache barriers from being emitted on platforms
where they are not needed.
Signed-off-by: Joshua Kinard <kumba@gentoo.org>
---
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 589930560088..7db2c1f05d89 100644
--- a/arch/mips/sgi-ip32/Platform
+++ b/arch/mips/sgi-ip32/Platform
@@ -6,8 +6,10 @@
# 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
cflags-$(CONFIG_CPU_R10000) += -mr10k-cache-barrier=load-store
cflags-$(CONFIG_CPU_R12K_R14K_R16K) += -mno-fix-r10000 -mr10k-cache-barrier=load-store
load-$(CONFIG_SGI_IP32) += 0xffffffff80004000
+endif
next reply other threads:[~2017-01-29 3:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-29 3:38 Joshua Kinard [this message]
2017-01-29 4:00 ` [PATCH] MIPS: Add ifdefs to IP22/IP32's Platform files Joshua Kinard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b290b37d-b136-0766-44ce-a094b336779a@gentoo.org \
--to=kumba@gentoo.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).