]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
patches for 4.4
authorSasha Levin <sashal@kernel.org>
Thu, 10 Jan 2019 06:20:16 +0000 (01:20 -0500)
committerSasha Levin <sashal@kernel.org>
Thu, 10 Jan 2019 06:20:16 +0000 (01:20 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.4/arm-imx-update-the-cpu-power-up-timing-setting-on-i..patch [new file with mode: 0644]
queue-4.4/checkstack.pl-fix-for-aarch64.patch [new file with mode: 0644]
queue-4.4/input-omap-keypad-fix-idle-configuration-to-not-bloc.patch [new file with mode: 0644]
queue-4.4/input-restore-ev_abs-abs_reserved.patch [new file with mode: 0644]
queue-4.4/powerpc-fix-coff-zimage-booting-on-old-powermacs.patch [new file with mode: 0644]
queue-4.4/scsi-bnx2fc-fix-null-dereference-in-error-handling.patch [new file with mode: 0644]
queue-4.4/series
queue-4.4/xfrm-fix-bucket-count-reported-to-userspace.patch [new file with mode: 0644]

diff --git a/queue-4.4/arm-imx-update-the-cpu-power-up-timing-setting-on-i..patch b/queue-4.4/arm-imx-update-the-cpu-power-up-timing-setting-on-i..patch
new file mode 100644 (file)
index 0000000..f05fd07
--- /dev/null
@@ -0,0 +1,40 @@
+From 29c3b4dc0fc6b7176701866bbeb47a7990623045 Mon Sep 17 00:00:00 2001
+From: Anson Huang <anson.huang@nxp.com>
+Date: Tue, 4 Dec 2018 03:17:45 +0000
+Subject: ARM: imx: update the cpu power up timing setting on i.mx6sx
+
+[ Upstream commit 1e434b703248580b7aaaf8a115d93e682f57d29f ]
+
+The sw2iso count should cover ARM LDO ramp-up time,
+the MAX ARM LDO ramp-up time may be up to more than
+100us on some boards, this patch sets sw2iso to 0xf
+(~384us) which is the reset value, and it is much
+more safe to cover different boards, since we have
+observed that some customer boards failed with current
+setting of 0x2.
+
+Fixes: 05136f0897b5 ("ARM: imx: support arm power off in cpuidle for i.mx6sx")
+Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
+Reviewed-by: Fabio Estevam <festevam@gmail.com>
+Signed-off-by: Shawn Guo <shawnguo@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/mach-imx/cpuidle-imx6sx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/mach-imx/cpuidle-imx6sx.c b/arch/arm/mach-imx/cpuidle-imx6sx.c
+index 3c6672b3796b..7f5df8992008 100644
+--- a/arch/arm/mach-imx/cpuidle-imx6sx.c
++++ b/arch/arm/mach-imx/cpuidle-imx6sx.c
+@@ -97,7 +97,7 @@ int __init imx6sx_cpuidle_init(void)
+        * except for power up sw2iso which need to be
+        * larger than LDO ramp up time.
+        */
+-      imx_gpc_set_arm_power_up_timing(2, 1);
++      imx_gpc_set_arm_power_up_timing(0xf, 1);
+       imx_gpc_set_arm_power_down_timing(1, 1);
+       return cpuidle_register(&imx6sx_cpuidle_driver, NULL);
+-- 
+2.19.1
+
diff --git a/queue-4.4/checkstack.pl-fix-for-aarch64.patch b/queue-4.4/checkstack.pl-fix-for-aarch64.patch
new file mode 100644 (file)
index 0000000..28fa8d7
--- /dev/null
@@ -0,0 +1,46 @@
+From bab4375152c2373ddea1ea55eb0014eab490cf0e Mon Sep 17 00:00:00 2001
+From: Qian Cai <cai@lca.pw>
+Date: Fri, 14 Dec 2018 14:17:20 -0800
+Subject: checkstack.pl: fix for aarch64
+
+[ Upstream commit f1733a1d3cd32a9492f4cf866be37bb46e10163d ]
+
+There is actually a space after "sp," like this,
+
+    ffff2000080813c8:       a9bb7bfd        stp     x29, x30, [sp, #-80]!
+
+Right now, checkstack.pl isn't able to print anything on aarch64,
+because it won't be able to match the stating objdump line of a function
+due to this missing space.  Hence, it displays every stack as zero-size.
+
+After this patch, checkpatch.pl is able to match the start of a
+function's objdump, and is then able to calculate each function's stack
+correctly.
+
+Link: http://lkml.kernel.org/r/20181207195843.38528-1-cai@lca.pw
+Signed-off-by: Qian Cai <cai@lca.pw>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ scripts/checkstack.pl | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl
+index dd8397894d5c..12a6940741fe 100755
+--- a/scripts/checkstack.pl
++++ b/scripts/checkstack.pl
+@@ -46,8 +46,8 @@ my (@stack, $re, $dre, $x, $xs, $funcre);
+       $xs     = "[0-9a-f ]";  # hex character or space
+       $funcre = qr/^$x* <(.*)>:$/;
+       if ($arch eq 'aarch64') {
+-              #ffffffc0006325cc:       a9bb7bfd        stp     x29, x30, [sp,#-80]!
+-              $re = qr/^.*stp.*sp,\#-([0-9]{1,8})\]\!/o;
++              #ffffffc0006325cc:       a9bb7bfd        stp     x29, x30, [sp, #-80]!
++              $re = qr/^.*stp.*sp, \#-([0-9]{1,8})\]\!/o;
+       } elsif ($arch eq 'arm') {
+               #c0008ffc:      e24dd064        sub     sp, sp, #100    ; 0x64
+               $re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;
+-- 
+2.19.1
+
diff --git a/queue-4.4/input-omap-keypad-fix-idle-configuration-to-not-bloc.patch b/queue-4.4/input-omap-keypad-fix-idle-configuration-to-not-bloc.patch
new file mode 100644 (file)
index 0000000..1e58943
--- /dev/null
@@ -0,0 +1,83 @@
+From 10ce8fe776f70818a75601dc68b927a5819a76e6 Mon Sep 17 00:00:00 2001
+From: Tony Lindgren <tony@atomide.com>
+Date: Tue, 4 Dec 2018 13:52:49 -0800
+Subject: Input: omap-keypad - fix idle configuration to not block SoC idle
+ states
+
+[ Upstream commit e2ca26ec4f01486661b55b03597c13e2b9c18b73 ]
+
+With PM enabled, I noticed that pressing a key on the droid4 keyboard will
+block deeper idle states for the SoC. Let's fix this by using IRQF_ONESHOT
+and stop constantly toggling the device OMAP4_KBD_IRQENABLE register as
+suggested by Dmitry Torokhov <dmitry.torokhov@gmail.com>.
+
+From the hardware point of view, looks like we need to manage the registers
+for OMAP4_KBD_IRQENABLE and OMAP4_KBD_WAKEUPENABLE together to avoid
+blocking deeper SoC idle states. And with toggling of OMAP4_KBD_IRQENABLE
+register now gone with IRQF_ONESHOT, also the SoC idle state problem is
+gone during runtime. We still also need to clear OMAP4_KBD_WAKEUPENABLE in
+omap4_keypad_close() though to pair it with omap4_keypad_open() to prevent
+blocking deeper SoC idle states after rmmod omap4-keypad.
+
+Reported-by: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/input/keyboard/omap4-keypad.c | 16 ++++------------
+ 1 file changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c
+index f78c464899db..3d2c60c8de83 100644
+--- a/drivers/input/keyboard/omap4-keypad.c
++++ b/drivers/input/keyboard/omap4-keypad.c
+@@ -126,12 +126,8 @@ static irqreturn_t omap4_keypad_irq_handler(int irq, void *dev_id)
+ {
+       struct omap4_keypad *keypad_data = dev_id;
+-      if (kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)) {
+-              /* Disable interrupts */
+-              kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
+-                               OMAP4_VAL_IRQDISABLE);
++      if (kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS))
+               return IRQ_WAKE_THREAD;
+-      }
+       return IRQ_NONE;
+ }
+@@ -173,11 +169,6 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
+       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
+                        kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
+-      /* enable interrupts */
+-      kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
+-              OMAP4_DEF_IRQENABLE_EVENTEN |
+-                              OMAP4_DEF_IRQENABLE_LONGKEY);
+-
+       return IRQ_HANDLED;
+ }
+@@ -214,9 +205,10 @@ static void omap4_keypad_close(struct input_dev *input)
+       disable_irq(keypad_data->irq);
+-      /* Disable interrupts */
++      /* Disable interrupts and wake-up events */
+       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
+                        OMAP4_VAL_IRQDISABLE);
++      kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE, 0);
+       /* clear pending interrupts */
+       kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS,
+@@ -364,7 +356,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
+       }
+       error = request_threaded_irq(keypad_data->irq, omap4_keypad_irq_handler,
+-                                   omap4_keypad_irq_thread_fn, 0,
++                                   omap4_keypad_irq_thread_fn, IRQF_ONESHOT,
+                                    "omap4-keypad", keypad_data);
+       if (error) {
+               dev_err(&pdev->dev, "failed to register interrupt\n");
+-- 
+2.19.1
+
diff --git a/queue-4.4/input-restore-ev_abs-abs_reserved.patch b/queue-4.4/input-restore-ev_abs-abs_reserved.patch
new file mode 100644 (file)
index 0000000..53b5ba9
--- /dev/null
@@ -0,0 +1,43 @@
+From 7a74a8f9d1e68b1568260ede720f46a5ab7b4f92 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu, 6 Dec 2018 09:03:36 +1000
+Subject: Input: restore EV_ABS ABS_RESERVED
+
+[ Upstream commit c201e3808e0e4be9b98d192802085a9f491bd80c ]
+
+ABS_RESERVED was added in d9ca1c990a7 and accidentally removed as part of
+ffe0e7cf290f5c9 when the high-resolution scrolling code was removed.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Reviewed-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
+Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/uapi/linux/input-event-codes.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
+index 87cf351bab03..9e07bf4259e1 100644
+--- a/include/uapi/linux/input-event-codes.h
++++ b/include/uapi/linux/input-event-codes.h
+@@ -708,6 +708,15 @@
+ #define ABS_MISC              0x28
++/*
++ * 0x2e is reserved and should not be used in input drivers.
++ * It was used by HID as ABS_MISC+6 and userspace needs to detect if
++ * the next ABS_* event is correct or is just ABS_MISC + n.
++ * We define here ABS_RESERVED so userspace can rely on it and detect
++ * the situation described above.
++ */
++#define ABS_RESERVED          0x2e
++
+ #define ABS_MT_SLOT           0x2f    /* MT slot being modified */
+ #define ABS_MT_TOUCH_MAJOR    0x30    /* Major axis of touching ellipse */
+ #define ABS_MT_TOUCH_MINOR    0x31    /* Minor axis (omit if circular) */
+-- 
+2.19.1
+
diff --git a/queue-4.4/powerpc-fix-coff-zimage-booting-on-old-powermacs.patch b/queue-4.4/powerpc-fix-coff-zimage-booting-on-old-powermacs.patch
new file mode 100644 (file)
index 0000000..769dbd6
--- /dev/null
@@ -0,0 +1,56 @@
+From c4b294473507885815f8df74c4cd1d883a1758c9 Mon Sep 17 00:00:00 2001
+From: Paul Mackerras <paulus@ozlabs.org>
+Date: Tue, 27 Nov 2018 09:01:54 +1100
+Subject: powerpc: Fix COFF zImage booting on old powermacs
+
+[ Upstream commit 5564597d51c8ff5b88d95c76255e18b13b760879 ]
+
+Commit 6975a783d7b4 ("powerpc/boot: Allow building the zImage wrapper
+as a relocatable ET_DYN", 2011-04-12) changed the procedure descriptor
+at the start of crt0.S to have a hard-coded start address of 0x500000
+rather than a reference to _zimage_start, presumably because having
+a reference to a symbol introduced a relocation which is awkward to
+handle in a position-independent executable.  Unfortunately, what is
+at 0x500000 in the COFF image is not the first instruction, but the
+procedure descriptor itself, that is, a word containing 0x500000,
+which is not a valid instruction.  Hence, booting a COFF zImage
+results in a "DEFAULT CATCH!, code=FFF00700" message from Open
+Firmware.
+
+This fixes the problem by (a) putting the procedure descriptor in the
+data section and (b) adding a branch to _zimage_start as the first
+instruction in the program.
+
+Fixes: 6975a783d7b4 ("powerpc/boot: Allow building the zImage wrapper as a relocatable ET_DYN")
+Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/powerpc/boot/crt0.S | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S
+index 5c2199857aa8..a3550e8f1a77 100644
+--- a/arch/powerpc/boot/crt0.S
++++ b/arch/powerpc/boot/crt0.S
+@@ -15,7 +15,7 @@
+ RELA = 7
+ RELACOUNT = 0x6ffffff9
+-      .text
++      .data
+       /* A procedure descriptor used when booting this as a COFF file.
+        * When making COFF, this comes first in the link and we're
+        * linked at 0x500000.
+@@ -23,6 +23,8 @@ RELACOUNT = 0x6ffffff9
+       .globl  _zimage_start_opd
+ _zimage_start_opd:
+       .long   0x500000, 0, 0, 0
++      .text
++      b       _zimage_start
+ #ifdef __powerpc64__
+ .balign 8
+-- 
+2.19.1
+
diff --git a/queue-4.4/scsi-bnx2fc-fix-null-dereference-in-error-handling.patch b/queue-4.4/scsi-bnx2fc-fix-null-dereference-in-error-handling.patch
new file mode 100644 (file)
index 0000000..ce3f8a6
--- /dev/null
@@ -0,0 +1,34 @@
+From d32721842dcab992b0b76d00d7e9e5b0adbcae18 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Thu, 1 Nov 2018 08:25:30 +0300
+Subject: scsi: bnx2fc: Fix NULL dereference in error handling
+
+[ Upstream commit 9ae4f8420ed7be4b13c96600e3568c144d101a23 ]
+
+If "interface" is NULL then we can't release it and trying to will only
+lead to an Oops.
+
+Fixes: aea71a024914 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+index d0b227ffbd5f..573aeec7a02b 100644
+--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
++++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+@@ -2279,7 +2279,7 @@ static int _bnx2fc_create(struct net_device *netdev,
+       if (!interface) {
+               printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
+               rc = -ENOMEM;
+-              goto ifput_err;
++              goto netdev_err;
+       }
+       if (netdev->priv_flags & IFF_802_1Q_VLAN) {
+-- 
+2.19.1
+
index 8c657590c11aab97bccfc745778203641807ebff..cbab88637b47152522859877ee389cfd7cea0579 100644 (file)
@@ -53,3 +53,10 @@ mips-align-kernel-load-address-to-64kb.patch
 cifs-fix-error-mapping-for-smb2_lock-command-which-caused-ofd-lock-problem.patch
 x86-kvm-vmx-do-not-use-vm-exit-instruction-length-for-fast-mmio-when-running-nested.patch
 spi-bcm2835-unbreak-the-build-of-esoteric-configs.patch
+powerpc-fix-coff-zimage-booting-on-old-powermacs.patch
+arm-imx-update-the-cpu-power-up-timing-setting-on-i..patch
+input-restore-ev_abs-abs_reserved.patch
+checkstack.pl-fix-for-aarch64.patch
+xfrm-fix-bucket-count-reported-to-userspace.patch
+scsi-bnx2fc-fix-null-dereference-in-error-handling.patch
+input-omap-keypad-fix-idle-configuration-to-not-bloc.patch
diff --git a/queue-4.4/xfrm-fix-bucket-count-reported-to-userspace.patch b/queue-4.4/xfrm-fix-bucket-count-reported-to-userspace.patch
new file mode 100644 (file)
index 0000000..ae9ea1f
--- /dev/null
@@ -0,0 +1,34 @@
+From e319078c64517ddd322fa6d773705b78c4db0cb1 Mon Sep 17 00:00:00 2001
+From: Benjamin Poirier <bpoirier@suse.com>
+Date: Mon, 5 Nov 2018 17:00:53 +0900
+Subject: xfrm: Fix bucket count reported to userspace
+
+[ Upstream commit ca92e173ab34a4f7fc4128bd372bd96f1af6f507 ]
+
+sadhcnt is reported by `ip -s xfrm state count` as "buckets count", not the
+hash mask.
+
+Fixes: 28d8909bc790 ("[XFRM]: Export SAD info.")
+Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/xfrm/xfrm_state.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
+index 9b6e51450fc5..13f261feb75c 100644
+--- a/net/xfrm/xfrm_state.c
++++ b/net/xfrm/xfrm_state.c
+@@ -623,7 +623,7 @@ void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si)
+ {
+       spin_lock_bh(&net->xfrm.xfrm_state_lock);
+       si->sadcnt = net->xfrm.state_num;
+-      si->sadhcnt = net->xfrm.state_hmask;
++      si->sadhcnt = net->xfrm.state_hmask + 1;
+       si->sadhmcnt = xfrm_state_hashmax;
+       spin_unlock_bh(&net->xfrm.xfrm_state_lock);
+ }
+-- 
+2.19.1
+