All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20150722164943.GQ6650@arm.com>

diff --git a/a/1.txt b/N1/1.txt
index 2e9796a..406386c 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -27,141 +27,3 @@ So, leaving mmiowb() alone, we end up with the patch below.
 Will
 
 --->8
-
-From 9373a4226986dd69b6aaf896590ea43abeb1cc8e Mon Sep 17 00:00:00 2001
-From: Will Deacon <will.deacon@arm.com>
-Date: Wed, 22 Jul 2015 17:37:58 +0100
-Subject: [PATCH] powerpc: kill smp_mb__after_unlock_lock
-
-PowerPC is the only architecture defining smp_mb__after_unlock_lock,
-but we can remove it by adding an unconditional sync (smp_mb()) to the
-spin_unlock code.
-
-Signed-off-by: Will Deacon <will.deacon@arm.com>
----
- arch/powerpc/include/asm/io.h       | 13 +------------
- arch/powerpc/include/asm/spinlock.h | 22 +---------------------
- 2 files changed, 2 insertions(+), 33 deletions(-)
-
-diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
-index a8d2ef30d473..a3ad51046b04 100644
---- a/arch/powerpc/include/asm/io.h
-+++ b/arch/powerpc/include/asm/io.h
-@@ -105,12 +105,6 @@ extern bool isa_io_special;
-  *
-  */
- 
--#ifdef CONFIG_PPC64
--#define IO_SET_SYNC_FLAG()	do { local_paca->io_sync = 1; } while(0)
--#else
--#define IO_SET_SYNC_FLAG()
--#endif
--
- /* gcc 4.0 and older doesn't have 'Z' constraint */
- #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 0)
- #define DEF_MMIO_IN_X(name, size, insn)				\
-@@ -127,7 +121,6 @@ static inline void name(volatile u##size __iomem *addr, u##size val)	\
- {									\
- 	__asm__ __volatile__("sync;"#insn" %1,0,%2"			\
- 		: "=m" (*addr) : "r" (val), "r" (addr) : "memory");	\
--	IO_SET_SYNC_FLAG();						\
- }
- #else /* newer gcc */
- #define DEF_MMIO_IN_X(name, size, insn)				\
-@@ -144,7 +137,6 @@ static inline void name(volatile u##size __iomem *addr, u##size val)	\
- {									\
- 	__asm__ __volatile__("sync;"#insn" %1,%y0"			\
- 		: "=Z" (*addr) : "r" (val) : "memory");			\
--	IO_SET_SYNC_FLAG();						\
- }
- #endif
- 
-@@ -162,7 +154,6 @@ static inline void name(volatile u##size __iomem *addr, u##size val)	\
- {									\
- 	__asm__ __volatile__("sync;"#insn"%U0%X0 %1,%0"			\
- 		: "=m" (*addr) : "r" (val) : "memory");			\
--	IO_SET_SYNC_FLAG();						\
- }
- 
- DEF_MMIO_IN_D(in_8,     8, lbz);
-@@ -630,9 +621,7 @@ static inline void name at					\
- #define mmiowb()
- #else
- /*
-- * Enforce synchronisation of stores vs. spin_unlock
-- * (this does it explicitly, though our implementation of spin_unlock
-- * does it implicitely too)
-+ * Explicitly enforce synchronisation of stores vs. spin_unlock
-  */
- static inline void mmiowb(void)
- {
-diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h
-index 4dbe072eecbe..9da89ea4ff31 100644
---- a/arch/powerpc/include/asm/spinlock.h
-+++ b/arch/powerpc/include/asm/spinlock.h
-@@ -28,8 +28,6 @@
- #include <asm/synch.h>
- #include <asm/ppc-opcode.h>
- 
--#define smp_mb__after_unlock_lock()	smp_mb()  /* Full ordering for lock. */
--
- #ifdef CONFIG_PPC64
- /* use 0x800000yy when locked, where yy == CPU number */
- #ifdef __BIG_ENDIAN__
-@@ -41,19 +39,6 @@
- #define LOCK_TOKEN	1
- #endif
- 
--#if defined(CONFIG_PPC64) && defined(CONFIG_SMP)
--#define CLEAR_IO_SYNC	(get_paca()->io_sync = 0)
--#define SYNC_IO		do {						\
--				if (unlikely(get_paca()->io_sync)) {	\
--					mb();				\
--					get_paca()->io_sync = 0;	\
--				}					\
--			} while (0)
--#else
--#define CLEAR_IO_SYNC
--#define SYNC_IO
--#endif
--
- static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock)
- {
- 	return lock.slock == 0;
-@@ -91,7 +76,6 @@ static inline unsigned long __arch_spin_trylock(arch_spinlock_t *lock)
- 
- static inline int arch_spin_trylock(arch_spinlock_t *lock)
- {
--	CLEAR_IO_SYNC;
- 	return __arch_spin_trylock(lock) == 0;
- }
- 
-@@ -122,7 +106,6 @@ extern void __rw_yield(arch_rwlock_t *lock);
- 
- static inline void arch_spin_lock(arch_spinlock_t *lock)
- {
--	CLEAR_IO_SYNC;
- 	while (1) {
- 		if (likely(__arch_spin_trylock(lock) == 0))
- 			break;
-@@ -140,7 +123,6 @@ void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)
- {
- 	unsigned long flags_dis;
- 
--	CLEAR_IO_SYNC;
- 	while (1) {
- 		if (likely(__arch_spin_trylock(lock) == 0))
- 			break;
-@@ -158,9 +140,7 @@ void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)
- 
- static inline void arch_spin_unlock(arch_spinlock_t *lock)
- {
--	SYNC_IO;
--	__asm__ __volatile__("# arch_spin_unlock\n\t"
--				PPC_RELEASE_BARRIER: : :"memory");
-+	smp_mb();
- 	lock->slock = 0;
- }
- 
--- 
-2.1.4
diff --git a/a/content_digest b/N1/content_digest
index 4f26969..1573e24 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -47,144 +47,6 @@
  "\n"
  "Will\n"
  "\n"
- "--->8\n"
- "\n"
- "From 9373a4226986dd69b6aaf896590ea43abeb1cc8e Mon Sep 17 00:00:00 2001\n"
- "From: Will Deacon <will.deacon@arm.com>\n"
- "Date: Wed, 22 Jul 2015 17:37:58 +0100\n"
- "Subject: [PATCH] powerpc: kill smp_mb__after_unlock_lock\n"
- "\n"
- "PowerPC is the only architecture defining smp_mb__after_unlock_lock,\n"
- "but we can remove it by adding an unconditional sync (smp_mb()) to the\n"
- "spin_unlock code.\n"
- "\n"
- "Signed-off-by: Will Deacon <will.deacon@arm.com>\n"
- "---\n"
- " arch/powerpc/include/asm/io.h       | 13 +------------\n"
- " arch/powerpc/include/asm/spinlock.h | 22 +---------------------\n"
- " 2 files changed, 2 insertions(+), 33 deletions(-)\n"
- "\n"
- "diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h\n"
- "index a8d2ef30d473..a3ad51046b04 100644\n"
- "--- a/arch/powerpc/include/asm/io.h\n"
- "+++ b/arch/powerpc/include/asm/io.h\n"
- "@@ -105,12 +105,6 @@ extern bool isa_io_special;\n"
- "  *\n"
- "  */\n"
- " \n"
- "-#ifdef CONFIG_PPC64\n"
- "-#define IO_SET_SYNC_FLAG()\tdo { local_paca->io_sync = 1; } while(0)\n"
- "-#else\n"
- "-#define IO_SET_SYNC_FLAG()\n"
- "-#endif\n"
- "-\n"
- " /* gcc 4.0 and older doesn't have 'Z' constraint */\n"
- " #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 0)\n"
- " #define DEF_MMIO_IN_X(name, size, insn)\t\t\t\t\\\n"
- "@@ -127,7 +121,6 @@ static inline void name(volatile u##size __iomem *addr, u##size val)\t\\\n"
- " {\t\t\t\t\t\t\t\t\t\\\n"
- " \t__asm__ __volatile__(\"sync;\"#insn\" %1,0,%2\"\t\t\t\\\n"
- " \t\t: \"=m\" (*addr) : \"r\" (val), \"r\" (addr) : \"memory\");\t\\\n"
- "-\tIO_SET_SYNC_FLAG();\t\t\t\t\t\t\\\n"
- " }\n"
- " #else /* newer gcc */\n"
- " #define DEF_MMIO_IN_X(name, size, insn)\t\t\t\t\\\n"
- "@@ -144,7 +137,6 @@ static inline void name(volatile u##size __iomem *addr, u##size val)\t\\\n"
- " {\t\t\t\t\t\t\t\t\t\\\n"
- " \t__asm__ __volatile__(\"sync;\"#insn\" %1,%y0\"\t\t\t\\\n"
- " \t\t: \"=Z\" (*addr) : \"r\" (val) : \"memory\");\t\t\t\\\n"
- "-\tIO_SET_SYNC_FLAG();\t\t\t\t\t\t\\\n"
- " }\n"
- " #endif\n"
- " \n"
- "@@ -162,7 +154,6 @@ static inline void name(volatile u##size __iomem *addr, u##size val)\t\\\n"
- " {\t\t\t\t\t\t\t\t\t\\\n"
- " \t__asm__ __volatile__(\"sync;\"#insn\"%U0%X0 %1,%0\"\t\t\t\\\n"
- " \t\t: \"=m\" (*addr) : \"r\" (val) : \"memory\");\t\t\t\\\n"
- "-\tIO_SET_SYNC_FLAG();\t\t\t\t\t\t\\\n"
- " }\n"
- " \n"
- " DEF_MMIO_IN_D(in_8,     8, lbz);\n"
- "@@ -630,9 +621,7 @@ static inline void name at\t\t\t\t\t\\\n"
- " #define mmiowb()\n"
- " #else\n"
- " /*\n"
- "- * Enforce synchronisation of stores vs. spin_unlock\n"
- "- * (this does it explicitly, though our implementation of spin_unlock\n"
- "- * does it implicitely too)\n"
- "+ * Explicitly enforce synchronisation of stores vs. spin_unlock\n"
- "  */\n"
- " static inline void mmiowb(void)\n"
- " {\n"
- "diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm/spinlock.h\n"
- "index 4dbe072eecbe..9da89ea4ff31 100644\n"
- "--- a/arch/powerpc/include/asm/spinlock.h\n"
- "+++ b/arch/powerpc/include/asm/spinlock.h\n"
- "@@ -28,8 +28,6 @@\n"
- " #include <asm/synch.h>\n"
- " #include <asm/ppc-opcode.h>\n"
- " \n"
- "-#define smp_mb__after_unlock_lock()\tsmp_mb()  /* Full ordering for lock. */\n"
- "-\n"
- " #ifdef CONFIG_PPC64\n"
- " /* use 0x800000yy when locked, where yy == CPU number */\n"
- " #ifdef __BIG_ENDIAN__\n"
- "@@ -41,19 +39,6 @@\n"
- " #define LOCK_TOKEN\t1\n"
- " #endif\n"
- " \n"
- "-#if defined(CONFIG_PPC64) && defined(CONFIG_SMP)\n"
- "-#define CLEAR_IO_SYNC\t(get_paca()->io_sync = 0)\n"
- "-#define SYNC_IO\t\tdo {\t\t\t\t\t\t\\\n"
- "-\t\t\t\tif (unlikely(get_paca()->io_sync)) {\t\\\n"
- "-\t\t\t\t\tmb();\t\t\t\t\\\n"
- "-\t\t\t\t\tget_paca()->io_sync = 0;\t\\\n"
- "-\t\t\t\t}\t\t\t\t\t\\\n"
- "-\t\t\t} while (0)\n"
- "-#else\n"
- "-#define CLEAR_IO_SYNC\n"
- "-#define SYNC_IO\n"
- "-#endif\n"
- "-\n"
- " static __always_inline int arch_spin_value_unlocked(arch_spinlock_t lock)\n"
- " {\n"
- " \treturn lock.slock == 0;\n"
- "@@ -91,7 +76,6 @@ static inline unsigned long __arch_spin_trylock(arch_spinlock_t *lock)\n"
- " \n"
- " static inline int arch_spin_trylock(arch_spinlock_t *lock)\n"
- " {\n"
- "-\tCLEAR_IO_SYNC;\n"
- " \treturn __arch_spin_trylock(lock) == 0;\n"
- " }\n"
- " \n"
- "@@ -122,7 +106,6 @@ extern void __rw_yield(arch_rwlock_t *lock);\n"
- " \n"
- " static inline void arch_spin_lock(arch_spinlock_t *lock)\n"
- " {\n"
- "-\tCLEAR_IO_SYNC;\n"
- " \twhile (1) {\n"
- " \t\tif (likely(__arch_spin_trylock(lock) == 0))\n"
- " \t\t\tbreak;\n"
- "@@ -140,7 +123,6 @@ void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)\n"
- " {\n"
- " \tunsigned long flags_dis;\n"
- " \n"
- "-\tCLEAR_IO_SYNC;\n"
- " \twhile (1) {\n"
- " \t\tif (likely(__arch_spin_trylock(lock) == 0))\n"
- " \t\t\tbreak;\n"
- "@@ -158,9 +140,7 @@ void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags)\n"
- " \n"
- " static inline void arch_spin_unlock(arch_spinlock_t *lock)\n"
- " {\n"
- "-\tSYNC_IO;\n"
- "-\t__asm__ __volatile__(\"# arch_spin_unlock\\n\\t\"\n"
- "-\t\t\t\tPPC_RELEASE_BARRIER: : :\"memory\");\n"
- "+\tsmp_mb();\n"
- " \tlock->slock = 0;\n"
- " }\n"
- " \n"
- "-- \n"
- 2.1.4
+ --->8
 
-ce6278c3d628cef39b109de22bf8db558b11ca0a79f15b1e5365ecd7115b76f0
+cba8ffd900a22694c9689edeaec0956913a793275713639e5be41d2c3feb113f

diff --git a/a/1.txt b/N2/1.txt
index 2e9796a..a08a8e7 100644
--- a/a/1.txt
+++ b/N2/1.txt
@@ -28,7 +28,7 @@ Will
 
 --->8
 
-From 9373a4226986dd69b6aaf896590ea43abeb1cc8e Mon Sep 17 00:00:00 2001
+>From 9373a4226986dd69b6aaf896590ea43abeb1cc8e Mon Sep 17 00:00:00 2001
 From: Will Deacon <will.deacon@arm.com>
 Date: Wed, 22 Jul 2015 17:37:58 +0100
 Subject: [PATCH] powerpc: kill smp_mb__after_unlock_lock
diff --git a/a/content_digest b/N2/content_digest
index 4f26969..56f91f8 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -49,7 +49,7 @@
  "\n"
  "--->8\n"
  "\n"
- "From 9373a4226986dd69b6aaf896590ea43abeb1cc8e Mon Sep 17 00:00:00 2001\n"
+ ">From 9373a4226986dd69b6aaf896590ea43abeb1cc8e Mon Sep 17 00:00:00 2001\n"
  "From: Will Deacon <will.deacon@arm.com>\n"
  "Date: Wed, 22 Jul 2015 17:37:58 +0100\n"
  "Subject: [PATCH] powerpc: kill smp_mb__after_unlock_lock\n"
@@ -187,4 +187,4 @@
  "-- \n"
  2.1.4
 
-ce6278c3d628cef39b109de22bf8db558b11ca0a79f15b1e5365ecd7115b76f0
+b9a3c9fd78adca9938584c7f1f2b6ccd31796e30ce0d4ede9a25c56593d8b44a

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.