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
86 86
87void __kernel_fpu_end(void)87void __kernel_fpu_end(void)
88{88{
89 if (use_eager_fpu())89 if (use_eager_fpu()) {
90 math_state_restore();90 /*
91 else91 * 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 {
92 stts();100 stts();
101 }
93}102}
94EXPORT_SYMBOL(__kernel_fpu_end);103EXPORT_SYMBOL(__kernel_fpu_end);
95 104
arch/x86/kernel/quirks.c+1−1
@@ -529,7 +529,7 @@ static void quirk_amd_nb_node(struct pci_dev *dev) · 528 unmodified lines
529 return;529 return;
530 530
531 pci_read_config_dword(nb_ht, 0x60, &val);531 pci_read_config_dword(nb_ht, 0x60, &val);
532 node = val & 7;532 node = pcibus_to_node(dev->bus) | (val & 7);
533 /*533 /*
534 * Some hardware may return an invalid node ID,534 * Some hardware may return an invalid node ID,
535 * so check it first:535 * 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