Commit a4ecdf82 authored by Linus Torvalds's avatar Linus Torvalds

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
parents cee152ff 847d7970
...@@ -86,10 +86,19 @@ EXPORT_SYMBOL(__kernel_fpu_begin); ...@@ -86,10 +86,19 @@ EXPORT_SYMBOL(__kernel_fpu_begin);
void __kernel_fpu_end(void) void __kernel_fpu_end(void)
{ {
if (use_eager_fpu()) if (use_eager_fpu()) {
math_state_restore(); /*
else * For eager fpu, most the time, tsk_used_math() is true.
* Restore the user math as we are done with the kernel usage.
* At few instances during thread exit, signal handling etc,
* tsk_used_math() is false. Those few places will take proper
* actions, so we don't need to restore the math here.
*/
if (likely(tsk_used_math(current)))
math_state_restore();
} else {
stts(); stts();
}
} }
EXPORT_SYMBOL(__kernel_fpu_end); EXPORT_SYMBOL(__kernel_fpu_end);
......
...@@ -529,7 +529,7 @@ static void quirk_amd_nb_node(struct pci_dev *dev) ...@@ -529,7 +529,7 @@ static void quirk_amd_nb_node(struct pci_dev *dev)
return; return;
pci_read_config_dword(nb_ht, 0x60, &val); pci_read_config_dword(nb_ht, 0x60, &val);
node = val & 7; node = pcibus_to_node(dev->bus) | (val & 7);
/* /*
* Some hardware may return an invalid node ID, * Some hardware may return an invalid node ID,
* so check it first: * so check it first:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment