From: Greg Kroah-Hartman Date: Tue, 10 Apr 2012 23:56:50 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.3.2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b92a64c5a7f01e7353895cb6667d4148ecf50ea;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: acer-wmi-no-wifi-rfkill-on-sony-machines.patch mfd-clear-twl6030-irq-status-register-only-once.patch revert-x86-ioapic-add-register-level-checks-to-detect.patch sched-x86-fix-overflow-in-cyc2ns_offset.patch usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch --- diff --git a/queue-3.0/acer-wmi-no-wifi-rfkill-on-sony-machines.patch b/queue-3.0/acer-wmi-no-wifi-rfkill-on-sony-machines.patch new file mode 100644 index 00000000000..3de72fc7b30 --- /dev/null +++ b/queue-3.0/acer-wmi-no-wifi-rfkill-on-sony-machines.patch @@ -0,0 +1,37 @@ +From 5719b81988f3c24ff694dc3a37e35b35630a3966 Mon Sep 17 00:00:00 2001 +From: "Lee, Chun-Yi" +Date: Fri, 23 Mar 2012 12:36:44 +0800 +Subject: acer-wmi: No wifi rfkill on Sony machines + +From: "Lee, Chun-Yi" + +commit 5719b81988f3c24ff694dc3a37e35b35630a3966 upstream. + +The wireless rfkill should charged by sony-laptop but not acer-wmi. +So, add Sony's SNY5001 acpi device to blacklist in acer-wmi. + +Tested on Sony Vaio + +Cc: Carlos Corbacho +Cc: Matthew Garrett +Cc: Mattia Dongili +Cc: Dimitris N +Tested-by: Dimitris N +Signed-off-by: Lee, Chun-Yi +Signed-off-by: Matthew Garrett +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/acer-wmi.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/platform/x86/acer-wmi.c ++++ b/drivers/platform/x86/acer-wmi.c +@@ -689,6 +689,7 @@ static const struct acpi_device_id norfk + { "VPC2004", 0}, + { "IBM0068", 0}, + { "LEN0068", 0}, ++ { "SNY5001", 0}, /* sony-laptop in charge */ + { "", 0}, + }; + diff --git a/queue-3.0/mfd-clear-twl6030-irq-status-register-only-once.patch b/queue-3.0/mfd-clear-twl6030-irq-status-register-only-once.patch new file mode 100644 index 00000000000..da0f1afb7da --- /dev/null +++ b/queue-3.0/mfd-clear-twl6030-irq-status-register-only-once.patch @@ -0,0 +1,56 @@ +From 3f8349e6e98ba0455437724589072523865eae5e Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Wed, 22 Feb 2012 20:03:45 -0600 +Subject: mfd: Clear twl6030 IRQ status register only once + +From: Nishanth Menon + +commit 3f8349e6e98ba0455437724589072523865eae5e upstream. + +TWL6030 family of PMIC use a shadow interrupt status register +while kernel processes the current interrupt event. +However, any write(0 or 1) to register INT_STS_A, INT_STS_B or +INT_STS_C clears all 3 interrupt status registers. + +Since clear of the interrupt is done on 32k clk, depending on I2C +bus speed, we could in-adverently clear the status of a interrupt +status pending on shadow register in the current implementation. +This is due to the fact that multi-byte i2c write operation into +three seperate status register could result in multiple load +and clear of status and result in lost interrupts. + +Instead, doing a single byte write to INT_STS_A register with 0x0 +will clear all three interrupt status registers without the related +risk. + +Acked-by: Santosh Shilimkar +Signed-off-by: Nishanth Menon +Signed-off-by: Samuel Ortiz +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mfd/twl6030-irq.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/drivers/mfd/twl6030-irq.c ++++ b/drivers/mfd/twl6030-irq.c +@@ -145,8 +145,17 @@ static int twl6030_irq_thread(void *data + } + local_irq_enable(); + } +- ret = twl_i2c_write(TWL_MODULE_PIH, sts.bytes, +- REG_INT_STS_A, 3); /* clear INT_STS_A */ ++ ++ /* ++ * NOTE: ++ * Simulation confirms that documentation is wrong w.r.t the ++ * interrupt status clear operation. A single *byte* write to ++ * any one of STS_A to STS_C register results in all three ++ * STS registers being reset. Since it does not matter which ++ * value is written, all three registers are cleared on a ++ * single byte write, so we just use 0x0 to clear. ++ */ ++ ret = twl_i2c_write_u8(TWL_MODULE_PIH, 0x00, REG_INT_STS_A); + if (ret) + pr_warning("twl6030: I2C error in clearing PIH ISR\n"); + diff --git a/queue-3.0/revert-x86-ioapic-add-register-level-checks-to-detect.patch b/queue-3.0/revert-x86-ioapic-add-register-level-checks-to-detect.patch new file mode 100644 index 00000000000..8918314741e --- /dev/null +++ b/queue-3.0/revert-x86-ioapic-add-register-level-checks-to-detect.patch @@ -0,0 +1,95 @@ +From dd97ac4172cb1c7a4c848bc37302e11540732856 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 10 Apr 2012 16:04:49 -0700 +Subject: Revert "x86/ioapic: Add register level checks to detect bogus io-apic entries" + +This reverts commit c2ec63edaf48c90c3495eeb0b75bb05102fbf71a +[73d63d038ee9f769f5e5b46792d227fe20e442c5 upstream] + +It causes problems, so needs to be reverted from 3.2-stable for now. + +Reported-by: Konrad Rzeszutek Wilk +Cc: Jon Dufresne +Cc: Suresh Siddha +Cc: +Cc: Josh Boyer +Cc: Ingo Molnar +Cc: Teck Choon Giam +Cc: Ben Guthro +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/apic/io_apic.c | 40 ++++++++-------------------------------- + 1 file changed, 8 insertions(+), 32 deletions(-) + +--- a/arch/x86/kernel/apic/io_apic.c ++++ b/arch/x86/kernel/apic/io_apic.c +@@ -3927,36 +3927,18 @@ int mp_find_ioapic_pin(int ioapic, u32 g + static __init int bad_ioapic(unsigned long address) + { + if (nr_ioapics >= MAX_IO_APICS) { +- pr_warn("WARNING: Max # of I/O APICs (%d) exceeded (found %d), skipping\n", +- MAX_IO_APICS, nr_ioapics); ++ printk(KERN_WARNING "WARNING: Max # of I/O APICs (%d) exceeded " ++ "(found %d), skipping\n", MAX_IO_APICS, nr_ioapics); + return 1; + } + if (!address) { +- pr_warn("WARNING: Bogus (zero) I/O APIC address found in table, skipping!\n"); ++ printk(KERN_WARNING "WARNING: Bogus (zero) I/O APIC address" ++ " found in table, skipping!\n"); + return 1; + } + return 0; + } + +-static __init int bad_ioapic_register(int idx) +-{ +- union IO_APIC_reg_00 reg_00; +- union IO_APIC_reg_01 reg_01; +- union IO_APIC_reg_02 reg_02; +- +- reg_00.raw = io_apic_read(idx, 0); +- reg_01.raw = io_apic_read(idx, 1); +- reg_02.raw = io_apic_read(idx, 2); +- +- if (reg_00.raw == -1 && reg_01.raw == -1 && reg_02.raw == -1) { +- pr_warn("I/O APIC 0x%x registers return all ones, skipping!\n", +- mpc_ioapic_addr(idx)); +- return 1; +- } +- +- return 0; +-} +- + void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) + { + int idx = 0; +@@ -3973,12 +3955,6 @@ void __init mp_register_ioapic(int id, u + ioapics[idx].mp_config.apicaddr = address; + + set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); +- +- if (bad_ioapic_register(idx)) { +- clear_fixmap(FIX_IO_APIC_BASE_0 + idx); +- return; +- } +- + ioapics[idx].mp_config.apicid = io_apic_unique_id(id); + ioapics[idx].mp_config.apicver = io_apic_get_version(idx); + +@@ -3999,10 +3975,10 @@ void __init mp_register_ioapic(int id, u + if (gsi_cfg->gsi_end >= gsi_top) + gsi_top = gsi_cfg->gsi_end + 1; + +- pr_info("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, GSI %d-%d\n", +- idx, mpc_ioapic_id(idx), +- mpc_ioapic_ver(idx), mpc_ioapic_addr(idx), +- gsi_cfg->gsi_base, gsi_cfg->gsi_end); ++ printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " ++ "GSI %d-%d\n", idx, mpc_ioapic_id(idx), ++ mpc_ioapic_ver(idx), mpc_ioapic_addr(idx), ++ gsi_cfg->gsi_base, gsi_cfg->gsi_end); + + nr_ioapics++; + } diff --git a/queue-3.0/sched-x86-fix-overflow-in-cyc2ns_offset.patch b/queue-3.0/sched-x86-fix-overflow-in-cyc2ns_offset.patch new file mode 100644 index 00000000000..f2761edf8a2 --- /dev/null +++ b/queue-3.0/sched-x86-fix-overflow-in-cyc2ns_offset.patch @@ -0,0 +1,93 @@ +From 9993bc635d01a6ee7f6b833b4ee65ce7c06350b1 Mon Sep 17 00:00:00 2001 +From: Salman Qazi +Date: Fri, 9 Mar 2012 16:41:01 -0800 +Subject: sched/x86: Fix overflow in cyc2ns_offset + +From: Salman Qazi + +commit 9993bc635d01a6ee7f6b833b4ee65ce7c06350b1 upstream. + +When a machine boots up, the TSC generally gets reset. However, +when kexec is used to boot into a kernel, the TSC value would be +carried over from the previous kernel. The computation of +cycns_offset in set_cyc2ns_scale is prone to an overflow, if the +machine has been up more than 208 days prior to the kexec. The +overflow happens when we multiply *scale, even though there is +enough room to store the final answer. + +We fix this issue by decomposing tsc_now into the quotient and +remainder of division by CYC2NS_SCALE_FACTOR and then performing +the multiplication separately on the two components. + +Refactor code to share the calculation with the previous +fix in __cycles_2_ns(). + +Signed-off-by: Salman Qazi +Acked-by: John Stultz +Acked-by: Peter Zijlstra +Cc: Paul Turner +Cc: john stultz +Link: http://lkml.kernel.org/r/20120310004027.19291.88460.stgit@dungbeetle.mtv.corp.google.com +Signed-off-by: Ingo Molnar +Cc: Mike Galbraith +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/timer.h | 8 ++------ + arch/x86/kernel/tsc.c | 3 ++- + include/linux/kernel.h | 13 +++++++++++++ + 3 files changed, 17 insertions(+), 7 deletions(-) + +--- a/arch/x86/include/asm/timer.h ++++ b/arch/x86/include/asm/timer.h +@@ -57,14 +57,10 @@ DECLARE_PER_CPU(unsigned long long, cyc2 + + static inline unsigned long long __cycles_2_ns(unsigned long long cyc) + { +- unsigned long long quot; +- unsigned long long rem; + int cpu = smp_processor_id(); + unsigned long long ns = per_cpu(cyc2ns_offset, cpu); +- quot = (cyc >> CYC2NS_SCALE_FACTOR); +- rem = cyc & ((1ULL << CYC2NS_SCALE_FACTOR) - 1); +- ns += quot * per_cpu(cyc2ns, cpu) + +- ((rem * per_cpu(cyc2ns, cpu)) >> CYC2NS_SCALE_FACTOR); ++ ns += mult_frac(cyc, per_cpu(cyc2ns, cpu), ++ (1UL << CYC2NS_SCALE_FACTOR)); + return ns; + } + +--- a/arch/x86/kernel/tsc.c ++++ b/arch/x86/kernel/tsc.c +@@ -623,7 +623,8 @@ static void set_cyc2ns_scale(unsigned lo + + if (cpu_khz) { + *scale = (NSEC_PER_MSEC << CYC2NS_SCALE_FACTOR)/cpu_khz; +- *offset = ns_now - (tsc_now * *scale >> CYC2NS_SCALE_FACTOR); ++ *offset = ns_now - mult_frac(tsc_now, *scale, ++ (1UL << CYC2NS_SCALE_FACTOR)); + } + + sched_clock_idle_wakeup_event(0); +--- a/include/linux/kernel.h ++++ b/include/linux/kernel.h +@@ -77,6 +77,19 @@ + } \ + ) + ++/* ++ * Multiplies an integer by a fraction, while avoiding unnecessary ++ * overflow or loss of precision. ++ */ ++#define mult_frac(x, numer, denom)( \ ++{ \ ++ typeof(x) quot = (x) / (denom); \ ++ typeof(x) rem = (x) % (denom); \ ++ (quot * (numer)) + ((rem * (numer)) / (denom)); \ ++} \ ++) ++ ++ + #define _RET_IP_ (unsigned long)__builtin_return_address(0) + #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) + diff --git a/queue-3.0/series b/queue-3.0/series index ab97f4e5caf..981c9c45148 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -30,3 +30,8 @@ modpost-fix-modpost-s-license-checking-v3.patch modpost-fix-modpost-license-checking-of-vmlinux.o.patch x86-pci-use-host-bridge-_crs-info-on-msi-ms-7253.patch x86-pci-do-not-tie-msi-ms-7253-use_crs-quirk-to-bios-version.patch +revert-x86-ioapic-add-register-level-checks-to-detect.patch +acer-wmi-no-wifi-rfkill-on-sony-machines.patch +sched-x86-fix-overflow-in-cyc2ns_offset.patch +mfd-clear-twl6030-irq-status-register-only-once.patch +usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch diff --git a/queue-3.0/usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch b/queue-3.0/usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch new file mode 100644 index 00000000000..7c388e18f09 --- /dev/null +++ b/queue-3.0/usb-add-motorola-rokr-e6-id-to-the-usbnet-driver-zaurus.patch @@ -0,0 +1,34 @@ +From a2daf263107ba3eb6db33931881731fa51c95045 Mon Sep 17 00:00:00 2001 +From: Guan Xin +Date: Mon, 26 Mar 2012 04:11:46 +0000 +Subject: USB: Add Motorola Rokr E6 Id to the USBNet driver "zaurus" + +From: Guan Xin + +commit a2daf263107ba3eb6db33931881731fa51c95045 upstream. + +Added Vendor/Device Id of Motorola Rokr E6 (22b8:6027) so it can be +recognized by the "zaurus" USBNet driver. +Applies to Linux 3.2.13 and 2.6.39.4. +Signed-off-by: Guan Xin +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/usb/zaurus.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/usb/zaurus.c ++++ b/drivers/net/usb/zaurus.c +@@ -332,6 +332,11 @@ static const struct usb_device_id produc + .driver_info = ZAURUS_PXA_INFO, + }, + { ++ /* Motorola Rokr E6 */ ++ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6027, USB_CLASS_COMM, ++ USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), ++ .driver_info = (unsigned long) &bogus_mdlm_info, ++}, { + /* Motorola MOTOMAGX phones */ + USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x6425, USB_CLASS_COMM, + USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),