Skip to contentSkip to conversation

Remove CONFIG_DCACHE_WORD_ACCESS

RFC PATCH In review Joe Perches 2 participants 3 messages Mar 4, 2014 – Mar 26, 2014

Subsystems (5)
Arm (32-bit) x86 VFS arm64 +1 more subsystems
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 Remove CONFIG_DCACHE_WORD_ACCESS

It seems to duplicate CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS so use that instead.

This changes the !CPU_LITTLE_ENDIAN powerpc arch to use unaligned accesses in fs/dcache.c and fs/namei.c as CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is enabled for that arch.

Remove the now unused DCACHE_WORD_ACCESS defines & uses.

---
 arch/arm/Kconfig                      | 1 -
 arch/arm/include/asm/word-at-a-time.h | 4 ++--
 arch/arm64/Kconfig                    | 1 -
 arch/x86/Kconfig                      | 1 -
 fs/Kconfig                            | 4 ----
 fs/dcache.c                           | 2 +-
 fs/namei.c                            | 2 +-
 7 files changed, 4 insertions(+), 11 deletions(-)
arch/arm/Kconfig +0 -1
index 623a272..d5a2e60 100644
@@ -12,7 +12,6 @@ config ARM
 	select BUILDTIME_EXTABLE_SORT if MMU
 	select CLONE_BACKWARDS
 	select CPU_PM if (SUSPEND || CPU_IDLE)
-	select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
 	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GENERIC_IDLE_POLL_SETUP
arch/arm/include/asm/word-at-a-time.h +2 -2
index a6d0a29..778b2ad 100644
@@ -54,7 +54,7 @@ static inline unsigned long find_zero(unsigned long mask)
 #include <asm-generic/word-at-a-time.h>
 #endif
 
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 /*
  * Load an unaligned word from kernel space.
@@ -94,5 +94,5 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
 	return ret;
 }
 
-#endif	/* DCACHE_WORD_ACCESS */
+#endif	/* HAVE_EFFICIENT_UNALIGNED_ACCESS */
 #endif /* __ASM_ARM_WORD_AT_A_TIME_H */
arch/arm64/Kconfig +0 -1
index 764d682..2d6978c 100644
@@ -13,7 +13,6 @@ config ARM64
 	select CLONE_BACKWARDS
 	select COMMON_CLK
 	select CPU_PM if (SUSPEND || CPU_IDLE)
-	select DCACHE_WORD_ACCESS
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GENERIC_IOMAP
arch/x86/Kconfig +0 -1
index abb261e..60cfa073 100644
@@ -98,7 +98,6 @@ config X86
 	select CLKEVT_I8253
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_IOMAP
-	select DCACHE_WORD_ACCESS
 	select GENERIC_SMP_IDLE_THREAD
 	select ARCH_WANT_IPC_PARSE_VERSION if X86_32
 	select HAVE_ARCH_SECCOMP_FILTER
fs/Kconfig +0 -4
index 312393f..7511271 100644
@@ -4,10 +4,6 @@
 
 menu "File systems"
 
-# Use unaligned word dcache accesses
-config DCACHE_WORD_ACCESS
-       bool
-
 if BLOCK
 
 source "fs/ext2/Kconfig"
fs/dcache.c +1 -1
index 265e0ce..4e3c195 100644
@@ -163,7 +163,7 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer,
  * Compare 2 name strings, return 0 if they match, otherwise non-zero.
  * The strings are both count bytes long, and count is non-zero.
  */
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 #include <asm/word-at-a-time.h>
 /*
fs/namei.c +1 -1
index 385f781..1ee33ca 100644
@@ -1618,7 +1618,7 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
  *   the final mask". Again, that could be replaced with a
  *   efficient population count instruction or similar.
  */
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 #include <asm/word-at-a-time.h>
 
#1 lore raw
Quoted 8 lines · Joe Perches

It seems to duplicate CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS so use that instead.

This changes the !CPU_LITTLE_ENDIAN powerpc arch to use unaligned accesses in fs/dcache.c and fs/namei.c as CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is enabled for that arch.

Remove the now unused DCACHE_WORD_ACCESS defines & uses.

Interesting.. we have word-at-a-time but we never enabled DCACHE_WORD_ACCESS, I wonder why that is. In fact, we should probably do it for LE as well for P8 if we can make a P8 only config option...

Anton, what do you reckon here ?

Cheers,
Ben.

Quoted 111 lines
---
 arch/arm/Kconfig                      | 1 -
 arch/arm/include/asm/word-at-a-time.h | 4 ++--
 arch/arm64/Kconfig                    | 1 -
 arch/x86/Kconfig                      | 1 -
 fs/Kconfig                            | 4 ----
 fs/dcache.c                           | 2 +-
 fs/namei.c                            | 2 +-
 7 files changed, 4 insertions(+), 11 deletions(-)
arch/arm/Kconfig +0 -1
index 623a272..d5a2e60 100644
@@ -12,7 +12,6 @@ config ARM
 	select BUILDTIME_EXTABLE_SORT if MMU
 	select CLONE_BACKWARDS
 	select CPU_PM if (SUSPEND || CPU_IDLE)
-	select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
 	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GENERIC_IDLE_POLL_SETUP
arch/arm/include/asm/word-at-a-time.h +2 -2
index a6d0a29..778b2ad 100644
@@ -54,7 +54,7 @@ static inline unsigned long find_zero(unsigned long mask)
 #include <asm-generic/word-at-a-time.h>
 #endif
 
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 /*
  * Load an unaligned word from kernel space.
@@ -94,5 +94,5 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
 	return ret;
 }
 
-#endif	/* DCACHE_WORD_ACCESS */
+#endif	/* HAVE_EFFICIENT_UNALIGNED_ACCESS */
 #endif /* __ASM_ARM_WORD_AT_A_TIME_H */
arch/arm64/Kconfig +0 -1
index 764d682..2d6978c 100644
@@ -13,7 +13,6 @@ config ARM64
 	select CLONE_BACKWARDS
 	select COMMON_CLK
 	select CPU_PM if (SUSPEND || CPU_IDLE)
-	select DCACHE_WORD_ACCESS
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GENERIC_IOMAP
arch/x86/Kconfig +0 -1
index abb261e..60cfa073 100644
@@ -98,7 +98,6 @@ config X86
 	select CLKEVT_I8253
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_IOMAP
-	select DCACHE_WORD_ACCESS
 	select GENERIC_SMP_IDLE_THREAD
 	select ARCH_WANT_IPC_PARSE_VERSION if X86_32
 	select HAVE_ARCH_SECCOMP_FILTER
fs/Kconfig +0 -4
index 312393f..7511271 100644
@@ -4,10 +4,6 @@
 
 menu "File systems"
 
-# Use unaligned word dcache accesses
-config DCACHE_WORD_ACCESS
-       bool
-
 if BLOCK
 
 source "fs/ext2/Kconfig"
fs/dcache.c +1 -1
index 265e0ce..4e3c195 100644
@@ -163,7 +163,7 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer,
  * Compare 2 name strings, return 0 if they match, otherwise non-zero.
  * The strings are both count bytes long, and count is non-zero.
  */
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 #include <asm/word-at-a-time.h>
 /*
fs/namei.c +1 -2
index 385f781..1ee33ca 100644
@@ -1618,7 +1618,7 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
  *   the final mask". Again, that could be replaced with a
  *   efficient population count instruction or similar.
  */
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 #include <asm/word-at-a-time.h>
 
 
 
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev

#2 lore raw
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 7 lines · Joe Perches

It seems to duplicate CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS so use that instead.

This changes the !CPU_LITTLE_ENDIAN powerpc arch to use unaligned accesses in fs/dcache.c and fs/namei.c as CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is enabled for that arch.

Quoted 8 lines
Quoted 1 line

Remove the now unused DCACHE_WORD_ACCESS defines & uses.

Interesting.. we have word-at-a-time but we never enabled DCACHE_WORD_ACCESS, I wonder why that is. In fact, we should probably do it for LE as well for P8 if we can make a P8 only config option...

Anton, what do you reckon here ?

Anton, do you have an opinion here?

Quoted 110 lines

Cheers,
Ben.

Quoted 107 lines
---
 arch/arm/Kconfig                      | 1 -
 arch/arm/include/asm/word-at-a-time.h | 4 ++--
 arch/arm64/Kconfig                    | 1 -
 arch/x86/Kconfig                      | 1 -
 fs/Kconfig                            | 4 ----
 fs/dcache.c                           | 2 +-
 fs/namei.c                            | 2 +-
 7 files changed, 4 insertions(+), 11 deletions(-)
arch/arm/Kconfig +0 -1
index 623a272..d5a2e60 100644
@@ -12,7 +12,6 @@ config ARM
 	select BUILDTIME_EXTABLE_SORT if MMU
 	select CLONE_BACKWARDS
 	select CPU_PM if (SUSPEND || CPU_IDLE)
-	select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS
 	select GENERIC_ATOMIC64 if (CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI)
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GENERIC_IDLE_POLL_SETUP
arch/arm/include/asm/word-at-a-time.h +2 -2
index a6d0a29..778b2ad 100644
@@ -54,7 +54,7 @@ static inline unsigned long find_zero(unsigned long mask)
 #include <asm-generic/word-at-a-time.h>
 #endif
 
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 /*
  * Load an unaligned word from kernel space.
@@ -94,5 +94,5 @@ static inline unsigned long load_unaligned_zeropad(const void *addr)
 	return ret;
 }
 
-#endif	/* DCACHE_WORD_ACCESS */
+#endif	/* HAVE_EFFICIENT_UNALIGNED_ACCESS */
 #endif /* __ASM_ARM_WORD_AT_A_TIME_H */
arch/arm64/Kconfig +0 -1
index 764d682..2d6978c 100644
@@ -13,7 +13,6 @@ config ARM64
 	select CLONE_BACKWARDS
 	select COMMON_CLK
 	select CPU_PM if (SUSPEND || CPU_IDLE)
-	select DCACHE_WORD_ACCESS
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_CLOCKEVENTS_BROADCAST if SMP
 	select GENERIC_IOMAP
arch/x86/Kconfig +0 -1
index abb261e..60cfa073 100644
@@ -98,7 +98,6 @@ config X86
 	select CLKEVT_I8253
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG
 	select GENERIC_IOMAP
-	select DCACHE_WORD_ACCESS
 	select GENERIC_SMP_IDLE_THREAD
 	select ARCH_WANT_IPC_PARSE_VERSION if X86_32
 	select HAVE_ARCH_SECCOMP_FILTER
fs/Kconfig +0 -4
index 312393f..7511271 100644
@@ -4,10 +4,6 @@
 
 menu "File systems"
 
-# Use unaligned word dcache accesses
-config DCACHE_WORD_ACCESS
-       bool
-
 if BLOCK
 
 source "fs/ext2/Kconfig"
fs/dcache.c +1 -1
index 265e0ce..4e3c195 100644
@@ -163,7 +163,7 @@ int proc_nr_dentry(ctl_table *table, int write, void __user *buffer,
  * Compare 2 name strings, return 0 if they match, otherwise non-zero.
  * The strings are both count bytes long, and count is non-zero.
  */
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 #include <asm/word-at-a-time.h>
 /*
fs/namei.c +1 -1
index 385f781..1ee33ca 100644
@@ -1618,7 +1618,7 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd)
  *   the final mask". Again, that could be replaced with a
  *   efficient population count instruction or similar.
  */
-#ifdef CONFIG_DCACHE_WORD_ACCESS
+#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 
 #include <asm/word-at-a-time.h>