linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v3 14/16] powerpc: Split synch.h in two parts
Date: Thu,  5 Jul 2018 16:25:17 +0000 (UTC)	[thread overview]
Message-ID: <d880539cae1cfb4b61cdea5aafc81af9493b194d.1530807556.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <cover.1530807556.git.christophe.leroy@c-s.fr>

move feature-fixups related stuff from synch.h to synch-ftr.h

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/include/asm/atomic.h                 |  1 +
 arch/powerpc/include/asm/barrier.h                |  1 +
 arch/powerpc/include/asm/bitops.h                 |  1 +
 arch/powerpc/include/asm/cmpxchg.h                |  1 +
 arch/powerpc/include/asm/spinlock.h               |  1 +
 arch/powerpc/include/asm/{synch.h => synch-ftr.h} | 22 +++--------------
 arch/powerpc/include/asm/synch.h                  | 30 -----------------------
 arch/powerpc/lib/feature-fixups-test.S            |  1 +
 8 files changed, 9 insertions(+), 49 deletions(-)
 copy arch/powerpc/include/asm/{synch.h => synch-ftr.h} (66%)

diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h
index cbdb0b7e60a3..49a929ec5435 100644
--- a/arch/powerpc/include/asm/atomic.h
+++ b/arch/powerpc/include/asm/atomic.h
@@ -11,6 +11,7 @@
 #include <asm/cmpxchg.h>
 #include <asm/barrier.h>
 #include <asm/asm-405.h>
+#include <asm/synch-ftr.h>
 
 #define ATOMIC_INIT(i)		{ (i) }
 
diff --git a/arch/powerpc/include/asm/barrier.h b/arch/powerpc/include/asm/barrier.h
index de1316874e45..d90a1463967b 100644
--- a/arch/powerpc/include/asm/barrier.h
+++ b/arch/powerpc/include/asm/barrier.h
@@ -6,6 +6,7 @@
 #define _ASM_POWERPC_BARRIER_H
 
 #include <asm/asm-const.h>
+#include <asm/synch-ftr.h>
 
 /*
  * Memory barrier.
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h
index ff71566dadee..b8bf2f5b75ce 100644
--- a/arch/powerpc/include/asm/bitops.h
+++ b/arch/powerpc/include/asm/bitops.h
@@ -44,6 +44,7 @@
 
 #include <linux/compiler.h>
 #include <asm/asm-compat.h>
+#include <asm/synch-ftr.h>
 #include <asm/synch.h>
 #include <asm/asm-405.h>
 
diff --git a/arch/powerpc/include/asm/cmpxchg.h b/arch/powerpc/include/asm/cmpxchg.h
index 27183871eb3b..d94a67a1a574 100644
--- a/arch/powerpc/include/asm/cmpxchg.h
+++ b/arch/powerpc/include/asm/cmpxchg.h
@@ -4,6 +4,7 @@
 
 #ifdef __KERNEL__
 #include <linux/compiler.h>
+#include <asm/synch-ftr.h>
 #include <asm/synch.h>
 #include <linux/bug.h>
 #include <asm/asm-405.h>
diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h
index 685c72310f5d..182f950a4c5d 100644
--- a/arch/powerpc/include/asm/spinlock.h
+++ b/arch/powerpc/include/asm/spinlock.h
@@ -24,6 +24,7 @@
 #include <asm/paca.h>
 #include <asm/hvcall.h>
 #endif
+#include <asm/synch-ftr.h>
 #include <asm/synch.h>
 #include <asm/ppc-opcode.h>
 #include <asm/asm-405.h>
diff --git a/arch/powerpc/include/asm/synch.h b/arch/powerpc/include/asm/synch-ftr.h
similarity index 66%
copy from arch/powerpc/include/asm/synch.h
copy to arch/powerpc/include/asm/synch-ftr.h
index aca70fb43147..f86c536bd351 100644
--- a/arch/powerpc/include/asm/synch.h
+++ b/arch/powerpc/include/asm/synch-ftr.h
@@ -1,27 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _ASM_POWERPC_SYNCH_H 
-#define _ASM_POWERPC_SYNCH_H 
+#ifndef _ASM_POWERPC_SYNCH_FTR_H
+#define _ASM_POWERPC_SYNCH_FTR_H
 #ifdef __KERNEL__
 
 #include <asm/feature-fixups.h>
 #include <asm/asm-const.h>
 
-#ifndef __ASSEMBLY__
-extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
-extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
-			     void *fixup_end);
-
-static inline void eieio(void)
-{
-	__asm__ __volatile__ ("eieio" : : : "memory");
-}
-
-static inline void isync(void)
-{
-	__asm__ __volatile__ ("isync" : : : "memory");
-}
-#endif /* __ASSEMBLY__ */
-
 #if defined(__powerpc64__)
 #    define LWSYNC	lwsync
 #elif defined(CONFIG_E500)
@@ -50,4 +34,4 @@ static inline void isync(void)
 #endif
 
 #endif /* __KERNEL__ */
-#endif	/* _ASM_POWERPC_SYNCH_H */
+#endif	/* _ASM_POWERPC_SYNCH_FTR_H */
diff --git a/arch/powerpc/include/asm/synch.h b/arch/powerpc/include/asm/synch.h
index aca70fb43147..48b23168ea9e 100644
--- a/arch/powerpc/include/asm/synch.h
+++ b/arch/powerpc/include/asm/synch.h
@@ -3,9 +3,6 @@
 #define _ASM_POWERPC_SYNCH_H 
 #ifdef __KERNEL__
 
-#include <asm/feature-fixups.h>
-#include <asm/asm-const.h>
-
 #ifndef __ASSEMBLY__
 extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
 extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
@@ -22,32 +19,5 @@ static inline void isync(void)
 }
 #endif /* __ASSEMBLY__ */
 
-#if defined(__powerpc64__)
-#    define LWSYNC	lwsync
-#elif defined(CONFIG_E500)
-#    define LWSYNC					\
-	START_LWSYNC_SECTION(96);			\
-	sync;						\
-	MAKE_LWSYNC_SECTION_ENTRY(96, __lwsync_fixup);
-#else
-#    define LWSYNC	sync
-#endif
-
-#ifdef CONFIG_SMP
-#define __PPC_ACQUIRE_BARRIER				\
-	START_LWSYNC_SECTION(97);			\
-	isync;						\
-	MAKE_LWSYNC_SECTION_ENTRY(97, __lwsync_fixup);
-#define PPC_ACQUIRE_BARRIER	 "\n" stringify_in_c(__PPC_ACQUIRE_BARRIER)
-#define PPC_RELEASE_BARRIER	 stringify_in_c(LWSYNC) "\n"
-#define PPC_ATOMIC_ENTRY_BARRIER "\n" stringify_in_c(sync) "\n"
-#define PPC_ATOMIC_EXIT_BARRIER	 "\n" stringify_in_c(sync) "\n"
-#else
-#define PPC_ACQUIRE_BARRIER
-#define PPC_RELEASE_BARRIER
-#define PPC_ATOMIC_ENTRY_BARRIER
-#define PPC_ATOMIC_EXIT_BARRIER
-#endif
-
 #endif /* __KERNEL__ */
 #endif	/* _ASM_POWERPC_SYNCH_H */
diff --git a/arch/powerpc/lib/feature-fixups-test.S b/arch/powerpc/lib/feature-fixups-test.S
index ee7c5fd5fc64..8c781b2e467b 100644
--- a/arch/powerpc/lib/feature-fixups-test.S
+++ b/arch/powerpc/lib/feature-fixups-test.S
@@ -10,6 +10,7 @@
 
 #include <asm/feature-fixups.h>
 #include <asm/ppc_asm.h>
+#include <asm/synch-ftr.h>
 #include <asm/synch.h>
 #include <asm/asm-compat.h>
 
-- 
2.13.3


  parent reply	other threads:[~2018-07-05 16:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 16:24 [PATCH v3 00/16] Remove unneccessary included headers Christophe Leroy
2018-07-05 16:24 ` [PATCH v3 01/16] powerpc: remove kdump.h from page.h Christophe Leroy
2018-08-01  5:24   ` [v3,01/16] " Michael Ellerman
2018-07-05 16:24 ` [PATCH v3 02/16] powerpc: remove unneeded inclusions of cpu_has_feature.h Christophe Leroy
2018-08-01  5:24   ` [v3,02/16] " Michael Ellerman
2018-07-05 16:24 ` [PATCH v3 03/16] powerpc/405: move PPC405_ERR77 in asm-405.h Christophe Leroy
2018-08-01  5:24   ` [v3,03/16] " Michael Ellerman
2018-07-05 16:24 ` [PATCH v3 04/16] powerpc: move ASM_CONST and stringify_in_c() into asm-const.h Christophe Leroy
2018-08-01  5:24   ` [v3, " Michael Ellerman
2018-07-05 16:24 ` [PATCH v3 05/16] powerpc: clean the inclusion of stringify.h Christophe Leroy
2018-08-01  5:24   ` [v3,05/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 06/16] powerpc: clean inclusions of asm/feature-fixups.h Christophe Leroy
2018-08-01  5:24   ` [v3,06/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 07/16] powerpc: remove superflous inclusions of asm/fixmap.h Christophe Leroy
2018-08-01  5:24   ` [v3,07/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 08/16] powerpc: declare set_breakpoint() static Christophe Leroy
2018-08-01  5:24   ` [v3,08/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 09/16] powerpc/book3s: Remove PPC_PIN_SIZE Christophe Leroy
2018-08-01  5:24   ` [v3,09/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 10/16] powerpc: fix includes in asm/processor.h Christophe Leroy
2018-08-01  5:24   ` [v3,10/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 11/16] powerpc/nohash: fix hash related comments in pgtable.h Christophe Leroy
2018-08-01  5:24   ` [v3,11/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 12/16] powerpc/44x: remove page.h from mmu-44x.h Christophe Leroy
2018-08-01  5:24   ` [v3,12/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 13/16] powerpc: split reg.h in two parts Christophe Leroy
2018-07-05 16:25 ` Christophe Leroy [this message]
2018-07-05 16:25 ` [PATCH v3 15/16] powerpc: remove unnecessary inclusion of asm/tlbflush.h Christophe Leroy
2018-08-01  5:24   ` [v3,15/16] " Michael Ellerman
2018-07-05 16:25 ` [PATCH v3 16/16] powerpc: split asm/tlbflush.h Christophe Leroy
2018-08-01  5:24   ` [v3,16/16] " Michael Ellerman

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=d880539cae1cfb4b61cdea5aafc81af9493b194d.1530807556.git.christophe.leroy@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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).