Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ras-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull RAS fixes from Thomas Gleixner:
"Two RAS related fixes:

- Shut down the per CPU thermal throttling poll work properly when a
CPU goes offline.

The missing shutdown caused the poll work to be migrated to a
unbound worker which triggered warnings about the usage of
smp_processor_id() in preemptible context

- Fix the PPIN feature initialization which missed to enable the
functionality when PPIN_CTL was enabled but the MSR locked against
updates"

* tag 'ras-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mce: Fix logic and comments around MSR_PPIN_CTL
x86/mce/therm_throt: Undo thermal polling properly on CPU offline

+12 -6
+5 -4
arch/x86/kernel/cpu/mce/intel.c
··· 493 493 return; 494 494 495 495 if ((val & 3UL) == 1UL) { 496 - /* PPIN available but disabled: */ 496 + /* PPIN locked in disabled mode */ 497 497 return; 498 498 } 499 499 500 - /* If PPIN is disabled, but not locked, try to enable: */ 501 - if (!(val & 3UL)) { 500 + /* If PPIN is disabled, try to enable */ 501 + if (!(val & 2UL)) { 502 502 wrmsrl_safe(MSR_PPIN_CTL, val | 2UL); 503 503 rdmsrl_safe(MSR_PPIN_CTL, &val); 504 504 } 505 505 506 - if ((val & 3UL) == 2UL) 506 + /* Is the enable bit set? */ 507 + if (val & 2UL) 507 508 set_cpu_cap(c, X86_FEATURE_INTEL_PPIN); 508 509 } 509 510 }
+7 -2
arch/x86/kernel/cpu/mce/therm_throt.c
··· 486 486 { 487 487 struct thermal_state *state = &per_cpu(thermal_state, cpu); 488 488 struct device *dev = get_cpu_device(cpu); 489 + u32 l; 489 490 490 - cancel_delayed_work(&state->package_throttle.therm_work); 491 - cancel_delayed_work(&state->core_throttle.therm_work); 491 + /* Mask the thermal vector before draining evtl. pending work */ 492 + l = apic_read(APIC_LVTTHMR); 493 + apic_write(APIC_LVTTHMR, l | APIC_LVT_MASKED); 494 + 495 + cancel_delayed_work_sync(&state->package_throttle.therm_work); 496 + cancel_delayed_work_sync(&state->core_throttle.therm_work); 492 497 493 498 state->package_throttle.rate_control_active = false; 494 499 state->core_throttle.rate_control_active = false;