Title: [8238] trunk: Define ARCH_FLAT_DATA_ALIGN for Blackfin and use it instead of ARCH_SLAB_MINALIGN.
- Revision
- 8238
- Author
- jiez
- Date
- 2010-01-26 19:44:33 -0500 (Tue, 26 Jan 2010)
Log Message
Define ARCH_FLAT_DATA_ALIGN for Blackfin and use it instead of ARCH_SLAB_MINALIGN.
Modified Paths
Diff
Modified: trunk/arch/blackfin/include/asm/cache.h (8237 => 8238)
--- trunk/arch/blackfin/include/asm/cache.h 2010-01-26 15:56:14 UTC (rev 8237)
+++ trunk/arch/blackfin/include/asm/cache.h 2010-01-27 00:44:33 UTC (rev 8238)
@@ -63,7 +63,4 @@
#endif
#endif
-/* binfmt_flat.c uses this to align data section. */
-#define ARCH_SLAB_MINALIGN 8
-
#endif
Modified: trunk/arch/blackfin/include/asm/flat.h (8237 => 8238)
--- trunk/arch/blackfin/include/asm/flat.h 2010-01-26 15:56:14 UTC (rev 8237)
+++ trunk/arch/blackfin/include/asm/flat.h 2010-01-27 00:44:33 UTC (rev 8238)
@@ -11,6 +11,8 @@
#include <asm/unaligned.h>
+#define ARCH_FLAT_DATA_ALIGN 0x20
+
#define flat_argvp_envp_on_stack() 0
#define flat_old_ram_flag(flags) (flags)
Modified: trunk/fs/binfmt_flat.c (8237 => 8238)
--- trunk/fs/binfmt_flat.c 2010-01-26 15:56:14 UTC (rev 8237)
+++ trunk/fs/binfmt_flat.c 2010-01-27 00:44:33 UTC (rev 8238)
@@ -57,12 +57,17 @@
#endif
/*
- * User data (stack, data section and bss) needs to be aligned
- * for the same reasons as SLAB memory is, and to the same amount.
+ * User data (stack, data section and bss) needs to be aligned.
+ * If ARCH_FLAT_DATA_ALIGN is defined, use it.
+ */
+#ifdef ARCH_FLAT_DATA_ALIGN
+#define FLAT_DATA_ALIGN (ARCH_FLAT_DATA_ALIGN)
+/* Otherwise user data nees to be aligned for the same reasons
+ * as SLAB memory is aligned, and to the same amount.
* Avoid duplicating architecture specific code by using the same
* macro as with SLAB allocation:
*/
-#ifdef ARCH_SLAB_MINALIGN
+#elif defined(ARCH_SLAB_MINALIGN)
#define FLAT_DATA_ALIGN (ARCH_SLAB_MINALIGN)
#else
#define FLAT_DATA_ALIGN (sizeof(void *))
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits