sparc32: use the common implementation of alloc_thread_info_node()
authorSam Ravnborg <sam@ravnborg.org>
Tue, 22 May 2012 14:39:00 +0000 (16:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 May 2012 19:02:56 +0000 (12:02 -0700)
With sun4c removed we can fall-back to the common implementation.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/Kconfig
arch/sparc/include/asm/thread_info_32.h
arch/sparc/mm/srmmu.c

index 1ea3fd9..051af37 100644 (file)
@@ -37,7 +37,6 @@ config SPARC32
        def_bool !64BIT
        select GENERIC_ATOMIC64
        select CLZ_TAB
-       select ARCH_THREAD_INFO_ALLOCATOR
 
 config SPARC64
        def_bool 64BIT
index 21a3894..5af6649 100644 (file)
@@ -77,18 +77,11 @@ register struct thread_info *current_thread_info_reg asm("g6");
 /*
  * thread information allocation
  */
-#define THREAD_INFO_ORDER  1
-
-struct thread_info * alloc_thread_info_node(struct task_struct *tsk, int node);
-void free_thread_info(struct thread_info *);
+#define THREAD_SIZE_ORDER  1
 
 #endif /* __ASSEMBLY__ */
 
-/*
- * Size of kernel stack for each process.
- * Observe the order of get_free_pages() in alloc_thread_info_node().
- * The sun4 has 8K stack too, because it's short on memory, and 16K is a waste.
- */
+/* Size of kernel stack for each process */
 #define THREAD_SIZE            (2 * PAGE_SIZE)
 
 /*
index 8e97e03..256db6b 100644 (file)
@@ -467,33 +467,6 @@ void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len)
        flush_tlb_all();
 }
 
-/*
- * On the SRMMU we do not have the problems with limited tlb entries
- * for mapping kernel pages, so we just take things from the free page
- * pool.  As a side effect we are putting a little too much pressure
- * on the gfp() subsystem.  This setup also makes the logic of the
- * iommu mapping code a lot easier as we can transparently handle
- * mappings on the kernel stack without any special code.
- */
-struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node)
-{
-       struct thread_info *ret;
-
-       ret = (struct thread_info *)__get_free_pages(GFP_KERNEL,
-                                                    THREAD_INFO_ORDER);
-#ifdef CONFIG_DEBUG_STACK_USAGE
-       if (ret)
-               memset(ret, 0, PAGE_SIZE << THREAD_INFO_ORDER);
-#endif /* DEBUG_STACK_USAGE */
-
-       return ret;
-}
-
-void free_thread_info(struct thread_info *ti)
-{
-       free_pages((unsigned long)ti, THREAD_INFO_ORDER);
-}
-
 /* tsunami.S */
 extern void tsunami_flush_cache_all(void);
 extern void tsunami_flush_cache_mm(struct mm_struct *mm);