]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Add thread_info_cache_init() weak hook
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 18 Apr 2008 06:56:15 +0000 (16:56 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 24 Apr 2008 10:57:33 +0000 (20:57 +1000)
Some architectures need to maintain a kmem cache for thread info
structures.  The next commit adds that to powerpc to fix an alignment
problem.

There is no good arch callback to use to initialize that cache
that I can find, so this adds a new one in the form of a weak
function whose default is empty.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
include/linux/sched.h
init/main.c

index 311380e5fe8915a1d85f6999f524bcd4330f0141..d0bd97044abd67ce71411e9c7a061dc2adc3b386 100644 (file)
@@ -1926,6 +1926,8 @@ static inline unsigned long *end_of_stack(struct task_struct *p)
 
 #endif
 
+extern void thread_info_cache_init(void);
+
 /* set thread flags in other task's structures
  * - see asm/thread_info.h for TIF_xxxx flags available
  */
index 833a67df1f7e06c121c4b9b982893592ca7219df..507c9fba03bb16d8c4d3f37699364a881741acd7 100644 (file)
@@ -525,6 +525,10 @@ void __init __attribute__((weak)) smp_setup_processor_id(void)
 {
 }
 
+void __init __weak thread_info_cache_init(void)
+{
+}
+
 asmlinkage void __init start_kernel(void)
 {
        char * command_line;
@@ -645,6 +649,7 @@ asmlinkage void __init start_kernel(void)
        if (efi_enabled)
                efi_enter_virtual_mode();
 #endif
+       thread_info_cache_init();
        fork_init(num_physpages);
        proc_caches_init();
        buffer_init();