aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/Kconfig.debug9
-rw-r--r--arch/sh/include/asm/tlb.h28
-rw-r--r--arch/sh/kernel/vmlinux.lds.S2
-rw-r--r--arch/sh/mm/init.c1
4 files changed, 18 insertions, 22 deletions
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 1553d56cf4e0..c1d5a820b1aa 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -28,15 +28,6 @@ config STACK_DEBUG
28 every function call and will therefore incur a major 28 every function call and will therefore incur a major
29 performance hit. Most users should say N. 29 performance hit. Most users should say N.
30 30
31config DEBUG_STACK_USAGE
32 bool "Stack utilization instrumentation"
33 depends on DEBUG_KERNEL
34 help
35 Enables the display of the minimum amount of free stack which each
36 task has ever had available in the sysrq-T and sysrq-P debug output.
37
38 This option will slow down process creation somewhat.
39
40config 4KSTACKS 31config 4KSTACKS
41 bool "Use 4Kb for kernel stacks instead of 8Kb" 32 bool "Use 4Kb for kernel stacks instead of 8Kb"
42 depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB 33 depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
diff --git a/arch/sh/include/asm/tlb.h b/arch/sh/include/asm/tlb.h
index 75abb38dffd5..6c308d8b9a50 100644
--- a/arch/sh/include/asm/tlb.h
+++ b/arch/sh/include/asm/tlb.h
@@ -23,8 +23,6 @@ struct mmu_gather {
23 unsigned long start, end; 23 unsigned long start, end;
24}; 24};
25 25
26DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
27
28static inline void init_tlb_gather(struct mmu_gather *tlb) 26static inline void init_tlb_gather(struct mmu_gather *tlb)
29{ 27{
30 tlb->start = TASK_SIZE; 28 tlb->start = TASK_SIZE;
@@ -36,17 +34,13 @@ static inline void init_tlb_gather(struct mmu_gather *tlb)
36 } 34 }
37} 35}
38 36
39static inline struct mmu_gather * 37static inline void
40tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) 38tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int full_mm_flush)
41{ 39{
42 struct mmu_gather *tlb = &get_cpu_var(mmu_gathers);
43
44 tlb->mm = mm; 40 tlb->mm = mm;
45 tlb->fullmm = full_mm_flush; 41 tlb->fullmm = full_mm_flush;
46 42
47 init_tlb_gather(tlb); 43 init_tlb_gather(tlb);
48
49 return tlb;
50} 44}
51 45
52static inline void 46static inline void
@@ -57,8 +51,6 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
57 51
58 /* keep the page table cache within bounds */ 52 /* keep the page table cache within bounds */
59 check_pgt_cache(); 53 check_pgt_cache();
60
61 put_cpu_var(mmu_gathers);
62} 54}
63 55
64static inline void 56static inline void
@@ -91,7 +83,21 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
91 } 83 }
92} 84}
93 85
94#define tlb_remove_page(tlb,page) free_page_and_swap_cache(page) 86static inline void tlb_flush_mmu(struct mmu_gather *tlb)
87{
88}
89
90static inline int __tlb_remove_page(struct mmu_gather *tlb, struct page *page)
91{
92 free_page_and_swap_cache(page);
93 return 1; /* avoid calling tlb_flush_mmu */
94}
95
96static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
97{
98 __tlb_remove_page(tlb, page);
99}
100
95#define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep) 101#define pte_free_tlb(tlb, ptep, addr) pte_free((tlb)->mm, ptep)
96#define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp) 102#define pmd_free_tlb(tlb, pmdp, addr) pmd_free((tlb)->mm, pmdp)
97#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp) 103#define pud_free_tlb(tlb, pudp, addr) pud_free((tlb)->mm, pudp)
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index af4d46187a79..731c10ce67b5 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -66,7 +66,7 @@ SECTIONS
66 __machvec_end = .; 66 __machvec_end = .;
67 } 67 }
68 68
69 PERCPU(L1_CACHE_BYTES, PAGE_SIZE) 69 PERCPU_SECTION(L1_CACHE_BYTES)
70 70
71 /* 71 /*
72 * .exit.text is discarded at runtime, not link time, to deal with 72 * .exit.text is discarded at runtime, not link time, to deal with
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 0d3f912e3334..58a93fb3d965 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -28,7 +28,6 @@
28#include <asm/cache.h> 28#include <asm/cache.h>
29#include <asm/sizes.h> 29#include <asm/sizes.h>
30 30
31DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
32pgd_t swapper_pg_dir[PTRS_PER_PGD]; 31pgd_t swapper_pg_dir[PTRS_PER_PGD];
33 32
34void __init generic_mem_init(void) 33void __init generic_mem_init(void)