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 'perf-urgent-2021-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
"Misc fixes:

- Fix the NMI watchdog on ancient Intel CPUs

- Remove a misguided, NMI-unsafe KASAN callback from the NMI-safe
irq_work path used by perf.

- Fix uncore events on Ice Lake servers.

- Someone booted maxcpus=1 on an SNB-EP, and the uncore driver
emitted warnings and was probably buggy. Fix it.

- KCSAN found a genuine data race in the core perf code. Somewhat
ironically the bug was introduced through a recent race fix. :-/
In our defense, the new race window was much more narrow. Fix it"

* tag 'perf-urgent-2021-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/nmi_watchdog: Fix old-style NMI watchdog regression on old Intel CPUs
irq_work: Make irq_work_queue() NMI-safe again
perf/x86/intel/uncore: Fix M2M event umask for Ice Lake server
perf/x86/intel/uncore: Fix a kernel WARNING triggered by maxcpus=1
perf: Fix data race between pin_count increment/decrement

+10 -8
+6 -3
arch/x86/events/intel/uncore_snbep.c
··· 1406 1406 die_id = i; 1407 1407 else 1408 1408 die_id = topology_phys_to_logical_pkg(i); 1409 + if (die_id < 0) 1410 + die_id = -ENODEV; 1409 1411 map->pbus_to_dieid[bus] = die_id; 1410 1412 break; 1411 1413 } ··· 1454 1452 i = -1; 1455 1453 if (reverse) { 1456 1454 for (bus = 255; bus >= 0; bus--) { 1457 - if (map->pbus_to_dieid[bus] >= 0) 1455 + if (map->pbus_to_dieid[bus] != -1) 1458 1456 i = map->pbus_to_dieid[bus]; 1459 1457 else 1460 1458 map->pbus_to_dieid[bus] = i; 1461 1459 } 1462 1460 } else { 1463 1461 for (bus = 0; bus <= 255; bus++) { 1464 - if (map->pbus_to_dieid[bus] >= 0) 1462 + if (map->pbus_to_dieid[bus] != -1) 1465 1463 i = map->pbus_to_dieid[bus]; 1466 1464 else 1467 1465 map->pbus_to_dieid[bus] = i; ··· 5099 5097 .perf_ctr = SNR_M2M_PCI_PMON_CTR0, 5100 5098 .event_ctl = SNR_M2M_PCI_PMON_CTL0, 5101 5099 .event_mask = SNBEP_PMON_RAW_EVENT_MASK, 5100 + .event_mask_ext = SNR_M2M_PCI_PMON_UMASK_EXT, 5102 5101 .box_ctl = SNR_M2M_PCI_PMON_BOX_CTL, 5103 5102 .ops = &snr_m2m_uncore_pci_ops, 5104 - .format_group = &skx_uncore_format_group, 5103 + .format_group = &snr_m2m_uncore_format_group, 5105 5104 }; 5106 5105 5107 5106 static struct attribute *icx_upi_uncore_formats_attr[] = {
+2 -2
arch/x86/kernel/cpu/perfctr-watchdog.c
··· 63 63 case 15: 64 64 return msr - MSR_P4_BPU_PERFCTR0; 65 65 } 66 - fallthrough; 66 + break; 67 67 case X86_VENDOR_ZHAOXIN: 68 68 case X86_VENDOR_CENTAUR: 69 69 return msr - MSR_ARCH_PERFMON_PERFCTR0; ··· 96 96 case 15: 97 97 return msr - MSR_P4_BSU_ESCR0; 98 98 } 99 - fallthrough; 99 + break; 100 100 case X86_VENDOR_ZHAOXIN: 101 101 case X86_VENDOR_CENTAUR: 102 102 return msr - MSR_ARCH_PERFMON_EVENTSEL0;
+2
kernel/events/core.c
··· 4609 4609 cpuctx = per_cpu_ptr(pmu->pmu_cpu_context, cpu); 4610 4610 ctx = &cpuctx->ctx; 4611 4611 get_ctx(ctx); 4612 + raw_spin_lock_irqsave(&ctx->lock, flags); 4612 4613 ++ctx->pin_count; 4614 + raw_spin_unlock_irqrestore(&ctx->lock, flags); 4613 4615 4614 4616 return ctx; 4615 4617 }
-3
kernel/irq_work.c
··· 70 70 if (!irq_work_claim(work)) 71 71 return false; 72 72 73 - /*record irq_work call stack in order to print it in KASAN reports*/ 74 - kasan_record_aux_stack(work); 75 - 76 73 /* Queue the entry and raise the IPI if needed. */ 77 74 preempt_disable(); 78 75 __irq_work_queue_local(work);