+ mm-move-cache_line_size-to-linux-cacheh.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     mm: move cache_line_size() to <linux/cache.h>
has been added to the -mm tree.  Its filename is
     mm-move-cache_line_size-to-linux-cacheh.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: mm: move cache_line_size() to <linux/cache.h>
From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>

Not all architectures define cache_line_size() so as suggested by Andrew move
the private implementations in mm/slab.c and mm/slob.c to <linux/cache.h>.

Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Reviewed-by: Christoph Lameter <clameter@xxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/x86/Kconfig      |    3 +++
 include/linux/cache.h |    4 ++++
 mm/slab.c             |    4 ----
 mm/slub.c             |    5 -----
 4 files changed, 7 insertions(+), 9 deletions(-)

diff -puN arch/x86/Kconfig~mm-move-cache_line_size-to-linux-cacheh arch/x86/Kconfig
--- a/arch/x86/Kconfig~mm-move-cache_line_size-to-linux-cacheh
+++ a/arch/x86/Kconfig
@@ -116,6 +116,9 @@ config GENERIC_TIME_VSYSCALL
 config ARCH_HAS_CPU_RELAX
 	def_bool y
 
+config ARCH_HAS_CACHE_LINE_SIZE
+	def_bool y
+
 config HAVE_SETUP_PER_CPU_AREA
 	def_bool X86_64
 
diff -puN include/linux/cache.h~mm-move-cache_line_size-to-linux-cacheh include/linux/cache.h
--- a/include/linux/cache.h~mm-move-cache_line_size-to-linux-cacheh
+++ a/include/linux/cache.h
@@ -60,4 +60,8 @@
 #endif
 #endif
 
+#ifndef CONFIG_ARCH_HAS_CACHE_LINE_SIZE
+#define cache_line_size()	L1_CACHE_BYTES
+#endif
+
 #endif /* __LINUX_CACHE_H */
diff -puN mm/slab.c~mm-move-cache_line_size-to-linux-cacheh mm/slab.c
--- a/mm/slab.c~mm-move-cache_line_size-to-linux-cacheh
+++ a/mm/slab.c
@@ -139,10 +139,6 @@
 #define	BYTES_PER_WORD		sizeof(void *)
 #define	REDZONE_ALIGN		max(BYTES_PER_WORD, __alignof__(unsigned long long))
 
-#ifndef cache_line_size
-#define cache_line_size()	L1_CACHE_BYTES
-#endif
-
 #ifndef ARCH_KMALLOC_MINALIGN
 /*
  * Enforce a minimum alignment for the kmalloc caches.
diff -puN mm/slub.c~mm-move-cache_line_size-to-linux-cacheh mm/slub.c
--- a/mm/slub.c~mm-move-cache_line_size-to-linux-cacheh
+++ a/mm/slub.c
@@ -189,11 +189,6 @@ static inline void ClearSlabDebug(struct
 #define __OBJECT_POISON		0x80000000 /* Poison object */
 #define __SYSFS_ADD_DEFERRED	0x40000000 /* Not yet visible via sysfs */
 
-/* Not all arches define cache_line_size */
-#ifndef cache_line_size
-#define cache_line_size()	L1_CACHE_BYTES
-#endif
-
 static int kmem_size = sizeof(struct kmem_cache);
 
 #ifdef CONFIG_SMP
_

Patches currently in -mm which might be from penberg@xxxxxxxxxxxxxx are

git-unionfs.patch
git-slub.patch
x86-cast-cmpxchg-and-cmpxchg_local-result-for-386-and-486.patch
slub-fix-possible-null-pointer-dereference.patch
slub-fix-possible-null-pointer-dereference-fix.patch
mm-move-cache_line_size-to-linux-cacheh.patch
fs-coda-remove-static-inline-forward-declarations.patch
documentation-patch-tags-one-more-time.patch
slab-leaks3-default-y.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux