diff options
author | Pavel Tatashin <pasha.tatashin@oracle.com> | 2017-05-31 11:25:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-06 16:45:29 -0400 |
commit | 0197e41ce70511dc3b71f7fefa1a676e2b5cd60b (patch) | |
tree | 575ba01f32418345f60b1b96718144e4b7c54fc3 | |
parent | a0582f26ec9dfd5360ea2f35dd9a1b026f8adda0 (diff) |
sparc64: delete old wrap code
The old method that is using xcall and softint to get new context id is
deleted, as it is replaced by a method of using per_cpu_secondary_mm
without xcall to perform the context wrap.
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Bob Picco <bob.picco@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/include/asm/mmu_context_64.h | 6 | ||||
-rw-r--r-- | arch/sparc/include/asm/pil.h | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/kernel.h | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 31 | ||||
-rw-r--r-- | arch/sparc/kernel/ttable_64.S | 2 | ||||
-rw-r--r-- | arch/sparc/mm/ultra.S | 5 |
6 files changed, 1 insertions, 45 deletions
diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h index edb45247bfa9..2cddcda4f85f 100644 --- a/arch/sparc/include/asm/mmu_context_64.h +++ b/arch/sparc/include/asm/mmu_context_64.h | |||
@@ -21,12 +21,6 @@ extern unsigned long mmu_context_bmap[]; | |||
21 | 21 | ||
22 | DECLARE_PER_CPU(struct mm_struct *, per_cpu_secondary_mm); | 22 | DECLARE_PER_CPU(struct mm_struct *, per_cpu_secondary_mm); |
23 | void get_new_mmu_context(struct mm_struct *mm); | 23 | void get_new_mmu_context(struct mm_struct *mm); |
24 | #ifdef CONFIG_SMP | ||
25 | void smp_new_mmu_context_version(void); | ||
26 | #else | ||
27 | #define smp_new_mmu_context_version() do { } while (0) | ||
28 | #endif | ||
29 | |||
30 | int init_new_context(struct task_struct *tsk, struct mm_struct *mm); | 24 | int init_new_context(struct task_struct *tsk, struct mm_struct *mm); |
31 | void destroy_context(struct mm_struct *mm); | 25 | void destroy_context(struct mm_struct *mm); |
32 | 26 | ||
diff --git a/arch/sparc/include/asm/pil.h b/arch/sparc/include/asm/pil.h index 266937030546..522b43db2ed3 100644 --- a/arch/sparc/include/asm/pil.h +++ b/arch/sparc/include/asm/pil.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #define PIL_SMP_CALL_FUNC 1 | 20 | #define PIL_SMP_CALL_FUNC 1 |
21 | #define PIL_SMP_RECEIVE_SIGNAL 2 | 21 | #define PIL_SMP_RECEIVE_SIGNAL 2 |
22 | #define PIL_SMP_CAPTURE 3 | 22 | #define PIL_SMP_CAPTURE 3 |
23 | #define PIL_SMP_CTX_NEW_VERSION 4 | ||
24 | #define PIL_DEVICE_IRQ 5 | 23 | #define PIL_DEVICE_IRQ 5 |
25 | #define PIL_SMP_CALL_FUNC_SNGL 6 | 24 | #define PIL_SMP_CALL_FUNC_SNGL 6 |
26 | #define PIL_DEFERRED_PCR_WORK 7 | 25 | #define PIL_DEFERRED_PCR_WORK 7 |
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index c9804551262c..6ae1e77be0bf 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h | |||
@@ -37,7 +37,6 @@ void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr | |||
37 | /* smp_64.c */ | 37 | /* smp_64.c */ |
38 | void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs); | 38 | void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs); |
39 | void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs); | 39 | void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs); |
40 | void __irq_entry smp_new_mmu_context_version_client(int irq, struct pt_regs *regs); | ||
41 | void __irq_entry smp_penguin_jailcell(int irq, struct pt_regs *regs); | 40 | void __irq_entry smp_penguin_jailcell(int irq, struct pt_regs *regs); |
42 | void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs); | 41 | void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs); |
43 | 42 | ||
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index b3bc0ac757cc..fdf31040a7dc 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -964,37 +964,6 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page) | |||
964 | preempt_enable(); | 964 | preempt_enable(); |
965 | } | 965 | } |
966 | 966 | ||
967 | void __irq_entry smp_new_mmu_context_version_client(int irq, struct pt_regs *regs) | ||
968 | { | ||
969 | struct mm_struct *mm; | ||
970 | unsigned long flags; | ||
971 | |||
972 | clear_softint(1 << irq); | ||
973 | |||
974 | /* See if we need to allocate a new TLB context because | ||
975 | * the version of the one we are using is now out of date. | ||
976 | */ | ||
977 | mm = current->active_mm; | ||
978 | if (unlikely(!mm || (mm == &init_mm))) | ||
979 | return; | ||
980 | |||
981 | spin_lock_irqsave(&mm->context.lock, flags); | ||
982 | |||
983 | if (unlikely(!CTX_VALID(mm->context))) | ||
984 | get_new_mmu_context(mm); | ||
985 | |||
986 | spin_unlock_irqrestore(&mm->context.lock, flags); | ||
987 | |||
988 | load_secondary_context(mm); | ||
989 | __flush_tlb_mm(CTX_HWBITS(mm->context), | ||
990 | SECONDARY_CONTEXT); | ||
991 | } | ||
992 | |||
993 | void smp_new_mmu_context_version(void) | ||
994 | { | ||
995 | smp_cross_call(&xcall_new_mmu_context_version, 0, 0, 0); | ||
996 | } | ||
997 | |||
998 | #ifdef CONFIG_KGDB | 967 | #ifdef CONFIG_KGDB |
999 | void kgdb_roundup_cpus(unsigned long flags) | 968 | void kgdb_roundup_cpus(unsigned long flags) |
1000 | { | 969 | { |
diff --git a/arch/sparc/kernel/ttable_64.S b/arch/sparc/kernel/ttable_64.S index 7bd8f6556352..efe93ab4a9c0 100644 --- a/arch/sparc/kernel/ttable_64.S +++ b/arch/sparc/kernel/ttable_64.S | |||
@@ -50,7 +50,7 @@ tl0_resv03e: BTRAP(0x3e) BTRAP(0x3f) BTRAP(0x40) | |||
50 | tl0_irq1: TRAP_IRQ(smp_call_function_client, 1) | 50 | tl0_irq1: TRAP_IRQ(smp_call_function_client, 1) |
51 | tl0_irq2: TRAP_IRQ(smp_receive_signal_client, 2) | 51 | tl0_irq2: TRAP_IRQ(smp_receive_signal_client, 2) |
52 | tl0_irq3: TRAP_IRQ(smp_penguin_jailcell, 3) | 52 | tl0_irq3: TRAP_IRQ(smp_penguin_jailcell, 3) |
53 | tl0_irq4: TRAP_IRQ(smp_new_mmu_context_version_client, 4) | 53 | tl0_irq4: BTRAP(0x44) |
54 | #else | 54 | #else |
55 | tl0_irq1: BTRAP(0x41) | 55 | tl0_irq1: BTRAP(0x41) |
56 | tl0_irq2: BTRAP(0x42) | 56 | tl0_irq2: BTRAP(0x42) |
diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S index 5d2fd6cd3189..fcf4d27a38fb 100644 --- a/arch/sparc/mm/ultra.S +++ b/arch/sparc/mm/ultra.S | |||
@@ -971,11 +971,6 @@ xcall_capture: | |||
971 | wr %g0, (1 << PIL_SMP_CAPTURE), %set_softint | 971 | wr %g0, (1 << PIL_SMP_CAPTURE), %set_softint |
972 | retry | 972 | retry |
973 | 973 | ||
974 | .globl xcall_new_mmu_context_version | ||
975 | xcall_new_mmu_context_version: | ||
976 | wr %g0, (1 << PIL_SMP_CTX_NEW_VERSION), %set_softint | ||
977 | retry | ||
978 | |||
979 | #ifdef CONFIG_KGDB | 974 | #ifdef CONFIG_KGDB |
980 | .globl xcall_kgdb_capture | 975 | .globl xcall_kgdb_capture |
981 | xcall_kgdb_capture: | 976 | xcall_kgdb_capture: |