]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Feb 2015 22:55:29 +0000 (14:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Feb 2015 22:55:29 +0000 (14:55 -0800)
added patches:
can-c_can-end-pending-transmission-on-network-stop-ifdown.patch
clocksource-arch_timer-only-use-the-virtual-counter.patch
xen-arm-arm64-introduce-xen_arch_need_swiotlb.patch

queue-3.18/can-c_can-end-pending-transmission-on-network-stop-ifdown.patch [new file with mode: 0644]
queue-3.18/clocksource-arch_timer-only-use-the-virtual-counter.patch [new file with mode: 0644]
queue-3.18/series
queue-3.18/xen-arm-arm64-introduce-xen_arch_need_swiotlb.patch [new file with mode: 0644]

diff --git a/queue-3.18/can-c_can-end-pending-transmission-on-network-stop-ifdown.patch b/queue-3.18/can-c_can-end-pending-transmission-on-network-stop-ifdown.patch
new file mode 100644 (file)
index 0000000..0c37add
--- /dev/null
@@ -0,0 +1,34 @@
+From 7ffd7b4e169d619e66928fe5d997723f2c6f1056 Mon Sep 17 00:00:00 2001
+From: Viktor Babrian <babrian.viktor@renyi.mta.hu>
+Date: Sun, 18 Jan 2015 20:01:40 +0100
+Subject: can: c_can: end pending transmission on network stop (ifdown)
+
+From: Viktor Babrian <babrian.viktor@renyi.mta.hu>
+
+commit 7ffd7b4e169d619e66928fe5d997723f2c6f1056 upstream.
+
+Put controller into init mode in network stop to end pending transmissions. The
+issue is observed in cases when transmitted frame is not acked.
+
+Signed-off-by: Viktor Babrian <babrian.viktor@renyi.mta.hu>
+Cc: linux-stable <stable@vger.kernel.org>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/c_can/c_can.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/can/c_can/c_can.c
++++ b/drivers/net/can/c_can/c_can.c
+@@ -611,6 +611,10 @@ static void c_can_stop(struct net_device
+       struct c_can_priv *priv = netdev_priv(dev);
+       c_can_irq_control(priv, false);
++
++      /* put ctrl to init on stop to end ongoing transmission */
++      priv->write_reg(priv, C_CAN_CTRL_REG, CONTROL_INIT);
++
+       priv->can.state = CAN_STATE_STOPPED;
+ }
diff --git a/queue-3.18/clocksource-arch_timer-only-use-the-virtual-counter.patch b/queue-3.18/clocksource-arch_timer-only-use-the-virtual-counter.patch
new file mode 100644 (file)
index 0000000..0b60f08
--- /dev/null
@@ -0,0 +1,44 @@
+From d6ad36913083d683aad4e02e53580c995f1a6ede Mon Sep 17 00:00:00 2001
+From: Catalin Marinas <catalin.marinas@arm.com>
+Date: Wed, 10 Dec 2014 11:02:09 +0000
+Subject: clocksource: arch_timer: Only use the virtual counter
+ (CNTVCT) on arm64
+
+From: Catalin Marinas <catalin.marinas@arm.com>
+
+commit d6ad36913083d683aad4e02e53580c995f1a6ede upstream.
+
+Commit 0b46b8a718c6 (clocksource: arch_timer: Fix code to use physical
+timers when requested) introduces the use of physical counters in the
+ARM architected timer driver. However, he arm64 kernel uses CNTVCT in
+VDSO. When booting in EL2, the kernel switches to the physical timers to
+make things easier for KVM but it continues to use the virtual counter
+both in user and kernel. While in such scenario CNTVCT == CNTPCT (since
+CNTVOFF is initialised by the kernel to 0), we want to spot firmware
+bugs corrupting CNTVOFF early (which would affect CNTVCT).
+
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Tested-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
+Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Fixes: 0b46b8a718c6 ("clocksource: arch_timer: Fix code to use physical
+timers when requested")
+Cc: Ian Campbell <ijc@hellion.org.uk>
+Signed-off-by: Mark Rutland <mark.rutland@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clocksource/arm_arch_timer.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/clocksource/arm_arch_timer.c
++++ b/drivers/clocksource/arm_arch_timer.c
+@@ -462,7 +462,7 @@ static void __init arch_counter_register
+       /* Register the CP15 based counter if we have one */
+       if (type & ARCH_CP15_TIMER) {
+-              if (arch_timer_use_virtual)
++              if (IS_ENABLED(CONFIG_ARM64) || arch_timer_use_virtual)
+                       arch_timer_read_counter = arch_counter_get_cntvct;
+               else
+                       arch_timer_read_counter = arch_counter_get_cntpct;
index 992cd49a724e263e35be7c86e700b43ae4e14c1c..bae2ea097f6e9631cd4cc78ebc936f4bb7a62418 100644 (file)
@@ -52,3 +52,6 @@ memcg-remove-extra-newlines-from-memcg-oom-kill-log.patch
 perf-x86-intel-add-model-number-for-airmont.patch
 perf-rapl-fix-crash-in-rapl_scale.patch
 hid-rmi-check-for-additional-acm-registers-appended-to-f11.patch
+can-c_can-end-pending-transmission-on-network-stop-ifdown.patch
+clocksource-arch_timer-only-use-the-virtual-counter.patch
+xen-arm-arm64-introduce-xen_arch_need_swiotlb.patch
diff --git a/queue-3.18/xen-arm-arm64-introduce-xen_arch_need_swiotlb.patch b/queue-3.18/xen-arm-arm64-introduce-xen_arch_need_swiotlb.patch
new file mode 100644 (file)
index 0000000..eccbc5f
--- /dev/null
@@ -0,0 +1,95 @@
+From a4dba130891271084344c12537731542ec77cb85 Mon Sep 17 00:00:00 2001
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Date: Fri, 21 Nov 2014 11:07:39 +0000
+Subject: xen/arm/arm64: introduce xen_arch_need_swiotlb
+
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+
+commit a4dba130891271084344c12537731542ec77cb85 upstream.
+
+Introduce an arch specific function to find out whether a particular dma
+mapping operation needs to bounce on the swiotlb buffer.
+
+On ARM and ARM64, if the page involved is a foreign page and the device
+is not coherent, we need to bounce because at unmap time we cannot
+execute any required cache maintenance operations (we don't know how to
+find the pfn from the mfn).
+
+No change of behaviour for x86.
+
+Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Reviewed-by: David Vrabel <david.vrabel@citrix.com>
+Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
+Acked-by: Ian Campbell <ian.campbell@citrix.com>
+Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/include/asm/xen/page.h |    4 ++++
+ arch/arm/xen/mm.c               |    7 +++++++
+ arch/x86/include/asm/xen/page.h |    7 +++++++
+ drivers/xen/swiotlb-xen.c       |    5 ++++-
+ 4 files changed, 22 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/include/asm/xen/page.h
++++ b/arch/arm/include/asm/xen/page.h
+@@ -107,4 +107,8 @@ static inline bool set_phys_to_machine(u
+ #define xen_remap(cookie, size) ioremap_cache((cookie), (size))
+ #define xen_unmap(cookie) iounmap((cookie))
++bool xen_arch_need_swiotlb(struct device *dev,
++                         unsigned long pfn,
++                         unsigned long mfn);
++
+ #endif /* _ASM_ARM_XEN_PAGE_H */
+--- a/arch/arm/xen/mm.c
++++ b/arch/arm/xen/mm.c
+@@ -16,6 +16,13 @@
+ #include <asm/xen/hypercall.h>
+ #include <asm/xen/interface.h>
++bool xen_arch_need_swiotlb(struct device *dev,
++                         unsigned long pfn,
++                         unsigned long mfn)
++{
++      return (pfn != mfn);
++}
++
+ int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
+                                unsigned int address_bits,
+                                dma_addr_t *dma_handle)
+--- a/arch/x86/include/asm/xen/page.h
++++ b/arch/x86/include/asm/xen/page.h
+@@ -236,4 +236,11 @@ void make_lowmem_page_readwrite(void *va
+ #define xen_remap(cookie, size) ioremap((cookie), (size));
+ #define xen_unmap(cookie) iounmap((cookie))
++static inline bool xen_arch_need_swiotlb(struct device *dev,
++                                       unsigned long pfn,
++                                       unsigned long mfn)
++{
++      return false;
++}
++
+ #endif /* _ASM_X86_XEN_PAGE_H */
+--- a/drivers/xen/swiotlb-xen.c
++++ b/drivers/xen/swiotlb-xen.c
+@@ -397,7 +397,9 @@ dma_addr_t xen_swiotlb_map_page(struct d
+        * buffering it.
+        */
+       if (dma_capable(dev, dev_addr, size) &&
+-          !range_straddles_page_boundary(phys, size) && !swiotlb_force) {
++          !range_straddles_page_boundary(phys, size) &&
++              !xen_arch_need_swiotlb(dev, PFN_DOWN(phys), PFN_DOWN(dev_addr)) &&
++              !swiotlb_force) {
+               /* we are not interested in the dma_addr returned by
+                * xen_dma_map_page, only in the potential cache flushes executed
+                * by the function. */
+@@ -555,6 +557,7 @@ xen_swiotlb_map_sg_attrs(struct device *
+               dma_addr_t dev_addr = xen_phys_to_bus(paddr);
+               if (swiotlb_force ||
++                  xen_arch_need_swiotlb(hwdev, PFN_DOWN(paddr), PFN_DOWN(dev_addr)) ||
+                   !dma_capable(hwdev, dev_addr, sg->length) ||
+                   range_straddles_page_boundary(paddr, sg->length)) {
+                       phys_addr_t map = swiotlb_tbl_map_single(hwdev,