Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1664012
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.9 017/119] sparc64: combine activate_mm and switch_mm |
| Date | 2017-06-12 19:10 +0200 |
| Message-ID | <tRB0J-4VC-5@gated-at.bofh.it> (permalink) |
| References | <tRzBD-3Tq-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Tatashin <pasha.tatashin@oracle.com>
[ Upstream commit 14d0334c6748ff2aedb3f2f7fdc51ee90a9b54e7 ]
The only difference between these two functions is that in activate_mm we
unconditionally flush context. However, there is no need to keep this
difference after fixing a bug where cpumask was not reset on a wrap. So, in
this patch we combine these.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/sparc/include/asm/mmu_context_64.h | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
--- a/arch/sparc/include/asm/mmu_context_64.h
+++ b/arch/sparc/include/asm/mmu_context_64.h
@@ -131,26 +131,7 @@ static inline void switch_mm(struct mm_s
}
#define deactivate_mm(tsk,mm) do { } while (0)
-
-/* Activate a new MM instance for the current task. */
-static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm)
-{
- unsigned long flags;
- int cpu;
-
- spin_lock_irqsave(&mm->context.lock, flags);
- if (!CTX_VALID(mm->context))
- get_new_mmu_context(mm);
- cpu = smp_processor_id();
- if (!cpumask_test_cpu(cpu, mm_cpumask(mm)))
- cpumask_set_cpu(cpu, mm_cpumask(mm));
-
- load_secondary_context(mm);
- __flush_tlb_mm(CTX_HWBITS(mm->context), SECONDARY_CONTEXT);
- tsb_context_switch(mm);
- spin_unlock_irqrestore(&mm->context.lock, flags);
-}
-
+#define activate_mm(active_mm, mm) switch_mm(active_mm, mm, NULL)
#endif /* !(__ASSEMBLY__) */
#endif /* !(__SPARC64_MMU_CONTEXT_H) */
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.9 000/119] 4.9.32-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 052/119] dmaengine: mv_xor_v2: set DMA mask to 40 bits Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 048/119] dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 055/119] ext4: fix SEEK_HOLE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 029/119] crypto: drbg - wait for crypto op not signal safe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 054/119] xen/privcmd: Support correctly 64KB page granularity when mapping memory Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 023/119] serial: ifx6x60: fix use-after-free on module unload Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 030/119] crypto: gcm - wait for crypto op not signal safe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 034/119] efi: Dont issue error message when booted under Xen Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 005/119] tcp: disallow cwnd undo when switching congestion control Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
[PATCH 4.9 017/119] sparc64: combine activate_mm and switch_mm Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
[PATCH 4.9 013/119] sparc64: Add __multi3 for gcc 7.x and later. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
[PATCH 4.9 016/119] sparc64: reset mm cpumask after wrap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
[PATCH 4.9 011/119] net: stmmac: fix completely hung TX when using TSO Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
[PATCH 4.9 001/119] bnx2x: Fix Multi-Cos Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
[PATCH 4.9 010/119] net: ethoc: enable NAPI before poll may be scheduled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
[PATCH 4.9 018/119] sparc64: redefine first version Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
[PATCH 4.9 020/119] sparc64: new context wrap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
Re: [PATCH 4.9 000/119] 4.9.32-stable review Guenter Roeck <linux@roeck-us.net> - 2017-06-13 00:00 +0200
Re: [PATCH 4.9 000/119] 4.9.32-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-13 09:30 +0200
Re: [PATCH 4.9 000/119] 4.9.32-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-06-13 02:50 +0200
csiph-web