summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-30 00:51:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-30 00:51:54 -0700
commit978b7ac2c3ef8984c2d7473e21f8dec772cfb147 (patch)
tree042569568660b3f83fa519fb4abc5947c971484d /kernel/fork.c
parent5d3c500bc7ad03ec118c66bca735fd93fc7e804e (diff)
[PATCH] task_struct alignment fix
The recent slab alignment changes broke an unknown number of architectures (parisc and x86_64 for sure) by causing task_structs to be insufficiently aligned. We need good alignemnt because architectures do things like dumping FP state into the task_struct with instructions which require particular alignment (I think). So change the default alignment to L1_CACHE_BYTES, which is what we used to have, via SLAB_HW_CACHE_ALIGN.
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 4f5b018777d8..68597bc347f2 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -211,7 +211,7 @@ void __init fork_init(unsigned long mempages)
{
#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
#ifndef ARCH_MIN_TASKALIGN
-#define ARCH_MIN_TASKALIGN 0
+#define ARCH_MIN_TASKALIGN L1_CACHE_BYTES
#endif
/* create a slab on which task_structs can be allocated */
task_struct_cachep =