From 3d7838368759b84befaeca099ddadae3888f1dbd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 11 Sep 2015 15:40:45 -0700 Subject: [PATCH] 4.1-stable patches added patches: 9p-ensure-err-is-initialized-to-0-in-p9_client_read-write.patch add-factory-recertified-crucial-m500s-to-blacklist.patch arm-omap-wakeupgen-restore-the-irq_set_type-mechanism.patch arm64-kvm-fix-host-crash-when-injecting-a-fault-into-a-32bit-guest.patch arm64-perf-fix-unassigned-cpu_pmu-plat_device-when-probing-pmu-ppis.patch can-pcan_usb-don-t-provide-can-fd-bittimings-by-non-fd-adapters.patch drm-atmel-hlcdc-compile-suspend-resume-for-pm_sleep-only.patch drm-i915-avoid-tp3-on-chv.patch drm-i915-flag-the-execlists-context-object-as-dirty-after-every-use.patch drm-i915-remove-hbr2-from-chv-supported-list.patch fnic-use-the-local-variable-instead-of-i-o-flag-to-acquire-io_req_lock-in-fnic_queuecommand-to-avoid-deadloack.patch genirq-don-t-return-enosys-in-irq_chip_retrigger_hierarchy.patch genirq-introduce-irq_chip_set_type_parent-helper.patch irqchip-crossbar-restore-set_wake-functionality.patch irqchip-crossbar-restore-the-irq_set_type-mechanism.patch irqchip-crossbar-restore-the-mask-on-suspend-behaviour.patch scsi-fix-null-pointer-dereference-in-runtime-pm.patch x86-apic-fix-fallout-from-x2apic-cleanup.patch x86-idle-restore-trace_cpu_idle-to-mwait_idle-calls.patch x86-xen-make-config_xen-depend-on-config_x86_local_apic.patch --- ...ialized-to-0-in-p9_client_read-write.patch | 57 ++++ ...certified-crucial-m500s-to-blacklist.patch | 34 +++ ...n-restore-the-irq_set_type-mechanism.patch | 51 ++++ ...injecting-a-fault-into-a-32bit-guest.patch | 60 ++++ ...mu-plat_device-when-probing-pmu-ppis.patch | 46 +++ ...can-fd-bittimings-by-non-fd-adapters.patch | 275 ++++++++++++++++++ ...ile-suspend-resume-for-pm_sleep-only.patch | 31 ++ queue-4.1/drm-i915-avoid-tp3-on-chv.patch | 84 ++++++ ...text-object-as-dirty-after-every-use.patch | 36 +++ ...-remove-hbr2-from-chv-supported-list.patch | 44 +++ ...fnic_queuecommand-to-avoid-deadloack.patch | 67 +++++ ...osys-in-irq_chip_retrigger_hierarchy.patch | 59 ++++ ...duce-irq_chip_set_type_parent-helper.patch | 74 +++++ ...ssbar-restore-set_wake-functionality.patch | 57 ++++ ...r-restore-the-irq_set_type-mechanism.patch | 51 ++++ ...estore-the-mask-on-suspend-behaviour.patch | 55 ++++ ...ll-pointer-dereference-in-runtime-pm.patch | 83 ++++++ queue-4.1/series | 20 ++ ...apic-fix-fallout-from-x2apic-cleanup.patch | 81 ++++++ ...e-trace_cpu_idle-to-mwait_idle-calls.patch | 46 +++ ..._xen-depend-on-config_x86_local_apic.patch | 46 +++ 21 files changed, 1357 insertions(+) create mode 100644 queue-4.1/9p-ensure-err-is-initialized-to-0-in-p9_client_read-write.patch create mode 100644 queue-4.1/add-factory-recertified-crucial-m500s-to-blacklist.patch create mode 100644 queue-4.1/arm-omap-wakeupgen-restore-the-irq_set_type-mechanism.patch create mode 100644 queue-4.1/arm64-kvm-fix-host-crash-when-injecting-a-fault-into-a-32bit-guest.patch create mode 100644 queue-4.1/arm64-perf-fix-unassigned-cpu_pmu-plat_device-when-probing-pmu-ppis.patch create mode 100644 queue-4.1/can-pcan_usb-don-t-provide-can-fd-bittimings-by-non-fd-adapters.patch create mode 100644 queue-4.1/drm-atmel-hlcdc-compile-suspend-resume-for-pm_sleep-only.patch create mode 100644 queue-4.1/drm-i915-avoid-tp3-on-chv.patch create mode 100644 queue-4.1/drm-i915-flag-the-execlists-context-object-as-dirty-after-every-use.patch create mode 100644 queue-4.1/drm-i915-remove-hbr2-from-chv-supported-list.patch create mode 100644 queue-4.1/fnic-use-the-local-variable-instead-of-i-o-flag-to-acquire-io_req_lock-in-fnic_queuecommand-to-avoid-deadloack.patch create mode 100644 queue-4.1/genirq-don-t-return-enosys-in-irq_chip_retrigger_hierarchy.patch create mode 100644 queue-4.1/genirq-introduce-irq_chip_set_type_parent-helper.patch create mode 100644 queue-4.1/irqchip-crossbar-restore-set_wake-functionality.patch create mode 100644 queue-4.1/irqchip-crossbar-restore-the-irq_set_type-mechanism.patch create mode 100644 queue-4.1/irqchip-crossbar-restore-the-mask-on-suspend-behaviour.patch create mode 100644 queue-4.1/scsi-fix-null-pointer-dereference-in-runtime-pm.patch create mode 100644 queue-4.1/x86-apic-fix-fallout-from-x2apic-cleanup.patch create mode 100644 queue-4.1/x86-idle-restore-trace_cpu_idle-to-mwait_idle-calls.patch create mode 100644 queue-4.1/x86-xen-make-config_xen-depend-on-config_x86_local_apic.patch diff --git a/queue-4.1/9p-ensure-err-is-initialized-to-0-in-p9_client_read-write.patch b/queue-4.1/9p-ensure-err-is-initialized-to-0-in-p9_client_read-write.patch new file mode 100644 index 00000000000..be9af13901d --- /dev/null +++ b/queue-4.1/9p-ensure-err-is-initialized-to-0-in-p9_client_read-write.patch @@ -0,0 +1,57 @@ +From 999b8b88c6060adf7a9b7907740ae86ace65291e Mon Sep 17 00:00:00 2001 +From: Vincent Bernat +Date: Sat, 15 Aug 2015 15:49:13 +0200 +Subject: 9p: ensure err is initialized to 0 in p9_client_read/write + +From: Vincent Bernat + +commit 999b8b88c6060adf7a9b7907740ae86ace65291e upstream. + +Some use of those functions were providing unitialized values to those +functions. Notably, when reading 0 bytes from an empty file on a 9P +filesystem, the return code of read() was not 0. + +Tested with this simple program: + + #include + #include + #include + #include + #include + + int main(int argc, const char **argv) + { + assert(argc == 2); + char buffer[256]; + int fd = open(argv[1], O_RDONLY|O_NOCTTY); + assert(fd >= 0); + assert(read(fd, buffer, 0) == 0); + return 0; + } + +Signed-off-by: Vincent Bernat +Signed-off-by: Al Viro +Signed-off-by: Greg Kroah-Hartman + +--- + net/9p/client.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/net/9p/client.c ++++ b/net/9p/client.c +@@ -1541,6 +1541,7 @@ p9_client_read(struct p9_fid *fid, u64 o + struct p9_client *clnt = fid->clnt; + struct p9_req_t *req; + int total = 0; ++ *err = 0; + + p9_debug(P9_DEBUG_9P, ">>> TREAD fid %d offset %llu %d\n", + fid->fid, (unsigned long long) offset, (int)iov_iter_count(to)); +@@ -1616,6 +1617,7 @@ p9_client_write(struct p9_fid *fid, u64 + struct p9_client *clnt = fid->clnt; + struct p9_req_t *req; + int total = 0; ++ *err = 0; + + p9_debug(P9_DEBUG_9P, ">>> TWRITE fid %d offset %llu count %zd\n", + fid->fid, (unsigned long long) offset, diff --git a/queue-4.1/add-factory-recertified-crucial-m500s-to-blacklist.patch b/queue-4.1/add-factory-recertified-crucial-m500s-to-blacklist.patch new file mode 100644 index 00000000000..cf1ff7a6726 --- /dev/null +++ b/queue-4.1/add-factory-recertified-crucial-m500s-to-blacklist.patch @@ -0,0 +1,34 @@ +From 7a7184b01aa9deb86df661c6f7cbcf69a95b728c Mon Sep 17 00:00:00 2001 +From: "Guillermo A. Amaral" +Date: Tue, 25 Aug 2015 23:29:13 -0700 +Subject: Add factory recertified Crucial M500s to blacklist + +From: "Guillermo A. Amaral" + +commit 7a7184b01aa9deb86df661c6f7cbcf69a95b728c upstream. + +The Crucial M500 is known to have issues with queued TRIM commands, the +factory recertified SSDs use a different model number naming convention +which causes them to get ignored by the blacklist. + +The new naming convention boils down to: s/Crucial_/FC/ + +Signed-off-by: Guillermo A. Amaral +Signed-off-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/libata-core.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/ata/libata-core.c ++++ b/drivers/ata/libata-core.c +@@ -4230,6 +4230,8 @@ static const struct ata_blacklist_entry + ATA_HORKAGE_ZERO_AFTER_TRIM, }, + { "Samsung SSD 8*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | + ATA_HORKAGE_ZERO_AFTER_TRIM, }, ++ { "FCCT*M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ++ ATA_HORKAGE_ZERO_AFTER_TRIM, }, + + /* devices that don't properly handle TRIM commands */ + { "SuperSSpeed S238*", NULL, ATA_HORKAGE_NOTRIM, }, diff --git a/queue-4.1/arm-omap-wakeupgen-restore-the-irq_set_type-mechanism.patch b/queue-4.1/arm-omap-wakeupgen-restore-the-irq_set_type-mechanism.patch new file mode 100644 index 00000000000..8e0375e96f4 --- /dev/null +++ b/queue-4.1/arm-omap-wakeupgen-restore-the-irq_set_type-mechanism.patch @@ -0,0 +1,51 @@ +From 63059a272398ef5dc1bd7065a036e8b6e82d1af7 Mon Sep 17 00:00:00 2001 +From: Grygorii Strashko +Date: Fri, 14 Aug 2015 15:20:28 +0300 +Subject: ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism + +From: Grygorii Strashko + +commit 63059a272398ef5dc1bd7065a036e8b6e82d1af7 upstream. + +The conversion of the wakeupgen irqchip to hierarchical irq domains +failed to provide a mechanism to properly set the trigger type of an +interrupt. + +The wakeupgen irq chip itself has no mechanism and therefor no +irq_set_type() callback. The code before the conversion relayed the +trigger configuration directly to the underlying GIC. + +Restore the correct behaviour by setting the wakeupgen irq_set_type +callback to irq_chip_set_type_parent(). This propagates the +set_trigger() call to the underlying GIC irqchip. + +[ tglx: Massaged changelog ] + +Fixes: 7136d457f365 ('ARM: omap: convert wakeupgen to stacked domains') +Signed-off-by: Grygorii Strashko +Acked-by: Tony Lindgren +Cc: Sudeep Holla +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Link: http://lkml.kernel.org/r/1439554830-19502-5-git-send-email-grygorii.strashko@ti.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-omap2/omap-wakeupgen.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/mach-omap2/omap-wakeupgen.c ++++ b/arch/arm/mach-omap2/omap-wakeupgen.c +@@ -392,6 +392,7 @@ static struct irq_chip wakeupgen_chip = + .irq_mask = wakeupgen_mask, + .irq_unmask = wakeupgen_unmask, + .irq_retrigger = irq_chip_retrigger_hierarchy, ++ .irq_set_type = irq_chip_set_type_parent, + .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND, + #ifdef CONFIG_SMP + .irq_set_affinity = irq_chip_set_affinity_parent, diff --git a/queue-4.1/arm64-kvm-fix-host-crash-when-injecting-a-fault-into-a-32bit-guest.patch b/queue-4.1/arm64-kvm-fix-host-crash-when-injecting-a-fault-into-a-32bit-guest.patch new file mode 100644 index 00000000000..45e570c89cd --- /dev/null +++ b/queue-4.1/arm64-kvm-fix-host-crash-when-injecting-a-fault-into-a-32bit-guest.patch @@ -0,0 +1,60 @@ +From 126c69a0bd0e441bf6766a5d9bf20de011be9f68 Mon Sep 17 00:00:00 2001 +From: Marc Zyngier +Date: Thu, 27 Aug 2015 16:10:01 +0100 +Subject: arm64: KVM: Fix host crash when injecting a fault into a 32bit guest + +From: Marc Zyngier + +commit 126c69a0bd0e441bf6766a5d9bf20de011be9f68 upstream. + +When injecting a fault into a misbehaving 32bit guest, it seems +rather idiotic to also inject a 64bit fault that is only going +to corrupt the guest state. This leads to a situation where we +perform an illegal exception return at EL2 causing the host +to crash instead of killing the guest. + +Just fix the stupid bug that has been there from day 1. + +Reported-by: Russell King +Tested-by: Russell King +Signed-off-by: Marc Zyngier +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/kvm/inject_fault.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/arch/arm64/kvm/inject_fault.c ++++ b/arch/arm64/kvm/inject_fault.c +@@ -168,8 +168,8 @@ void kvm_inject_dabt(struct kvm_vcpu *vc + { + if (!(vcpu->arch.hcr_el2 & HCR_RW)) + inject_abt32(vcpu, false, addr); +- +- inject_abt64(vcpu, false, addr); ++ else ++ inject_abt64(vcpu, false, addr); + } + + /** +@@ -184,8 +184,8 @@ void kvm_inject_pabt(struct kvm_vcpu *vc + { + if (!(vcpu->arch.hcr_el2 & HCR_RW)) + inject_abt32(vcpu, true, addr); +- +- inject_abt64(vcpu, true, addr); ++ else ++ inject_abt64(vcpu, true, addr); + } + + /** +@@ -198,6 +198,6 @@ void kvm_inject_undefined(struct kvm_vcp + { + if (!(vcpu->arch.hcr_el2 & HCR_RW)) + inject_undef32(vcpu); +- +- inject_undef64(vcpu); ++ else ++ inject_undef64(vcpu); + } diff --git a/queue-4.1/arm64-perf-fix-unassigned-cpu_pmu-plat_device-when-probing-pmu-ppis.patch b/queue-4.1/arm64-perf-fix-unassigned-cpu_pmu-plat_device-when-probing-pmu-ppis.patch new file mode 100644 index 00000000000..ee892a1ec08 --- /dev/null +++ b/queue-4.1/arm64-perf-fix-unassigned-cpu_pmu-plat_device-when-probing-pmu-ppis.patch @@ -0,0 +1,46 @@ +From b265da5a45ce60bd3d7505cc0eaa6cfba50946a1 Mon Sep 17 00:00:00 2001 +From: Shannon Zhao +Date: Mon, 29 Jun 2015 09:02:40 +0100 +Subject: arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs + +From: Shannon Zhao + +commit b265da5a45ce60bd3d7505cc0eaa6cfba50946a1 upstream. + +Commit d795ef9aa831 ("arm64: perf: don't warn about missing +interrupt-affinity property for PPIs") added a check for PPIs so that +we avoid parsing the interrupt-affinity property for these naturally +affine interrupts. + +Unfortunately, this check can trigger an early (successful) return and +we will not assign the value of cpu_pmu->plat_device. This patch fixes +the issue. + +Signed-off-by: Shannon Zhao +Signed-off-by: Will Deacon +Cc: Kefeng Wang +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/kernel/perf_event.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/arm64/kernel/perf_event.c ++++ b/arch/arm64/kernel/perf_event.c +@@ -1318,7 +1318,7 @@ static int armpmu_device_probe(struct pl + /* Don't bother with PPIs; they're already affine */ + irq = platform_get_irq(pdev, 0); + if (irq >= 0 && irq_is_percpu(irq)) +- return 0; ++ goto out; + + irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); + if (!irqs) +@@ -1355,6 +1355,7 @@ static int armpmu_device_probe(struct pl + else + kfree(irqs); + ++out: + cpu_pmu->plat_device = pdev; + return 0; + } diff --git a/queue-4.1/can-pcan_usb-don-t-provide-can-fd-bittimings-by-non-fd-adapters.patch b/queue-4.1/can-pcan_usb-don-t-provide-can-fd-bittimings-by-non-fd-adapters.patch new file mode 100644 index 00000000000..36ecbb449d9 --- /dev/null +++ b/queue-4.1/can-pcan_usb-don-t-provide-can-fd-bittimings-by-non-fd-adapters.patch @@ -0,0 +1,275 @@ +From 06b23f7fbbf26a025fd68395c7586949db586b47 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Thu, 6 Aug 2015 09:48:34 +0200 +Subject: can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters + +From: Marc Kleine-Budde + +commit 06b23f7fbbf26a025fd68395c7586949db586b47 upstream. + +The CAN FD data bittiming constants are provided via netlink only when there +are valid CAN FD constants available in priv->data_bittiming_const. + +Due to the indirection of pointer assignments in the peak_usb driver the +priv->data_bittiming_const never becomes NULL - not even for non-FD adapters. + +The data_bittiming_const points to zero'ed data which leads to this result +when running 'ip -details link show can0': + +35: can0: mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10 + link/can promiscuity 0 + can state STOPPED restart-ms 0 + pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1 + : dtseg1 0..0 dtseg2 0..0 dsjw 1..0 dbrp 0..0 dbrp-inc 0 <== BROKEN! + clock 8000000 + +This patch changes the struct peak_usb_adapter::bittiming_const and struct +peak_usb_adapter::data_bittiming_const to pointers to fix the assignemnt +problems. + +Reported-by: Oliver Hartkopp +Tested-by: Oliver Hartkopp +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/can/usb/peak_usb/pcan_usb.c | 24 +++--- + drivers/net/can/usb/peak_usb/pcan_usb_core.c | 4 - + drivers/net/can/usb/peak_usb/pcan_usb_core.h | 4 - + drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 96 ++++++++++++++------------- + drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 24 +++--- + 5 files changed, 82 insertions(+), 70 deletions(-) + +--- a/drivers/net/can/usb/peak_usb/pcan_usb.c ++++ b/drivers/net/can/usb/peak_usb/pcan_usb.c +@@ -855,6 +855,18 @@ static int pcan_usb_probe(struct usb_int + /* + * describe the PCAN-USB adapter + */ ++static const struct can_bittiming_const pcan_usb_const = { ++ .name = "pcan_usb", ++ .tseg1_min = 1, ++ .tseg1_max = 16, ++ .tseg2_min = 1, ++ .tseg2_max = 8, ++ .sjw_max = 4, ++ .brp_min = 1, ++ .brp_max = 64, ++ .brp_inc = 1, ++}; ++ + const struct peak_usb_adapter pcan_usb = { + .name = "PCAN-USB", + .device_id = PCAN_USB_PRODUCT_ID, +@@ -863,17 +875,7 @@ const struct peak_usb_adapter pcan_usb = + .clock = { + .freq = PCAN_USB_CRYSTAL_HZ / 2 , + }, +- .bittiming_const = { +- .name = "pcan_usb", +- .tseg1_min = 1, +- .tseg1_max = 16, +- .tseg2_min = 1, +- .tseg2_max = 8, +- .sjw_max = 4, +- .brp_min = 1, +- .brp_max = 64, +- .brp_inc = 1, +- }, ++ .bittiming_const = &pcan_usb_const, + + /* size of device private data */ + .sizeof_dev_private = sizeof(struct pcan_usb), +--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c ++++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c +@@ -792,9 +792,9 @@ static int peak_usb_create_dev(const str + dev->ep_msg_out = peak_usb_adapter->ep_msg_out[ctrl_idx]; + + dev->can.clock = peak_usb_adapter->clock; +- dev->can.bittiming_const = &peak_usb_adapter->bittiming_const; ++ dev->can.bittiming_const = peak_usb_adapter->bittiming_const; + dev->can.do_set_bittiming = peak_usb_set_bittiming; +- dev->can.data_bittiming_const = &peak_usb_adapter->data_bittiming_const; ++ dev->can.data_bittiming_const = peak_usb_adapter->data_bittiming_const; + dev->can.do_set_data_bittiming = peak_usb_set_data_bittiming; + dev->can.do_set_mode = peak_usb_set_mode; + dev->can.do_get_berr_counter = peak_usb_adapter->do_get_berr_counter; +--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h ++++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h +@@ -48,8 +48,8 @@ struct peak_usb_adapter { + u32 device_id; + u32 ctrlmode_supported; + struct can_clock clock; +- const struct can_bittiming_const bittiming_const; +- const struct can_bittiming_const data_bittiming_const; ++ const struct can_bittiming_const * const bittiming_const; ++ const struct can_bittiming_const * const data_bittiming_const; + unsigned int ctrl_count; + + int (*intf_probe)(struct usb_interface *intf); +--- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c ++++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c +@@ -990,6 +990,30 @@ static void pcan_usb_fd_free(struct peak + } + + /* describes the PCAN-USB FD adapter */ ++static const struct can_bittiming_const pcan_usb_fd_const = { ++ .name = "pcan_usb_fd", ++ .tseg1_min = 1, ++ .tseg1_max = 64, ++ .tseg2_min = 1, ++ .tseg2_max = 16, ++ .sjw_max = 16, ++ .brp_min = 1, ++ .brp_max = 1024, ++ .brp_inc = 1, ++}; ++ ++static const struct can_bittiming_const pcan_usb_fd_data_const = { ++ .name = "pcan_usb_fd", ++ .tseg1_min = 1, ++ .tseg1_max = 16, ++ .tseg2_min = 1, ++ .tseg2_max = 8, ++ .sjw_max = 4, ++ .brp_min = 1, ++ .brp_max = 1024, ++ .brp_inc = 1, ++}; ++ + const struct peak_usb_adapter pcan_usb_fd = { + .name = "PCAN-USB FD", + .device_id = PCAN_USBFD_PRODUCT_ID, +@@ -999,28 +1023,8 @@ const struct peak_usb_adapter pcan_usb_f + .clock = { + .freq = PCAN_UFD_CRYSTAL_HZ, + }, +- .bittiming_const = { +- .name = "pcan_usb_fd", +- .tseg1_min = 1, +- .tseg1_max = 64, +- .tseg2_min = 1, +- .tseg2_max = 16, +- .sjw_max = 16, +- .brp_min = 1, +- .brp_max = 1024, +- .brp_inc = 1, +- }, +- .data_bittiming_const = { +- .name = "pcan_usb_fd", +- .tseg1_min = 1, +- .tseg1_max = 16, +- .tseg2_min = 1, +- .tseg2_max = 8, +- .sjw_max = 4, +- .brp_min = 1, +- .brp_max = 1024, +- .brp_inc = 1, +- }, ++ .bittiming_const = &pcan_usb_fd_const, ++ .data_bittiming_const = &pcan_usb_fd_data_const, + + /* size of device private data */ + .sizeof_dev_private = sizeof(struct pcan_usb_fd_device), +@@ -1058,6 +1062,30 @@ const struct peak_usb_adapter pcan_usb_f + }; + + /* describes the PCAN-USB Pro FD adapter */ ++static const struct can_bittiming_const pcan_usb_pro_fd_const = { ++ .name = "pcan_usb_pro_fd", ++ .tseg1_min = 1, ++ .tseg1_max = 64, ++ .tseg2_min = 1, ++ .tseg2_max = 16, ++ .sjw_max = 16, ++ .brp_min = 1, ++ .brp_max = 1024, ++ .brp_inc = 1, ++}; ++ ++static const struct can_bittiming_const pcan_usb_pro_fd_data_const = { ++ .name = "pcan_usb_pro_fd", ++ .tseg1_min = 1, ++ .tseg1_max = 16, ++ .tseg2_min = 1, ++ .tseg2_max = 8, ++ .sjw_max = 4, ++ .brp_min = 1, ++ .brp_max = 1024, ++ .brp_inc = 1, ++}; ++ + const struct peak_usb_adapter pcan_usb_pro_fd = { + .name = "PCAN-USB Pro FD", + .device_id = PCAN_USBPROFD_PRODUCT_ID, +@@ -1067,28 +1095,8 @@ const struct peak_usb_adapter pcan_usb_p + .clock = { + .freq = PCAN_UFD_CRYSTAL_HZ, + }, +- .bittiming_const = { +- .name = "pcan_usb_pro_fd", +- .tseg1_min = 1, +- .tseg1_max = 64, +- .tseg2_min = 1, +- .tseg2_max = 16, +- .sjw_max = 16, +- .brp_min = 1, +- .brp_max = 1024, +- .brp_inc = 1, +- }, +- .data_bittiming_const = { +- .name = "pcan_usb_pro_fd", +- .tseg1_min = 1, +- .tseg1_max = 16, +- .tseg2_min = 1, +- .tseg2_max = 8, +- .sjw_max = 4, +- .brp_min = 1, +- .brp_max = 1024, +- .brp_inc = 1, +- }, ++ .bittiming_const = &pcan_usb_pro_fd_const, ++ .data_bittiming_const = &pcan_usb_pro_fd_data_const, + + /* size of device private data */ + .sizeof_dev_private = sizeof(struct pcan_usb_fd_device), +--- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c ++++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c +@@ -1004,6 +1004,18 @@ int pcan_usb_pro_probe(struct usb_interf + /* + * describe the PCAN-USB Pro adapter + */ ++static const struct can_bittiming_const pcan_usb_pro_const = { ++ .name = "pcan_usb_pro", ++ .tseg1_min = 1, ++ .tseg1_max = 16, ++ .tseg2_min = 1, ++ .tseg2_max = 8, ++ .sjw_max = 4, ++ .brp_min = 1, ++ .brp_max = 1024, ++ .brp_inc = 1, ++}; ++ + const struct peak_usb_adapter pcan_usb_pro = { + .name = "PCAN-USB Pro", + .device_id = PCAN_USBPRO_PRODUCT_ID, +@@ -1012,17 +1024,7 @@ const struct peak_usb_adapter pcan_usb_p + .clock = { + .freq = PCAN_USBPRO_CRYSTAL_HZ, + }, +- .bittiming_const = { +- .name = "pcan_usb_pro", +- .tseg1_min = 1, +- .tseg1_max = 16, +- .tseg2_min = 1, +- .tseg2_max = 8, +- .sjw_max = 4, +- .brp_min = 1, +- .brp_max = 1024, +- .brp_inc = 1, +- }, ++ .bittiming_const = &pcan_usb_pro_const, + + /* size of device private data */ + .sizeof_dev_private = sizeof(struct pcan_usb_pro_device), diff --git a/queue-4.1/drm-atmel-hlcdc-compile-suspend-resume-for-pm_sleep-only.patch b/queue-4.1/drm-atmel-hlcdc-compile-suspend-resume-for-pm_sleep-only.patch new file mode 100644 index 00000000000..1af226b8a6c --- /dev/null +++ b/queue-4.1/drm-atmel-hlcdc-compile-suspend-resume-for-pm_sleep-only.patch @@ -0,0 +1,31 @@ +From dbb3df2d58754e4df58620e60370d166c2cb6744 Mon Sep 17 00:00:00 2001 +From: Thierry Reding +Date: Fri, 14 Aug 2015 13:58:20 +0200 +Subject: drm/atmel-hlcdc: Compile suspend/resume for PM_SLEEP only + +From: Thierry Reding + +commit dbb3df2d58754e4df58620e60370d166c2cb6744 upstream. + +If PM is enabled but PM_SLEEP is disabled, the suspend/resume functions +are still unused and produce a compiler warning. + +Signed-off-by: Thierry Reding +Signed-off-by: Boris Brezillon +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c ++++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +@@ -559,7 +559,7 @@ static int atmel_hlcdc_dc_drm_remove(str + return 0; + } + +-#ifdef CONFIG_PM ++#ifdef CONFIG_PM_SLEEP + static int atmel_hlcdc_dc_drm_suspend(struct device *dev) + { + struct drm_device *drm_dev = dev_get_drvdata(dev); diff --git a/queue-4.1/drm-i915-avoid-tp3-on-chv.patch b/queue-4.1/drm-i915-avoid-tp3-on-chv.patch new file mode 100644 index 00000000000..8738c7f4ba6 --- /dev/null +++ b/queue-4.1/drm-i915-avoid-tp3-on-chv.patch @@ -0,0 +1,84 @@ +From ed63baaf849e91c84ac3e042b1fd6a0af07c16f3 Mon Sep 17 00:00:00 2001 +From: "Thulasimani,Sivakumar" +Date: Tue, 18 Aug 2015 15:30:37 +0530 +Subject: drm/i915: Avoid TP3 on CHV +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: "Thulasimani,Sivakumar" + +commit ed63baaf849e91c84ac3e042b1fd6a0af07c16f3 upstream. + +This patch removes TP3 support on CHV since there is no support +for HBR2 on this platform. + +v2: rename the function to indicate it checks source rates (Jani) +v3: update comment to indicate TP3 dependency on HBR2 supported + hardware (Jani) + +Reviewed-by: Ville Syrjälä +Signed-off-by: Sivakumar Thulasimani +[Jani: fixed a couple of checkpatch warnings.] +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_dp.c | 30 ++++++++++++++++++++++-------- + 1 file changed, 22 insertions(+), 8 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_dp.c ++++ b/drivers/gpu/drm/i915/intel_dp.c +@@ -1150,6 +1150,19 @@ intel_dp_sink_rates(struct intel_dp *int + return (intel_dp_max_link_bw(intel_dp) >> 3) + 1; + } + ++static bool intel_dp_source_supports_hbr2(struct drm_device *dev) ++{ ++ /* WaDisableHBR2:skl */ ++ if (IS_SKYLAKE(dev) && INTEL_REVID(dev) <= SKL_REVID_B0) ++ return false; ++ ++ if ((IS_HASWELL(dev) && !IS_HSW_ULX(dev)) || IS_BROADWELL(dev) || ++ (INTEL_INFO(dev)->gen >= 9)) ++ return true; ++ else ++ return false; ++} ++ + static int + intel_dp_source_rates(struct drm_device *dev, const int **source_rates) + { +@@ -1163,12 +1176,8 @@ intel_dp_source_rates(struct drm_device + + *source_rates = default_rates; + +- /* WaDisableHBR2:skl */ +- if (IS_SKYLAKE(dev) && INTEL_REVID(dev) <= SKL_REVID_B0) +- return (DP_LINK_BW_2_7 >> 3) + 1; +- +- if ((IS_HASWELL(dev) && !IS_HSW_ULX(dev)) || IS_BROADWELL(dev) || +- (INTEL_INFO(dev)->gen >= 9)) ++ /* This depends on the fact that 5.4 is last value in the array */ ++ if (intel_dp_source_supports_hbr2(dev)) + return (DP_LINK_BW_5_4 >> 3) + 1; + else + return (DP_LINK_BW_2_7 >> 3) + 1; +@@ -3784,10 +3793,15 @@ intel_dp_get_dpcd(struct intel_dp *intel + } + } + +- /* Training Pattern 3 support, both source and sink */ ++ /* Training Pattern 3 support, Intel platforms that support HBR2 alone ++ * have support for TP3 hence that check is used along with dpcd check ++ * to ensure TP3 can be enabled. ++ * SKL < B0: due it's WaDisableHBR2 is the only exception where TP3 is ++ * supported but still not enabled. ++ */ + if (intel_dp->dpcd[DP_DPCD_REV] >= 0x12 && + intel_dp->dpcd[DP_MAX_LANE_COUNT] & DP_TPS3_SUPPORTED && +- (IS_HASWELL(dev_priv) || INTEL_INFO(dev_priv)->gen >= 8)) { ++ intel_dp_source_supports_hbr2(dev)) { + intel_dp->use_tps3 = true; + DRM_DEBUG_KMS("Displayport TPS3 supported\n"); + } else diff --git a/queue-4.1/drm-i915-flag-the-execlists-context-object-as-dirty-after-every-use.patch b/queue-4.1/drm-i915-flag-the-execlists-context-object-as-dirty-after-every-use.patch new file mode 100644 index 00000000000..e17096404c8 --- /dev/null +++ b/queue-4.1/drm-i915-flag-the-execlists-context-object-as-dirty-after-every-use.patch @@ -0,0 +1,36 @@ +From 903ecd0bb970438c3a60c2c33ec9032d6443bf67 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Fri, 14 Aug 2015 12:59:19 +0100 +Subject: drm/i915: Flag the execlists context object as dirty after every use + +From: Chris Wilson + +commit 903ecd0bb970438c3a60c2c33ec9032d6443bf67 upstream. + +Everytime we use the logical context with execlists it becomes dirty (as +the hardware will write the new register values afterwards, as well as +the GPU state that will be used). We need to then flag the context as +dirty everytime since after a swap-out/swap-in cycle the dirty flag will +be cleared, and a further swap-out cycle will then loose the most recent +GPU state. + +Signed-off-by: Chris Wilson +Reviewed-by: Daniel Vetter +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_lrc.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_lrc.c ++++ b/drivers/gpu/drm/i915/intel_lrc.c +@@ -848,6 +848,8 @@ static int intel_lr_context_pin(struct i + ret = intel_pin_and_map_ringbuffer_obj(ring->dev, ringbuf); + if (ret) + goto unpin_ctx_obj; ++ ++ ctx_obj->dirty = true; + } + + return ret; diff --git a/queue-4.1/drm-i915-remove-hbr2-from-chv-supported-list.patch b/queue-4.1/drm-i915-remove-hbr2-from-chv-supported-list.patch new file mode 100644 index 00000000000..b4dcd236c94 --- /dev/null +++ b/queue-4.1/drm-i915-remove-hbr2-from-chv-supported-list.patch @@ -0,0 +1,44 @@ +From 5e86dfe39f54ab13fd8079ac3d6cb100318909a3 Mon Sep 17 00:00:00 2001 +From: "Thulasimani,Sivakumar" +Date: Tue, 18 Aug 2015 11:07:57 +0530 +Subject: drm/i915: remove HBR2 from chv supported list +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: "Thulasimani,Sivakumar" + +commit 5e86dfe39f54ab13fd8079ac3d6cb100318909a3 upstream. + +This patch removes 5.4Gbps from supported link rate for CHV since +it is not supported in it. + +v2: change the ordering for better readability (Ville) + +Reviewed-by: Ville Syrjälä +Signed-off-by: Sivakumar Thulasimani +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_dp.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_dp.c ++++ b/drivers/gpu/drm/i915/intel_dp.c +@@ -1163,11 +1163,12 @@ intel_dp_source_rates(struct drm_device + + *source_rates = default_rates; + ++ /* WaDisableHBR2:skl */ + if (IS_SKYLAKE(dev) && INTEL_REVID(dev) <= SKL_REVID_B0) +- /* WaDisableHBR2:skl */ + return (DP_LINK_BW_2_7 >> 3) + 1; +- else if (INTEL_INFO(dev)->gen >= 8 || +- (IS_HASWELL(dev) && !IS_HSW_ULX(dev))) ++ ++ if ((IS_HASWELL(dev) && !IS_HSW_ULX(dev)) || IS_BROADWELL(dev) || ++ (INTEL_INFO(dev)->gen >= 9)) + return (DP_LINK_BW_5_4 >> 3) + 1; + else + return (DP_LINK_BW_2_7 >> 3) + 1; diff --git a/queue-4.1/fnic-use-the-local-variable-instead-of-i-o-flag-to-acquire-io_req_lock-in-fnic_queuecommand-to-avoid-deadloack.patch b/queue-4.1/fnic-use-the-local-variable-instead-of-i-o-flag-to-acquire-io_req_lock-in-fnic_queuecommand-to-avoid-deadloack.patch new file mode 100644 index 00000000000..3abea8eee18 --- /dev/null +++ b/queue-4.1/fnic-use-the-local-variable-instead-of-i-o-flag-to-acquire-io_req_lock-in-fnic_queuecommand-to-avoid-deadloack.patch @@ -0,0 +1,67 @@ +From db196935d9562abec4510f48d887bc1f1e054fcf Mon Sep 17 00:00:00 2001 +From: Hiral Shah +Date: Tue, 14 Jul 2015 07:08:57 -0700 +Subject: fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack + +From: Hiral Shah + +commit db196935d9562abec4510f48d887bc1f1e054fcf upstream. + +We added changes in fnic driver patch 1.6.0.16 to acquire +io_req_lock in fnic_queuecommand() before issuing I/O so that io completion +is serialized. But when releasing the lock we check for the I/O flag and +this could be modified if IO abort occurs before I/O completion. In this case +we wont release the lock and causes deadlock in some scenerios. Using the +local variable to check the IO lock status will resolve the problem. + +Fixes: 41df7b02db82cf6c14f094757bac3830d10a827f +Signed-off-by: Hiral Shah +Signed-off-by: Sesidhar Baddela +Signed-off-by: Anil Chintalapati +Reviewed-by: Martin K. Petersen +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/fnic/fnic.h | 2 +- + drivers/scsi/fnic/fnic_scsi.c | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/fnic/fnic.h ++++ b/drivers/scsi/fnic/fnic.h +@@ -39,7 +39,7 @@ + + #define DRV_NAME "fnic" + #define DRV_DESCRIPTION "Cisco FCoE HBA Driver" +-#define DRV_VERSION "1.6.0.17" ++#define DRV_VERSION "1.6.0.17a" + #define PFX DRV_NAME ": " + #define DFX DRV_NAME "%d: " + +--- a/drivers/scsi/fnic/fnic_scsi.c ++++ b/drivers/scsi/fnic/fnic_scsi.c +@@ -425,6 +425,7 @@ static int fnic_queuecommand_lck(struct + unsigned long ptr; + struct fc_rport_priv *rdata; + spinlock_t *io_lock = NULL; ++ int io_lock_acquired = 0; + + if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_IO_BLOCKED))) + return SCSI_MLQUEUE_HOST_BUSY; +@@ -518,6 +519,7 @@ static int fnic_queuecommand_lck(struct + spin_lock_irqsave(io_lock, flags); + + /* initialize rest of io_req */ ++ io_lock_acquired = 1; + io_req->port_id = rport->port_id; + io_req->start_time = jiffies; + CMD_STATE(sc) = FNIC_IOREQ_CMD_PENDING; +@@ -571,7 +573,7 @@ out: + (((u64)CMD_FLAGS(sc) >> 32) | CMD_STATE(sc))); + + /* if only we issued IO, will we have the io lock */ +- if (CMD_FLAGS(sc) & FNIC_IO_INITIALIZED) ++ if (io_lock_acquired) + spin_unlock_irqrestore(io_lock, flags); + + atomic_dec(&fnic->in_flight); diff --git a/queue-4.1/genirq-don-t-return-enosys-in-irq_chip_retrigger_hierarchy.patch b/queue-4.1/genirq-don-t-return-enosys-in-irq_chip_retrigger_hierarchy.patch new file mode 100644 index 00000000000..4017e7f78fc --- /dev/null +++ b/queue-4.1/genirq-don-t-return-enosys-in-irq_chip_retrigger_hierarchy.patch @@ -0,0 +1,59 @@ +From 6d4affea7d5aa5ca5ff4c3e5fbf3ee16801cc527 Mon Sep 17 00:00:00 2001 +From: Grygorii Strashko +Date: Fri, 14 Aug 2015 15:20:25 +0300 +Subject: genirq: Don't return ENOSYS in irq_chip_retrigger_hierarchy + +From: Grygorii Strashko + +commit 6d4affea7d5aa5ca5ff4c3e5fbf3ee16801cc527 upstream. + +irq_chip_retrigger_hierarchy() returns -ENOSYS if it was not able to +find at least one .irq_retrigger() callback implemented in the IRQ +domain hierarchy. + +That's wrong, because check_irq_resend() expects a 0 return value from +the callback in case that the hardware assisted resend was not +possible. If the return value is non zero the core code assumes +hardware resend success and the software resend is not invoked. + +This results in lost interrupts on platforms where none of the parent +irq chips in the hierarchy implements the retrigger callback. + +This is observable on TI OMAP, where the hierarchy is: + + ARM GIC <- OMAP wakeupgen <- TI Crossbar + +Return 0 instead so the software resend mechanism gets invoked. + +[ tglx: Massaged changelog ] + +Fixes: 85f08c17de26 ('genirq: Introduce helper functions...') +Signed-off-by: Grygorii Strashko +Reviewed-by: Marc Zyngier +Reviewed-by: Jiang Liu +Cc: Sudeep Holla +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Link: http://lkml.kernel.org/r/1439554830-19502-2-git-send-email-grygorii.strashko@ti.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/irq/chip.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/irq/chip.c ++++ b/kernel/irq/chip.c +@@ -946,7 +946,7 @@ int irq_chip_retrigger_hierarchy(struct + if (data->chip && data->chip->irq_retrigger) + return data->chip->irq_retrigger(data); + +- return -ENOSYS; ++ return 0; + } + + /** diff --git a/queue-4.1/genirq-introduce-irq_chip_set_type_parent-helper.patch b/queue-4.1/genirq-introduce-irq_chip_set_type_parent-helper.patch new file mode 100644 index 00000000000..c2cff3d7659 --- /dev/null +++ b/queue-4.1/genirq-introduce-irq_chip_set_type_parent-helper.patch @@ -0,0 +1,74 @@ +From b7560de198222994374c1340a389f12d5efb244a Mon Sep 17 00:00:00 2001 +From: Grygorii Strashko +Date: Fri, 14 Aug 2015 15:20:26 +0300 +Subject: genirq: Introduce irq_chip_set_type_parent() helper + +From: Grygorii Strashko + +commit b7560de198222994374c1340a389f12d5efb244a upstream. + +This helper is required for irq chips which do not implement a +irq_set_type callback and need to call down the irq domain hierarchy +for the actual trigger type change. + +This helper is required to fix further wreckage caused by the +conversion of TI OMAP to hierarchical irq domains and therefor tagged +for stable. + +[ tglx: Massaged changelog ] + +Signed-off-by: Grygorii Strashko +Cc: Sudeep Holla +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: stable@vger.kernel.org # 4.1 +Link: http://lkml.kernel.org/r/1439554830-19502-3-git-send-email-grygorii.strashko@ti.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/irq.h | 1 + + kernel/irq/chip.c | 17 +++++++++++++++++ + 2 files changed, 18 insertions(+) + +--- a/include/linux/irq.h ++++ b/include/linux/irq.h +@@ -467,6 +467,7 @@ extern int irq_chip_set_affinity_parent( + const struct cpumask *dest, + bool force); + extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on); ++extern int irq_chip_set_type_parent(struct irq_data *data, unsigned int type); + #endif + + /* Handling of unhandled and spurious interrupts: */ +--- a/kernel/irq/chip.c ++++ b/kernel/irq/chip.c +@@ -934,6 +934,23 @@ int irq_chip_set_affinity_parent(struct + } + + /** ++ * irq_chip_set_type_parent - Set IRQ type on the parent interrupt ++ * @data: Pointer to interrupt specific data ++ * @type: IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h ++ * ++ * Conditional, as the underlying parent chip might not implement it. ++ */ ++int irq_chip_set_type_parent(struct irq_data *data, unsigned int type) ++{ ++ data = data->parent_data; ++ ++ if (data->chip->irq_set_type) ++ return data->chip->irq_set_type(data, type); ++ ++ return -ENOSYS; ++} ++ ++/** + * irq_chip_retrigger_hierarchy - Retrigger an interrupt in hardware + * @data: Pointer to interrupt specific data + * diff --git a/queue-4.1/irqchip-crossbar-restore-set_wake-functionality.patch b/queue-4.1/irqchip-crossbar-restore-set_wake-functionality.patch new file mode 100644 index 00000000000..5cb56553725 --- /dev/null +++ b/queue-4.1/irqchip-crossbar-restore-set_wake-functionality.patch @@ -0,0 +1,57 @@ +From 8200fe4347870d4ad6475048bcdf3e7c106c5268 Mon Sep 17 00:00:00 2001 +From: Grygorii Strashko +Date: Fri, 14 Aug 2015 15:20:30 +0300 +Subject: irqchip/crossbar: Restore set_wake functionality + +From: Grygorii Strashko + +commit 8200fe4347870d4ad6475048bcdf3e7c106c5268 upstream. + +The TI crossbar irqchip doesn't provides any facility to configure the +wakeup sources, but the conversion to hierarchical irqdomains set the +irq_set_wake callback to irq_chip_set_wake_parent. The parent chip +(OMAP wakeupgen) has no irq_set_wake function either so the call will +fail with -ENOSYS. As a result the irq_set_wake() call in the resume +path will trigger an 'Unbalanced wake disable' warning. + +Before the conversion the GIC irqchip was the top level irqchip and +correctly flagged with IRQCHIP_SKIP_SET_WAKE. + +Restore the correct behaviour by removing the irq_set_type callback +from the crossbar irqchip and set the IRQCHIP_SKIP_SET_WAKE flag which +lets the irq_set_irq_wake() call from the driver succeed. + +[ tglx: Massaged changelog ] + +Fixes: 783d31863fb8 ('irqchip: crossbar: Convert dra7 crossbar...') +Signed-off-by: Grygorii Strashko +Cc: Sudeep Holla +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Link: http://lkml.kernel.org/r/1439554830-19502-7-git-send-email-grygorii.strashko@ti.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/irqchip/irq-crossbar.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/irqchip/irq-crossbar.c ++++ b/drivers/irqchip/irq-crossbar.c +@@ -68,9 +68,9 @@ static struct irq_chip crossbar_chip = { + .irq_mask = irq_chip_mask_parent, + .irq_unmask = irq_chip_unmask_parent, + .irq_retrigger = irq_chip_retrigger_hierarchy, +- .irq_set_wake = irq_chip_set_wake_parent, + .irq_set_type = irq_chip_set_type_parent, +- .flags = IRQCHIP_MASK_ON_SUSPEND, ++ .flags = IRQCHIP_MASK_ON_SUSPEND | ++ IRQCHIP_SKIP_SET_WAKE, + #ifdef CONFIG_SMP + .irq_set_affinity = irq_chip_set_affinity_parent, + #endif diff --git a/queue-4.1/irqchip-crossbar-restore-the-irq_set_type-mechanism.patch b/queue-4.1/irqchip-crossbar-restore-the-irq_set_type-mechanism.patch new file mode 100644 index 00000000000..57f8c72f520 --- /dev/null +++ b/queue-4.1/irqchip-crossbar-restore-the-irq_set_type-mechanism.patch @@ -0,0 +1,51 @@ +From e269ec42328783e51be08c191aa935dba56141fc Mon Sep 17 00:00:00 2001 +From: Grygorii Strashko +Date: Fri, 14 Aug 2015 15:20:27 +0300 +Subject: irqchip/crossbar: Restore the irq_set_type() mechanism + +From: Grygorii Strashko + +commit e269ec42328783e51be08c191aa935dba56141fc upstream. + +The conversion of the crossbar irqchip to hierarchical irq domains +failed to provide a mechanism to properly set the trigger type of an +interrupt. + +The crossbar irq chip itself has no mechanism and therefor no +irq_set_type() callback. The code before the conversion relayed the +trigger configuration directly to the underlying GIC. + +Restore the correct behaviour by setting the crossbar irq_set_type +callback to irq_chip_set_type_parent(). This propagates the +set_trigger() call to the underlying GIC irqchip. + +[ tglx: Massaged changelog ] + +Fixes: 783d31863fb8 ('irqchip: crossbar: Convert dra7 crossbar...') +Signed-off-by: Grygorii Strashko +Cc: Sudeep Holla +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Link: http://lkml.kernel.org/r/1439554830-19502-4-git-send-email-grygorii.strashko@ti.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/irqchip/irq-crossbar.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/irqchip/irq-crossbar.c ++++ b/drivers/irqchip/irq-crossbar.c +@@ -69,6 +69,7 @@ static struct irq_chip crossbar_chip = { + .irq_unmask = irq_chip_unmask_parent, + .irq_retrigger = irq_chip_retrigger_hierarchy, + .irq_set_wake = irq_chip_set_wake_parent, ++ .irq_set_type = irq_chip_set_type_parent, + #ifdef CONFIG_SMP + .irq_set_affinity = irq_chip_set_affinity_parent, + #endif diff --git a/queue-4.1/irqchip-crossbar-restore-the-mask-on-suspend-behaviour.patch b/queue-4.1/irqchip-crossbar-restore-the-mask-on-suspend-behaviour.patch new file mode 100644 index 00000000000..2743806b763 --- /dev/null +++ b/queue-4.1/irqchip-crossbar-restore-the-mask-on-suspend-behaviour.patch @@ -0,0 +1,55 @@ +From 4fd8f47e7e5b64a74b60f23c2e08ba8234d659d1 Mon Sep 17 00:00:00 2001 +From: Grygorii Strashko +Date: Fri, 14 Aug 2015 15:20:29 +0300 +Subject: irqchip/crossbar: Restore the mask on suspend behaviour + +From: Grygorii Strashko + +commit 4fd8f47e7e5b64a74b60f23c2e08ba8234d659d1 upstream. + +The ARM GIC requires that all interrupts which are not used as a +wakeup source have to be masked during suspend. + +The conversion of the crossbar irqchip to hierarchical irq domains +failed to mark the crossbar irqchip with the IRQCHIP_MASK_ON_SUSPEND +flag and therefor broke the suspend requirement of the GIC. + +Before the conversion the flags were visible because the GIC was the +top level irqchip. After the conversion the crossbar irqchip is the +top level irq chip whose flags are evaluated in suspend_device_irq(). +As the flag is not set the masking of the non-wakeup irqs is not +invoked which breaks suspend. + +Add the IRQCHIP_MASK_ON_SUSPEND flag to the crossbar irqchip, so the +GIC interrupts get masked properly. + +[ tglx: Massaged changelog ] + +Fixes: 783d31863fb8 ('irqchip: crossbar: Convert dra7 crossbar...') +Signed-off-by: Grygorii Strashko +Cc: Sudeep Holla +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Cc: +Link: http://lkml.kernel.org/r/1439554830-19502-6-git-send-email-grygorii.strashko@ti.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/irqchip/irq-crossbar.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/irqchip/irq-crossbar.c ++++ b/drivers/irqchip/irq-crossbar.c +@@ -70,6 +70,7 @@ static struct irq_chip crossbar_chip = { + .irq_retrigger = irq_chip_retrigger_hierarchy, + .irq_set_wake = irq_chip_set_wake_parent, + .irq_set_type = irq_chip_set_type_parent, ++ .flags = IRQCHIP_MASK_ON_SUSPEND, + #ifdef CONFIG_SMP + .irq_set_affinity = irq_chip_set_affinity_parent, + #endif diff --git a/queue-4.1/scsi-fix-null-pointer-dereference-in-runtime-pm.patch b/queue-4.1/scsi-fix-null-pointer-dereference-in-runtime-pm.patch new file mode 100644 index 00000000000..048c1326cff --- /dev/null +++ b/queue-4.1/scsi-fix-null-pointer-dereference-in-runtime-pm.patch @@ -0,0 +1,83 @@ +From 49718f0fb8c9af192b33d8af3a2826db04025371 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Mon, 17 Aug 2015 11:02:42 -0400 +Subject: SCSI: Fix NULL pointer dereference in runtime PM +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alan Stern + +commit 49718f0fb8c9af192b33d8af3a2826db04025371 upstream. + +The routines in scsi_rpm.c assume that if a runtime-PM callback is +invoked for a SCSI device, it can only mean that the device's driver +has asked the block layer to handle the runtime power management (by +calling blk_pm_runtime_init(), which among other things sets q->dev). + +However, this assumption turns out to be wrong for things like the ses +driver. Normally ses devices are not allowed to do runtime PM, but +userspace can override this setting. If this happens, the kernel gets +a NULL pointer dereference when blk_post_runtime_resume() tries to use +the uninitialized q->dev pointer. + +This patch fixes the problem by calling the block layer's runtime-PM +routines only if the device's driver really does have a runtime-PM +callback routine. Since ses doesn't define any such callbacks, the +crash won't occur. + +This fixes Bugzilla #101371. + +Signed-off-by: Alan Stern +Reported-by: Stanisław Pitucha +Reported-by: Ilan Cohen +Tested-by: Ilan Cohen +Reviewed-by: Johannes Thumshirn +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/scsi_pm.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +--- a/drivers/scsi/scsi_pm.c ++++ b/drivers/scsi/scsi_pm.c +@@ -217,15 +217,15 @@ static int sdev_runtime_suspend(struct d + { + const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; + struct scsi_device *sdev = to_scsi_device(dev); +- int err; ++ int err = 0; + +- err = blk_pre_runtime_suspend(sdev->request_queue); +- if (err) +- return err; +- if (pm && pm->runtime_suspend) ++ if (pm && pm->runtime_suspend) { ++ err = blk_pre_runtime_suspend(sdev->request_queue); ++ if (err) ++ return err; + err = pm->runtime_suspend(dev); +- blk_post_runtime_suspend(sdev->request_queue, err); +- ++ blk_post_runtime_suspend(sdev->request_queue, err); ++ } + return err; + } + +@@ -248,11 +248,11 @@ static int sdev_runtime_resume(struct de + const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; + int err = 0; + +- blk_pre_runtime_resume(sdev->request_queue); +- if (pm && pm->runtime_resume) ++ if (pm && pm->runtime_resume) { ++ blk_pre_runtime_resume(sdev->request_queue); + err = pm->runtime_resume(dev); +- blk_post_runtime_resume(sdev->request_queue, err); +- ++ blk_post_runtime_resume(sdev->request_queue, err); ++ } + return err; + } + diff --git a/queue-4.1/series b/queue-4.1/series index 579da2edc92..a09d2941b05 100644 --- a/queue-4.1/series +++ b/queue-4.1/series @@ -56,3 +56,23 @@ mac80211-fix-invalid-read-in-minstrel_sort_best_tp_rates.patch target-iscsi-fix-double-free-of-a-tur-followed-by-a-solicited-nopout.patch pci-don-t-use-64-bit-bus-addresses-on-pa-risc.patch input-gpio_keys_polled-request-gpio-pin-as-input.patch +drm-atmel-hlcdc-compile-suspend-resume-for-pm_sleep-only.patch +drm-i915-flag-the-execlists-context-object-as-dirty-after-every-use.patch +drm-i915-remove-hbr2-from-chv-supported-list.patch +drm-i915-avoid-tp3-on-chv.patch +9p-ensure-err-is-initialized-to-0-in-p9_client_read-write.patch +irqchip-crossbar-restore-the-irq_set_type-mechanism.patch +irqchip-crossbar-restore-the-mask-on-suspend-behaviour.patch +irqchip-crossbar-restore-set_wake-functionality.patch +arm-omap-wakeupgen-restore-the-irq_set_type-mechanism.patch +genirq-don-t-return-enosys-in-irq_chip_retrigger_hierarchy.patch +genirq-introduce-irq_chip_set_type_parent-helper.patch +scsi-fix-null-pointer-dereference-in-runtime-pm.patch +can-pcan_usb-don-t-provide-can-fd-bittimings-by-non-fd-adapters.patch +add-factory-recertified-crucial-m500s-to-blacklist.patch +fnic-use-the-local-variable-instead-of-i-o-flag-to-acquire-io_req_lock-in-fnic_queuecommand-to-avoid-deadloack.patch +arm64-kvm-fix-host-crash-when-injecting-a-fault-into-a-32bit-guest.patch +arm64-perf-fix-unassigned-cpu_pmu-plat_device-when-probing-pmu-ppis.patch +x86-xen-make-config_xen-depend-on-config_x86_local_apic.patch +x86-apic-fix-fallout-from-x2apic-cleanup.patch +x86-idle-restore-trace_cpu_idle-to-mwait_idle-calls.patch diff --git a/queue-4.1/x86-apic-fix-fallout-from-x2apic-cleanup.patch b/queue-4.1/x86-apic-fix-fallout-from-x2apic-cleanup.patch new file mode 100644 index 00000000000..ebc6989c338 --- /dev/null +++ b/queue-4.1/x86-apic-fix-fallout-from-x2apic-cleanup.patch @@ -0,0 +1,81 @@ +From a57e456a7b28431b55e407e5ab78ebd5b378d19e Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Sat, 22 Aug 2015 16:41:17 +0200 +Subject: x86/apic: Fix fallout from x2apic cleanup + +From: Thomas Gleixner + +commit a57e456a7b28431b55e407e5ab78ebd5b378d19e upstream. + +In the recent x2apic cleanup I got two things really wrong: +1) The safety check in __disable_x2apic which allows the function to + be called unconditionally is backwards. The check is there to + prevent access to the apic MSR in case that the machine has no + apic. Though right now it returns if the machine has an apic and + therefor the disabling of x2apic is never invoked. + +2) x2apic_disable() sets x2apic_mode to 0 after registering the local + apic. That's wrong, because register_lapic_address() checks x2apic + mode and therefor takes the wrong code path. + +This results in boot failures on machines with x2apic preenabled by +BIOS and can also lead to an fatal MSR access on machines without +apic. + +The solutions are simple: +1) Correct the sanity check for apic availability +2) Clear x2apic_mode _before_ calling register_lapic_address() + +Fixes: 659006bf3ae3 'x86/x2apic: Split enable and setup function' +Reported-and-tested-by: Javier Monteagudo +Signed-off-by: Thomas Gleixner +Link: https://bugzilla.redhat.com/show_bug.cgi?id=1224764 +Cc: Laura Abbott +Cc: Jiang Liu +Cc: Joerg Roedel +Cc: Tony Luck +Cc: Borislav Petkov +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/apic/apic.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/arch/x86/kernel/apic/apic.c ++++ b/arch/x86/kernel/apic/apic.c +@@ -1424,7 +1424,7 @@ static inline void __x2apic_disable(void + { + u64 msr; + +- if (cpu_has_apic) ++ if (!cpu_has_apic) + return; + + rdmsrl(MSR_IA32_APICBASE, msr); +@@ -1483,10 +1483,13 @@ void x2apic_setup(void) + + static __init void x2apic_disable(void) + { +- u32 x2apic_id; ++ u32 x2apic_id, state = x2apic_state; + +- if (x2apic_state != X2APIC_ON) +- goto out; ++ x2apic_mode = 0; ++ x2apic_state = X2APIC_DISABLED; ++ ++ if (state != X2APIC_ON) ++ return; + + x2apic_id = read_apic_id(); + if (x2apic_id >= 255) +@@ -1494,9 +1497,6 @@ static __init void x2apic_disable(void) + + __x2apic_disable(); + register_lapic_address(mp_lapic_addr); +-out: +- x2apic_state = X2APIC_DISABLED; +- x2apic_mode = 0; + } + + static __init void x2apic_enable(void) diff --git a/queue-4.1/x86-idle-restore-trace_cpu_idle-to-mwait_idle-calls.patch b/queue-4.1/x86-idle-restore-trace_cpu_idle-to-mwait_idle-calls.patch new file mode 100644 index 00000000000..d869f5f8c9e --- /dev/null +++ b/queue-4.1/x86-idle-restore-trace_cpu_idle-to-mwait_idle-calls.patch @@ -0,0 +1,46 @@ +From e43d0189ac02415fe4487f79fc35e8f147e9ea0d Mon Sep 17 00:00:00 2001 +From: Jisheng Zhang +Date: Thu, 20 Aug 2015 12:54:39 +0800 +Subject: x86/idle: Restore trace_cpu_idle to mwait_idle() calls + +From: Jisheng Zhang + +commit e43d0189ac02415fe4487f79fc35e8f147e9ea0d upstream. + +Commit b253149b843f ("sched/idle/x86: Restore mwait_idle() to fix boot +hangs, to improve power savings and to improve performance") restores +mwait_idle(), but the trace_cpu_idle related calls are missing. This +causes powertop on my old desktop powered by Intel Core2 E6550 to +report zero wakeups and zero events. + +Add them back to restore the proper behaviour. + +Fixes: b253149b843f ("sched/idle/x86: Restore mwait_idle() to ...") +Signed-off-by: Jisheng Zhang +Cc: +Link: http://lkml.kernel.org/r/1440046479-4262-1-git-send-email-jszhang@marvell.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/process.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/x86/kernel/process.c ++++ b/arch/x86/kernel/process.c +@@ -453,6 +453,7 @@ static int prefer_mwait_c1_over_halt(con + static void mwait_idle(void) + { + if (!current_set_polling_and_test()) { ++ trace_cpu_idle_rcuidle(1, smp_processor_id()); + if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) { + smp_mb(); /* quirk */ + clflush((void *)¤t_thread_info()->flags); +@@ -464,6 +465,7 @@ static void mwait_idle(void) + __sti_mwait(0, 0); + else + local_irq_enable(); ++ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); + } else { + local_irq_enable(); + } diff --git a/queue-4.1/x86-xen-make-config_xen-depend-on-config_x86_local_apic.patch b/queue-4.1/x86-xen-make-config_xen-depend-on-config_x86_local_apic.patch new file mode 100644 index 00000000000..4590154b03c --- /dev/null +++ b/queue-4.1/x86-xen-make-config_xen-depend-on-config_x86_local_apic.patch @@ -0,0 +1,46 @@ +From 87ffd2b9bb74061c120f450e4d0f3409bb603ae0 Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Thu, 20 Aug 2015 11:33:41 +0100 +Subject: x86/xen: make CONFIG_XEN depend on CONFIG_X86_LOCAL_APIC + +From: David Vrabel + +commit 87ffd2b9bb74061c120f450e4d0f3409bb603ae0 upstream. + +Since commit feb44f1f7a4ac299d1ab1c3606860e70b9b89d69 (x86/xen: +Provide a "Xen PV" APIC driver to support >255 VCPUs) Xen guests need +a full APIC driver and thus should depend on X86_LOCAL_APIC. + +This fixes an i386 build failure with !SMP && !CONFIG_X86_UP_APIC by +disabling Xen support in this configuration. + +Users needing Xen support in a non-SMP i386 kernel will need to enable +CONFIG_X86_UP_APIC. + +Signed-off-by: David Vrabel +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/Kconfig | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/x86/xen/Kconfig ++++ b/arch/x86/xen/Kconfig +@@ -8,7 +8,7 @@ config XEN + select PARAVIRT_CLOCK + select XEN_HAVE_PVMMU + depends on X86_64 || (X86_32 && X86_PAE) +- depends on X86_TSC ++ depends on X86_LOCAL_APIC && X86_TSC + help + This is the Linux Xen port. Enabling this will allow the + kernel to boot in a paravirtualized environment under the +@@ -17,7 +17,7 @@ config XEN + config XEN_DOM0 + def_bool y + depends on XEN && PCI_XEN && SWIOTLB_XEN +- depends on X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI ++ depends on X86_IO_APIC && ACPI && PCI + + config XEN_PVHVM + def_bool y -- 2.47.2