Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2019-10-02 13:40:19 +0200
committerMichal Suchanek <msuchanek@suse.de>2019-10-02 21:10:10 +0200
commitb3a8f874f5e11755f3b6f7519c450720096ee8a4 (patch)
tree9f43d2b7a3f345f5d0a5a572a0ed1b12d0c53079
parent60ee413cdaaff930f4a8871d61aef66800bdb7b4 (diff)
powerpc/64s/radix: Improve preempt handling in TLB code (bsc#1152161 ltc#181664).
- Refresh patches.suse/powerpc-64s-radix-Optimize-TLB-range-flush-barriers.patch. - Refresh patches.suse/powerpc-mm-Fixup-tlbie-vs-store-ordering-issue-on-PO.patch. - Refresh patches.suse/powerpc-mm-Workaround-Nest-MMU-bug-with-TLB-invalida.patch. - Refresh patches.suse/powerpc-mm-radix-Drop-unneeded-NULL-check.patch. - Delete patches.suse/powerpc-64s-radix-Fix-preempt-imbalance-in-TLB-flush.patch. - blacklist.conf: Add the above.
-rw-r--r--blacklist.conf1
-rw-r--r--patches.suse/powerpc-64s-radix-Fix-preempt-imbalance-in-TLB-flush.patch39
-rw-r--r--patches.suse/powerpc-64s-radix-Improve-preempt-handling-in-TLB-co.patch164
-rw-r--r--patches.suse/powerpc-64s-radix-Optimize-TLB-range-flush-barriers.patch54
-rw-r--r--patches.suse/powerpc-mm-Fixup-tlbie-vs-store-ordering-issue-on-PO.patch33
-rw-r--r--patches.suse/powerpc-mm-Workaround-Nest-MMU-bug-with-TLB-invalida.patch27
-rw-r--r--patches.suse/powerpc-mm-radix-Drop-unneeded-NULL-check.patch23
-rw-r--r--series.conf2
8 files changed, 230 insertions, 113 deletions
diff --git a/blacklist.conf b/blacklist.conf
index cf8b676ae1..4762e72d0e 100644
--- a/blacklist.conf
+++ b/blacklist.conf
@@ -1375,3 +1375,4 @@ c03cd7738a83b13739f00546166969342c8ff014 # not applicable, bsc#1146664
b636fd38dc40113f853337a7d2a6885ad23b8811 # non-functional prereq for c03cd7738a83b13739f00546166969342c8ff014
1b7aebf0487613033aff26420e32fa2076d52846 # doesn't trigger here
3751e008da0df4384031bd66a516c0292f915605 # depends on patch that breaks kABI
+26e53d5ebe2e2a5ff7343e820f0ffd69dd503f8e # obsoleted by dffe8449c5dd63ff18b47709de75553586582cd8
diff --git a/patches.suse/powerpc-64s-radix-Fix-preempt-imbalance-in-TLB-flush.patch b/patches.suse/powerpc-64s-radix-Fix-preempt-imbalance-in-TLB-flush.patch
deleted file mode 100644
index 42f1dfdf49..0000000000
--- a/patches.suse/powerpc-64s-radix-Fix-preempt-imbalance-in-TLB-flush.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 26e53d5ebe2e2a5ff7343e820f0ffd69dd503f8e Mon Sep 17 00:00:00 2001
-From: Nicholas Piggin <npiggin@gmail.com>
-Date: Tue, 24 Oct 2017 23:06:52 +1000
-Subject: [PATCH] powerpc/64s/radix: Fix preempt imbalance in TLB flush
-
-References: bsc#1055186
-Patch-mainline: v4.14-rc8
-Git-commit: 26e53d5ebe2e2a5ff7343e820f0ffd69dd503f8e
-
-Fixes: 424de9c6e3f8 ("powerpc/mm/radix: Avoid flushing the PWC on every flush_tlb_range")
-Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
-Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-Acked-by: Michal Suchanek <msuchanek@suse.de>
----
- arch/powerpc/mm/tlb-radix.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
-index b3e849c4886e..d304028641a2 100644
---- a/arch/powerpc/mm/tlb-radix.c
-+++ b/arch/powerpc/mm/tlb-radix.c
-@@ -360,12 +360,14 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
-
-
- pid = mm ? mm->context.id : 0;
-+ preempt_disable();
- if (unlikely(pid == MMU_NO_CONTEXT))
- goto no_context;
-
- /* 4k page size, just blow the world */
- if (PAGE_SIZE == 0x1000) {
- radix__flush_all_mm(mm);
-+ preempt_enable();
- return;
- }
-
---
-2.13.6
-
diff --git a/patches.suse/powerpc-64s-radix-Improve-preempt-handling-in-TLB-co.patch b/patches.suse/powerpc-64s-radix-Improve-preempt-handling-in-TLB-co.patch
new file mode 100644
index 0000000000..62ab163197
--- /dev/null
+++ b/patches.suse/powerpc-64s-radix-Improve-preempt-handling-in-TLB-co.patch
@@ -0,0 +1,164 @@
+From dffe8449c5dd63ff18b47709de75553586582cd8 Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Tue, 24 Oct 2017 23:06:53 +1000
+Subject: [PATCH] powerpc/64s/radix: Improve preempt handling in TLB code
+
+References: bsc#1152161 ltc#181664
+Patch-mainline: v4.15-rc1
+Git-commit: dffe8449c5dd63ff18b47709de75553586582cd8
+
+Preempt should be consistently disabled for mm_is_thread_local tests,
+so bring the rest of these under preempt_disable().
+
+Preempt does not need to be disabled for the mm->context.id tests,
+which allows simplification and removal of gotos.
+
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/mm/tlb-radix.c | 48 ++++++++++++++++++-------------------
+ 1 file changed, 23 insertions(+), 25 deletions(-)
+
+diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
+index 3a07d7a5e2fe..67191fe63283 100644
+--- a/arch/powerpc/mm/tlb-radix.c
++++ b/arch/powerpc/mm/tlb-radix.c
+@@ -186,16 +186,15 @@ void radix__flush_tlb_mm(struct mm_struct *mm)
+ {
+ unsigned long pid;
+
+- preempt_disable();
+ pid = mm->context.id;
+ if (unlikely(pid == MMU_NO_CONTEXT))
+- goto no_context;
++ return;
+
++ preempt_disable();
+ if (!mm_is_thread_local(mm))
+ _tlbie_pid(pid, RIC_FLUSH_TLB);
+ else
+ _tlbiel_pid(pid, RIC_FLUSH_TLB);
+-no_context:
+ preempt_enable();
+ }
+ EXPORT_SYMBOL(radix__flush_tlb_mm);
+@@ -204,16 +203,15 @@ void radix__flush_all_mm(struct mm_struct *mm)
+ {
+ unsigned long pid;
+
+- preempt_disable();
+ pid = mm->context.id;
+ if (unlikely(pid == MMU_NO_CONTEXT))
+- goto no_context;
++ return;
+
++ preempt_disable();
+ if (!mm_is_thread_local(mm))
+ _tlbie_pid(pid, RIC_FLUSH_ALL);
+ else
+ _tlbiel_pid(pid, RIC_FLUSH_ALL);
+-no_context:
+ preempt_enable();
+ }
+ EXPORT_SYMBOL(radix__flush_all_mm);
+@@ -230,15 +228,15 @@ void radix__flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmaddr,
+ unsigned long pid;
+ unsigned long ap = mmu_get_ap(psize);
+
+- preempt_disable();
+ pid = mm->context.id;
+ if (unlikely(pid == MMU_NO_CONTEXT))
+- goto bail;
++ return;
++
++ preempt_disable();
+ if (!mm_is_thread_local(mm))
+ _tlbie_va(vmaddr, pid, ap, RIC_FLUSH_TLB);
+ else
+ _tlbiel_va(vmaddr, pid, ap, RIC_FLUSH_TLB);
+-bail:
+ preempt_enable();
+ }
+
+@@ -322,46 +320,44 @@ void radix__flush_tlb_range_psize(struct mm_struct *mm, unsigned long start,
+ {
+ unsigned long pid;
+ unsigned long addr;
+- int local = mm_is_thread_local(mm);
++ bool local;
+ unsigned long ap = mmu_get_ap(psize);
+ unsigned long page_size = 1UL << mmu_psize_defs[psize].shift;
+
+-
+- preempt_disable();
+ pid = mm->context.id;
+ if (unlikely(pid == MMU_NO_CONTEXT))
+- goto err_out;
++ return;
+
++ preempt_disable();
++ local = mm_is_thread_local(mm);
+ if (end == TLB_FLUSH_ALL ||
+ (end - start) > tlb_single_page_flush_ceiling * page_size) {
+ if (local)
+ _tlbiel_pid(pid, RIC_FLUSH_TLB);
+ else
+ _tlbie_pid(pid, RIC_FLUSH_TLB);
+- goto err_out;
+- }
+- for (addr = start; addr < end; addr += page_size) {
++ } else {
++ for (addr = start; addr < end; addr += page_size) {
+
+- if (local)
+- _tlbiel_va(addr, pid, ap, RIC_FLUSH_TLB);
+- else
+- _tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
++ if (local)
++ _tlbiel_va(addr, pid, ap, RIC_FLUSH_TLB);
++ else
++ _tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
++ }
+ }
+-err_out:
+ preempt_enable();
+ }
+
+ #ifdef CONFIG_TRANSPARENT_HUGEPAGE
+ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
+ {
+- int local = mm_is_thread_local(mm);
+ unsigned long ap = mmu_get_ap(mmu_virtual_psize);
+ unsigned long pid, end;
+-
++ bool local;
+
+ pid = mm->context.id;
+ if (unlikely(pid == MMU_NO_CONTEXT))
+- goto no_context;
++ return;
+
+ /* 4k page size, just blow the world */
+ if (PAGE_SIZE == 0x1000) {
+@@ -369,6 +365,8 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
+ return;
+ }
+
++ preempt_disable();
++ local = mm_is_thread_local(mm);
+ /* Otherwise first do the PWC */
+ if (local)
+ _tlbiel_pid(pid, RIC_FLUSH_PWC);
+@@ -383,7 +381,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
+ else
+ _tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
+ }
+-no_context:
++
+ preempt_enable();
+ }
+ #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
+--
+2.23.0
+
diff --git a/patches.suse/powerpc-64s-radix-Optimize-TLB-range-flush-barriers.patch b/patches.suse/powerpc-64s-radix-Optimize-TLB-range-flush-barriers.patch
index f169adaa89..cdf3cb7f59 100644
--- a/patches.suse/powerpc-64s-radix-Optimize-TLB-range-flush-barriers.patch
+++ b/patches.suse/powerpc-64s-radix-Optimize-TLB-range-flush-barriers.patch
@@ -29,18 +29,13 @@ patched 3.4us 14.4us
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-[mauricfo: backport:
- - hunk 4: update indentation and context lines -- equivalent logic (else / goto err_out)
- - hunk 6: update context lines, add one empty line to match upstream]
-Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
-
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
- arch/powerpc/mm/tlb-radix.c | 42 +++++++++++++++++++++++++++++++++---------
- 1 file changed, 33 insertions(+), 9 deletions(-)
+ arch/powerpc/mm/tlb-radix.c | 41 +++++++++++++++++++++++++++++--------
+ 1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
-index a71e25a8911d..812b9c338285 100644
+index 63e277b6e60c..22b657e4b01a 100644
--- a/arch/powerpc/mm/tlb-radix.c
+++ b/arch/powerpc/mm/tlb-radix.c
@@ -84,7 +84,7 @@ static inline void _tlbie_pid(unsigned long pid, unsigned long ric)
@@ -99,28 +94,28 @@ index a71e25a8911d..812b9c338285 100644
/*
* Base TLB flushing operations:
*
-@@ -342,13 +355,17 @@ void radix__flush_tlb_range_psize(struct mm_struct *mm, unsigned long start,
+@@ -341,13 +354,17 @@ void radix__flush_tlb_range_psize(struct mm_struct *mm, unsigned long start,
+ else
_tlbie_pid(pid, RIC_FLUSH_TLB);
- goto err_out;
- }
-+ asm volatile("ptesync": : :"memory");
- for (addr = start; addr < end; addr += page_size) {
+ } else {
++ asm volatile("ptesync": : :"memory");
+ for (addr = start; addr < end; addr += page_size) {
-
- if (local)
-- _tlbiel_va(addr, pid, ap, RIC_FLUSH_TLB);
-+ __tlbiel_va(addr, pid, ap, RIC_FLUSH_TLB);
- else
-- _tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
-+ __tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
+ if (local)
+- _tlbiel_va(addr, pid, ap, RIC_FLUSH_TLB);
++ __tlbiel_va(addr, pid, ap, RIC_FLUSH_TLB);
+ else
+- _tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
++ __tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
+ }
++ if (local)
++ asm volatile("ptesync": : :"memory");
++ else
++ asm volatile("eieio; tlbsync; ptesync": : :"memory");
}
-+ if (local)
-+ asm volatile("ptesync": : :"memory");
-+ else
-+ asm volatile("eieio; tlbsync; ptesync": : :"memory");
- err_out:
preempt_enable();
}
-@@ -380,6 +397,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
+@@ -378,6 +395,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
_tlbie_pid(pid, RIC_FLUSH_PWC);
/* Then iterate the pages */
@@ -128,19 +123,18 @@ index a71e25a8911d..812b9c338285 100644
end = addr + HPAGE_PMD_SIZE;
for (; addr < end; addr += PAGE_SIZE) {
if (local)
-@@ -387,6 +405,12 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
- else
+@@ -386,6 +404,11 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
_tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
}
-+
+
+ if (local)
+ asm volatile("ptesync": : :"memory");
+ else
+ asm volatile("eieio; tlbsync; ptesync": : :"memory");
+
- no_context:
preempt_enable();
}
+ #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
--
-2.13.6
+2.23.0
diff --git a/patches.suse/powerpc-mm-Fixup-tlbie-vs-store-ordering-issue-on-PO.patch b/patches.suse/powerpc-mm-Fixup-tlbie-vs-store-ordering-issue-on-PO.patch
index ecb0038e9a..aac1a78fcc 100644
--- a/patches.suse/powerpc-mm-Fixup-tlbie-vs-store-ordering-issue-on-PO.patch
+++ b/patches.suse/powerpc-mm-Fixup-tlbie-vs-store-ordering-issue-on-PO.patch
@@ -179,11 +179,9 @@ index 28c980e..adf469f 100644
asm volatile("eieio; tlbsync; ptesync" : : : "memory");
}
EXPORT_SYMBOL_GPL(mmu_partition_table_set_entry);
-diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
-index 74354c2..a07f537 100644
--- a/arch/powerpc/mm/tlb-radix.c
+++ b/arch/powerpc/mm/tlb-radix.c
-@@ -151,6 +151,17 @@ static inline void __tlbie_va(unsigned long va, unsigned long pid,
+@@ -137,6 +137,17 @@ static inline void __tlbie_va(unsigned l
trace_tlbie(0, 0, rb, rs, ric, prs, r);
}
@@ -201,7 +199,7 @@ index 74354c2..a07f537 100644
/*
* We use 128 set in radix mode and 256 set in hpt mode.
*/
-@@ -200,6 +211,7 @@ static inline void _tlbie_pid(unsigned long pid, unsigned long ric)
+@@ -178,6 +189,7 @@ static inline void _tlbie_pid(unsigned l
asm volatile("ptesync": : :"memory");
asm volatile(PPC_TLBIE_5(%0, %4, %3, %2, %1)
: : "r"(rb), "i"(r), "i"(prs), "i"(ric), "r"(rs) : "memory");
@@ -209,7 +207,7 @@ index 74354c2..a07f537 100644
asm volatile("eieio; tlbsync; ptesync": : :"memory");
trace_tlbie(0, 0, rb, rs, ric, prs, r);
}
-@@ -253,6 +265,7 @@ static inline void _tlbie_va(unsigned long va, unsigned long pid,
+@@ -195,6 +207,7 @@ static inline void _tlbie_va(unsigned lo
{
asm volatile("ptesync": : :"memory");
__tlbie_va(va, pid, ap, ric);
@@ -217,18 +215,15 @@ index 74354c2..a07f537 100644
asm volatile("eieio; tlbsync; ptesync": : :"memory");
}
-@@ -264,8 +277,10 @@ static inline void _tlbie_va_range(unsigned long start, unsigned long end,
- for (addr = start; addr < end; addr += page_size) {
+@@ -441,8 +454,10 @@ void radix__flush_tlb_range_psize(struct
+ for (addr = start; addr < end; addr += page_size) {
+ if (local)
+ __tlbiel_va(addr, pid, ap, RIC_FLUSH_TLB);
+- else
++ else {
+ __tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
++ fixup_tlbie();
++ }
+ }
if (local)
- __tlbiel_va(addr, pid, ap, RIC_FLUSH_TLB);
-- else
-+ else {
- __tlbie_va(addr, pid, ap, RIC_FLUSH_TLB);
-+ fixup_tlbie();
-+ }
- }
- if (local)
- asm volatile("ptesync": : :"memory");
---
-cgit v1.1
-
+ asm volatile("ptesync": : :"memory");
diff --git a/patches.suse/powerpc-mm-Workaround-Nest-MMU-bug-with-TLB-invalida.patch b/patches.suse/powerpc-mm-Workaround-Nest-MMU-bug-with-TLB-invalida.patch
index 422f153063..53e00f0cdf 100644
--- a/patches.suse/powerpc-mm-Workaround-Nest-MMU-bug-with-TLB-invalida.patch
+++ b/patches.suse/powerpc-mm-Workaround-Nest-MMU-bug-with-TLB-invalida.patch
@@ -32,7 +32,7 @@ Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
just calls radix__flush_tlb_mm() which is already
patched; but there is another instance of _tlbie_pid(
(pid, RIC_FLUSH_TLB) in radix__flush_tlb_range_psize(),
- so cover that one; equivalent logic (else / goto err_out).
+ so cover that one).
- hunk 5: removed -- this function does not exist in SLES 15.]
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
@@ -41,11 +41,9 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
arch/powerpc/mm/tlb-radix.c | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
-diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
-index f136cb4c4255..c26a92cfa4a6 100644
--- a/arch/powerpc/mm/tlb-radix.c
+++ b/arch/powerpc/mm/tlb-radix.c
-@@ -261,6 +261,16 @@ void radix__local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmadd
+@@ -260,6 +260,16 @@ void radix__local_flush_tlb_page(struct
}
EXPORT_SYMBOL(radix__local_flush_tlb_page);
@@ -62,10 +60,10 @@ index f136cb4c4255..c26a92cfa4a6 100644
#ifdef CONFIG_SMP
void radix__flush_tlb_mm(struct mm_struct *mm)
{
-@@ -271,9 +281,12 @@ void radix__flush_tlb_mm(struct mm_struct *mm)
- if (unlikely(pid == MMU_NO_CONTEXT))
- goto no_context;
+@@ -270,9 +280,12 @@ void radix__flush_tlb_mm(struct mm_struc
+ return;
+ preempt_disable();
- if (!mm_is_thread_local(mm))
- _tlbie_pid(pid, RIC_FLUSH_TLB);
- else
@@ -76,10 +74,10 @@ index f136cb4c4255..c26a92cfa4a6 100644
+ _tlbie_pid(pid, RIC_FLUSH_TLB);
+ } else
_tlbiel_pid(pid, RIC_FLUSH_TLB);
- no_context:
preempt_enable();
-@@ -415,10 +428,14 @@ void radix__flush_tlb_range_psize(struct mm_struct *mm, unsigned long start,
-
+ }
+@@ -415,10 +428,14 @@ void radix__flush_tlb_range_psize(struct
+ local = mm_is_thread_local(mm);
if (end == TLB_FLUSH_ALL ||
(end - start) > tlb_single_page_flush_ceiling * page_size) {
- if (local)
@@ -93,9 +91,6 @@ index f136cb4c4255..c26a92cfa4a6 100644
+ else
+ _tlbie_pid(pid, RIC_FLUSH_TLB);
+ }
- goto err_out;
- }
- asm volatile("ptesync": : :"memory");
---
-2.13.6
-
+ } else {
+ asm volatile("ptesync": : :"memory");
+ for (addr = start; addr < end; addr += page_size) {
diff --git a/patches.suse/powerpc-mm-radix-Drop-unneeded-NULL-check.patch b/patches.suse/powerpc-mm-radix-Drop-unneeded-NULL-check.patch
index 359782ad16..b5f79c5d8e 100644
--- a/patches.suse/powerpc-mm-radix-Drop-unneeded-NULL-check.patch
+++ b/patches.suse/powerpc-mm-radix-Drop-unneeded-NULL-check.patch
@@ -20,9 +20,11 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
arch/powerpc/mm/tlb-radix.c | 22 ++++++++++------------
2 files changed, 10 insertions(+), 18 deletions(-)
+diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h
+index b8a0fb442c64..795d825c2edd 100644
--- a/arch/powerpc/include/asm/hugetlb.h
+++ b/arch/powerpc/include/asm/hugetlb.h
-@@ -40,12 +40,6 @@ static inline void flush_hugetlb_page(st
+@@ -40,12 +40,6 @@ static inline void flush_hugetlb_page(struct vm_area_struct *vma,
return radix__flush_hugetlb_page(vma, vmaddr);
}
@@ -35,9 +37,11 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
#else
static inline pte_t *hugepd_page(hugepd_t hpd)
+diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
+index 5a1f46eff3a2..3a07d7a5e2fe 100644
--- a/arch/powerpc/mm/tlb-radix.c
+++ b/arch/powerpc/mm/tlb-radix.c
-@@ -164,7 +164,7 @@ void radix__local_flush_tlb_page_psize(s
+@@ -164,7 +164,7 @@ void radix__local_flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmadd
unsigned long ap = mmu_get_ap(psize);
preempt_disable();
@@ -46,7 +50,7 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
if (pid != MMU_NO_CONTEXT)
_tlbiel_va(vmaddr, pid, ap, RIC_FLUSH_TLB);
preempt_enable();
-@@ -174,11 +174,10 @@ void radix__local_flush_tlb_page(struct
+@@ -174,11 +174,10 @@ void radix__local_flush_tlb_page(struct vm_area_struct *vma, unsigned long vmadd
{
#ifdef CONFIG_HUGETLB_PAGE
/* need the return fix for nohash.c */
@@ -61,7 +65,7 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
}
EXPORT_SYMBOL(radix__local_flush_tlb_page);
-@@ -232,7 +231,7 @@ void radix__flush_tlb_page_psize(struct
+@@ -232,7 +231,7 @@ void radix__flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmaddr,
unsigned long ap = mmu_get_ap(psize);
preempt_disable();
@@ -70,7 +74,7 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
if (unlikely(pid == MMU_NO_CONTEXT))
goto bail;
if (!mm_is_thread_local(mm))
-@@ -246,11 +245,10 @@ bail:
+@@ -246,11 +245,10 @@ void radix__flush_tlb_page_psize(struct mm_struct *mm, unsigned long vmaddr,
void radix__flush_tlb_page(struct vm_area_struct *vma, unsigned long vmaddr)
{
#ifdef CONFIG_HUGETLB_PAGE
@@ -85,7 +89,7 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
}
EXPORT_SYMBOL(radix__flush_tlb_page);
-@@ -330,7 +328,7 @@ void radix__flush_tlb_range_psize(struct
+@@ -330,7 +328,7 @@ void radix__flush_tlb_range_psize(struct mm_struct *mm, unsigned long start,
preempt_disable();
@@ -94,12 +98,15 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
if (unlikely(pid == MMU_NO_CONTEXT))
goto err_out;
-@@ -361,7 +359,7 @@ void radix__flush_tlb_collapsed_pmd(stru
+@@ -361,7 +359,7 @@ void radix__flush_tlb_collapsed_pmd(struct mm_struct *mm, unsigned long addr)
unsigned long pid, end;
- pid = mm ? mm->context.id : 0;
+ pid = mm->context.id;
- preempt_disable();
if (unlikely(pid == MMU_NO_CONTEXT))
goto no_context;
+
+--
+2.23.0
+
diff --git a/series.conf b/series.conf
index 98a18069b2..66145a322a 100644
--- a/series.conf
+++ b/series.conf
@@ -7915,7 +7915,6 @@
patches.suse/0002-mmc-dw_mmc-Fix-the-DTO-timeout-calculation.patch
patches.suse/powerpc-perf-Fix-IMC-allocation-routine.patch
patches.suse/powerpc-Fix-check-for-copy-paste-instructions-in-ali.patch
- patches.suse/powerpc-64s-radix-Fix-preempt-imbalance-in-TLB-flush.patch
patches.suse/powerpc-perf-Fix-core-imc-hotplug-callback-failure.patch
patches.suse/scsi-qla2xxx-Fix-oops-in-qla2x00_probe_one-error-pat.patch
patches.suse/KVM-VMX-Do-not-fully-reset-PI-descriptor-on-vCPU-res.patch
@@ -10174,6 +10173,7 @@
patches.suse/powerpc-mm-radix-Drop-unneeded-NULL-check.patch
patches.suse/powerpc-perf-hv-24x7-Fix-incorrect-comparison-in-mem.patch
patches.suse/KVM-PPC-Book3S-HV-Handle-host-system-reset-in-guest-.patch
+ patches.suse/powerpc-64s-radix-Improve-preempt-handling-in-TLB-co.patch
patches.suse/powerpc-64s-radix-Fix-process-table-entry-cache-inva.patch
patches.suse/powerpc-pseries-vio-Dispose-of-virq-mapping-on-vdevice-unregister.patch
patches.suse/powerpc-ipic-Fix-status-get-and-status-clear.patch