[rt] Refresh "powerpc/pseries/iommu: Use a locallock instead local_irq_save()" for context changes in 4.19.104.

This commit is contained in:
Salvatore Bonaccorso 2020-02-21 22:11:04 +01:00
parent 25fdae0539
commit 9e923c8434
2 changed files with 16 additions and 16 deletions

2
debian/changelog vendored
View File

@ -860,6 +860,8 @@ linux (4.19.104-1) UNRELEASED; urgency=medium
* Refresh "ARM: dts: bcm283x: Correct vchiq compatible string" for context * Refresh "ARM: dts: bcm283x: Correct vchiq compatible string" for context
changes in 4.19.99 changes in 4.19.99
* [rt] Update to 4.19.103-rt42 * [rt] Update to 4.19.103-rt42
* [rt] Refresh "powerpc/pseries/iommu: Use a locallock instead
local_irq_save()" for context changes in 4.19.104.
[ Ben Hutchings ] [ Ben Hutchings ]
* [x86] Drop "Add a SysRq option to lift kernel lockdown" (Closes: #947021) * [x86] Drop "Add a SysRq option to lift kernel lockdown" (Closes: #947021)

View File

@ -14,12 +14,13 @@ Use local_irq_save() instead of local_irq_disable().
Cc: stable-rt@vger.kernel.org Cc: stable-rt@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
[Salvatore Bonaccorso: Update for context changes in 4.19.104 due to
9ed7b9085e13 ("powerpc/pseries: Allow not having ibm,
hypertas-functions::hcall-multi-tce for DDW")]
--- ---
arch/powerpc/platforms/pseries/iommu.c | 16 ++++++++++------ arch/powerpc/platforms/pseries/iommu.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-) 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 06f02960b439..d80d919c78d3 100644
--- a/arch/powerpc/platforms/pseries/iommu.c --- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
@ -30,7 +31,7 @@ index 06f02960b439..d80d919c78d3 100644
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/rtas.h> #include <asm/rtas.h>
@@ -212,6 +213,7 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, @@ -212,6 +213,7 @@
} }
static DEFINE_PER_CPU(__be64 *, tce_page); static DEFINE_PER_CPU(__be64 *, tce_page);
@ -38,7 +39,7 @@ index 06f02960b439..d80d919c78d3 100644
static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
long npages, unsigned long uaddr, long npages, unsigned long uaddr,
@@ -232,7 +234,8 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, @@ -233,7 +235,8 @@
direction, attrs); direction, attrs);
} }
@ -48,16 +49,16 @@ index 06f02960b439..d80d919c78d3 100644
tcep = __this_cpu_read(tce_page); tcep = __this_cpu_read(tce_page);
@@ -243,7 +246,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, @@ -244,7 +247,7 @@
tcep = (__be64 *)__get_free_page(GFP_ATOMIC); tcep = (__be64 *)__get_free_page(GFP_ATOMIC);
/* If allocation fails, fall back to the loop implementation */ /* If allocation fails, fall back to the loop implementation */
if (!tcep) { if (!tcep) {
- local_irq_restore(flags); - local_irq_restore(flags);
+ local_unlock_irqrestore(tcp_page_lock, flags); + local_unlock_irqrestore(tcp_page_lock, flags);
return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, return tce_build_pSeriesLP(tbl->it_index, tcenum,
direction, attrs); tbl->it_page_shift,
} npages, uaddr, direction, attrs);
@@ -277,7 +280,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, @@ -279,7 +282,7 @@
tcenum += limit; tcenum += limit;
} while (npages > 0 && !rc); } while (npages > 0 && !rc);
@ -66,9 +67,9 @@ index 06f02960b439..d80d919c78d3 100644
if (unlikely(rc == H_NOT_ENOUGH_RESOURCES)) { if (unlikely(rc == H_NOT_ENOUGH_RESOURCES)) {
ret = (int)rc; ret = (int)rc;
@@ -435,13 +438,14 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn, @@ -450,13 +453,14 @@
u64 rc = 0; DMA_BIDIRECTIONAL, 0);
long l, limit; }
- local_irq_disable(); /* to protect tcep and the page behind it */ - local_irq_disable(); /* to protect tcep and the page behind it */
+ /* to protect tcep and the page behind it */ + /* to protect tcep and the page behind it */
@ -83,7 +84,7 @@ index 06f02960b439..d80d919c78d3 100644
return -ENOMEM; return -ENOMEM;
} }
__this_cpu_write(tce_page, tcep); __this_cpu_write(tce_page, tcep);
@@ -487,7 +491,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn, @@ -502,7 +506,7 @@
/* error cleanup: caller will clear whole range */ /* error cleanup: caller will clear whole range */
@ -92,6 +93,3 @@ index 06f02960b439..d80d919c78d3 100644
return rc; return rc;
} }
--
2.25.0