kernel: Move to Linux 4.16.1-openpower2
Move to the 4.16 series. Changes to patches:
- "tg3: APE heartbeat changes" patch was merged upstream and can be
dropped
- "powerpc/mm/radix: Fix checkstops caused by invalid tlbiel" was found
when testing with 4.16.1-openpower1 and has been posted upstream
A few new options are turned off by default as they are not useful to
petitboot. In the future we may enable DEFERRED_STRUCT_PAGE_INIT, but it
defaults to off for now.
We bump the buildroot repository in order to support the new kernel
version.
Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/openpower/configs/barreleye_defconfig b/openpower/configs/barreleye_defconfig
index d0236a2..4ddeb75 100644
--- a/openpower/configs/barreleye_defconfig
+++ b/openpower/configs/barreleye_defconfig
@@ -14,7 +14,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/firenze_defconfig b/openpower/configs/firenze_defconfig
index 2157dba..bb8d52b 100644
--- a/openpower/configs/firenze_defconfig
+++ b/openpower/configs/firenze_defconfig
@@ -13,7 +13,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/firestone_defconfig b/openpower/configs/firestone_defconfig
index 73a55b6..8137e83 100644
--- a/openpower/configs/firestone_defconfig
+++ b/openpower/configs/firestone_defconfig
@@ -14,7 +14,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/garrison_defconfig b/openpower/configs/garrison_defconfig
index 846218f..ccb5a4a 100644
--- a/openpower/configs/garrison_defconfig
+++ b/openpower/configs/garrison_defconfig
@@ -14,7 +14,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/habanero_defconfig b/openpower/configs/habanero_defconfig
index d51ef42..20e84c4 100644
--- a/openpower/configs/habanero_defconfig
+++ b/openpower/configs/habanero_defconfig
@@ -15,7 +15,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/linux/skiroot_p9_defconfig b/openpower/configs/linux/skiroot_p9_defconfig
index 1c12e98..6124137 100644
--- a/openpower/configs/linux/skiroot_p9_defconfig
+++ b/openpower/configs/linux/skiroot_p9_defconfig
@@ -53,6 +53,7 @@
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="console=tty0 console=hvc0 ipr.fast_reboot=1"
# CONFIG_SECCOMP is not set
+# CONFIG_PPC_MEM_KEYS is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@@ -79,6 +80,7 @@
CONFIG_NVME_MULTIPATH=y
CONFIG_EEPROM_AT24=y
# CONFIG_CXL is not set
+# CONFIG_OCXL is not set
CONFIG_BLK_DEV_SD=m
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
@@ -126,7 +128,9 @@
CONFIG_ACENIC_OMIT_TIGON_I=y
CONFIG_TIGON3=y
CONFIG_BNX2X=m
+# CONFIG_CAVIUM_PTP is not set
CONFIG_CHELSIO_T1=y
+# CONFIG_NET_VENDOR_CORTINA is not set
CONFIG_BE2NET=m
CONFIG_S2IO=m
# CONFIG_NET_VENDOR_HUAWEI is not set
@@ -140,11 +144,11 @@
CONFIG_MLX5_CORE=m
CONFIG_MLX5_CORE_EN=y
# CONFIG_MLX5_MPFS is not set
-# CONFIG_MLX5_ESWITCH is not set
CONFIG_MYRI10GE=m
CONFIG_QLGE=m
CONFIG_NETXEN_NIC=m
CONFIG_SFC=m
+# CONFIG_NET_VENDOR_SOCIONEXT is not set
# CONFIG_USB_NET_DRIVERS is not set
# CONFIG_WLAN is not set
CONFIG_INPUT_EVDEV=y
@@ -226,6 +230,7 @@
CONFIG_WQ_WATCHDOG=y
CONFIG_SCHEDSTATS=y
# CONFIG_FTRACE is not set
+# CONFIG_RUNTIME_TESTING_MENU is not set
CONFIG_XMON=y
CONFIG_XMON_DEFAULT=y
CONFIG_SECURITY=y
diff --git a/openpower/configs/openpower_mambo_defconfig b/openpower/configs/openpower_mambo_defconfig
index 0724d3c..3f89280 100644
--- a/openpower/configs/openpower_mambo_defconfig
+++ b/openpower/configs/openpower_mambo_defconfig
@@ -11,7 +11,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/openpower_p9_mambo_defconfig b/openpower/configs/openpower_p9_mambo_defconfig
index cfdff54..5de9b9a 100644
--- a/openpower/configs/openpower_p9_mambo_defconfig
+++ b/openpower/configs/openpower_p9_mambo_defconfig
@@ -11,7 +11,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/p9dsu_defconfig b/openpower/configs/p9dsu_defconfig
index 1b10e48..b98b88a 100644
--- a/openpower/configs/p9dsu_defconfig
+++ b/openpower/configs/p9dsu_defconfig
@@ -14,7 +14,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_p9_defconfig"
diff --git a/openpower/configs/palmetto_defconfig b/openpower/configs/palmetto_defconfig
index 85efe1a..e03ce42 100644
--- a/openpower/configs/palmetto_defconfig
+++ b/openpower/configs/palmetto_defconfig
@@ -13,7 +13,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/pseries_defconfig b/openpower/configs/pseries_defconfig
index d9258e5..4c3706e 100644
--- a/openpower/configs/pseries_defconfig
+++ b/openpower/configs/pseries_defconfig
@@ -13,7 +13,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/pseries_skiroot_defconfig"
diff --git a/openpower/configs/romulus_defconfig b/openpower/configs/romulus_defconfig
index 5f78349..e5f9bb5 100644
--- a/openpower/configs/romulus_defconfig
+++ b/openpower/configs/romulus_defconfig
@@ -14,7 +14,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_p9_defconfig"
diff --git a/openpower/configs/vesnin_defconfig b/openpower/configs/vesnin_defconfig
index cb7350e..6b45190 100644
--- a/openpower/configs/vesnin_defconfig
+++ b/openpower/configs/vesnin_defconfig
@@ -13,7 +13,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_defconfig"
diff --git a/openpower/configs/witherspoon_defconfig b/openpower/configs/witherspoon_defconfig
index eb85dc9..ed8c006 100644
--- a/openpower/configs/witherspoon_defconfig
+++ b/openpower/configs/witherspoon_defconfig
@@ -15,7 +15,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_p9_defconfig"
diff --git a/openpower/configs/zaius_defconfig b/openpower/configs/zaius_defconfig
index d855e82..3ba8049 100644
--- a/openpower/configs/zaius_defconfig
+++ b/openpower/configs/zaius_defconfig
@@ -14,7 +14,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_p9_defconfig"
diff --git a/openpower/configs/zz_defconfig b/openpower/configs/zz_defconfig
index 1ccb704..b35ce4c 100644
--- a/openpower/configs/zz_defconfig
+++ b/openpower/configs/zz_defconfig
@@ -13,7 +13,7 @@
BR2_ROOTFS_POST_BUILD_SCRIPT="../openpower/scripts/fixup-target-var ../openpower/scripts/firmware-whitelist"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.1"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_OP_BUILD_PATH)/linux"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_OP_BUILD_PATH)/configs/linux/skiroot_p9_defconfig"
diff --git a/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch b/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch
index 3675f53..55c0f56 100644
--- a/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch
+++ b/openpower/linux/0001-xhci-Reset-controller-on-xhci-shutdown.patch
@@ -14,10 +14,10 @@
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
-index a7c99e121cc6..f953c94b2c5e 100644
+index 5d37700ae4b0..27848c3226a4 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
-@@ -722,6 +722,7 @@ static void xhci_shutdown(struct usb_hcd *hcd)
+@@ -717,6 +717,7 @@ static void xhci_shutdown(struct usb_hcd *hcd)
/* Yet another workaround for spurious wakeups at shutdown with HSW */
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
pci_set_power_state(to_pci_dev(hcd->self.sysdev), PCI_D3hot);
diff --git a/openpower/linux/0003-powerpc-eeh-Fix-race-with-driver-un-bind.patch b/openpower/linux/0002-powerpc-eeh-Fix-race-with-driver-un-bind.patch
similarity index 63%
rename from openpower/linux/0003-powerpc-eeh-Fix-race-with-driver-un-bind.patch
rename to openpower/linux/0002-powerpc-eeh-Fix-race-with-driver-un-bind.patch
index a75e804..14e33fd 100644
--- a/openpower/linux/0003-powerpc-eeh-Fix-race-with-driver-un-bind.patch
+++ b/openpower/linux/0002-powerpc-eeh-Fix-race-with-driver-un-bind.patch
@@ -1,46 +1,45 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Neuling <mikey@neuling.org>
Date: Mon, 26 Mar 2018 15:17:07 +1100
-Subject: [PATCH 3/4] powerpc/eeh: Fix race with driver un/bind
+Subject: [PATCH 2/4] powerpc/eeh: Fix race with driver un/bind
-The current EEH callbacks can race with a driver unbind. This
-can result in a backtraces like this:
+The current EEH callbacks can race with a driver unbind. This can
+result in a backtraces like this:
-[ 7.573055] EEH: Frozen PHB#0-PE#1fc detected
-[ 7.573063] EEH: PE location: S000009, PHB location: N/A
-[ 7.573069] CPU: 2 PID: 2312 Comm: kworker/u258:3 Not tainted 4.15.6-openpower1 #2
-[ 7.573078] Workqueue: nvme-wq nvme_reset_work [nvme]
-[ 7.573080] Call Trace:
-[ 7.573088] [c000000ff12a3a30] [c0000000005f5000] dump_stack+0x9c/0xd0
-[ 7.573093] (unreliable)
-[ 7.573106] [c000000ff12a3a70] [c00000000002385c] eeh_dev_check_failure+0x420/0x470
-[ 7.573111] [c000000ff12a3b10] [c00000000002394c] eeh_check_failure+0xa0/0xa4
-[ 7.573115] [c000000ff12a3b50] [c0080000088c2ff0] nvme_reset_work+0x138/0x1414 [nvme]
-[ 7.573122] [c000000ff12a3cb0] [c000000000089c78] process_one_work+0x1ec/0x328
-[ 7.573132] [c000000ff12a3d40] [c00000000008a3b4] worker_thread+0x2e4/0x3a8
-[ 7.573140] [c000000ff12a3dc0] [c00000000008fed0] kthread+0x14c/0x154
-[ 7.573150] [c000000ff12a3e30] [c00000000000b594] ret_from_kernel_thread+0x5c/0xc8
-[ 7.573183] nvme nvme1: Removing after probe failure status: -19
-<snip>
-cpu 0x23: Vector: 300 (Data Access) at [c000000ff50f3800]
- pc: c0080000089a0eb0: nvme_error_detected+0x4c/0x90 [nvme]
- lr: c000000000026564: eeh_report_error+0xe0/0x110
- sp: c000000ff50f3a80
- msr: 9000000000009033
- dar: 400
- dsisr: 40000000
- current = 0xc000000ff507c000
- paca = 0xc00000000fdc9d80 softe: 0 irq_happened: 0x01
- pid = 782, comm = eehd
-Linux version 4.15.6-openpower1 (smc@smc-desktop) (gcc version 6.4.0 (Buildroot 2017.11.2-00008-g4b6188e)) #2 SM P Tue Feb 27 12:33:27 PST 2018
-enter ? for help
-[c000000ff50f3af0] c000000000026564 eeh_report_error+0xe0/0x110
-[c000000ff50f3b30] c000000000025520 eeh_pe_dev_traverse+0xc0/0xdc
-[c000000ff50f3bc0] c000000000026bd0 eeh_handle_normal_event+0x184/0x4c4
-[c000000ff50f3c70] c000000000026ff4 eeh_handle_event+0x30/0x288
-[c000000ff50f3d10] c00000000002758c eeh_event_handler+0x124/0x170
-[c000000ff50f3dc0] c00000000008fed0 kthread+0x14c/0x154
-[c000000ff50f3e30] c00000000000b594 ret_from_kernel_thread+0x5c/0xc8
+ EEH: Frozen PHB#0-PE#1fc detected
+ EEH: PE location: S000009, PHB location: N/A
+ CPU: 2 PID: 2312 Comm: kworker/u258:3 Not tainted 4.15.6-openpower1 #2
+ Workqueue: nvme-wq nvme_reset_work [nvme]
+ Call Trace:
+ dump_stack+0x9c/0xd0 (unreliable)
+ eeh_dev_check_failure+0x420/0x470
+ eeh_check_failure+0xa0/0xa4
+ nvme_reset_work+0x138/0x1414 [nvme]
+ process_one_work+0x1ec/0x328
+ worker_thread+0x2e4/0x3a8
+ kthread+0x14c/0x154
+ ret_from_kernel_thread+0x5c/0xc8
+ nvme nvme1: Removing after probe failure status: -19
+ <snip>
+ cpu 0x23: Vector: 300 (Data Access) at [c000000ff50f3800]
+ pc: c0080000089a0eb0: nvme_error_detected+0x4c/0x90 [nvme]
+ lr: c000000000026564: eeh_report_error+0xe0/0x110
+ sp: c000000ff50f3a80
+ msr: 9000000000009033
+ dar: 400
+ dsisr: 40000000
+ current = 0xc000000ff507c000
+ paca = 0xc00000000fdc9d80 softe: 0 irq_happened: 0x01
+ pid = 782, comm = eehd
+ Linux version 4.15.6-openpower1 (smc@smc-desktop) (gcc version 6.4.0 (Buildroot 2017.11.2-00008-g4b6188e)) #2 SM P Tue Feb 27 12:33:27 PST 2018
+ enter ? for help
+ eeh_report_error+0xe0/0x110
+ eeh_pe_dev_traverse+0xc0/0xdc
+ eeh_handle_normal_event+0x184/0x4c4
+ eeh_handle_event+0x30/0x288
+ eeh_event_handler+0x124/0x170
+ kthread+0x14c/0x154
+ ret_from_kernel_thread+0x5c/0xc8
The first part is an EEH (on boot), the second half is the resulting
crash. nvme probe starts the nvme_reset_work() worker thread. This
@@ -63,16 +62,19 @@
in 2005 (in 77bd7415610) but it's not clear if a lock was needed back
then.
+Fixes: 77bd74156101 ("[PATCH] powerpc: PCI Error Recovery: PPC64 core recovery routines")
+Cc: stable@vger.kernel.org # v2.6.16+
Signed-off-by: Michael Neuling <mikey@neuling.org>
Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-[joel: backport to 4.15]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+(cherry picked from commit f0295e047fcf52ccb42561fb7de6942f5201b676)
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
- arch/powerpc/kernel/eeh_driver.c | 62 ++++++++++++++++++++++++----------------
- 1 file changed, 38 insertions(+), 24 deletions(-)
+ arch/powerpc/kernel/eeh_driver.c | 68 ++++++++++++++++++++------------
+ 1 file changed, 42 insertions(+), 26 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
-index 4f71e4c9beb7..169531150e13 100644
+index 0c0b66fc5bfb..295ba833846e 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -207,18 +207,18 @@ static void *eeh_report_error(void *data, void *userdata)
@@ -99,18 +101,21 @@
rc = driver->err_handler->error_detected(dev, pci_channel_io_frozen);
-@@ -227,7 +227,10 @@ static void *eeh_report_error(void *data, void *userdata)
+@@ -227,8 +227,12 @@ static void *eeh_report_error(void *data, void *userdata)
if (*res == PCI_ERS_RESULT_NONE) *res = rc;
edev->in_error = true;
+- eeh_pcid_put(dev);
+ pci_uevent_ers(dev, PCI_ERS_RESULT_NONE);
++
+out:
- eeh_pcid_put(dev);
++ eeh_pcid_put(dev);
+out_no_dev:
+ device_unlock(&dev->dev);
return NULL;
}
-@@ -250,15 +253,14 @@ static void *eeh_report_mmio_enabled(void *data, void *userdata)
+@@ -251,15 +255,14 @@ static void *eeh_report_mmio_enabled(void *data, void *userdata)
if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL;
@@ -130,7 +135,7 @@
rc = driver->err_handler->mmio_enabled(dev);
-@@ -266,7 +268,10 @@ static void *eeh_report_mmio_enabled(void *data, void *userdata)
+@@ -267,7 +270,10 @@ static void *eeh_report_mmio_enabled(void *data, void *userdata)
if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
if (*res == PCI_ERS_RESULT_NONE) *res = rc;
@@ -141,7 +146,7 @@
return NULL;
}
-@@ -289,20 +294,20 @@ static void *eeh_report_reset(void *data, void *userdata)
+@@ -290,20 +296,20 @@ static void *eeh_report_reset(void *data, void *userdata)
if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL;
@@ -167,7 +172,7 @@
rc = driver->err_handler->slot_reset(dev);
if ((*res == PCI_ERS_RESULT_NONE) ||
-@@ -310,7 +315,10 @@ static void *eeh_report_reset(void *data, void *userdata)
+@@ -311,7 +317,10 @@ static void *eeh_report_reset(void *data, void *userdata)
if (*res == PCI_ERS_RESULT_DISCONNECT &&
rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
@@ -178,7 +183,7 @@
return NULL;
}
-@@ -361,10 +369,12 @@ static void *eeh_report_resume(void *data, void *userdata)
+@@ -362,10 +371,12 @@ static void *eeh_report_resume(void *data, void *userdata)
if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL;
@@ -192,7 +197,7 @@
was_in_error = edev->in_error;
edev->in_error = false;
-@@ -374,13 +384,15 @@ static void *eeh_report_resume(void *data, void *userdata)
+@@ -375,18 +386,20 @@ static void *eeh_report_resume(void *data, void *userdata)
!driver->err_handler->resume ||
(edev->mode & EEH_DEV_NO_HANDLER) || !was_in_error) {
edev->mode &= ~EEH_DEV_NO_HANDLER;
@@ -203,14 +208,20 @@
driver->err_handler->resume(dev);
+- eeh_pcid_put(dev);
+ pci_uevent_ers(dev, PCI_ERS_RESULT_RECOVERED);
+out:
- eeh_pcid_put(dev);
++ eeh_pcid_put(dev);
+ #ifdef CONFIG_PCI_IOV
+ if (eeh_ops->notify_resume && eeh_dev_to_pdn(edev))
+ eeh_ops->notify_resume(eeh_dev_to_pdn(edev));
+ #endif
+out_no_dev:
+ device_unlock(&dev->dev);
return NULL;
}
-@@ -400,22 +412,24 @@ static void *eeh_report_failure(void *data, void *userdata)
+@@ -406,23 +419,26 @@ static void *eeh_report_failure(void *data, void *userdata)
if (!dev || eeh_dev_removed(edev) || eeh_pe_passed(edev->pe))
return NULL;
@@ -233,9 +244,11 @@
+ goto out;
driver->err_handler->error_detected(dev, pci_channel_io_perm_failure);
--
+
+- eeh_pcid_put(dev);
+ pci_uevent_ers(dev, PCI_ERS_RESULT_DISCONNECT);
+out:
- eeh_pcid_put(dev);
++ eeh_pcid_put(dev);
+out_no_dev:
+ device_unlock(&dev->dev);
return NULL;
diff --git a/openpower/linux/0002-tg3-APE-heartbeat-changes.patch b/openpower/linux/0002-tg3-APE-heartbeat-changes.patch
deleted file mode 100644
index d1c333e..0000000
--- a/openpower/linux/0002-tg3-APE-heartbeat-changes.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Prashant Sreedharan <prashant.sreedharan@broadcom.com>
-Date: Mon, 19 Feb 2018 12:27:04 +0530
-Subject: [PATCH 2/4] tg3: APE heartbeat changes
-
-In ungraceful host shutdown or driver crash case BMC connectivity is
-lost. APE firmware is missing the driver state in this
-case to keep the BMC connectivity alive.
-This patch has below change to address this issue.
-
-Heartbeat mechanism with APE firmware. This heartbeat mechanism
-is needed to notify the APE firmware about driver state.
-
-This patch also has the change in wait time for APE event from
-1ms to 20ms as there can be some delay in getting response.
-
-v2: Drop inline keyword as per David suggestion.
-
-Signed-off-by: Prashant Sreedharan <prashant.sreedharan@broadcom.com>
-Signed-off-by: Satish Baddipadige <satish.baddipadige@broadcom.com>
-Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
-Acked-by: Michael Chan <michael.chan@broadcom.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 506b0a395f26e52b3f18827e0de1be051acb77ab)
-Signed-off-by: Joel Stanley <joel@jms.id.au>
----
- drivers/net/ethernet/broadcom/tg3.c | 35 ++++++++++++++++++++++++-----------
- drivers/net/ethernet/broadcom/tg3.h | 5 +++++
- 2 files changed, 29 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
-index 8995cfefbfcf..0cbf537c8f6c 100644
---- a/drivers/net/ethernet/broadcom/tg3.c
-+++ b/drivers/net/ethernet/broadcom/tg3.c
-@@ -820,7 +820,7 @@ static int tg3_ape_event_lock(struct tg3 *tp, u32 timeout_us)
-
- tg3_ape_unlock(tp, TG3_APE_LOCK_MEM);
-
-- udelay(10);
-+ usleep_range(10, 20);
- timeout_us -= (timeout_us > 10) ? 10 : timeout_us;
- }
-
-@@ -922,8 +922,8 @@ static int tg3_ape_send_event(struct tg3 *tp, u32 event)
- if (!(apedata & APE_FW_STATUS_READY))
- return -EAGAIN;
-
-- /* Wait for up to 1 millisecond for APE to service previous event. */
-- err = tg3_ape_event_lock(tp, 1000);
-+ /* Wait for up to 20 millisecond for APE to service previous event. */
-+ err = tg3_ape_event_lock(tp, 20000);
- if (err)
- return err;
-
-@@ -946,6 +946,7 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind)
-
- switch (kind) {
- case RESET_KIND_INIT:
-+ tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_COUNT, tp->ape_hb++);
- tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG,
- APE_HOST_SEG_SIG_MAGIC);
- tg3_ape_write32(tp, TG3_APE_HOST_SEG_LEN,
-@@ -962,13 +963,6 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind)
- event = APE_EVENT_STATUS_STATE_START;
- break;
- case RESET_KIND_SHUTDOWN:
-- /* With the interface we are currently using,
-- * APE does not track driver state. Wiping
-- * out the HOST SEGMENT SIGNATURE forces
-- * the APE to assume OS absent status.
-- */
-- tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG, 0x0);
--
- if (device_may_wakeup(&tp->pdev->dev) &&
- tg3_flag(tp, WOL_ENABLE)) {
- tg3_ape_write32(tp, TG3_APE_HOST_WOL_SPEED,
-@@ -990,6 +984,18 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind)
- tg3_ape_send_event(tp, event);
- }
-
-+static void tg3_send_ape_heartbeat(struct tg3 *tp,
-+ unsigned long interval)
-+{
-+ /* Check if hb interval has exceeded */
-+ if (!tg3_flag(tp, ENABLE_APE) ||
-+ time_before(jiffies, tp->ape_hb_jiffies + interval))
-+ return;
-+
-+ tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_COUNT, tp->ape_hb++);
-+ tp->ape_hb_jiffies = jiffies;
-+}
-+
- static void tg3_disable_ints(struct tg3 *tp)
- {
- int i;
-@@ -7262,6 +7268,7 @@ static int tg3_poll_msix(struct napi_struct *napi, int budget)
- }
- }
-
-+ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL << 1);
- return work_done;
-
- tx_recovery:
-@@ -7344,6 +7351,7 @@ static int tg3_poll(struct napi_struct *napi, int budget)
- }
- }
-
-+ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL << 1);
- return work_done;
-
- tx_recovery:
-@@ -10732,7 +10740,7 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset_phy)
- if (tg3_flag(tp, ENABLE_APE))
- /* Write our heartbeat update interval to APE. */
- tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_INT_MS,
-- APE_HOST_HEARTBEAT_INT_DISABLE);
-+ APE_HOST_HEARTBEAT_INT_5SEC);
-
- tg3_write_sig_post_reset(tp, RESET_KIND_INIT);
-
-@@ -11077,6 +11085,9 @@ static void tg3_timer(struct timer_list *t)
- tp->asf_counter = tp->asf_multiplier;
- }
-
-+ /* Update the APE heartbeat every 5 seconds.*/
-+ tg3_send_ape_heartbeat(tp, TG3_APE_HB_INTERVAL);
-+
- spin_unlock(&tp->lock);
-
- restart_timer:
-@@ -16636,6 +16647,8 @@ static int tg3_get_invariants(struct tg3 *tp, const struct pci_device_id *ent)
- pci_state_reg);
-
- tg3_ape_lock_init(tp);
-+ tp->ape_hb_interval =
-+ msecs_to_jiffies(APE_HOST_HEARTBEAT_INT_5SEC);
- }
-
- /* Set up tp->grc_local_ctrl before calling
-diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
-index 1f0271fa7c74..4b9d2906da90 100644
---- a/drivers/net/ethernet/broadcom/tg3.h
-+++ b/drivers/net/ethernet/broadcom/tg3.h
-@@ -2499,6 +2499,7 @@
- #define TG3_APE_LOCK_PHY3 5
- #define TG3_APE_LOCK_GPIO 7
-
-+#define TG3_APE_HB_INTERVAL (tp->ape_hb_interval)
- #define TG3_EEPROM_SB_F1R2_MBA_OFF 0x10
-
-
-@@ -3413,6 +3414,10 @@ struct tg3 {
- struct device *hwmon_dev;
- bool link_up;
- bool pcierr_recovery;
-+
-+ u32 ape_hb;
-+ unsigned long ape_hb_interval;
-+ unsigned long ape_hb_jiffies;
- };
-
- /* Accessor macros for chip and asic attributes
diff --git a/openpower/linux/0003-powerpc-mm-radix-Fix-checkstops-caused-by-invalid-tl.patch b/openpower/linux/0003-powerpc-mm-radix-Fix-checkstops-caused-by-invalid-tl.patch
new file mode 100644
index 0000000..8e871e8
--- /dev/null
+++ b/openpower/linux/0003-powerpc-mm-radix-Fix-checkstops-caused-by-invalid-tl.patch
@@ -0,0 +1,71 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Michael Ellerman <mpe@ellerman.id.au>
+Date: Thu, 12 Apr 2018 15:53:52 +1000
+Subject: [PATCH 3/4] powerpc/mm/radix: Fix checkstops caused by invalid tlbiel
+
+In tlbiel_radix_set_isa300() we use the PPC_TLBIEL() macro to
+construct tlbiel instructions. The instruction takes 5 fields, two of
+which are registers, and the others are constants. But because it's
+constructed with inline asm the compiler doesn't know that.
+
+We got the constraint wrong on the 'r' field, using "r" tells the
+compiler to put the value in a register. The value we then get in the
+macro is the *register number*, not the value of the field.
+
+That means when we mask the register number with 0x1 we get 0 or 1
+depending on which register the compiler happens to put the constant
+in, eg:
+
+ li r10,1
+ tlbiel r8,r9,2,0,0
+
+ li r7,1
+ tlbiel r10,r6,0,0,1
+
+If we're unlucky we might generate an invalid instruction form, for
+example RIC=0, PRS=1 and R=0, tlbiel r8,r7,0,1,0, this has been
+observed to cause machine checks:
+
+ Oops: Machine check, sig: 7 [#1]
+ CPU: 24 PID: 0 Comm: swapper
+ NIP: 00000000000385f4 LR: 000000000100ed00 CTR: 000000000000007f
+ REGS: c00000000110bb40 TRAP: 0200
+ MSR: 9000000000201003 <SF,HV,ME,RI,LE> CR: 48002222 XER: 20040000
+ CFAR: 00000000000385d0 DAR: 0000000000001c00 DSISR: 00000200 SOFTE: 1
+
+If the machine check happens early in boot while we have MSR_ME=0 it
+will escalate into a checkstop and kill the box entirely.
+
+To fix it we could change the inline asm constraint to "i" which
+tells the compiler the value is a constant. But a better fix is to just
+pass a literal 1 into the macro, which bypasses any problems with inline
+asm constraints.
+
+Fixes: d4748276ae14 ("powerpc/64s: Improve local TLB flush for boot and MCE on POWER9")
+Cc: stable@vger.kernel.org # v4.16+
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+---
+ arch/powerpc/mm/tlb-radix.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c
+index a07f5372a4bf..9ab051155af3 100644
+--- a/arch/powerpc/mm/tlb-radix.c
++++ b/arch/powerpc/mm/tlb-radix.c
+@@ -33,13 +33,12 @@ static inline void tlbiel_radix_set_isa300(unsigned int set, unsigned int is,
+ {
+ unsigned long rb;
+ unsigned long rs;
+- unsigned int r = 1; /* radix format */
+
+ rb = (set << PPC_BITLSHIFT(51)) | (is << PPC_BITLSHIFT(53));
+ rs = ((unsigned long)pid << PPC_BITLSHIFT(31));
+
+- asm volatile(PPC_TLBIEL(%0, %1, %2, %3, %4)
+- : : "r"(rb), "r"(rs), "i"(ric), "i"(prs), "r"(r)
++ asm volatile(PPC_TLBIEL(%0, %1, %2, %3, 1)
++ : : "r"(rb), "r"(rs), "i"(ric), "i"(prs)
+ : "memory");
+ }
+
diff --git a/openpower/linux/0004-Release-OpenPower-kernel.patch b/openpower/linux/0004-Release-OpenPower-kernel.patch
index 7184b81..c5bcf72 100644
--- a/openpower/linux/0004-Release-OpenPower-kernel.patch
+++ b/openpower/linux/0004-Release-OpenPower-kernel.patch
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Joel Stanley <joel@jms.id.au>
-Date: Thu, 29 Mar 2018 17:10:52 +1100
+Date: Mon, 9 Apr 2018 12:03:25 +0930
Subject: [PATCH 4/4] Release OpenPower kernel
Signed-off-by: Joel Stanley <joel@jms.id.au>
@@ -9,15 +9,15 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
-index a5e561900daf..3c8e12e69a5b 100644
+index 1773c718074e..692f4f732128 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
VERSION = 4
- PATCHLEVEL = 15
- SUBLEVEL = 14
+ PATCHLEVEL = 16
+ SUBLEVEL = 1
-EXTRAVERSION =
-+EXTRAVERSION = -openpower1
++EXTRAVERSION = -openpower2
NAME = Fearless Coyote
# *DOCUMENTATION*