From 9e923c8434aa89301e0cbbeb2af7a50c69e23f5e Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Fri, 21 Feb 2020 22:11:04 +0100 Subject: [PATCH] [rt] Refresh "powerpc/pseries/iommu: Use a locallock instead local_irq_save()" for context changes in 4.19.104. --- debian/changelog | 2 ++ ...iommu-Use-a-locallock-instead-local_.patch | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index e55879d54..7dd65aacf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -860,6 +860,8 @@ linux (4.19.104-1) UNRELEASED; urgency=medium * Refresh "ARM: dts: bcm283x: Correct vchiq compatible string" for context changes in 4.19.99 * [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 ] * [x86] Drop "Add a SysRq option to lift kernel lockdown" (Closes: #947021) diff --git a/debian/patches-rt/0263-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch b/debian/patches-rt/0263-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch index 02ecea9d8..00334c34f 100644 --- a/debian/patches-rt/0263-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch +++ b/debian/patches-rt/0263-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch @@ -14,12 +14,13 @@ Use local_irq_save() instead of local_irq_disable(). Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steven Rostedt (VMware) +[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 ++++++++++------ 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 +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -38,6 +38,7 @@ @@ -30,7 +31,7 @@ index 06f02960b439..d80d919c78d3 100644 #include #include #include -@@ -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); @@ -38,7 +39,7 @@ index 06f02960b439..d80d919c78d3 100644 static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, 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); } @@ -48,16 +49,16 @@ index 06f02960b439..d80d919c78d3 100644 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); /* If allocation fails, fall back to the loop implementation */ if (!tcep) { - local_irq_restore(flags); + local_unlock_irqrestore(tcp_page_lock, flags); - return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, - direction, attrs); - } -@@ -277,7 +280,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, + return tce_build_pSeriesLP(tbl->it_index, tcenum, + tbl->it_page_shift, + npages, uaddr, direction, attrs); +@@ -279,7 +282,7 @@ tcenum += limit; } while (npages > 0 && !rc); @@ -66,9 +67,9 @@ index 06f02960b439..d80d919c78d3 100644 if (unlikely(rc == H_NOT_ENOUGH_RESOURCES)) { ret = (int)rc; -@@ -435,13 +438,14 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn, - u64 rc = 0; - long l, limit; +@@ -450,13 +453,14 @@ + DMA_BIDIRECTIONAL, 0); + } - local_irq_disable(); /* 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; } __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 */ @@ -92,6 +93,3 @@ index 06f02960b439..d80d919c78d3 100644 return rc; } --- -2.25.0 -