From: Greg Kroah-Hartman Date: Thu, 19 Apr 2018 16:26:07 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.9.95~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aaa3473dba5c79bccd8944a912c70aa33c888997;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: arm-dts-at91-at91sam9g25-fix-mux-mask-pinctrl-property.patch arm-dts-at91-sama5d4-fix-pinctrl-compatible-string.patch arm-dts-exynos-fix-iommu-support-for-gscaler-devices-on-exynos5250.patch spi-fix-scatterlist-elements-size-in-spi_map_buf.patch --- diff --git a/queue-4.9/arm-dts-at91-at91sam9g25-fix-mux-mask-pinctrl-property.patch b/queue-4.9/arm-dts-at91-at91sam9g25-fix-mux-mask-pinctrl-property.patch new file mode 100644 index 00000000000..d4fa72bce76 --- /dev/null +++ b/queue-4.9/arm-dts-at91-at91sam9g25-fix-mux-mask-pinctrl-property.patch @@ -0,0 +1,34 @@ +From e8fd0adf105e132fd84545997bbef3d5edc2c9c1 Mon Sep 17 00:00:00 2001 +From: Nicolas Ferre +Date: Tue, 13 Mar 2018 16:20:05 +0100 +Subject: ARM: dts: at91: at91sam9g25: fix mux-mask pinctrl property + +From: Nicolas Ferre + +commit e8fd0adf105e132fd84545997bbef3d5edc2c9c1 upstream. + +There are only 19 PIOB pins having primary names PB0-PB18. Not all of them +have a 'C' function. So the pinctrl property mask ends up being the same as the +other SoC of the at91sam9x5 series. + +Reported-by: Marek Sieranski +Signed-off-by: Nicolas Ferre +Cc: # v3.8+ +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/at91sam9g25.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/at91sam9g25.dtsi ++++ b/arch/arm/boot/dts/at91sam9g25.dtsi +@@ -21,7 +21,7 @@ + atmel,mux-mask = < + /* A B C */ + 0xffffffff 0xffe0399f 0xc000001c /* pioA */ +- 0x0007ffff 0x8000fe3f 0x00000000 /* pioB */ ++ 0x0007ffff 0x00047e3f 0x00000000 /* pioB */ + 0x80000000 0x07c0ffff 0xb83fffff /* pioC */ + 0x003fffff 0x003f8000 0x00000000 /* pioD */ + >; diff --git a/queue-4.9/arm-dts-at91-sama5d4-fix-pinctrl-compatible-string.patch b/queue-4.9/arm-dts-at91-sama5d4-fix-pinctrl-compatible-string.patch new file mode 100644 index 00000000000..67dc96d1011 --- /dev/null +++ b/queue-4.9/arm-dts-at91-sama5d4-fix-pinctrl-compatible-string.patch @@ -0,0 +1,35 @@ +From 9a06757dcc8509c162ac00488c8c82fc98e04227 Mon Sep 17 00:00:00 2001 +From: Santiago Esteban +Date: Thu, 18 Jan 2018 15:38:47 +0100 +Subject: ARM: dts: at91: sama5d4: fix pinctrl compatible string + +From: Santiago Esteban + +commit 9a06757dcc8509c162ac00488c8c82fc98e04227 upstream. + +The compatible string is incorrect. Add atmel,sama5d3-pinctrl since +it's the appropriate compatible string. Remove the +atmel,at91rm9200-pinctrl compatible string, this fallback is +useless, there are too many changes. + +Signed-off-by: Santiago Esteban +Signed-off-by: Ludovic Desroches +Cc: stable@vger.kernel.org #v3.18 +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/sama5d4.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/sama5d4.dtsi ++++ b/arch/arm/boot/dts/sama5d4.dtsi +@@ -1362,7 +1362,7 @@ + pinctrl@fc06a000 { + #address-cells = <1>; + #size-cells = <1>; +- compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus"; ++ compatible = "atmel,sama5d3-pinctrl", "atmel,at91sam9x5-pinctrl", "simple-bus"; + ranges = <0xfc068000 0xfc068000 0x100 + 0xfc06a000 0xfc06a000 0x4000>; + /* WARNING: revisit as pin spec has changed */ diff --git a/queue-4.9/arm-dts-exynos-fix-iommu-support-for-gscaler-devices-on-exynos5250.patch b/queue-4.9/arm-dts-exynos-fix-iommu-support-for-gscaler-devices-on-exynos5250.patch new file mode 100644 index 00000000000..12da612a032 --- /dev/null +++ b/queue-4.9/arm-dts-exynos-fix-iommu-support-for-gscaler-devices-on-exynos5250.patch @@ -0,0 +1,62 @@ +From 6f4870753f29edf7dc39444246f9e39987b8b158 Mon Sep 17 00:00:00 2001 +From: Marek Szyprowski +Date: Fri, 2 Mar 2018 17:07:42 +0100 +Subject: ARM: dts: exynos: Fix IOMMU support for GScaler devices on Exynos5250 + +From: Marek Szyprowski + +commit 6f4870753f29edf7dc39444246f9e39987b8b158 upstream. + +The proper name for the property, which assign given device to IOMMU is +'iommus', not 'iommu'. Fix incorrect name and let all GScaler devices +to be properly handled when IOMMU support is enabled. + +Reported-by: Andrzej Hajda +Signed-off-by: Marek Szyprowski +Fixes: 6cbfdd73a94f ("ARM: dts: add sysmmu nodes for exynos5250") +Cc: # v4.8+ +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/exynos5250.dtsi | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm/boot/dts/exynos5250.dtsi ++++ b/arch/arm/boot/dts/exynos5250.dtsi +@@ -640,7 +640,7 @@ + power-domains = <&pd_gsc>; + clocks = <&clock CLK_GSCL0>; + clock-names = "gscl"; +- iommu = <&sysmmu_gsc0>; ++ iommus = <&sysmmu_gsc0>; + }; + + gsc_1: gsc@13e10000 { +@@ -650,7 +650,7 @@ + power-domains = <&pd_gsc>; + clocks = <&clock CLK_GSCL1>; + clock-names = "gscl"; +- iommu = <&sysmmu_gsc1>; ++ iommus = <&sysmmu_gsc1>; + }; + + gsc_2: gsc@13e20000 { +@@ -660,7 +660,7 @@ + power-domains = <&pd_gsc>; + clocks = <&clock CLK_GSCL2>; + clock-names = "gscl"; +- iommu = <&sysmmu_gsc2>; ++ iommus = <&sysmmu_gsc2>; + }; + + gsc_3: gsc@13e30000 { +@@ -670,7 +670,7 @@ + power-domains = <&pd_gsc>; + clocks = <&clock CLK_GSCL3>; + clock-names = "gscl"; +- iommu = <&sysmmu_gsc3>; ++ iommus = <&sysmmu_gsc3>; + }; + + hdmi: hdmi@14530000 { diff --git a/queue-4.9/series b/queue-4.9/series index 52cc688f4ba..23da955408f 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -77,3 +77,7 @@ ipc-shm-fix-use-after-free-of-shm-file-via-remap_file_pages.patch mm-slab-reschedule-cache_reap-on-the-same-cpu.patch usb-musb-gadget-misplaced-out-of-bounds-check.patch usb-gadget-udc-core-update-usb_ep_queue-documentation.patch +arm-dts-at91-at91sam9g25-fix-mux-mask-pinctrl-property.patch +arm-dts-exynos-fix-iommu-support-for-gscaler-devices-on-exynos5250.patch +arm-dts-at91-sama5d4-fix-pinctrl-compatible-string.patch +spi-fix-scatterlist-elements-size-in-spi_map_buf.patch diff --git a/queue-4.9/spi-fix-scatterlist-elements-size-in-spi_map_buf.patch b/queue-4.9/spi-fix-scatterlist-elements-size-in-spi_map_buf.patch new file mode 100644 index 00000000000..c4617656adc --- /dev/null +++ b/queue-4.9/spi-fix-scatterlist-elements-size-in-spi_map_buf.patch @@ -0,0 +1,50 @@ +From ce99319a182fe766be67f96338386f3ec73e321c Mon Sep 17 00:00:00 2001 +From: Maxime Chevallier +Date: Fri, 2 Mar 2018 15:55:09 +0100 +Subject: spi: Fix scatterlist elements size in spi_map_buf + +From: Maxime Chevallier + +commit ce99319a182fe766be67f96338386f3ec73e321c upstream. + +When SPI transfers can be offloaded using DMA, the SPI core need to +build a scatterlist to make sure that the buffer to be transferred is +dma-able. + +This patch fixes the scatterlist entry size computation in the case +where the maximum acceptable scatterlist entry supported by the DMA +controller is less than PAGE_SIZE, when the buffer is vmalloced. + +For each entry, the actual size is given by the minimum between the +desc_len (which is the max buffer size supported by the DMA controller) +and the remaining buffer length until we cross a page boundary. + +Fixes: 65598c13fd66 ("spi: Fix per-page mapping of unaligned vmalloc-ed buffer") +Signed-off-by: Maxime Chevallier +Signed-off-by: Mark Brown +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/spi/spi.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/spi/spi.c ++++ b/drivers/spi/spi.c +@@ -743,8 +743,14 @@ static int spi_map_buf(struct spi_master + for (i = 0; i < sgs; i++) { + + if (vmalloced_buf || kmap_buf) { +- min = min_t(size_t, +- len, desc_len - offset_in_page(buf)); ++ /* ++ * Next scatterlist entry size is the minimum between ++ * the desc_len and the remaining buffer length that ++ * fits in a page. ++ */ ++ min = min_t(size_t, desc_len, ++ min_t(size_t, len, ++ PAGE_SIZE - offset_in_page(buf))); + if (vmalloced_buf) + vm_page = vmalloc_to_page(buf); + else