From: Greg Kroah-Hartman Date: Tue, 4 Feb 2014 23:46:25 +0000 (-0800) Subject: delete 2 patches X-Git-Tag: v3.4.79~1^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d857d6e03e70c5608e1a241d7e6dfab8e681b4d5;p=thirdparty%2Fkernel%2Fstable-queue.git delete 2 patches Remove rtc-cmos-add-an-alarm-disable-quirk.patch and x86-add-check-for-number-of-available-vectors-before-cpu-down.patc --- diff --git a/queue-3.10/rtc-cmos-add-an-alarm-disable-quirk.patch b/queue-3.10/rtc-cmos-add-an-alarm-disable-quirk.patch deleted file mode 100644 index 421c863a51e..00000000000 --- a/queue-3.10/rtc-cmos-add-an-alarm-disable-quirk.patch +++ /dev/null @@ -1,125 +0,0 @@ -From d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d Mon Sep 17 00:00:00 2001 -From: Borislav Petkov -Date: Sat, 20 Jul 2013 19:00:23 +0200 -Subject: rtc-cmos: Add an alarm disable quirk - -From: Borislav Petkov - -commit d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d upstream. - -41c7f7424259f ("rtc: Disable the alarm in the hardware (v2)") added the -functionality to disable the RTC wake alarm when shutting down the box. - -However, there are at least two b0rked BIOSes we know about: - -https://bugzilla.novell.com/show_bug.cgi?id=812592 -https://bugzilla.novell.com/show_bug.cgi?id=805740 - -where, when wakeup alarm is enabled in the BIOS, the machine reboots -automatically right after shutdown, regardless of what wakeup time is -programmed. - -Bisecting the issue lead to this patch so disable its functionality with -a DMI quirk only for those boxes. - -Cc: Brecht Machiels -Cc: Thomas Gleixner -Cc: John Stultz -Cc: Rabin Vincent -Signed-off-by: Borislav Petkov -[jstultz: Changed variable name for clarity, added extra dmi entry] -Tested-by: Brecht Machiels -Tested-by: Borislav Petkov -Signed-off-by: John Stultz -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/rtc/rtc-cmos.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 51 insertions(+), 1 deletion(-) - ---- a/drivers/rtc/rtc-cmos.c -+++ b/drivers/rtc/rtc-cmos.c -@@ -34,11 +34,11 @@ - #include - #include - #include --#include - #include - #include - #include - #include -+#include - - /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ - #include -@@ -377,6 +377,51 @@ static int cmos_set_alarm(struct device - return 0; - } - -+/* -+ * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes. -+ */ -+static bool alarm_disable_quirk; -+ -+static int __init set_alarm_disable_quirk(const struct dmi_system_id *id) -+{ -+ alarm_disable_quirk = true; -+ pr_info("rtc-cmos: BIOS has alarm-disable quirk. "); -+ pr_info("RTC alarms disabled\n"); -+ return 0; -+} -+ -+static const struct dmi_system_id rtc_quirks[] __initconst = { -+ /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "IBM Truman", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "4852570"), -+ }, -+ }, -+ /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "Gigabyte GA-990XA-UD3", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, -+ "Gigabyte Technology Co., Ltd."), -+ DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"), -+ }, -+ }, -+ /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "Toshiba Satellite L300", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), -+ }, -+ }, -+ {} -+}; -+ - static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) - { - struct cmos_rtc *cmos = dev_get_drvdata(dev); -@@ -385,6 +430,9 @@ static int cmos_alarm_irq_enable(struct - if (!is_valid_irq(cmos->irq)) - return -EINVAL; - -+ if (alarm_disable_quirk) -+ return 0; -+ - spin_lock_irqsave(&rtc_lock, flags); - - if (enabled) -@@ -1163,6 +1211,8 @@ static int __init cmos_init(void) - platform_driver_registered = true; - } - -+ dmi_check_system(rtc_quirks); -+ - if (retval == 0) - return 0; - diff --git a/queue-3.10/series b/queue-3.10/series index 2c75436f63f..4a98ae1204e 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -8,7 +8,6 @@ e1000e-fix-compiler-warnings.patch mm-mempolicy.c-fix-mempolicy-printing-in-numa_maps.patch x86-x32-correct-invalid-use-of-user-timespec-in-the-kernel.patch x86-efi-fix-off-by-one-bug-in-efi-boot-services-reservation.patch -x86-add-check-for-number-of-available-vectors-before-cpu-down.patch kvm-x86-limit-pit-timer-frequency.patch usb-pl2303-fix-data-corruption-on-termios-updates.patch usb-option-add-new-zte-3g-modem-pids-to-option-driver.patch @@ -51,7 +50,6 @@ serial-8250-enable-uart_bug_nomsr-for-tegra.patch kvm-s390-fix-diagnose-code-extraction.patch s390-uapi-fix-struct-statfs64-definition.patch parport-parport_pc-remove-double-pci-id-for-netmos.patch -rtc-cmos-add-an-alarm-disable-quirk.patch rtc-max8907-weekday-encoding-fixes.patch pinctrl-sunxi-honor-gpio-output-initial-vaules.patch perf-kvm-fix-kvm-report-without-guestmount.patch diff --git a/queue-3.10/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch b/queue-3.10/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch deleted file mode 100644 index 25902edf4f2..00000000000 --- a/queue-3.10/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch +++ /dev/null @@ -1,211 +0,0 @@ -From da6139e49c7cb0f4251265cb5243b8d220adb48d Mon Sep 17 00:00:00 2001 -From: Prarit Bhargava -Date: Mon, 13 Jan 2014 06:51:01 -0500 -Subject: x86: Add check for number of available vectors before CPU down - -From: Prarit Bhargava - -commit da6139e49c7cb0f4251265cb5243b8d220adb48d upstream. - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64791 - -When a cpu is downed on a system, the irqs on the cpu are assigned to -other cpus. It is possible, however, that when a cpu is downed there -aren't enough free vectors on the remaining cpus to account for the -vectors from the cpu that is being downed. - -This results in an interesting "overflow" condition where irqs are -"assigned" to a CPU but are not handled. - -For example, when downing cpus on a 1-64 logical processor system: - - -[ 232.021745] smpboot: CPU 61 is now offline -[ 238.480275] smpboot: CPU 62 is now offline -[ 245.991080] ------------[ cut here ]------------ -[ 245.996270] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:264 dev_watchdog+0x246/0x250() -[ 246.005688] NETDEV WATCHDOG: p786p1 (ixgbe): transmit queue 0 timed out -[ 246.013070] Modules linked in: lockd sunrpc iTCO_wdt iTCO_vendor_support sb_edac ixgbe microcode e1000e pcspkr joydev edac_core lpc_ich ioatdma ptp mdio mfd_core i2c_i801 dca pps_core i2c_core wmi acpi_cpufreq isci libsas scsi_transport_sas -[ 246.037633] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.12.0+ #14 -[ 246.044451] Hardware name: Intel Corporation S4600LH ........../SVRBD-ROW_T, BIOS SE5C600.86B.01.08.0003.022620131521 02/26/2013 -[ 246.057371] 0000000000000009 ffff88081fa03d40 ffffffff8164fbf6 ffff88081fa0ee48 -[ 246.065728] ffff88081fa03d90 ffff88081fa03d80 ffffffff81054ecc ffff88081fa13040 -[ 246.074073] 0000000000000000 ffff88200cce0000 0000000000000040 0000000000000000 -[ 246.082430] Call Trace: -[ 246.085174] [] dump_stack+0x46/0x58 -[ 246.091633] [] warn_slowpath_common+0x8c/0xc0 -[ 246.098352] [] warn_slowpath_fmt+0x46/0x50 -[ 246.104786] [] dev_watchdog+0x246/0x250 -[ 246.110923] [] ? dev_deactivate_queue.constprop.31+0x80/0x80 -[ 246.119097] [] call_timer_fn+0x3a/0x110 -[ 246.125224] [] ? update_process_times+0x6f/0x80 -[ 246.132137] [] ? dev_deactivate_queue.constprop.31+0x80/0x80 -[ 246.140308] [] run_timer_softirq+0x1f0/0x2a0 -[ 246.146933] [] __do_softirq+0xe0/0x220 -[ 246.152976] [] call_softirq+0x1c/0x30 -[ 246.158920] [] do_softirq+0x55/0x90 -[ 246.164670] [] irq_exit+0xa5/0xb0 -[ 246.170227] [] smp_apic_timer_interrupt+0x4a/0x60 -[ 246.177324] [] apic_timer_interrupt+0x6a/0x70 -[ 246.184041] [] ? cpuidle_enter_state+0x5b/0xe0 -[ 246.191559] [] ? cpuidle_enter_state+0x57/0xe0 -[ 246.198374] [] cpuidle_idle_call+0xbd/0x200 -[ 246.204900] [] arch_cpu_idle+0xe/0x30 -[ 246.210846] [] cpu_startup_entry+0xd0/0x250 -[ 246.217371] [] rest_init+0x77/0x80 -[ 246.223028] [] start_kernel+0x3ee/0x3fb -[ 246.229165] [] ? repair_env_string+0x5e/0x5e -[ 246.235787] [] x86_64_start_reservations+0x2a/0x2c -[ 246.242990] [] x86_64_start_kernel+0xf8/0xfc -[ 246.249610] ---[ end trace fb74fdef54d79039 ]--- -[ 246.254807] ixgbe 0000:c2:00.0 p786p1: initiating reset due to tx timeout -[ 246.262489] ixgbe 0000:c2:00.0 p786p1: Reset adapter -Last login: Mon Nov 11 08:35:14 from 10.18.17.119 -[root@(none) ~]# [ 246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5 -[ 249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX -[ 246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5 -[ 249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX - -(last lines keep repeating. ixgbe driver is dead until module reload.) - -If the downed cpu has more vectors than are free on the remaining cpus on the -system, it is possible that some vectors are "orphaned" even though they are -assigned to a cpu. In this case, since the ixgbe driver had a watchdog, the -watchdog fired and notified that something was wrong. - -This patch adds a function, check_vectors(), to compare the number of vectors -on the CPU going down and compares it to the number of vectors available on -the system. If there aren't enough vectors for the CPU to go down, an -error is returned and propogated back to userspace. - -v2: Do not need to look at percpu irqs -v3: Need to check affinity to prevent counting of MSIs in IOAPIC Lowest - Priority Mode -v4: Additional changes suggested by Gong Chen. -v5/v6/v7/v8: Updated comment text - -Signed-off-by: Prarit Bhargava -Link: http://lkml.kernel.org/r/1389613861-3853-1-git-send-email-prarit@redhat.com -Reviewed-by: Gong Chen -Cc: Andi Kleen -Cc: Michel Lespinasse -Cc: Seiji Aguchi -Cc: Yang Zhang -Cc: Paul Gortmaker -Cc: Janet Morgan -Cc: Tony Luck -Cc: Ruiv Wang -Cc: Gong Chen -Signed-off-by: H. Peter Anvin -Signed-off-by: Greg Kroah-Hartman - ---- - arch/x86/include/asm/irq.h | 1 - arch/x86/kernel/irq.c | 70 +++++++++++++++++++++++++++++++++++++++++++++ - arch/x86/kernel/smpboot.c | 6 +++ - 3 files changed, 77 insertions(+) - ---- a/arch/x86/include/asm/irq.h -+++ b/arch/x86/include/asm/irq.h -@@ -25,6 +25,7 @@ extern void irq_ctx_init(int cpu); - - #ifdef CONFIG_HOTPLUG_CPU - #include -+extern int check_irq_vectors_for_cpu_disable(void); - extern void fixup_irqs(void); - extern void irq_force_complete_move(int); - #endif ---- a/arch/x86/kernel/irq.c -+++ b/arch/x86/kernel/irq.c -@@ -249,6 +249,76 @@ void smp_kvm_posted_intr_ipi(struct pt_r - EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); - - #ifdef CONFIG_HOTPLUG_CPU -+/* -+ * This cpu is going to be removed and its vectors migrated to the remaining -+ * online cpus. Check to see if there are enough vectors in the remaining cpus. -+ * This function is protected by stop_machine(). -+ */ -+int check_irq_vectors_for_cpu_disable(void) -+{ -+ int irq, cpu; -+ unsigned int this_cpu, vector, this_count, count; -+ struct irq_desc *desc; -+ struct irq_data *data; -+ struct cpumask affinity_new, online_new; -+ -+ this_cpu = smp_processor_id(); -+ cpumask_copy(&online_new, cpu_online_mask); -+ cpu_clear(this_cpu, online_new); -+ -+ this_count = 0; -+ for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) { -+ irq = __this_cpu_read(vector_irq[vector]); -+ if (irq >= 0) { -+ desc = irq_to_desc(irq); -+ data = irq_desc_get_irq_data(desc); -+ cpumask_copy(&affinity_new, data->affinity); -+ cpu_clear(this_cpu, affinity_new); -+ -+ /* Do not count inactive or per-cpu irqs. */ -+ if (!irq_has_action(irq) || irqd_is_per_cpu(data)) -+ continue; -+ -+ /* -+ * A single irq may be mapped to multiple -+ * cpu's vector_irq[] (for example IOAPIC cluster -+ * mode). In this case we have two -+ * possibilities: -+ * -+ * 1) the resulting affinity mask is empty; that is -+ * this the down'd cpu is the last cpu in the irq's -+ * affinity mask, or -+ * -+ * 2) the resulting affinity mask is no longer -+ * a subset of the online cpus but the affinity -+ * mask is not zero; that is the down'd cpu is the -+ * last online cpu in a user set affinity mask. -+ */ -+ if (cpumask_empty(&affinity_new) || -+ !cpumask_subset(&affinity_new, &online_new)) -+ this_count++; -+ } -+ } -+ -+ count = 0; -+ for_each_online_cpu(cpu) { -+ if (cpu == this_cpu) -+ continue; -+ for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; -+ vector++) { -+ if (per_cpu(vector_irq, cpu)[vector] < 0) -+ count++; -+ } -+ } -+ -+ if (count < this_count) { -+ pr_warn("CPU %d disable failed: CPU has %u vectors assigned and there are only %u available.\n", -+ this_cpu, this_count, count); -+ return -ERANGE; -+ } -+ return 0; -+} -+ - /* A cpu has been removed from cpu_online_mask. Reset irq affinities. */ - void fixup_irqs(void) - { ---- a/arch/x86/kernel/smpboot.c -+++ b/arch/x86/kernel/smpboot.c -@@ -1309,6 +1309,12 @@ void cpu_disable_common(void) - - int native_cpu_disable(void) - { -+ int ret; -+ -+ ret = check_irq_vectors_for_cpu_disable(); -+ if (ret) -+ return ret; -+ - clear_local_APIC(); - - cpu_disable_common(); diff --git a/queue-3.12/rtc-cmos-add-an-alarm-disable-quirk.patch b/queue-3.12/rtc-cmos-add-an-alarm-disable-quirk.patch deleted file mode 100644 index f5f191a5ade..00000000000 --- a/queue-3.12/rtc-cmos-add-an-alarm-disable-quirk.patch +++ /dev/null @@ -1,125 +0,0 @@ -From d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d Mon Sep 17 00:00:00 2001 -From: Borislav Petkov -Date: Sat, 20 Jul 2013 19:00:23 +0200 -Subject: rtc-cmos: Add an alarm disable quirk - -From: Borislav Petkov - -commit d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d upstream. - -41c7f7424259f ("rtc: Disable the alarm in the hardware (v2)") added the -functionality to disable the RTC wake alarm when shutting down the box. - -However, there are at least two b0rked BIOSes we know about: - -https://bugzilla.novell.com/show_bug.cgi?id=812592 -https://bugzilla.novell.com/show_bug.cgi?id=805740 - -where, when wakeup alarm is enabled in the BIOS, the machine reboots -automatically right after shutdown, regardless of what wakeup time is -programmed. - -Bisecting the issue lead to this patch so disable its functionality with -a DMI quirk only for those boxes. - -Cc: Brecht Machiels -Cc: Thomas Gleixner -Cc: John Stultz -Cc: Rabin Vincent -Signed-off-by: Borislav Petkov -[jstultz: Changed variable name for clarity, added extra dmi entry] -Tested-by: Brecht Machiels -Tested-by: Borislav Petkov -Signed-off-by: John Stultz -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/rtc/rtc-cmos.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 51 insertions(+), 1 deletion(-) - ---- a/drivers/rtc/rtc-cmos.c -+++ b/drivers/rtc/rtc-cmos.c -@@ -34,11 +34,11 @@ - #include - #include - #include --#include - #include - #include - #include - #include -+#include - - /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ - #include -@@ -377,6 +377,51 @@ static int cmos_set_alarm(struct device - return 0; - } - -+/* -+ * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes. -+ */ -+static bool alarm_disable_quirk; -+ -+static int __init set_alarm_disable_quirk(const struct dmi_system_id *id) -+{ -+ alarm_disable_quirk = true; -+ pr_info("rtc-cmos: BIOS has alarm-disable quirk. "); -+ pr_info("RTC alarms disabled\n"); -+ return 0; -+} -+ -+static const struct dmi_system_id rtc_quirks[] __initconst = { -+ /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "IBM Truman", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "4852570"), -+ }, -+ }, -+ /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "Gigabyte GA-990XA-UD3", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, -+ "Gigabyte Technology Co., Ltd."), -+ DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"), -+ }, -+ }, -+ /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "Toshiba Satellite L300", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), -+ }, -+ }, -+ {} -+}; -+ - static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) - { - struct cmos_rtc *cmos = dev_get_drvdata(dev); -@@ -385,6 +430,9 @@ static int cmos_alarm_irq_enable(struct - if (!is_valid_irq(cmos->irq)) - return -EINVAL; - -+ if (alarm_disable_quirk) -+ return 0; -+ - spin_lock_irqsave(&rtc_lock, flags); - - if (enabled) -@@ -1158,6 +1206,8 @@ static int __init cmos_init(void) - platform_driver_registered = true; - } - -+ dmi_check_system(rtc_quirks); -+ - if (retval == 0) - return 0; - diff --git a/queue-3.12/series b/queue-3.12/series index d2a867db684..2aecdf47b4b 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -7,7 +7,6 @@ e1000e-fix-compiler-warnings.patch mm-mempolicy.c-fix-mempolicy-printing-in-numa_maps.patch x86-x32-correct-invalid-use-of-user-timespec-in-the-kernel.patch x86-efi-fix-off-by-one-bug-in-efi-boot-services-reservation.patch -x86-add-check-for-number-of-available-vectors-before-cpu-down.patch kvm-x86-limit-pit-timer-frequency.patch x86-kvm-cache-the-base-of-the-kvm-cpuid-leaves.patch x86-kvm-correctly-access-the-kvm_cpuid_features-leaf-at-0x40000101.patch @@ -68,7 +67,6 @@ kvm-s390-fix-diagnose-code-extraction.patch kvm-s390-ioeventfd-ignore-leftmost-bits.patch s390-uapi-fix-struct-statfs64-definition.patch parport-parport_pc-remove-double-pci-id-for-netmos.patch -rtc-cmos-add-an-alarm-disable-quirk.patch rtc-max8907-weekday-encoding-fixes.patch pinctrl-sunxi-honor-gpio-output-initial-vaules.patch perf-kvm-fix-kvm-report-without-guestmount.patch diff --git a/queue-3.12/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch b/queue-3.12/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch deleted file mode 100644 index 352fdb34333..00000000000 --- a/queue-3.12/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch +++ /dev/null @@ -1,211 +0,0 @@ -From da6139e49c7cb0f4251265cb5243b8d220adb48d Mon Sep 17 00:00:00 2001 -From: Prarit Bhargava -Date: Mon, 13 Jan 2014 06:51:01 -0500 -Subject: x86: Add check for number of available vectors before CPU down - -From: Prarit Bhargava - -commit da6139e49c7cb0f4251265cb5243b8d220adb48d upstream. - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64791 - -When a cpu is downed on a system, the irqs on the cpu are assigned to -other cpus. It is possible, however, that when a cpu is downed there -aren't enough free vectors on the remaining cpus to account for the -vectors from the cpu that is being downed. - -This results in an interesting "overflow" condition where irqs are -"assigned" to a CPU but are not handled. - -For example, when downing cpus on a 1-64 logical processor system: - - -[ 232.021745] smpboot: CPU 61 is now offline -[ 238.480275] smpboot: CPU 62 is now offline -[ 245.991080] ------------[ cut here ]------------ -[ 245.996270] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:264 dev_watchdog+0x246/0x250() -[ 246.005688] NETDEV WATCHDOG: p786p1 (ixgbe): transmit queue 0 timed out -[ 246.013070] Modules linked in: lockd sunrpc iTCO_wdt iTCO_vendor_support sb_edac ixgbe microcode e1000e pcspkr joydev edac_core lpc_ich ioatdma ptp mdio mfd_core i2c_i801 dca pps_core i2c_core wmi acpi_cpufreq isci libsas scsi_transport_sas -[ 246.037633] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.12.0+ #14 -[ 246.044451] Hardware name: Intel Corporation S4600LH ........../SVRBD-ROW_T, BIOS SE5C600.86B.01.08.0003.022620131521 02/26/2013 -[ 246.057371] 0000000000000009 ffff88081fa03d40 ffffffff8164fbf6 ffff88081fa0ee48 -[ 246.065728] ffff88081fa03d90 ffff88081fa03d80 ffffffff81054ecc ffff88081fa13040 -[ 246.074073] 0000000000000000 ffff88200cce0000 0000000000000040 0000000000000000 -[ 246.082430] Call Trace: -[ 246.085174] [] dump_stack+0x46/0x58 -[ 246.091633] [] warn_slowpath_common+0x8c/0xc0 -[ 246.098352] [] warn_slowpath_fmt+0x46/0x50 -[ 246.104786] [] dev_watchdog+0x246/0x250 -[ 246.110923] [] ? dev_deactivate_queue.constprop.31+0x80/0x80 -[ 246.119097] [] call_timer_fn+0x3a/0x110 -[ 246.125224] [] ? update_process_times+0x6f/0x80 -[ 246.132137] [] ? dev_deactivate_queue.constprop.31+0x80/0x80 -[ 246.140308] [] run_timer_softirq+0x1f0/0x2a0 -[ 246.146933] [] __do_softirq+0xe0/0x220 -[ 246.152976] [] call_softirq+0x1c/0x30 -[ 246.158920] [] do_softirq+0x55/0x90 -[ 246.164670] [] irq_exit+0xa5/0xb0 -[ 246.170227] [] smp_apic_timer_interrupt+0x4a/0x60 -[ 246.177324] [] apic_timer_interrupt+0x6a/0x70 -[ 246.184041] [] ? cpuidle_enter_state+0x5b/0xe0 -[ 246.191559] [] ? cpuidle_enter_state+0x57/0xe0 -[ 246.198374] [] cpuidle_idle_call+0xbd/0x200 -[ 246.204900] [] arch_cpu_idle+0xe/0x30 -[ 246.210846] [] cpu_startup_entry+0xd0/0x250 -[ 246.217371] [] rest_init+0x77/0x80 -[ 246.223028] [] start_kernel+0x3ee/0x3fb -[ 246.229165] [] ? repair_env_string+0x5e/0x5e -[ 246.235787] [] x86_64_start_reservations+0x2a/0x2c -[ 246.242990] [] x86_64_start_kernel+0xf8/0xfc -[ 246.249610] ---[ end trace fb74fdef54d79039 ]--- -[ 246.254807] ixgbe 0000:c2:00.0 p786p1: initiating reset due to tx timeout -[ 246.262489] ixgbe 0000:c2:00.0 p786p1: Reset adapter -Last login: Mon Nov 11 08:35:14 from 10.18.17.119 -[root@(none) ~]# [ 246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5 -[ 249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX -[ 246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5 -[ 249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX - -(last lines keep repeating. ixgbe driver is dead until module reload.) - -If the downed cpu has more vectors than are free on the remaining cpus on the -system, it is possible that some vectors are "orphaned" even though they are -assigned to a cpu. In this case, since the ixgbe driver had a watchdog, the -watchdog fired and notified that something was wrong. - -This patch adds a function, check_vectors(), to compare the number of vectors -on the CPU going down and compares it to the number of vectors available on -the system. If there aren't enough vectors for the CPU to go down, an -error is returned and propogated back to userspace. - -v2: Do not need to look at percpu irqs -v3: Need to check affinity to prevent counting of MSIs in IOAPIC Lowest - Priority Mode -v4: Additional changes suggested by Gong Chen. -v5/v6/v7/v8: Updated comment text - -Signed-off-by: Prarit Bhargava -Link: http://lkml.kernel.org/r/1389613861-3853-1-git-send-email-prarit@redhat.com -Reviewed-by: Gong Chen -Cc: Andi Kleen -Cc: Michel Lespinasse -Cc: Seiji Aguchi -Cc: Yang Zhang -Cc: Paul Gortmaker -Cc: Janet Morgan -Cc: Tony Luck -Cc: Ruiv Wang -Cc: Gong Chen -Signed-off-by: H. Peter Anvin -Signed-off-by: Greg Kroah-Hartman - ---- - arch/x86/include/asm/irq.h | 1 - arch/x86/kernel/irq.c | 70 +++++++++++++++++++++++++++++++++++++++++++++ - arch/x86/kernel/smpboot.c | 6 +++ - 3 files changed, 77 insertions(+) - ---- a/arch/x86/include/asm/irq.h -+++ b/arch/x86/include/asm/irq.h -@@ -25,6 +25,7 @@ extern void irq_ctx_init(int cpu); - - #ifdef CONFIG_HOTPLUG_CPU - #include -+extern int check_irq_vectors_for_cpu_disable(void); - extern void fixup_irqs(void); - extern void irq_force_complete_move(int); - #endif ---- a/arch/x86/kernel/irq.c -+++ b/arch/x86/kernel/irq.c -@@ -262,6 +262,76 @@ __visible void smp_trace_x86_platform_ip - EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); - - #ifdef CONFIG_HOTPLUG_CPU -+/* -+ * This cpu is going to be removed and its vectors migrated to the remaining -+ * online cpus. Check to see if there are enough vectors in the remaining cpus. -+ * This function is protected by stop_machine(). -+ */ -+int check_irq_vectors_for_cpu_disable(void) -+{ -+ int irq, cpu; -+ unsigned int this_cpu, vector, this_count, count; -+ struct irq_desc *desc; -+ struct irq_data *data; -+ struct cpumask affinity_new, online_new; -+ -+ this_cpu = smp_processor_id(); -+ cpumask_copy(&online_new, cpu_online_mask); -+ cpu_clear(this_cpu, online_new); -+ -+ this_count = 0; -+ for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) { -+ irq = __this_cpu_read(vector_irq[vector]); -+ if (irq >= 0) { -+ desc = irq_to_desc(irq); -+ data = irq_desc_get_irq_data(desc); -+ cpumask_copy(&affinity_new, data->affinity); -+ cpu_clear(this_cpu, affinity_new); -+ -+ /* Do not count inactive or per-cpu irqs. */ -+ if (!irq_has_action(irq) || irqd_is_per_cpu(data)) -+ continue; -+ -+ /* -+ * A single irq may be mapped to multiple -+ * cpu's vector_irq[] (for example IOAPIC cluster -+ * mode). In this case we have two -+ * possibilities: -+ * -+ * 1) the resulting affinity mask is empty; that is -+ * this the down'd cpu is the last cpu in the irq's -+ * affinity mask, or -+ * -+ * 2) the resulting affinity mask is no longer -+ * a subset of the online cpus but the affinity -+ * mask is not zero; that is the down'd cpu is the -+ * last online cpu in a user set affinity mask. -+ */ -+ if (cpumask_empty(&affinity_new) || -+ !cpumask_subset(&affinity_new, &online_new)) -+ this_count++; -+ } -+ } -+ -+ count = 0; -+ for_each_online_cpu(cpu) { -+ if (cpu == this_cpu) -+ continue; -+ for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; -+ vector++) { -+ if (per_cpu(vector_irq, cpu)[vector] < 0) -+ count++; -+ } -+ } -+ -+ if (count < this_count) { -+ pr_warn("CPU %d disable failed: CPU has %u vectors assigned and there are only %u available.\n", -+ this_cpu, this_count, count); -+ return -ERANGE; -+ } -+ return 0; -+} -+ - /* A cpu has been removed from cpu_online_mask. Reset irq affinities. */ - void fixup_irqs(void) - { ---- a/arch/x86/kernel/smpboot.c -+++ b/arch/x86/kernel/smpboot.c -@@ -1310,6 +1310,12 @@ void cpu_disable_common(void) - - int native_cpu_disable(void) - { -+ int ret; -+ -+ ret = check_irq_vectors_for_cpu_disable(); -+ if (ret) -+ return ret; -+ - clear_local_APIC(); - - cpu_disable_common(); diff --git a/queue-3.13/rtc-cmos-add-an-alarm-disable-quirk.patch b/queue-3.13/rtc-cmos-add-an-alarm-disable-quirk.patch deleted file mode 100644 index ded11f9dd26..00000000000 --- a/queue-3.13/rtc-cmos-add-an-alarm-disable-quirk.patch +++ /dev/null @@ -1,125 +0,0 @@ -From d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d Mon Sep 17 00:00:00 2001 -From: Borislav Petkov -Date: Sat, 20 Jul 2013 19:00:23 +0200 -Subject: rtc-cmos: Add an alarm disable quirk - -From: Borislav Petkov - -commit d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d upstream. - -41c7f7424259f ("rtc: Disable the alarm in the hardware (v2)") added the -functionality to disable the RTC wake alarm when shutting down the box. - -However, there are at least two b0rked BIOSes we know about: - -https://bugzilla.novell.com/show_bug.cgi?id=812592 -https://bugzilla.novell.com/show_bug.cgi?id=805740 - -where, when wakeup alarm is enabled in the BIOS, the machine reboots -automatically right after shutdown, regardless of what wakeup time is -programmed. - -Bisecting the issue lead to this patch so disable its functionality with -a DMI quirk only for those boxes. - -Cc: Brecht Machiels -Cc: Thomas Gleixner -Cc: John Stultz -Cc: Rabin Vincent -Signed-off-by: Borislav Petkov -[jstultz: Changed variable name for clarity, added extra dmi entry] -Tested-by: Brecht Machiels -Tested-by: Borislav Petkov -Signed-off-by: John Stultz -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/rtc/rtc-cmos.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 51 insertions(+), 1 deletion(-) - ---- a/drivers/rtc/rtc-cmos.c -+++ b/drivers/rtc/rtc-cmos.c -@@ -34,11 +34,11 @@ - #include - #include - #include --#include - #include - #include - #include - #include -+#include - - /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ - #include -@@ -377,6 +377,51 @@ static int cmos_set_alarm(struct device - return 0; - } - -+/* -+ * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes. -+ */ -+static bool alarm_disable_quirk; -+ -+static int __init set_alarm_disable_quirk(const struct dmi_system_id *id) -+{ -+ alarm_disable_quirk = true; -+ pr_info("rtc-cmos: BIOS has alarm-disable quirk. "); -+ pr_info("RTC alarms disabled\n"); -+ return 0; -+} -+ -+static const struct dmi_system_id rtc_quirks[] __initconst = { -+ /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "IBM Truman", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "4852570"), -+ }, -+ }, -+ /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "Gigabyte GA-990XA-UD3", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, -+ "Gigabyte Technology Co., Ltd."), -+ DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"), -+ }, -+ }, -+ /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "Toshiba Satellite L300", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), -+ }, -+ }, -+ {} -+}; -+ - static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) - { - struct cmos_rtc *cmos = dev_get_drvdata(dev); -@@ -385,6 +430,9 @@ static int cmos_alarm_irq_enable(struct - if (!is_valid_irq(cmos->irq)) - return -EINVAL; - -+ if (alarm_disable_quirk) -+ return 0; -+ - spin_lock_irqsave(&rtc_lock, flags); - - if (enabled) -@@ -1157,6 +1205,8 @@ static int __init cmos_init(void) - platform_driver_registered = true; - } - -+ dmi_check_system(rtc_quirks); -+ - if (retval == 0) - return 0; - diff --git a/queue-3.13/series b/queue-3.13/series index ce9ddccbc24..44e473469f7 100644 --- a/queue-3.13/series +++ b/queue-3.13/series @@ -3,7 +3,6 @@ mm-mempolicy.c-fix-mempolicy-printing-in-numa_maps.patch x86-x32-correct-invalid-use-of-user-timespec-in-the-kernel.patch xen-pci-fix-build-on-non-x86.patch x86-efi-fix-off-by-one-bug-in-efi-boot-services-reservation.patch -x86-add-check-for-number-of-available-vectors-before-cpu-down.patch kvm-x86-limit-pit-timer-frequency.patch x86-kvm-cache-the-base-of-the-kvm-cpuid-leaves.patch x86-kvm-correctly-access-the-kvm_cpuid_features-leaf-at-0x40000101.patch @@ -71,7 +70,6 @@ kvm-s390-fix-diagnose-code-extraction.patch kvm-s390-ioeventfd-ignore-leftmost-bits.patch s390-uapi-fix-struct-statfs64-definition.patch parport-parport_pc-remove-double-pci-id-for-netmos.patch -rtc-cmos-add-an-alarm-disable-quirk.patch rtc-max8907-weekday-encoding-fixes.patch misc-mic-bug-fix-for-interrupt-acknowledgement-in-msi-intx-case.patch pinctrl-sunxi-honor-gpio-output-initial-vaules.patch diff --git a/queue-3.13/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch b/queue-3.13/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch deleted file mode 100644 index 79f600045fd..00000000000 --- a/queue-3.13/x86-add-check-for-number-of-available-vectors-before-cpu-down.patch +++ /dev/null @@ -1,211 +0,0 @@ -From da6139e49c7cb0f4251265cb5243b8d220adb48d Mon Sep 17 00:00:00 2001 -From: Prarit Bhargava -Date: Mon, 13 Jan 2014 06:51:01 -0500 -Subject: x86: Add check for number of available vectors before CPU down - -From: Prarit Bhargava - -commit da6139e49c7cb0f4251265cb5243b8d220adb48d upstream. - -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64791 - -When a cpu is downed on a system, the irqs on the cpu are assigned to -other cpus. It is possible, however, that when a cpu is downed there -aren't enough free vectors on the remaining cpus to account for the -vectors from the cpu that is being downed. - -This results in an interesting "overflow" condition where irqs are -"assigned" to a CPU but are not handled. - -For example, when downing cpus on a 1-64 logical processor system: - - -[ 232.021745] smpboot: CPU 61 is now offline -[ 238.480275] smpboot: CPU 62 is now offline -[ 245.991080] ------------[ cut here ]------------ -[ 245.996270] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:264 dev_watchdog+0x246/0x250() -[ 246.005688] NETDEV WATCHDOG: p786p1 (ixgbe): transmit queue 0 timed out -[ 246.013070] Modules linked in: lockd sunrpc iTCO_wdt iTCO_vendor_support sb_edac ixgbe microcode e1000e pcspkr joydev edac_core lpc_ich ioatdma ptp mdio mfd_core i2c_i801 dca pps_core i2c_core wmi acpi_cpufreq isci libsas scsi_transport_sas -[ 246.037633] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.12.0+ #14 -[ 246.044451] Hardware name: Intel Corporation S4600LH ........../SVRBD-ROW_T, BIOS SE5C600.86B.01.08.0003.022620131521 02/26/2013 -[ 246.057371] 0000000000000009 ffff88081fa03d40 ffffffff8164fbf6 ffff88081fa0ee48 -[ 246.065728] ffff88081fa03d90 ffff88081fa03d80 ffffffff81054ecc ffff88081fa13040 -[ 246.074073] 0000000000000000 ffff88200cce0000 0000000000000040 0000000000000000 -[ 246.082430] Call Trace: -[ 246.085174] [] dump_stack+0x46/0x58 -[ 246.091633] [] warn_slowpath_common+0x8c/0xc0 -[ 246.098352] [] warn_slowpath_fmt+0x46/0x50 -[ 246.104786] [] dev_watchdog+0x246/0x250 -[ 246.110923] [] ? dev_deactivate_queue.constprop.31+0x80/0x80 -[ 246.119097] [] call_timer_fn+0x3a/0x110 -[ 246.125224] [] ? update_process_times+0x6f/0x80 -[ 246.132137] [] ? dev_deactivate_queue.constprop.31+0x80/0x80 -[ 246.140308] [] run_timer_softirq+0x1f0/0x2a0 -[ 246.146933] [] __do_softirq+0xe0/0x220 -[ 246.152976] [] call_softirq+0x1c/0x30 -[ 246.158920] [] do_softirq+0x55/0x90 -[ 246.164670] [] irq_exit+0xa5/0xb0 -[ 246.170227] [] smp_apic_timer_interrupt+0x4a/0x60 -[ 246.177324] [] apic_timer_interrupt+0x6a/0x70 -[ 246.184041] [] ? cpuidle_enter_state+0x5b/0xe0 -[ 246.191559] [] ? cpuidle_enter_state+0x57/0xe0 -[ 246.198374] [] cpuidle_idle_call+0xbd/0x200 -[ 246.204900] [] arch_cpu_idle+0xe/0x30 -[ 246.210846] [] cpu_startup_entry+0xd0/0x250 -[ 246.217371] [] rest_init+0x77/0x80 -[ 246.223028] [] start_kernel+0x3ee/0x3fb -[ 246.229165] [] ? repair_env_string+0x5e/0x5e -[ 246.235787] [] x86_64_start_reservations+0x2a/0x2c -[ 246.242990] [] x86_64_start_kernel+0xf8/0xfc -[ 246.249610] ---[ end trace fb74fdef54d79039 ]--- -[ 246.254807] ixgbe 0000:c2:00.0 p786p1: initiating reset due to tx timeout -[ 246.262489] ixgbe 0000:c2:00.0 p786p1: Reset adapter -Last login: Mon Nov 11 08:35:14 from 10.18.17.119 -[root@(none) ~]# [ 246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5 -[ 249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX -[ 246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5 -[ 249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX - -(last lines keep repeating. ixgbe driver is dead until module reload.) - -If the downed cpu has more vectors than are free on the remaining cpus on the -system, it is possible that some vectors are "orphaned" even though they are -assigned to a cpu. In this case, since the ixgbe driver had a watchdog, the -watchdog fired and notified that something was wrong. - -This patch adds a function, check_vectors(), to compare the number of vectors -on the CPU going down and compares it to the number of vectors available on -the system. If there aren't enough vectors for the CPU to go down, an -error is returned and propogated back to userspace. - -v2: Do not need to look at percpu irqs -v3: Need to check affinity to prevent counting of MSIs in IOAPIC Lowest - Priority Mode -v4: Additional changes suggested by Gong Chen. -v5/v6/v7/v8: Updated comment text - -Signed-off-by: Prarit Bhargava -Link: http://lkml.kernel.org/r/1389613861-3853-1-git-send-email-prarit@redhat.com -Reviewed-by: Gong Chen -Cc: Andi Kleen -Cc: Michel Lespinasse -Cc: Seiji Aguchi -Cc: Yang Zhang -Cc: Paul Gortmaker -Cc: Janet Morgan -Cc: Tony Luck -Cc: Ruiv Wang -Cc: Gong Chen -Signed-off-by: H. Peter Anvin -Signed-off-by: Greg Kroah-Hartman - ---- - arch/x86/include/asm/irq.h | 1 - arch/x86/kernel/irq.c | 70 +++++++++++++++++++++++++++++++++++++++++++++ - arch/x86/kernel/smpboot.c | 6 +++ - 3 files changed, 77 insertions(+) - ---- a/arch/x86/include/asm/irq.h -+++ b/arch/x86/include/asm/irq.h -@@ -25,6 +25,7 @@ extern void irq_ctx_init(int cpu); - - #ifdef CONFIG_HOTPLUG_CPU - #include -+extern int check_irq_vectors_for_cpu_disable(void); - extern void fixup_irqs(void); - extern void irq_force_complete_move(int); - #endif ---- a/arch/x86/kernel/irq.c -+++ b/arch/x86/kernel/irq.c -@@ -262,6 +262,76 @@ __visible void smp_trace_x86_platform_ip - EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); - - #ifdef CONFIG_HOTPLUG_CPU -+/* -+ * This cpu is going to be removed and its vectors migrated to the remaining -+ * online cpus. Check to see if there are enough vectors in the remaining cpus. -+ * This function is protected by stop_machine(). -+ */ -+int check_irq_vectors_for_cpu_disable(void) -+{ -+ int irq, cpu; -+ unsigned int this_cpu, vector, this_count, count; -+ struct irq_desc *desc; -+ struct irq_data *data; -+ struct cpumask affinity_new, online_new; -+ -+ this_cpu = smp_processor_id(); -+ cpumask_copy(&online_new, cpu_online_mask); -+ cpu_clear(this_cpu, online_new); -+ -+ this_count = 0; -+ for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) { -+ irq = __this_cpu_read(vector_irq[vector]); -+ if (irq >= 0) { -+ desc = irq_to_desc(irq); -+ data = irq_desc_get_irq_data(desc); -+ cpumask_copy(&affinity_new, data->affinity); -+ cpu_clear(this_cpu, affinity_new); -+ -+ /* Do not count inactive or per-cpu irqs. */ -+ if (!irq_has_action(irq) || irqd_is_per_cpu(data)) -+ continue; -+ -+ /* -+ * A single irq may be mapped to multiple -+ * cpu's vector_irq[] (for example IOAPIC cluster -+ * mode). In this case we have two -+ * possibilities: -+ * -+ * 1) the resulting affinity mask is empty; that is -+ * this the down'd cpu is the last cpu in the irq's -+ * affinity mask, or -+ * -+ * 2) the resulting affinity mask is no longer -+ * a subset of the online cpus but the affinity -+ * mask is not zero; that is the down'd cpu is the -+ * last online cpu in a user set affinity mask. -+ */ -+ if (cpumask_empty(&affinity_new) || -+ !cpumask_subset(&affinity_new, &online_new)) -+ this_count++; -+ } -+ } -+ -+ count = 0; -+ for_each_online_cpu(cpu) { -+ if (cpu == this_cpu) -+ continue; -+ for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; -+ vector++) { -+ if (per_cpu(vector_irq, cpu)[vector] < 0) -+ count++; -+ } -+ } -+ -+ if (count < this_count) { -+ pr_warn("CPU %d disable failed: CPU has %u vectors assigned and there are only %u available.\n", -+ this_cpu, this_count, count); -+ return -ERANGE; -+ } -+ return 0; -+} -+ - /* A cpu has been removed from cpu_online_mask. Reset irq affinities. */ - void fixup_irqs(void) - { ---- a/arch/x86/kernel/smpboot.c -+++ b/arch/x86/kernel/smpboot.c -@@ -1312,6 +1312,12 @@ void cpu_disable_common(void) - - int native_cpu_disable(void) - { -+ int ret; -+ -+ ret = check_irq_vectors_for_cpu_disable(); -+ if (ret) -+ return ret; -+ - clear_local_APIC(); - - cpu_disable_common(); diff --git a/queue-3.4/rtc-cmos-add-an-alarm-disable-quirk.patch b/queue-3.4/rtc-cmos-add-an-alarm-disable-quirk.patch deleted file mode 100644 index 73da285ed1e..00000000000 --- a/queue-3.4/rtc-cmos-add-an-alarm-disable-quirk.patch +++ /dev/null @@ -1,125 +0,0 @@ -From d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d Mon Sep 17 00:00:00 2001 -From: Borislav Petkov -Date: Sat, 20 Jul 2013 19:00:23 +0200 -Subject: rtc-cmos: Add an alarm disable quirk - -From: Borislav Petkov - -commit d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d upstream. - -41c7f7424259f ("rtc: Disable the alarm in the hardware (v2)") added the -functionality to disable the RTC wake alarm when shutting down the box. - -However, there are at least two b0rked BIOSes we know about: - -https://bugzilla.novell.com/show_bug.cgi?id=812592 -https://bugzilla.novell.com/show_bug.cgi?id=805740 - -where, when wakeup alarm is enabled in the BIOS, the machine reboots -automatically right after shutdown, regardless of what wakeup time is -programmed. - -Bisecting the issue lead to this patch so disable its functionality with -a DMI quirk only for those boxes. - -Cc: Brecht Machiels -Cc: Thomas Gleixner -Cc: John Stultz -Cc: Rabin Vincent -Signed-off-by: Borislav Petkov -[jstultz: Changed variable name for clarity, added extra dmi entry] -Tested-by: Brecht Machiels -Tested-by: Borislav Petkov -Signed-off-by: John Stultz -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/rtc/rtc-cmos.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 51 insertions(+), 1 deletion(-) - ---- a/drivers/rtc/rtc-cmos.c -+++ b/drivers/rtc/rtc-cmos.c -@@ -34,11 +34,11 @@ - #include - #include - #include --#include - #include - #include - #include - #include -+#include - - /* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */ - #include -@@ -377,6 +377,51 @@ static int cmos_set_alarm(struct device - return 0; - } - -+/* -+ * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes. -+ */ -+static bool alarm_disable_quirk; -+ -+static int __init set_alarm_disable_quirk(const struct dmi_system_id *id) -+{ -+ alarm_disable_quirk = true; -+ pr_info("rtc-cmos: BIOS has alarm-disable quirk. "); -+ pr_info("RTC alarms disabled\n"); -+ return 0; -+} -+ -+static const struct dmi_system_id rtc_quirks[] __initconst = { -+ /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "IBM Truman", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "4852570"), -+ }, -+ }, -+ /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "Gigabyte GA-990XA-UD3", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, -+ "Gigabyte Technology Co., Ltd."), -+ DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"), -+ }, -+ }, -+ /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */ -+ { -+ .callback = set_alarm_disable_quirk, -+ .ident = "Toshiba Satellite L300", -+ .matches = { -+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), -+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), -+ }, -+ }, -+ {} -+}; -+ - static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) - { - struct cmos_rtc *cmos = dev_get_drvdata(dev); -@@ -385,6 +430,9 @@ static int cmos_alarm_irq_enable(struct - if (!is_valid_irq(cmos->irq)) - return -EINVAL; - -+ if (alarm_disable_quirk) -+ return 0; -+ - spin_lock_irqsave(&rtc_lock, flags); - - if (enabled) -@@ -1166,6 +1214,8 @@ static int __init cmos_init(void) - platform_driver_registered = true; - } - -+ dmi_check_system(rtc_quirks); -+ - if (retval == 0) - return 0; - diff --git a/queue-3.4/series b/queue-3.4/series index 0013d5fcbf2..6160357bf16 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -20,7 +20,6 @@ tty-serial-at91-handle-shutdown-more-safely.patch arm-at91-smc-bug-fix-in-sam9_smc_cs_read.patch serial-add-support-for-200-v3-series-titan-card.patch parport-parport_pc-remove-double-pci-id-for-netmos.patch -rtc-cmos-add-an-alarm-disable-quirk.patch asoc-adau1701-fix-adau1701_seroctl_word_len_16-constant.patch alsa-rme9652-fix-a-missing-comma-in-channel_map_9636_ds.patch alsa-enable-config_zone_dma-for-smaller-pci-dma-masks.patch