From: Greg Kroah-Hartman Date: Wed, 26 Sep 2018 13:20:00 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.18.11~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a46f37db2c5fbb746ee7eebf778bb19c3da57b05;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: hid-sony-support-ds4-dongle.patch hid-sony-update-device-ids.patch pci-aardvark-size-bridges-before-resources-allocation.patch sched-fair-fix-vruntime_normalized-for-remote-non-migration-wakeup.patch vmw_balloon-include-asm-io.h.patch --- diff --git a/queue-4.9/hid-sony-support-ds4-dongle.patch b/queue-4.9/hid-sony-support-ds4-dongle.patch new file mode 100644 index 00000000000..ae34ed81c71 --- /dev/null +++ b/queue-4.9/hid-sony-support-ds4-dongle.patch @@ -0,0 +1,53 @@ +From de66a1a04c25f2560a8dca7a95e2a150b0d5e17e Mon Sep 17 00:00:00 2001 +From: Roderick Colenbrander +Date: Wed, 23 Nov 2016 14:07:11 -0800 +Subject: HID: sony: Support DS4 dongle + +From: Roderick Colenbrander + +commit de66a1a04c25f2560a8dca7a95e2a150b0d5e17e upstream. + +Add support for USB based DS4 dongle device, which allows connecting +a DS4 through Bluetooth, but hides Bluetooth from the host system. + +Signed-off-by: Roderick Colenbrander +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-core.c | 1 + + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-sony.c | 2 ++ + 3 files changed, 4 insertions(+) + +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -2061,6 +2061,7 @@ static const struct hid_device_id hid_ha + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SINO_LITE, USB_DEVICE_ID_SINO_LITE_CONTROLLER) }, +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -928,6 +928,7 @@ + #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 + #define USB_DEVICE_ID_SONY_PS4_CONTROLLER 0x05c4 + #define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2 0x09cc ++#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE 0x0ba0 + #define USB_DEVICE_ID_SONY_MOTION_CONTROLLER 0x03d5 + #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER 0x042f + #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER 0x0002 +--- a/drivers/hid/hid-sony.c ++++ b/drivers/hid/hid-sony.c +@@ -2585,6 +2585,8 @@ static const struct hid_device_id sony_d + .driver_data = DUALSHOCK4_CONTROLLER_USB }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2), + .driver_data = DUALSHOCK4_CONTROLLER_BT }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE), ++ .driver_data = DUALSHOCK4_CONTROLLER_USB }, + /* Nyko Core Controller for PS3 */ + { HID_USB_DEVICE(USB_VENDOR_ID_SINO_LITE, USB_DEVICE_ID_SINO_LITE_CONTROLLER), + .driver_data = SIXAXIS_CONTROLLER_USB | SINO_LITE_CONTROLLER }, diff --git a/queue-4.9/hid-sony-update-device-ids.patch b/queue-4.9/hid-sony-update-device-ids.patch new file mode 100644 index 00000000000..62f3f1d0f06 --- /dev/null +++ b/queue-4.9/hid-sony-update-device-ids.patch @@ -0,0 +1,56 @@ +From cf1015d65d7c8a5504a4c03afb60fb86bff0f032 Mon Sep 17 00:00:00 2001 +From: Roderick Colenbrander +Date: Fri, 7 Oct 2016 12:39:40 -0700 +Subject: HID: sony: Update device ids + +From: Roderick Colenbrander + +commit cf1015d65d7c8a5504a4c03afb60fb86bff0f032 upstream. + +Support additional DS4 model. + +Signed-off-by: Roderick Colenbrander +Reviewed-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-core.c | 2 ++ + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-sony.c | 4 ++++ + 3 files changed, 7 insertions(+) + +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -2059,6 +2059,8 @@ static const struct hid_device_id hid_ha + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SINO_LITE, USB_DEVICE_ID_SINO_LITE_CONTROLLER) }, +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -927,6 +927,7 @@ + #define USB_DEVICE_ID_SONY_PS3_BDREMOTE 0x0306 + #define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 + #define USB_DEVICE_ID_SONY_PS4_CONTROLLER 0x05c4 ++#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2 0x09cc + #define USB_DEVICE_ID_SONY_MOTION_CONTROLLER 0x03d5 + #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER 0x042f + #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER 0x0002 +--- a/drivers/hid/hid-sony.c ++++ b/drivers/hid/hid-sony.c +@@ -2581,6 +2581,10 @@ static const struct hid_device_id sony_d + .driver_data = DUALSHOCK4_CONTROLLER_USB }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER), + .driver_data = DUALSHOCK4_CONTROLLER_BT }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2), ++ .driver_data = DUALSHOCK4_CONTROLLER_USB }, ++ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2), ++ .driver_data = DUALSHOCK4_CONTROLLER_BT }, + /* Nyko Core Controller for PS3 */ + { HID_USB_DEVICE(USB_VENDOR_ID_SINO_LITE, USB_DEVICE_ID_SINO_LITE_CONTROLLER), + .driver_data = SIXAXIS_CONTROLLER_USB | SINO_LITE_CONTROLLER }, diff --git a/queue-4.9/pci-aardvark-size-bridges-before-resources-allocation.patch b/queue-4.9/pci-aardvark-size-bridges-before-resources-allocation.patch new file mode 100644 index 00000000000..126b514940f --- /dev/null +++ b/queue-4.9/pci-aardvark-size-bridges-before-resources-allocation.patch @@ -0,0 +1,47 @@ +From 91a2968e245d6ba616db37001fa1a043078b1a65 Mon Sep 17 00:00:00 2001 +From: Zachary Zhang +Date: Fri, 29 Jun 2018 11:16:19 +0200 +Subject: PCI: aardvark: Size bridges before resources allocation + +From: Zachary Zhang + +commit 91a2968e245d6ba616db37001fa1a043078b1a65 upstream. + +The PCIE I/O and MEM resource allocation mechanism is that root bus +goes through the following steps: + +1. Check PCI bridges' range and computes I/O and Mem base/limits. + +2. Sort all subordinate devices I/O and MEM resource requirements and + allocate the resources and writes/updates subordinate devices' + requirements to PCI bridges I/O and Mem MEM/limits registers. + +Currently, PCI Aardvark driver only handles the second step and lacks +the first step, so there is an I/O and MEM resource allocation failure +when using a PCI switch. This commit fixes that by sizing bridges +before doing the resource allocation. + +Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller +driver") +Signed-off-by: Zachary Zhang +[Thomas: edit commit log.] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Lorenzo Pieralisi +Cc: +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/pci/host/pci-aardvark.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/pci/host/pci-aardvark.c ++++ b/drivers/pci/host/pci-aardvark.c +@@ -976,6 +976,7 @@ static int advk_pcie_probe(struct platfo + return -ENOMEM; + } + ++ pci_bus_size_bridges(bus); + pci_bus_assign_resources(bus); + + list_for_each_entry(child, &bus->children, node) diff --git a/queue-4.9/sched-fair-fix-vruntime_normalized-for-remote-non-migration-wakeup.patch b/queue-4.9/sched-fair-fix-vruntime_normalized-for-remote-non-migration-wakeup.patch new file mode 100644 index 00000000000..0ac8634502b --- /dev/null +++ b/queue-4.9/sched-fair-fix-vruntime_normalized-for-remote-non-migration-wakeup.patch @@ -0,0 +1,68 @@ +From d0cdb3ce8834332d918fc9c8ff74f8a169ec9abe Mon Sep 17 00:00:00 2001 +From: Steve Muckle +Date: Fri, 31 Aug 2018 15:42:17 -0700 +Subject: sched/fair: Fix vruntime_normalized() for remote non-migration wakeup + +From: Steve Muckle + +commit d0cdb3ce8834332d918fc9c8ff74f8a169ec9abe upstream. + +When a task which previously ran on a given CPU is remotely queued to +wake up on that same CPU, there is a period where the task's state is +TASK_WAKING and its vruntime is not normalized. This is not accounted +for in vruntime_normalized() which will cause an error in the task's +vruntime if it is switched from the fair class during this time. + +For example if it is boosted to RT priority via rt_mutex_setprio(), +rq->min_vruntime will not be subtracted from the task's vruntime but +it will be added again when the task returns to the fair class. The +task's vruntime will have been erroneously doubled and the effective +priority of the task will be reduced. + +Note this will also lead to inflation of all vruntimes since the doubled +vruntime value will become the rq's min_vruntime when other tasks leave +the rq. This leads to repeated doubling of the vruntime and priority +penalty. + +Fix this by recognizing a WAKING task's vruntime as normalized only if +sched_remote_wakeup is true. This indicates a migration, in which case +the vruntime would have been normalized in migrate_task_rq_fair(). + +Based on a similar patch from John Dias . + +Suggested-by: Peter Zijlstra +Tested-by: Dietmar Eggemann +Signed-off-by: Steve Muckle +Signed-off-by: Peter Zijlstra (Intel) +Cc: Chris Redpath +Cc: John Dias +Cc: Linus Torvalds +Cc: Miguel de Dios +Cc: Morten Rasmussen +Cc: Patrick Bellasi +Cc: Paul Turner +Cc: Quentin Perret +Cc: Thomas Gleixner +Cc: Todd Kjos +Cc: kernel-team@android.com +Fixes: b5179ac70de8 ("sched/fair: Prepare to fix fairness problems on migration") +Link: http://lkml.kernel.org/r/20180831224217.169476-1-smuckle@google.com +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched/fair.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/kernel/sched/fair.c ++++ b/kernel/sched/fair.c +@@ -8639,7 +8639,8 @@ static inline bool vruntime_normalized(s + * - A task which has been woken up by try_to_wake_up() and + * waiting for actually being woken up by sched_ttwu_pending(). + */ +- if (!se->sum_exec_runtime || p->state == TASK_WAKING) ++ if (!se->sum_exec_runtime || ++ (p->state == TASK_WAKING && p->sched_remote_wakeup)) + return true; + + return false; diff --git a/queue-4.9/series b/queue-4.9/series index d206bd18eba..f59b9bfde50 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -36,3 +36,8 @@ ext4-fix-online-resize-s-handling-of-a-too-small-final-block-group.patch ext4-fix-online-resizing-for-bigalloc-file-systems-with-a-1k-block-size.patch ext4-don-t-mark-mmp-buffer-head-dirty.patch ext4-show-test_dummy_encryption-mount-option-in-proc-mounts.patch +sched-fair-fix-vruntime_normalized-for-remote-non-migration-wakeup.patch +hid-sony-update-device-ids.patch +hid-sony-support-ds4-dongle.patch +pci-aardvark-size-bridges-before-resources-allocation.patch +vmw_balloon-include-asm-io.h.patch diff --git a/queue-4.9/vmw_balloon-include-asm-io.h.patch b/queue-4.9/vmw_balloon-include-asm-io.h.patch new file mode 100644 index 00000000000..7f6bf4474d9 --- /dev/null +++ b/queue-4.9/vmw_balloon-include-asm-io.h.patch @@ -0,0 +1,32 @@ +From a3b92ee6fc171d7c9d9b6b829b7fef169210440c Mon Sep 17 00:00:00 2001 +From: Nadav Amit +Date: Thu, 13 Sep 2018 13:18:52 -0700 +Subject: vmw_balloon: include asm/io.h + +From: Nadav Amit + +commit a3b92ee6fc171d7c9d9b6b829b7fef169210440c upstream. + +Fix a build error due to missing virt_to_phys() + +Reported-by: kbuild test robot +Fixes: f0a1bf29d821b ("vmw_balloon: fix inflation with batching") +Cc: stable@vger.kernel.org +Cc: Xavier Deguillard +Signed-off-by: Nadav Amit +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/vmw_balloon.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/misc/vmw_balloon.c ++++ b/drivers/misc/vmw_balloon.c +@@ -45,6 +45,7 @@ + #include + #include + #include ++#include + #include + + MODULE_AUTHOR("VMware, Inc.");