]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sh: Consolidate slab/kmalloc minalign values.
authorPaul Mundt <lethal@linux-sh.org>
Sat, 10 Nov 2007 10:57:58 +0000 (19:57 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jan 2008 04:18:43 +0000 (13:18 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
include/asm-sh/page.h
include/asm-sh/uaccess_64.h

index d00a8fde7c7f82b965552342cbcef6d05b66bbae..d0273dbce6beb81b221f5311a3e8b946469a2dc6 100644 (file)
@@ -157,8 +157,22 @@ typedef struct { unsigned long pgd; } pgd_t;
  * Slub defaults to 8-byte alignment, we're only interested in 4.
  * Slab defaults to BYTES_PER_WORD, which ends up being the same anyways.
  */
+#ifdef CONFIG_SUPERH32
 #define ARCH_KMALLOC_MINALIGN  4
 #define ARCH_SLAB_MINALIGN     4
+#else
+/* If gcc inlines memset, it will use st.q instructions.  Therefore, we need
+   kmalloc allocations to be 8-byte aligned.  Without this, the alignment
+   becomes BYTE_PER_WORD i.e. only 4 (since sizeof(long)==sizeof(void*)==4 on
+   sh64 at the moment). */
+#define ARCH_KMALLOC_MINALIGN  8
+
+/*
+ * We want 8-byte alignment for the slab caches as well, otherwise we have
+ * the same BYTES_PER_WORD (sizeof(void *)) min align in kmem_cache_create().
+ */
+#define ARCH_SLAB_MINALIGN     8
+#endif
 
 #endif /* __KERNEL__ */
 #endif /* __ASM_SH_PAGE_H */
index 644c67b65f94596a208a3015f86ba6b37fc695ed..24800a8045ced78e399cfa3db53adc41a72878c9 100644 (file)
@@ -297,18 +297,6 @@ struct exception_table_entry
 
 #define ARCH_HAS_SEARCH_EXTABLE
 
-/* If gcc inlines memset, it will use st.q instructions.  Therefore, we need
-   kmalloc allocations to be 8-byte aligned.  Without this, the alignment
-   becomes BYTE_PER_WORD i.e. only 4 (since sizeof(long)==sizeof(void*)==4 on
-   sh64 at the moment). */
-#define ARCH_KMALLOC_MINALIGN 8
-
-/*
- * We want 8-byte alignment for the slab caches as well, otherwise we have
- * the same BYTES_PER_WORD (sizeof(void *)) min align in kmem_cache_create().
- */
-#define ARCH_SLAB_MINALIGN 8
-
 /* Returns 0 if exception not found and fixup.unit otherwise.  */
 extern unsigned long search_exception_table(unsigned long addr);
 extern const struct exception_table_entry *search_exception_tables (unsigned long addr);