diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2012-05-22 10:39:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-22 15:02:56 -0400 |
commit | 29af0ebaa24d3078d7fd9747a49a763fe7f9ea3c (patch) | |
tree | 15481af6c098a1a284693fb50db371a7b30b033b /arch/sparc | |
parent | 72c04af9a2d57b7945cf3de8e71461bd80695d50 (diff) |
sparc32: use the common implementation of alloc_thread_info_node()
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>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/Kconfig | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/thread_info_32.h | 11 | ||||
-rw-r--r-- | arch/sparc/mm/srmmu.c | 27 |
3 files changed, 2 insertions, 37 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 1ea3fd954756..051af37f2b49 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -37,7 +37,6 @@ config SPARC32 | |||
37 | def_bool !64BIT | 37 | def_bool !64BIT |
38 | select GENERIC_ATOMIC64 | 38 | select GENERIC_ATOMIC64 |
39 | select CLZ_TAB | 39 | select CLZ_TAB |
40 | select ARCH_THREAD_INFO_ALLOCATOR | ||
41 | 40 | ||
42 | config SPARC64 | 41 | config SPARC64 |
43 | def_bool 64BIT | 42 | def_bool 64BIT |
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index 21a38946541d..5af664932452 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -77,18 +77,11 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
77 | /* | 77 | /* |
78 | * thread information allocation | 78 | * thread information allocation |
79 | */ | 79 | */ |
80 | #define THREAD_INFO_ORDER 1 | 80 | #define THREAD_SIZE_ORDER 1 |
81 | |||
82 | struct thread_info * alloc_thread_info_node(struct task_struct *tsk, int node); | ||
83 | void free_thread_info(struct thread_info *); | ||
84 | 81 | ||
85 | #endif /* __ASSEMBLY__ */ | 82 | #endif /* __ASSEMBLY__ */ |
86 | 83 | ||
87 | /* | 84 | /* Size of kernel stack for each process */ |
88 | * Size of kernel stack for each process. | ||
89 | * Observe the order of get_free_pages() in alloc_thread_info_node(). | ||
90 | * The sun4 has 8K stack too, because it's short on memory, and 16K is a waste. | ||
91 | */ | ||
92 | #define THREAD_SIZE (2 * PAGE_SIZE) | 85 | #define THREAD_SIZE (2 * PAGE_SIZE) |
93 | 86 | ||
94 | /* | 87 | /* |
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 8e97e0305b01..256db6b22c54 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -467,33 +467,6 @@ void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len) | |||
467 | flush_tlb_all(); | 467 | flush_tlb_all(); |
468 | } | 468 | } |
469 | 469 | ||
470 | /* | ||
471 | * On the SRMMU we do not have the problems with limited tlb entries | ||
472 | * for mapping kernel pages, so we just take things from the free page | ||
473 | * pool. As a side effect we are putting a little too much pressure | ||
474 | * on the gfp() subsystem. This setup also makes the logic of the | ||
475 | * iommu mapping code a lot easier as we can transparently handle | ||
476 | * mappings on the kernel stack without any special code. | ||
477 | */ | ||
478 | struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node) | ||
479 | { | ||
480 | struct thread_info *ret; | ||
481 | |||
482 | ret = (struct thread_info *)__get_free_pages(GFP_KERNEL, | ||
483 | THREAD_INFO_ORDER); | ||
484 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
485 | if (ret) | ||
486 | memset(ret, 0, PAGE_SIZE << THREAD_INFO_ORDER); | ||
487 | #endif /* DEBUG_STACK_USAGE */ | ||
488 | |||
489 | return ret; | ||
490 | } | ||
491 | |||
492 | void free_thread_info(struct thread_info *ti) | ||
493 | { | ||
494 | free_pages((unsigned long)ti, THREAD_INFO_ORDER); | ||
495 | } | ||
496 | |||
497 | /* tsunami.S */ | 470 | /* tsunami.S */ |
498 | extern void tsunami_flush_cache_all(void); | 471 | extern void tsunami_flush_cache_all(void); |
499 | extern void tsunami_flush_cache_mm(struct mm_struct *mm); | 472 | extern void tsunami_flush_cache_mm(struct mm_struct *mm); |