diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-27 11:56:42 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-27 11:56:42 +0800 |
commit | a274dac2a3ab9e8947832aac5f79c12c50b48381 (patch) | |
tree | d598908a325b8011e6f96d0625b4e0ce498f95b4 | |
parent | 51e5ba4ad8163b1f76f31f4084ddfbf5cd0a03b3 (diff) | |
download | stable-queue-a274dac2a3ab9e8947832aac5f79c12c50b48381.tar.gz |
.39 patches
10 files changed, 446 insertions, 0 deletions
diff --git a/queue-2.6.39/ftrace-only-update-the-function-code-on-write-to-filter-files.patch b/queue-2.6.39/ftrace-only-update-the-function-code-on-write-to-filter-files.patch new file mode 100644 index 0000000000..89e7c73424 --- /dev/null +++ b/queue-2.6.39/ftrace-only-update-the-function-code-on-write-to-filter-files.patch @@ -0,0 +1,44 @@ +From 058e297d34a404caaa5ed277de15698d8dc43000 Mon Sep 17 00:00:00 2001 +From: Steven Rostedt <srostedt@redhat.com> +Date: Fri, 29 Apr 2011 22:35:33 -0400 +Subject: ftrace: Only update the function code on write to filter files + +From: Steven Rostedt <srostedt@redhat.com> + +commit 058e297d34a404caaa5ed277de15698d8dc43000 upstream. + +If function tracing is enabled, a read of the filter files will +cause the call to stop_machine to update the function trace sites. +It should only call stop_machine on write. + +Signed-off-by: Steven Rostedt <rostedt@goodmis.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + kernel/trace/ftrace.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +--- a/kernel/trace/ftrace.c ++++ b/kernel/trace/ftrace.c +@@ -2413,14 +2413,16 @@ ftrace_regex_release(struct inode *inode + ftrace_match_records(parser->buffer, parser->idx, enable); + } + +- mutex_lock(&ftrace_lock); +- if (ftrace_start_up && ftrace_enabled) +- ftrace_run_update_code(FTRACE_ENABLE_CALLS); +- mutex_unlock(&ftrace_lock); +- + trace_parser_put(parser); + kfree(iter); + ++ if (file->f_mode & FMODE_WRITE) { ++ mutex_lock(&ftrace_lock); ++ if (ftrace_start_up && ftrace_enabled) ++ ftrace_run_update_code(FTRACE_ENABLE_CALLS); ++ mutex_unlock(&ftrace_lock); ++ } ++ + mutex_unlock(&ftrace_regex_lock); + return 0; + } diff --git a/queue-2.6.39/net-recvmmsg-strip-msg_waitforone-when-calling-recvmsg.patch b/queue-2.6.39/net-recvmmsg-strip-msg_waitforone-when-calling-recvmsg.patch new file mode 100644 index 0000000000..28ca1e8ba9 --- /dev/null +++ b/queue-2.6.39/net-recvmmsg-strip-msg_waitforone-when-calling-recvmsg.patch @@ -0,0 +1,48 @@ +From b9eb8b8752804cecbacdb4d24b52e823cf07f107 Mon Sep 17 00:00:00 2001 +From: Anton Blanchard <anton@samba.org> +Date: Tue, 17 May 2011 15:38:57 -0400 +Subject: net: recvmmsg: Strip MSG_WAITFORONE when calling recvmsg + +From: Anton Blanchard <anton@samba.org> + +commit b9eb8b8752804cecbacdb4d24b52e823cf07f107 upstream. + +recvmmsg fails on a raw socket with EINVAL. The reason for this is +packet_recvmsg checks the incoming flags: + + err = -EINVAL; + if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT|MSG_ERRQUEUE)) + goto out; + +This patch strips out MSG_WAITFORONE when calling recvmmsg which +fixes the issue. + +Signed-off-by: Anton Blanchard <anton@samba.org> +Signed-off-by: David S. Miller <davem@davemloft.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + net/socket.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/net/socket.c ++++ b/net/socket.c +@@ -2122,14 +2122,16 @@ int __sys_recvmmsg(int fd, struct mmsghd + */ + if (MSG_CMSG_COMPAT & flags) { + err = __sys_recvmsg(sock, (struct msghdr __user *)compat_entry, +- &msg_sys, flags, datagrams); ++ &msg_sys, flags & ~MSG_WAITFORONE, ++ datagrams); + if (err < 0) + break; + err = __put_user(err, &compat_entry->msg_len); + ++compat_entry; + } else { + err = __sys_recvmsg(sock, (struct msghdr __user *)entry, +- &msg_sys, flags, datagrams); ++ &msg_sys, flags & ~MSG_WAITFORONE, ++ datagrams); + if (err < 0) + break; + err = put_user(err, &entry->msg_len); diff --git a/queue-2.6.39/powerpc-kdump64-don-t-reference-freed-memory-as-pacas.patch b/queue-2.6.39/powerpc-kdump64-don-t-reference-freed-memory-as-pacas.patch new file mode 100644 index 0000000000..98dcdd8442 --- /dev/null +++ b/queue-2.6.39/powerpc-kdump64-don-t-reference-freed-memory-as-pacas.patch @@ -0,0 +1,36 @@ +From bd9e5eefecb3d69018bb95796298019d309cbec8 Mon Sep 17 00:00:00 2001 +From: Milton Miller <miltonm@bga.com> +Date: Tue, 10 May 2011 19:28:41 +0000 +Subject: powerpc/kdump64: Don't reference freed memory as pacas + +From: Milton Miller <miltonm@bga.com> + +commit bd9e5eefecb3d69018bb95796298019d309cbec8 upstream. + +Starting with 1426d5a3bd07589534286375998c0c8c6fdc5260 (powerpc: +Dynamically allocate pacas) the space for pacas beyond cpu_possible +is freed, but we failed to update the loop in crash.c. + +Since c1854e00727f50f7ac99e98d26ece04c087ef785 (powerpc: Set nr_cpu_ids +early and use it to free PACAs) the number of pacas allocated is +always nr_cpu_ids. + +Signed-off-by: Milton Miller <miltonm@bga.com> +Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/powerpc/kernel/crash.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/kernel/crash.c ++++ b/arch/powerpc/kernel/crash.c +@@ -170,7 +170,7 @@ static void crash_kexec_wait_realmode(in + int i; + + msecs = 10000; +- for (i=0; i < NR_CPUS && msecs > 0; i++) { ++ for (i=0; i < nr_cpu_ids && msecs > 0; i++) { + if (i == cpu) + continue; + diff --git a/queue-2.6.39/powerpc-kexec-fix-memory-corruption-from-unallocated-slaves.patch b/queue-2.6.39/powerpc-kexec-fix-memory-corruption-from-unallocated-slaves.patch new file mode 100644 index 0000000000..7470f0d1b4 --- /dev/null +++ b/queue-2.6.39/powerpc-kexec-fix-memory-corruption-from-unallocated-slaves.patch @@ -0,0 +1,74 @@ +From 3d2cea732d68aa270c360f55d8669820ebce188a Mon Sep 17 00:00:00 2001 +From: Milton Miller <miltonm@bga.com> +Date: Tue, 10 May 2011 19:28:33 +0000 +Subject: powerpc/kexec: Fix memory corruption from unallocated slaves + +From: Milton Miller <miltonm@bga.com> + +commit 3d2cea732d68aa270c360f55d8669820ebce188a upstream. + +Commit 1fc711f7ffb01089efc58042cfdbac8573d1b59a (powerpc/kexec: Fix race +in kexec shutdown) moved the write to signal the cpu had exited the kernel +from before the transition to real mode in kexec_smp_wait to kexec_wait. + +Unfornately it missed that kexec_wait is used both by cpus leaving the +kernel and by secondary slave cpus that were not allocated a paca for +what ever reason -- they could be beyond nr_cpus or not described in +the current device tree for whatever reason (for example, kexec-load +was not refreshed after a cpu hotplug operation). Cpus coming through +that path they will write to paca[NR_CPUS] which is beyond the space +allocated for the paca data and overwrite memory not allocated to pacas +but very likely still real mode accessable). + +Move the write back to kexec_smp_wait, which is used only by cpus that +found their paca, but after the transition to real mode. + +Signed-off-by: Milton Miller <miltonm@bga.com> +Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/powerpc/kernel/misc_64.S | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/arch/powerpc/kernel/misc_64.S ++++ b/arch/powerpc/kernel/misc_64.S +@@ -462,7 +462,8 @@ _GLOBAL(disable_kernel_fp) + * wait for the flag to change, indicating this kernel is going away but + * the slave code for the next one is at addresses 0 to 100. + * +- * This is used by all slaves. ++ * This is used by all slaves, even those that did not find a matching ++ * paca in the secondary startup code. + * + * Physical (hardware) cpu id should be in r3. + */ +@@ -471,10 +472,6 @@ _GLOBAL(kexec_wait) + 1: mflr r5 + addi r5,r5,kexec_flag-1b + +- li r4,KEXEC_STATE_REAL_MODE +- stb r4,PACAKEXECSTATE(r13) +- SYNC +- + 99: HMT_LOW + #ifdef CONFIG_KEXEC /* use no memory without kexec */ + lwz r4,0(r5) +@@ -499,11 +496,17 @@ kexec_flag: + * + * get phys id from paca + * switch to real mode ++ * mark the paca as no longer used + * join other cpus in kexec_wait(phys_id) + */ + _GLOBAL(kexec_smp_wait) + lhz r3,PACAHWCPUID(r13) + bl real_mode ++ ++ li r4,KEXEC_STATE_REAL_MODE ++ stb r4,PACAKEXECSTATE(r13) ++ SYNC ++ + b .kexec_wait + + /* diff --git a/queue-2.6.39/qla2xxx-fix-hang-during-driver-unload-when-vport-is-active.patch b/queue-2.6.39/qla2xxx-fix-hang-during-driver-unload-when-vport-is-active.patch new file mode 100644 index 0000000000..b997d28c6d --- /dev/null +++ b/queue-2.6.39/qla2xxx-fix-hang-during-driver-unload-when-vport-is-active.patch @@ -0,0 +1,62 @@ +From 43ebf16d762b082663976b679b813e1b546548d1 Mon Sep 17 00:00:00 2001 +From: Arun Easi <arun.easi@qlogic.com> +Date: Tue, 10 May 2011 11:18:16 -0700 +Subject: [SCSI] qla2xxx: Fix hang during driver unload when vport is active. + +From: Arun Easi <arun.easi@qlogic.com> + +commit 43ebf16d762b082663976b679b813e1b546548d1 upstream. + +Bumping ref count during fc_vport_terminate() was the cause. vport +delete would wait for ref count to drop to zero and that would never +happen. + +Signed-off-by: Arun Easi <arun.easi@qlogic.com> +Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> +Signed-off-by: James Bottomley <jbottomley@parallels.com> +Signed-off-by: James Bottomley <James.Bottomley@suse.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/scsi/qla2xxx/qla_os.c | 25 +++++++++++++++---------- + 1 file changed, 15 insertions(+), 10 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_os.c ++++ b/drivers/scsi/qla2xxx/qla_os.c +@@ -2360,21 +2360,26 @@ qla2x00_remove_one(struct pci_dev *pdev) + base_vha = pci_get_drvdata(pdev); + ha = base_vha->hw; + +- spin_lock_irqsave(&ha->vport_slock, flags); +- list_for_each_entry(vha, &ha->vp_list, list) { +- atomic_inc(&vha->vref_count); ++ mutex_lock(&ha->vport_lock); ++ while (ha->cur_vport_count) { ++ struct Scsi_Host *scsi_host; + +- if (vha->fc_vport) { +- spin_unlock_irqrestore(&ha->vport_slock, flags); ++ spin_lock_irqsave(&ha->vport_slock, flags); + +- fc_vport_terminate(vha->fc_vport); ++ BUG_ON(base_vha->list.next == &ha->vp_list); ++ /* This assumes first entry in ha->vp_list is always base vha */ ++ vha = list_first_entry(&base_vha->list, scsi_qla_host_t, list); ++ scsi_host = scsi_host_get(vha->host); + +- spin_lock_irqsave(&ha->vport_slock, flags); +- } ++ spin_unlock_irqrestore(&ha->vport_slock, flags); ++ mutex_unlock(&ha->vport_lock); + +- atomic_dec(&vha->vref_count); ++ fc_vport_terminate(vha->fc_vport); ++ scsi_host_put(vha->host); ++ ++ mutex_lock(&ha->vport_lock); + } +- spin_unlock_irqrestore(&ha->vport_slock, flags); ++ mutex_unlock(&ha->vport_lock); + + set_bit(UNLOADING, &base_vha->dpc_flags); + diff --git a/queue-2.6.39/qla2xxx-fix-virtual-port-failing-to-login-after-chip-reset.patch b/queue-2.6.39/qla2xxx-fix-virtual-port-failing-to-login-after-chip-reset.patch new file mode 100644 index 0000000000..adaa9d38b7 --- /dev/null +++ b/queue-2.6.39/qla2xxx-fix-virtual-port-failing-to-login-after-chip-reset.patch @@ -0,0 +1,46 @@ +From cefcaba67ab97fb756b3a6af5139c94d861b660d Mon Sep 17 00:00:00 2001 +From: Saurav Kashyap <saurav.kashyap@qlogic.com> +Date: Tue, 10 May 2011 11:18:18 -0700 +Subject: [SCSI] qla2xxx: Fix virtual port failing to login after chip reset. + +From: Saurav Kashyap <saurav.kashyap@qlogic.com> + +commit cefcaba67ab97fb756b3a6af5139c94d861b660d upstream. + +This patch ensures qla82xx_watchdog is not being run for the vport. It also +makes sure that beacon ON is not done for the vport, as it will lead to the +waking up of the dpc thread again and again. + +Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> +Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> +Signed-off-by: James Bottomley <jbottomley@parallels.com> +Signed-off-by: James Bottomley <James.Bottomley@suse.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/scsi/qla2xxx/qla_os.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_os.c ++++ b/drivers/scsi/qla2xxx/qla_os.c +@@ -3609,7 +3609,8 @@ qla2x00_timer(scsi_qla_host_t *vha) + if (!pci_channel_offline(ha->pdev)) + pci_read_config_word(ha->pdev, PCI_VENDOR_ID, &w); + +- if (IS_QLA82XX(ha)) { ++ /* Make sure qla82xx_watchdog is run only for physical port */ ++ if (!vha->vp_idx && IS_QLA82XX(ha)) { + if (test_bit(ISP_QUIESCE_NEEDED, &vha->dpc_flags)) + start_dpc++; + qla82xx_watchdog(vha); +@@ -3680,8 +3681,8 @@ qla2x00_timer(scsi_qla_host_t *vha) + atomic_read(&vha->loop_down_timer))); + } + +- /* Check if beacon LED needs to be blinked */ +- if (ha->beacon_blink_led == 1) { ++ /* Check if beacon LED needs to be blinked for physical host only */ ++ if (!vha->vp_idx && (ha->beacon_blink_led == 1)) { + set_bit(BEACON_BLINK_NEEDED, &vha->dpc_flags); + start_dpc++; + } diff --git a/queue-2.6.39/qla2xxx-fix-vport-delete-hang-when-logins-are-outstanding.patch b/queue-2.6.39/qla2xxx-fix-vport-delete-hang-when-logins-are-outstanding.patch new file mode 100644 index 0000000000..753c19d42a --- /dev/null +++ b/queue-2.6.39/qla2xxx-fix-vport-delete-hang-when-logins-are-outstanding.patch @@ -0,0 +1,41 @@ +From 9f40682e2857a3c2ddb80a87b185af3c6a708346 Mon Sep 17 00:00:00 2001 +From: Arun Easi <arun.easi@qlogic.com> +Date: Tue, 10 May 2011 11:18:17 -0700 +Subject: [SCSI] qla2xxx: Fix vport delete hang when logins are outstanding. + +From: Arun Easi <arun.easi@qlogic.com> + +commit 9f40682e2857a3c2ddb80a87b185af3c6a708346 upstream. + +Timer is required to flush out entries that may be present in work queues. + +Signed-off-by: Arun Easi <arun.easi@qlogic.com> +Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> +Signed-off-by: James Bottomley <jbottomley@parallels.com> +Signed-off-by: James Bottomley <James.Bottomley@suse.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/scsi/qla2xxx/qla_attr.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_attr.c ++++ b/drivers/scsi/qla2xxx/qla_attr.c +@@ -1877,14 +1877,15 @@ qla24xx_vport_delete(struct fc_vport *fc + + scsi_remove_host(vha->host); + ++ /* Allow timer to run to drain queued items, when removing vp */ ++ qla24xx_deallocate_vp_id(vha); ++ + if (vha->timer_active) { + qla2x00_vp_stop_timer(vha); + DEBUG15(printk(KERN_INFO "scsi(%ld): timer for the vport[%d]" + " = %p has stopped\n", vha->host_no, vha->vp_idx, vha)); + } + +- qla24xx_deallocate_vp_id(vha); +- + /* No pending activities shall be there on the vha now */ + DEBUG(msleep(random32()%10)); /* Just to see if something falls on + * the net we have placed below */ diff --git a/queue-2.6.39/qla2xxx-properly-set-the-dsd_list_len-for-dsd_chaining-in-cmd-type-6.patch b/queue-2.6.39/qla2xxx-properly-set-the-dsd_list_len-for-dsd_chaining-in-cmd-type-6.patch new file mode 100644 index 0000000000..b33233bcb5 --- /dev/null +++ b/queue-2.6.39/qla2xxx-properly-set-the-dsd_list_len-for-dsd_chaining-in-cmd-type-6.patch @@ -0,0 +1,52 @@ +From fa96d927362a422405d65491326f8ef763572e84 Mon Sep 17 00:00:00 2001 +From: Andrew Vasquez <andrew.vasquez@qlogic.com> +Date: Tue, 10 May 2011 11:18:15 -0700 +Subject: [SCSI] qla2xxx: Properly set the dsd_list_len for dsd_chaining in cmd type 6. + +From: Andrew Vasquez <andrew.vasquez@qlogic.com> + +commit fa96d927362a422405d65491326f8ef763572e84 upstream. + +The firmware spec has the fcp_data_dseg_len defined as a 32-bit +value, while the corresponding field in the driver structure has +it defined as a 16-bit value. + +Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> +Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> +Signed-off-by: James Bottomley <jbottomley@parallels.com> +Signed-off-by: James Bottomley <James.Bottomley@suse.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/scsi/qla2xxx/qla_fw.h | 3 +-- + drivers/scsi/qla2xxx/qla_nx.c | 4 ++-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_fw.h ++++ b/drivers/scsi/qla2xxx/qla_fw.h +@@ -416,8 +416,7 @@ struct cmd_type_6 { + uint8_t vp_index; + + uint32_t fcp_data_dseg_address[2]; /* Data segment address. */ +- uint16_t fcp_data_dseg_len; /* Data segment length. */ +- uint16_t reserved_1; /* MUST be set to 0. */ ++ uint32_t fcp_data_dseg_len; /* Data segment length. */ + }; + + #define COMMAND_TYPE_7 0x18 /* Command Type 7 entry */ +--- a/drivers/scsi/qla2xxx/qla_nx.c ++++ b/drivers/scsi/qla2xxx/qla_nx.c +@@ -2548,11 +2548,11 @@ qla2xx_build_scsi_type_6_iocbs(srb_t *sp + dsd_seg = (uint32_t *)&cmd_pkt->fcp_data_dseg_address; + *dsd_seg++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma)); + *dsd_seg++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma)); +- cmd_pkt->fcp_data_dseg_len = dsd_list_len; ++ *dsd_seg++ = cpu_to_le32(dsd_list_len); + } else { + *cur_dsd++ = cpu_to_le32(LSD(dsd_ptr->dsd_list_dma)); + *cur_dsd++ = cpu_to_le32(MSD(dsd_ptr->dsd_list_dma)); +- *cur_dsd++ = dsd_list_len; ++ *cur_dsd++ = cpu_to_le32(dsd_list_len); + } + cur_dsd = (uint32_t *)next_dsd; + while (avail_dsds) { diff --git a/queue-2.6.39/series b/queue-2.6.39/series index 5fc1527b42..9caabd9834 100644 --- a/queue-2.6.39/series +++ b/queue-2.6.39/series @@ -5,3 +5,12 @@ kmemleak-initialise-kmemleak-after-debug_objects_mem_init.patch fix-_osc-uuid-in-pcc-cpufreq.patch cpu-hotplug-re-create-sysfs-directory-and-symlinks.patch fix-memory-leak-in-cpufreq_stat.patch +net-recvmmsg-strip-msg_waitforone-when-calling-recvmsg.patch +ftrace-only-update-the-function-code-on-write-to-filter-files.patch +qla2xxx-properly-set-the-dsd_list_len-for-dsd_chaining-in-cmd-type-6.patch +qla2xxx-fix-hang-during-driver-unload-when-vport-is-active.patch +qla2xxx-fix-virtual-port-failing-to-login-after-chip-reset.patch +qla2xxx-fix-vport-delete-hang-when-logins-are-outstanding.patch +powerpc-kdump64-don-t-reference-freed-memory-as-pacas.patch +powerpc-kexec-fix-memory-corruption-from-unallocated-slaves.patch +x86-cpufeature-fix-cpuid-leaf-7-feature-detection.patch diff --git a/queue-2.6.39/x86-cpufeature-fix-cpuid-leaf-7-feature-detection.patch b/queue-2.6.39/x86-cpufeature-fix-cpuid-leaf-7-feature-detection.patch new file mode 100644 index 0000000000..6d98b1fe93 --- /dev/null +++ b/queue-2.6.39/x86-cpufeature-fix-cpuid-leaf-7-feature-detection.patch @@ -0,0 +1,34 @@ +From 2494b030ba9334c7dd7df9b9f7abe4eacc950ec5 Mon Sep 17 00:00:00 2001 +From: Fenghua Yu <fenghua.yu@intel.com> +Date: Tue, 17 May 2011 12:33:26 -0700 +Subject: x86, cpufeature: Fix cpuid leaf 7 feature detection + +From: Fenghua Yu <fenghua.yu@intel.com> + +commit 2494b030ba9334c7dd7df9b9f7abe4eacc950ec5 upstream. + +CPUID leaf 7, subleaf 0 returns the maximum subleaf in EAX, not the +number of subleaves. Since so far only subleaf 0 is defined (and only +the EBX bitfield) we do not need to qualify the test. + +Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> +Link: http://lkml.kernel.org/r/1305660806-17519-1-git-send-email-fenghua.yu@intel.com +Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/x86/kernel/cpu/common.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/x86/kernel/cpu/common.c ++++ b/arch/x86/kernel/cpu/common.c +@@ -565,8 +565,7 @@ void __cpuinit get_cpu_cap(struct cpuinf + + cpuid_count(0x00000007, 0, &eax, &ebx, &ecx, &edx); + +- if (eax > 0) +- c->x86_capability[9] = ebx; ++ c->x86_capability[9] = ebx; + } + + /* AMD-defined flags: level 0x80000001 */ |