]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 May 2017 22:37:19 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 May 2017 22:37:19 +0000 (15:37 -0700)
added patches:
arm-cns3xxx-shut-up-frame-size-warning.patch
arm64-build-vdso-without-libgcov.patch
arm64-provide-a-namespace-to-ncaps.patch
ib-ehca-fix-maybe-uninitialized-warnings.patch
ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
infiniband-mlx5-avoid-a-compile-time-warning.patch
ips-remove-pointless-warning.patch
misdn-avoid-arch-specific-__builtin_return_address-call.patch
mm-cma-silence-warnings-due-to-max-usage.patch
staging-bcm-add-32-bit-host-dependency.patch
staging-imx-drm-fix-indentation-warning.patch
staging-vt6655-fix-overly-large-stack-usage.patch
tty-isicom-fix-big-endian-compile-warning.patch

14 files changed:
queue-3.18/arm-cns3xxx-shut-up-frame-size-warning.patch [new file with mode: 0644]
queue-3.18/arm64-build-vdso-without-libgcov.patch [new file with mode: 0644]
queue-3.18/arm64-provide-a-namespace-to-ncaps.patch [new file with mode: 0644]
queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch [new file with mode: 0644]
queue-3.18/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch [new file with mode: 0644]
queue-3.18/infiniband-mlx5-avoid-a-compile-time-warning.patch [new file with mode: 0644]
queue-3.18/ips-remove-pointless-warning.patch [new file with mode: 0644]
queue-3.18/misdn-avoid-arch-specific-__builtin_return_address-call.patch [new file with mode: 0644]
queue-3.18/mm-cma-silence-warnings-due-to-max-usage.patch [new file with mode: 0644]
queue-3.18/series
queue-3.18/staging-bcm-add-32-bit-host-dependency.patch [new file with mode: 0644]
queue-3.18/staging-imx-drm-fix-indentation-warning.patch [new file with mode: 0644]
queue-3.18/staging-vt6655-fix-overly-large-stack-usage.patch [new file with mode: 0644]
queue-3.18/tty-isicom-fix-big-endian-compile-warning.patch [new file with mode: 0644]

diff --git a/queue-3.18/arm-cns3xxx-shut-up-frame-size-warning.patch b/queue-3.18/arm-cns3xxx-shut-up-frame-size-warning.patch
new file mode 100644 (file)
index 0000000..defed26
--- /dev/null
@@ -0,0 +1,44 @@
+From arnd@arndb.de  Thu May  4 15:27:13 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu,  4 May 2017 22:51:57 +0200
+Subject: ARM: cns3xxx: shut up frame size warning
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170504205209.498721-2-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+This shuts up a warning in the 3.18-stable series that has been fixed
+in newer kernels with commit 498a92d42596 ("ARM: cns3xxx: pci: avoid
+potential stack overflow"):
+
+arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
+arch/arm/mach-cns3xxx/pcie.c:313:1: error: the frame size of 1080 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
+
+The fix that went into v4.4 is known to be buggy and was later
+fixed again with commit 88e9da9a2a70 ("CNS3xxx: Fix PCI
+cns3xxx_write_config()"). While we could backport both to 3.18,
+they are fairly invasive and the warning is definitely harmless
+here as the call chain is known to not overflow the stack of the
+init task.
+
+This simply adds a Makefile flag to extend the limit for this one
+file.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+We do want 88e9da9a2a70 ("CNS3xxx: Fix PCI cns3xxx_write_config()")
+backported into v4.4 though.
+---
+ arch/arm/mach-cns3xxx/Makefile |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/mach-cns3xxx/Makefile
++++ b/arch/arm/mach-cns3xxx/Makefile
+@@ -2,4 +2,5 @@ obj-$(CONFIG_ARCH_CNS3XXX)             += cns3xxx.o
+ cns3xxx-y                             += core.o pm.o
+ cns3xxx-$(CONFIG_ATAGS)                       += devices.o
+ cns3xxx-$(CONFIG_PCI)                 += pcie.o
++CFLAGS_pcie.o                         += -Wframe-larger-than=1536 # override default 1024, this is safe here
+ cns3xxx-$(CONFIG_MACH_CNS3420VB)      += cns3420vb.o
diff --git a/queue-3.18/arm64-build-vdso-without-libgcov.patch b/queue-3.18/arm64-build-vdso-without-libgcov.patch
new file mode 100644 (file)
index 0000000..91de32c
--- /dev/null
@@ -0,0 +1,39 @@
+From 543097843ca7c9ac3758d0b5879ea2a6f44089de Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu, 12 Nov 2015 15:37:12 +0100
+Subject: arm64: build vdso without libgcov
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 543097843ca7c9ac3758d0b5879ea2a6f44089de upstream.
+
+On a cross-toolchain without glibc support, libgcov may not be
+available, and attempting to build an arm64 kernel with GCOV
+enabled then results in a build error:
+
+/home/arnd/cross-gcc/lib/gcc/aarch64-linux/5.2.1/../../../../aarch64-linux/bin/ld: cannot find -lgcov
+
+We don't really want to link libgcov into the vdso anyway, so
+this patch just disables GCOV in the vdso directory, just as
+we do for most other architectures.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/kernel/vdso/Makefile |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/arch/arm64/kernel/vdso/Makefile
++++ b/arch/arm64/kernel/vdso/Makefile
+@@ -15,6 +15,9 @@ ccflags-y := -shared -fno-common -fno-bu
+ ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \
+               $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
++# Disable gcov profiling for VDSO code
++GCOV_PROFILE := n
++
+ # Workaround for bare-metal (ELF) toolchains that neglect to pass -shared
+ # down to collect2, resulting in silent corruption of the vDSO image.
+ ccflags-y += -Wl,-shared
diff --git a/queue-3.18/arm64-provide-a-namespace-to-ncaps.patch b/queue-3.18/arm64-provide-a-namespace-to-ncaps.patch
new file mode 100644 (file)
index 0000000..e8056f5
--- /dev/null
@@ -0,0 +1,89 @@
+From 06f9eb884be81431d54d7d37390043e3b5b7f14a Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam@freescale.com>
+Date: Thu, 4 Dec 2014 01:17:01 +0000
+Subject: arm64: Provide a namespace to NCAPS
+
+From: Fabio Estevam <fabio.estevam@freescale.com>
+
+commit 06f9eb884be81431d54d7d37390043e3b5b7f14a upstream.
+
+Building arm64.allmodconfig leads to the following warning:
+
+usb/gadget/function/f_ncm.c:203:0: warning: "NCAPS" redefined
+ #define NCAPS (USB_CDC_NCM_NCAP_ETH_FILTER | USB_CDC_NCM_NCAP_CRC_MODE)
+ ^
+In file included from /home/build/work/batch/arch/arm64/include/asm/io.h:32:0,
+                 from /home/build/work/batch/include/linux/clocksource.h:19,
+                 from /home/build/work/batch/include/clocksource/arm_arch_timer.h:19,
+                 from /home/build/work/batch/arch/arm64/include/asm/arch_timer.h:27,
+                 from /home/build/work/batch/arch/arm64/include/asm/timex.h:19,
+                 from /home/build/work/batch/include/linux/timex.h:65,
+                 from /home/build/work/batch/include/linux/sched.h:19,
+                 from /home/build/work/batch/arch/arm64/include/asm/compat.h:25,
+                 from /home/build/work/batch/arch/arm64/include/asm/stat.h:23,
+                 from /home/build/work/batch/include/linux/stat.h:5,
+                 from /home/build/work/batch/include/linux/module.h:10,
+                 from /home/build/work/batch/drivers/usb/gadget/function/f_ncm.c:19:
+arch/arm64/include/asm/cpufeature.h:27:0: note: this is the location of the previous definition
+ #define NCAPS     2
+
+So add a ARM64 prefix to avoid such problem.
+
+Reported-by: Olof's autobuilder <build@lixom.net>
+Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/include/asm/cpufeature.h |   10 +++++-----
+ arch/arm64/kernel/setup.c           |    2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+--- a/arch/arm64/include/asm/cpufeature.h
++++ b/arch/arm64/include/asm/cpufeature.h
+@@ -25,11 +25,11 @@
+ #define ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE  1
+ #define ARM64_WORKAROUND_845719                       2
+-#define NCAPS                                 3
++#define ARM64_NCAPS                           3
+ #ifndef __ASSEMBLY__
+-extern DECLARE_BITMAP(cpu_hwcaps, NCAPS);
++extern DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS);
+ static inline bool cpu_have_feature(unsigned int num)
+ {
+@@ -38,16 +38,16 @@ static inline bool cpu_have_feature(unsi
+ static inline bool cpus_have_cap(unsigned int num)
+ {
+-      if (num >= NCAPS)
++      if (num >= ARM64_NCAPS)
+               return false;
+       return test_bit(num, cpu_hwcaps);
+ }
+ static inline void cpus_set_cap(unsigned int num)
+ {
+-      if (num >= NCAPS)
++      if (num >= ARM64_NCAPS)
+               pr_warn("Attempt to set an illegal CPU capability (%d >= %d)\n",
+-                      num, NCAPS);
++                      num, ARM64_NCAPS);
+       else
+               __set_bit(num, cpu_hwcaps);
+ }
+--- a/arch/arm64/kernel/setup.c
++++ b/arch/arm64/kernel/setup.c
+@@ -80,7 +80,7 @@ unsigned int compat_elf_hwcap __read_mos
+ unsigned int compat_elf_hwcap2 __read_mostly;
+ #endif
+-DECLARE_BITMAP(cpu_hwcaps, NCAPS);
++DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS);
+ static const char *cpu_name;
+ phys_addr_t __fdt_pointer __initdata;
diff --git a/queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch b/queue-3.18/ib-ehca-fix-maybe-uninitialized-warnings.patch
new file mode 100644 (file)
index 0000000..7abbfeb
--- /dev/null
@@ -0,0 +1,52 @@
+From arnd@arndb.de  Thu May  4 15:31:46 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu,  4 May 2017 22:52:03 +0200
+Subject: IB/ehca: fix maybe-uninitialized warnings
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170504205209.498721-8-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+The driver causes two warnings about possibly uninitialized variables:
+
+drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf':
+drivers/infiniband/hw/ehca/ehca_mrmw.c:1908:4: warning: 'prev_pgaddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
+drivers/infiniband/hw/ehca/ehca_mrmw.c:1924:14: note: 'prev_pgaddr' was declared here
+drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_reg_mr':
+drivers/infiniband/hw/ehca/ehca_mrmw.c:2430:5: warning: 'hret' may be used uninitialized in this function [-Wmaybe-uninitialized]
+
+The first one is definitely a false positive, the second one may or may not
+be one. In both cases, adding an intialization is the safe and easy
+workaround.
+
+The driver was removed in mainline in commit e581d111dad3
+("staging/rdma: remove deprecated ehca driver"), in linux-4.6.
+In 4.4, the file is located in drivers/staging/rdma/ehca/ehca_mrmw.c,
+and the fix still applies.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/hw/ehca/ehca_mrmw.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
++++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
+@@ -1921,7 +1921,7 @@ static int ehca_set_pagebuf_user2(struct
+                                 u64 *kpage)
+ {
+       int ret = 0;
+-      u64 pgaddr, prev_pgaddr;
++      u64 pgaddr, prev_pgaddr = 0;
+       u32 j = 0;
+       int kpages_per_hwpage = pginfo->hwpage_size / PAGE_SIZE;
+       int nr_kpages = kpages_per_hwpage;
+@@ -2417,6 +2417,7 @@ static int ehca_reg_bmap_mr_rpages(struc
+               ehca_err(&shca->ib_device, "kpage alloc failed");
+               return -ENOMEM;
+       }
++      hret = H_SUCCESS;
+       for (top = 0; top < EHCA_MAP_ENTRIES; top++) {
+               if (!ehca_bmap_valid(ehca_bmap->top[top]))
+                       continue;
diff --git a/queue-3.18/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch b/queue-3.18/ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
new file mode 100644 (file)
index 0000000..7368e6a
--- /dev/null
@@ -0,0 +1,92 @@
+From arnd@arndb.de  Thu May  4 15:29:57 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu,  4 May 2017 22:52:02 +0200
+Subject: IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170504205209.498721-7-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+We get this build warning on arm64
+
+drivers/infiniband/hw/qib/qib_qp.c:44:0: error: "BITS_PER_PAGE" redefined [-Werror]
+ #define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
+
+This is fixed upstream in commit 898fa52b4ac3 ("IB/qib: Remove qpn, qp tables and
+related variables from qib"), which does a lot of other things as well.
+
+Instead, I just backport the rename of the local BITS_PER_PAGE definition to
+RVT_BITS_PER_PAGE.
+
+The driver first showed up in linux-2.6.35, and the fixup should still apply
+to that. The upstream fix went into v4.6, so we could apply this workaround
+to both 3.18 and 4.4.
+
+Fixes: f931551bafe1 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/hw/qib/qib_qp.c |   18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/infiniband/hw/qib/qib_qp.c
++++ b/drivers/infiniband/hw/qib/qib_qp.c
+@@ -41,13 +41,13 @@
+ #include "qib.h"
+-#define BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
+-#define BITS_PER_PAGE_MASK      (BITS_PER_PAGE-1)
++#define RVT_BITS_PER_PAGE           (PAGE_SIZE*BITS_PER_BYTE)
++#define RVT_BITS_PER_PAGE_MASK      (RVT_BITS_PER_PAGE-1)
+ static inline unsigned mk_qpn(struct qib_qpn_table *qpt,
+                             struct qpn_map *map, unsigned off)
+ {
+-      return (map - qpt->map) * BITS_PER_PAGE + off;
++      return (map - qpt->map) * RVT_BITS_PER_PAGE + off;
+ }
+ static inline unsigned find_next_offset(struct qib_qpn_table *qpt,
+@@ -59,7 +59,7 @@ static inline unsigned find_next_offset(
+               if (((off & qpt->mask) >> 1) >= n)
+                       off = (off | qpt->mask) + 2;
+       } else
+-              off = find_next_zero_bit(map->page, BITS_PER_PAGE, off);
++              off = find_next_zero_bit(map->page, RVT_BITS_PER_PAGE, off);
+       return off;
+ }
+@@ -147,8 +147,8 @@ static int alloc_qpn(struct qib_devdata
+               qpn = 2;
+       if (qpt->mask && ((qpn & qpt->mask) >> 1) >= dd->n_krcv_queues)
+               qpn = (qpn | qpt->mask) + 2;
+-      offset = qpn & BITS_PER_PAGE_MASK;
+-      map = &qpt->map[qpn / BITS_PER_PAGE];
++      offset = qpn & RVT_BITS_PER_PAGE_MASK;
++      map = &qpt->map[qpn / RVT_BITS_PER_PAGE];
+       max_scan = qpt->nmaps - !offset;
+       for (i = 0;;) {
+               if (unlikely(!map->page)) {
+@@ -173,7 +173,7 @@ static int alloc_qpn(struct qib_devdata
+                        * We just need to be sure we don't loop
+                        * forever.
+                        */
+-              } while (offset < BITS_PER_PAGE && qpn < QPN_MAX);
++              } while (offset < RVT_BITS_PER_PAGE && qpn < QPN_MAX);
+               /*
+                * In order to keep the number of pages allocated to a
+                * minimum, we scan the all existing pages before increasing
+@@ -204,9 +204,9 @@ static void free_qpn(struct qib_qpn_tabl
+ {
+       struct qpn_map *map;
+-      map = qpt->map + qpn / BITS_PER_PAGE;
++      map = qpt->map + qpn / RVT_BITS_PER_PAGE;
+       if (map->page)
+-              clear_bit(qpn & BITS_PER_PAGE_MASK, map->page);
++              clear_bit(qpn & RVT_BITS_PER_PAGE_MASK, map->page);
+ }
+ static inline unsigned qpn_hash(struct qib_ibdev *dev, u32 qpn)
diff --git a/queue-3.18/infiniband-mlx5-avoid-a-compile-time-warning.patch b/queue-3.18/infiniband-mlx5-avoid-a-compile-time-warning.patch
new file mode 100644 (file)
index 0000000..d6aa7a7
--- /dev/null
@@ -0,0 +1,43 @@
+From 7835bfb5261501590a508b3de3379e2231cb4853 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Tue, 13 Jan 2015 17:09:43 +0100
+Subject: infiniband: mlx5: avoid a compile-time warning
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 7835bfb5261501590a508b3de3379e2231cb4853 upstream.
+
+The return type of find_first_bit() is architecture specific,
+on ARM it is 'unsigned int', while the asm-generic code used
+on x86 and a lot of other architectures returns 'unsigned long'.
+
+When building the mlx5 driver on ARM, we get a warning about
+this:
+
+infiniband/hw/mlx5/mem.c: In function 'mlx5_ib_cont_pages':
+infiniband/hw/mlx5/mem.c:84:143: warning: comparison of distinct pointer types lacks a cast
+     m = min(m, find_first_bit(&tmp, sizeof(tmp)));
+
+This patch changes the driver to use min_t to make it behave
+the same way on all architectures.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: Eli Cohen <eli@mellanox.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/infiniband/hw/mlx5/mem.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/infiniband/hw/mlx5/mem.c
++++ b/drivers/infiniband/hw/mlx5/mem.c
+@@ -69,7 +69,7 @@ void mlx5_ib_cont_pages(struct ib_umem *
+               for (k = 0; k < len; k++) {
+                       if (!(i & mask)) {
+                               tmp = (unsigned long)pfn;
+-                              m = min(m, find_first_bit(&tmp, sizeof(tmp)));
++                              m = min_t(unsigned long, m, find_first_bit(&tmp, sizeof(tmp)));
+                               skip = 1 << m;
+                               mask = skip - 1;
+                               base = pfn;
diff --git a/queue-3.18/ips-remove-pointless-warning.patch b/queue-3.18/ips-remove-pointless-warning.patch
new file mode 100644 (file)
index 0000000..91226d0
--- /dev/null
@@ -0,0 +1,48 @@
+From e03c2da6574223081b786960e39c1e5ecf5d492d Mon Sep 17 00:00:00 2001
+From: James Bottomley <JBottomley@Odin.com>
+Date: Tue, 19 May 2015 11:38:17 -0700
+Subject: ips: remove pointless #warning
+
+From: James Bottomley <JBottomley@Odin.com>
+
+commit e03c2da6574223081b786960e39c1e5ecf5d492d upstream.
+
+non-x86 builds want the #warning in the IPS code about compiling on the wrong
+architecture removed because it keeps triggering on their platforms build
+farms.  Transform from a compile time warning into a runtime one with taint to
+preserve the original intent of the authors.
+
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: James Bottomley <JBottomley@Odin.com>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/ips.c |    9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/drivers/scsi/ips.c
++++ b/drivers/scsi/ips.c
+@@ -206,10 +206,6 @@ module_param(ips, charp, 0);
+ #define IPS_VERSION_HIGH        IPS_VER_MAJOR_STRING "." IPS_VER_MINOR_STRING
+ #define IPS_VERSION_LOW         "." IPS_VER_BUILD_STRING " "
+-#if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__)
+-#warning "This driver has only been tested on the x86/ia64/x86_64 platforms"
+-#endif
+-
+ #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || \
+                          DMA_NONE == scb->scsi_cmd->sc_data_direction) ? \
+                          PCI_DMA_BIDIRECTIONAL : \
+@@ -6789,6 +6785,11 @@ ips_remove_device(struct pci_dev *pci_de
+ static int __init
+ ips_module_init(void)
+ {
++#if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__)
++      printk(KERN_ERR "ips: This driver has only been tested on the x86/ia64/x86_64 platforms\n");
++      add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK);
++#endif
++
+       if (pci_register_driver(&ips_pci_driver) < 0)
+               return -ENODEV;
+       ips_driver_template.module = THIS_MODULE;
diff --git a/queue-3.18/misdn-avoid-arch-specific-__builtin_return_address-call.patch b/queue-3.18/misdn-avoid-arch-specific-__builtin_return_address-call.patch
new file mode 100644 (file)
index 0000000..8820744
--- /dev/null
@@ -0,0 +1,99 @@
+From 3e7a8716e20b759eec0ad88145255bb33174f0c8 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Tue, 13 Jan 2015 17:10:58 +0100
+Subject: mISDN: avoid arch specific __builtin_return_address call
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 3e7a8716e20b759eec0ad88145255bb33174f0c8 upstream.
+
+Not all architectures are able to call __builtin_return_address().
+On ARM, the mISDN code produces this warning:
+
+hardware/mISDN/w6692.c: In function 'w6692_dctrl':
+hardware/mISDN/w6692.c:1181:75: warning: unsupported argument to '__builtin_return_address'
+  pr_debug("%s: %s dev(%d) open from %p\n", card->name, __func__,
+                                                                           ^
+hardware/mISDN/mISDNipac.c: In function 'open_dchannel':
+hardware/mISDN/mISDNipac.c:759:75: warning: unsupported argument to '__builtin_return_address'
+  pr_debug("%s: %s dev(%d) open from %p\n", isac->name, __func__,
+                                                                           ^
+
+In a lot of cases, this is relatively easy to work around by
+passing the value of __builtin_return_address(0) from the
+callers into the functions that want it. One exception is
+the indirect 'open' function call in struct isac_hw. While it
+would be possible to fix this as well, this patch only addresses
+the other callers properly and lets this one return the direct
+parent function, which should be good enough.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/isdn/hardware/mISDN/mISDNipac.c |   12 +++++++++---
+ drivers/isdn/hardware/mISDN/w6692.c     |    6 +++---
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+--- a/drivers/isdn/hardware/mISDN/mISDNipac.c
++++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
+@@ -754,10 +754,10 @@ dbusy_timer_handler(struct isac_hw *isac
+ }
+ static int
+-open_dchannel(struct isac_hw *isac, struct channel_req *rq)
++open_dchannel_caller(struct isac_hw *isac, struct channel_req *rq, void *caller)
+ {
+       pr_debug("%s: %s dev(%d) open from %p\n", isac->name, __func__,
+-               isac->dch.dev.id, __builtin_return_address(1));
++               isac->dch.dev.id, caller);
+       if (rq->protocol != ISDN_P_TE_S0)
+               return -EINVAL;
+       if (rq->adr.channel == 1)
+@@ -771,6 +771,12 @@ open_dchannel(struct isac_hw *isac, stru
+       return 0;
+ }
++static int
++open_dchannel(struct isac_hw *isac, struct channel_req *rq)
++{
++      return open_dchannel_caller(isac, rq, __builtin_return_address(0));
++}
++
+ static const char *ISACVer[] =
+ {"2086/2186 V1.1", "2085 B1", "2085 B2",
+  "2085 V2.3"};
+@@ -1548,7 +1554,7 @@ ipac_dctrl(struct mISDNchannel *ch, u32
+       case OPEN_CHANNEL:
+               rq = arg;
+               if (rq->protocol == ISDN_P_TE_S0)
+-                      err = open_dchannel(isac, rq);
++                      err = open_dchannel_caller(isac, rq, __builtin_return_address(0));
+               else
+                       err = open_bchannel(ipac, rq);
+               if (err)
+--- a/drivers/isdn/hardware/mISDN/w6692.c
++++ b/drivers/isdn/hardware/mISDN/w6692.c
+@@ -1176,10 +1176,10 @@ w6692_l1callback(struct dchannel *dch, u
+ }
+ static int
+-open_dchannel(struct w6692_hw *card, struct channel_req *rq)
++open_dchannel(struct w6692_hw *card, struct channel_req *rq, void *caller)
+ {
+       pr_debug("%s: %s dev(%d) open from %p\n", card->name, __func__,
+-               card->dch.dev.id, __builtin_return_address(1));
++               card->dch.dev.id, caller);
+       if (rq->protocol != ISDN_P_TE_S0)
+               return -EINVAL;
+       if (rq->adr.channel == 1)
+@@ -1207,7 +1207,7 @@ w6692_dctrl(struct mISDNchannel *ch, u32
+       case OPEN_CHANNEL:
+               rq = arg;
+               if (rq->protocol == ISDN_P_TE_S0)
+-                      err = open_dchannel(card, rq);
++                      err = open_dchannel(card, rq, __builtin_return_address(0));
+               else
+                       err = open_bchannel(card, rq);
+               if (err)
diff --git a/queue-3.18/mm-cma-silence-warnings-due-to-max-usage.patch b/queue-3.18/mm-cma-silence-warnings-due-to-max-usage.patch
new file mode 100644 (file)
index 0000000..6ab5d8a
--- /dev/null
@@ -0,0 +1,78 @@
+From badbda53e505089062e194c614e6f23450bc98b2 Mon Sep 17 00:00:00 2001
+From: Stephen Rothwell <sfr@canb.auug.org.au>
+Date: Fri, 27 May 2016 14:27:41 -0700
+Subject: mm/cma: silence warnings due to max() usage
+
+From: Stephen Rothwell <sfr@canb.auug.org.au>
+
+commit badbda53e505089062e194c614e6f23450bc98b2 upstream.
+
+pageblock_order can be (at least) an unsigned int or an unsigned long
+depending on the kernel config and architecture, so use max_t(unsigned
+long, ...) when comparing it.
+
+fixes these warnings:
+
+In file included from include/asm-generic/bug.h:13:0,
+                 from arch/powerpc/include/asm/bug.h:127,
+                 from include/linux/bug.h:4,
+                 from include/linux/mmdebug.h:4,
+                 from include/linux/mm.h:8,
+                 from include/linux/memblock.h:18,
+                 from mm/cma.c:28:
+mm/cma.c: In function 'cma_init_reserved_mem':
+include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast
+  (void) (&_max1 == &_max2);                   ^
+mm/cma.c:186:27: note: in expansion of macro 'max'
+  alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
+                           ^
+mm/cma.c: In function 'cma_declare_contiguous':
+include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast
+  (void) (&_max1 == &_max2);                   ^
+include/linux/kernel.h:747:9: note: in definition of macro 'max'
+  typeof(y) _max2 = (y);            ^
+mm/cma.c:270:29: note: in expansion of macro 'max'
+   (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));
+                             ^
+include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast
+  (void) (&_max1 == &_max2);                   ^
+include/linux/kernel.h:747:21: note: in definition of macro 'max'
+  typeof(y) _max2 = (y);                        ^
+mm/cma.c:270:29: note: in expansion of macro 'max'
+   (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));
+                             ^
+
+[akpm@linux-foundation.org: coding-style fixes]
+Link: http://lkml.kernel.org/r/20160526150748.5be38a4f@canb.auug.org.au
+Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/cma.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/mm/cma.c
++++ b/mm/cma.c
+@@ -168,7 +168,8 @@ int __init cma_init_reserved_mem(phys_ad
+               return -EINVAL;
+       /* ensure minimal alignment requied by mm core */
+-      alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
++      alignment = PAGE_SIZE <<
++                      max_t(unsigned long, MAX_ORDER - 1, pageblock_order);
+       /* alignment should be aligned with order_per_bit */
+       if (!IS_ALIGNED(alignment >> PAGE_SHIFT, 1 << order_per_bit))
+@@ -250,8 +251,8 @@ int __init cma_declare_contiguous(phys_a
+        * migratetype page by page allocator's buddy algorithm. In the case,
+        * you couldn't get a contiguous memory, which is not what we want.
+        */
+-      alignment = max(alignment,
+-              (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));
++      alignment = max(alignment,  (phys_addr_t)PAGE_SIZE <<
++                        max_t(unsigned long, MAX_ORDER - 1, pageblock_order));
+       base = ALIGN(base, alignment);
+       size = ALIGN(size, alignment);
+       limit &= ~(alignment - 1);
index 2cddc7937a5a8c84f730d5cb1beb0d40e5526fd4..1820a8ce56cd34ec944cd10d86fe643729c5688f 100644 (file)
@@ -41,3 +41,16 @@ posix_acl-clear-sgid-bit-when-setting-file-permissions.patch
 l2tp-fix-racy-sock_zapped-flag-check-in-l2tp_ip-6-_bind.patch
 net-avoid-signed-overflows-for-so_-snd-rcv-bufforce.patch
 mm-avoid-setting-up-anonymous-pages-into-file-mapping.patch
+arm-cns3xxx-shut-up-frame-size-warning.patch
+arm64-provide-a-namespace-to-ncaps.patch
+staging-vt6655-fix-overly-large-stack-usage.patch
+staging-imx-drm-fix-indentation-warning.patch
+staging-bcm-add-32-bit-host-dependency.patch
+ib-qib-rename-bits_per_page-to-rvt_bits_per_page.patch
+ib-ehca-fix-maybe-uninitialized-warnings.patch
+tty-isicom-fix-big-endian-compile-warning.patch
+infiniband-mlx5-avoid-a-compile-time-warning.patch
+ips-remove-pointless-warning.patch
+misdn-avoid-arch-specific-__builtin_return_address-call.patch
+arm64-build-vdso-without-libgcov.patch
+mm-cma-silence-warnings-due-to-max-usage.patch
diff --git a/queue-3.18/staging-bcm-add-32-bit-host-dependency.patch b/queue-3.18/staging-bcm-add-32-bit-host-dependency.patch
new file mode 100644 (file)
index 0000000..0d9d26e
--- /dev/null
@@ -0,0 +1,49 @@
+From arnd@arndb.de  Thu May  4 15:29:20 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu,  4 May 2017 22:52:01 +0200
+Subject: staging: bcm: add 32-bit host dependency
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170504205209.498721-6-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+The driver uses a 32-bit variable to store a pointer, causing a couple of
+warnings:
+
+../drivers/staging/bcm/CmHost.c: In function 'StoreCmControlResponseMessage':
+../drivers/staging/bcm/CmHost.c:1503:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
+   (struct bcm_connect_mgr_params *) ntohl(
+   ^
+../drivers/staging/bcm/CmHost.c:1546:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
+   (struct bcm_connect_mgr_params *) ntohl(
+   ^
+../drivers/staging/bcm/CmHost.c:1564:3: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
+   (struct bcm_connect_mgr_params *) ntohl(
+
+I fixed other warnings in an earlier commit 9f1c75ac2dba ("staging/bcm: fix most
+build warnings"), but couldn't figure out what was the intended behavior on
+64-bit machines here.
+
+The driver was removed in linux-3.19, commit d09e9b160fc1 ("staging: bcm: remove
+driver") which explains that it never worked on 64-bit machines. This adds
+a Kconfig dependency instead to prevent it from being built in the known
+broken configuration. This workaround applies to v2.6.37 or higher.
+
+Fixes: f8942e07a3db ("staging: Beeceem USB Wimax driver")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/bcm/Kconfig |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/staging/bcm/Kconfig
++++ b/drivers/staging/bcm/Kconfig
+@@ -1,6 +1,7 @@
+ config BCM_WIMAX
+        tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support"
+        depends on USB && NET
++      depends on !64BIT
+        help
+          This is an experimental driver for the Beceem WIMAX chipset used
+        by Sprint 4G.
diff --git a/queue-3.18/staging-imx-drm-fix-indentation-warning.patch b/queue-3.18/staging-imx-drm-fix-indentation-warning.patch
new file mode 100644 (file)
index 0000000..8290229
--- /dev/null
@@ -0,0 +1,45 @@
+From arnd@arndb.de  Thu May  4 15:29:03 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu,  4 May 2017 22:52:00 +0200
+Subject: staging: imx-drm: fix indentation warning
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170504205209.498721-5-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+gcc-6 produces a harmless warning:
+
+drivers/staging/imx-drm/imx-hdmi.c: In function 'hdmi_config_AVI':
+drivers/staging/imx-drm/imx-hdmi.c:967:2: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
+
+Commit d083c312cba2 ("drm: bridge/dw_hdmi: simplify hdmi_config_AVI() a little")
+in linux-4.3 fixes this with a larger rewrite that is not applicable here.
+After that rewrite, the variable that gets assigned here no longer exists.
+
+The assignment is rather pointless here, as we just set a variable to zero
+that is later added into another variable using a bitwise or operator, and
+that has no effect, so I'm just changing the indentation here to shut up
+the warning.
+
+The driver was originally merged in linux-3.13, and the fix applies
+to all versions between that and 4.2.
+
+Fixes: 9aaf880ed4ee ("imx-drm: Add mx6 hdmi transmitter support")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/imx-drm/imx-hdmi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/imx-drm/imx-hdmi.c
++++ b/drivers/staging/imx-drm/imx-hdmi.c
+@@ -967,7 +967,7 @@ static void hdmi_config_AVI(struct imx_h
+       else
+               pix_fmt = HDMI_FC_AVICONF0_PIX_FMT_RGB;
+-              under_scan =  HDMI_FC_AVICONF0_SCAN_INFO_NODATA;
++      under_scan =  HDMI_FC_AVICONF0_SCAN_INFO_NODATA;
+       /*
+        * Active format identification data is present in the AVI InfoFrame.
diff --git a/queue-3.18/staging-vt6655-fix-overly-large-stack-usage.patch b/queue-3.18/staging-vt6655-fix-overly-large-stack-usage.patch
new file mode 100644 (file)
index 0000000..6de865a
--- /dev/null
@@ -0,0 +1,65 @@
+From arnd@arndb.de  Thu May  4 15:28:39 2017
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Thu,  4 May 2017 22:51:59 +0200
+Subject: staging: vt6655: fix overly large stack usage
+To: gregkh@linuxfoundation.org
+Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
+Message-ID: <20170504205209.498721-4-arnd@arndb.de>
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+We get a warning for the large stack usage in some configurations:
+
+drivers/staging/vt6655/device_main.c: In function 'device_ioctl':
+drivers/staging/vt6655/device_main.c:2974:1: warning: the frame size of 1304 bytes is larger than 1024 bytes [-Wframe-larger-than=]
+
+This is addressed in linux-3.19 with commit 67013f2c0e58 ("staging: vt6655:
+mac80211 conversion add main mac80211 functions"), which obsoletes the
+device_ioctl() function, but as that does not apply to stable kernels,
+this picks an easier way out by using dynamic allocation.
+
+The driver was merged in 2.6.31, and the fix applies to all versions
+before 3.19.
+
+Fixes: 5449c685a4b3 ("Staging: Add pristine upstream vt6655 driver sources")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/vt6655/device_main.c |   10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/staging/vt6655/device_main.c
++++ b/drivers/staging/vt6655/device_main.c
+@@ -2818,11 +2818,13 @@ static int  device_ioctl(struct net_devi
+               pr_debug(" SIOCSIWSENS\n");
+               rc = -EOPNOTSUPP;
+               break;
+-
+       case SIOCGIWAPLIST: {
+-              char buffer[IW_MAX_AP * (sizeof(struct sockaddr) + sizeof(struct iw_quality))];
++              char *buffer = kzalloc(IW_MAX_AP * (sizeof(struct sockaddr) +
++                                     sizeof(struct iw_quality)), GFP_KERNEL);
+-              if (wrq->u.data.pointer) {
++              if (!buffer) {
++                      rc = -ENOMEM;
++              } else if (wrq->u.data.pointer) {
+                       rc = iwctl_giwaplist(dev, NULL, &(wrq->u.data), buffer);
+                       if (rc == 0) {
+                               if (copy_to_user(wrq->u.data.pointer,
+@@ -2832,6 +2834,7 @@ static int  device_ioctl(struct net_devi
+                                       rc = -EFAULT;
+                       }
+               }
++              kfree(buffer);
+       }
+       break;
+@@ -2878,7 +2881,6 @@ static int  device_ioctl(struct net_devi
+               pr_debug(" SIOCGIWGENIE\n");
+               rc = iwctl_giwgenie(dev, NULL, &(wrq->u.data), wrq->u.data.pointer);
+               break;
+-
+       case SIOCSIWENCODEEXT: {
+               char extra[sizeof(struct iw_encode_ext)+MAX_KEY_LEN+1];
diff --git a/queue-3.18/tty-isicom-fix-big-endian-compile-warning.patch b/queue-3.18/tty-isicom-fix-big-endian-compile-warning.patch
new file mode 100644 (file)
index 0000000..7e387f5
--- /dev/null
@@ -0,0 +1,58 @@
+From f3e2d56dce47dbd0bb3f69f84741b439542fef37 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Tue, 13 Jan 2015 22:59:47 +0100
+Subject: tty/isicom: fix big-endian compile warning
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit f3e2d56dce47dbd0bb3f69f84741b439542fef37 upstream.
+
+Building an arm allmodconfig kernel triggers a lengthy but harmless
+warning in the isicom driver:
+
+drvers/tty/isicom.c: In function 'isicom_send_break':
+uapi/linux/swab.h:13:15: warning: integer overflow in expression [-Woverflow]
+  (((__u16)(x) & (__u16)0x00ffU) << 8) |   \
+               ^
+uapi/linux/swab.h:107:2: note: in expansion of macro '___constant_swab16'
+  ___constant_swab16(x) :   \
+  ^
+uapi/linux/byteorder/big_endian.h:34:43: note: in expansion of macro '__swab16'
+ #define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
+                                           ^
+linux/byteorder/generic.h:89:21: note: in expansion of macro '__cpu_to_le16'
+ #define cpu_to_le16 __cpu_to_le16
+                     ^
+include/asm/io.h:270:6: note: in expansion of macro 'cpu_to_le16'
+      cpu_to_le16(v),__io(p)); })
+      ^
+drivers/tty/isicom.c:1058:2: note: in expansion of macro 'outw'
+  outw((length & 0xff00), base);
+  ^
+
+Apparently, the problem is related to the fact that the value 0xff00,
+when used as a 16-bit number, is negative and passed into bitwise
+operands of the generic byte swapping code.
+
+Marking the input argument as unsigned in both technically correct
+and avoids the warning.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/isicom.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/tty/isicom.c
++++ b/drivers/tty/isicom.c
+@@ -1055,7 +1055,7 @@ static int isicom_send_break(struct tty_
+       outw(0x8000 | ((port->channel) << (card->shift_count)) | 0x3, base);
+       outw((length & 0xff) << 8 | 0x00, base);
+-      outw((length & 0xff00), base);
++      outw((length & 0xff00u), base);
+       InterruptTheCard(base);
+       unlock_card(card);