History

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin: "Two x86 fixes: Suresh's eager FPU fix, and a fix to the NUMA quirk for AMD northbridges. This only includes Suresh's fix patch, not the "mostly a cleanup" patch which had __init issues" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/amd/numa: Fix northbridge quirk to assign correct NUMA node x86, fpu: Check tsk_used_math() in kernel_fpu_end() for eager FPU

Linus Torvalds committed 12 years ago

Commit a4ecdf82 parents cee152f 847d7972 files · +13 −4Browse files

Unified · Split

2 files
  1. arch/x86/kernel/i387.c +12 −3
  2. arch/x86/kernel/quirks.c +1 −1
arch/x86/kernel/i387.c+12−3
@@ -86,10 +86,19 @@ EXPORT_SYMBOL(__kernel_fpu_begin); · 85 unmodified lines
8686
8787 void __kernel_fpu_end(void)
8888 {
89− if (use_eager_fpu())
90− math_state_restore();
91− else
89+ if (use_eager_fpu()) {
90+ /*
91+ * For eager fpu, most the time, tsk_used_math() is true.
92+ * Restore the user math as we are done with the kernel usage.
93+ * At few instances during thread exit, signal handling etc,
94+ * tsk_used_math() is false. Those few places will take proper
95+ * actions, so we don't need to restore the math here.
96+ */
97+ if (likely(tsk_used_math(current)))
98+ math_state_restore();
99+ } else {
92100 stts();
101+ }
93102 }
94103 EXPORT_SYMBOL(__kernel_fpu_end);
95104
arch/x86/kernel/quirks.c+1−1
@@ -529,7 +529,7 @@ static void quirk_amd_nb_node(struct pci_dev *dev) · 528 unmodified lines
529529 return;
530530
531531 pci_read_config_dword(nb_ht, 0x60, &val);
532− node = val & 7;
532+ node = pcibus_to_node(dev->bus) | (val & 7);
533533 /*
534534 * Some hardware may return an invalid node ID,
535535 * so check it first:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t