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 branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
"A small set of fixes for x86:

- Make the tsc=reliable/nowatchdog command line parameter work again.
It was broken with the introduction of the early TSC clocksource.

- Prevent the evaluation of exception stacks before they are set up.
This causes a crash in dumpstack because the stack walk termination
gets screwed up.

- Prevent a NULL pointer dereference in the rescource control file
system.

- Avoid bogus warnings about APIC id mismatch related to the LDR
which can happen when the LDR is not in use and therefore not
initialized. Only evaluate that when the APIC is in logical
destination mode"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/tsc: Respect tsc command line paraemeter for clocksource_tsc_early
x86/dumpstack/64: Don't evaluate exception stacks before setup
x86/apic/32: Avoid bogus LDR warnings
x86/resctrl: Prevent NULL pointer dereference when reading mondata

+29 -13
+15 -13
arch/x86/kernel/apic/apic.c
··· 1586 1586 { 1587 1587 int cpu = smp_processor_id(); 1588 1588 unsigned int value; 1589 - #ifdef CONFIG_X86_32 1590 - int logical_apicid, ldr_apicid; 1591 - #endif 1592 1589 1593 1590 if (disable_apic) { 1594 1591 disable_ioapic_support(); ··· 1623 1626 apic->init_apic_ldr(); 1624 1627 1625 1628 #ifdef CONFIG_X86_32 1626 - /* 1627 - * APIC LDR is initialized. If logical_apicid mapping was 1628 - * initialized during get_smp_config(), make sure it matches the 1629 - * actual value. 1630 - */ 1631 - logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu); 1632 - ldr_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR)); 1633 - WARN_ON(logical_apicid != BAD_APICID && logical_apicid != ldr_apicid); 1634 - /* always use the value from LDR */ 1635 - early_per_cpu(x86_cpu_to_logical_apicid, cpu) = ldr_apicid; 1629 + if (apic->dest_logical) { 1630 + int logical_apicid, ldr_apicid; 1631 + 1632 + /* 1633 + * APIC LDR is initialized. If logical_apicid mapping was 1634 + * initialized during get_smp_config(), make sure it matches 1635 + * the actual value. 1636 + */ 1637 + logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu); 1638 + ldr_apicid = GET_APIC_LOGICAL_ID(apic_read(APIC_LDR)); 1639 + if (logical_apicid != BAD_APICID) 1640 + WARN_ON(logical_apicid != ldr_apicid); 1641 + /* Always use the value from LDR. */ 1642 + early_per_cpu(x86_cpu_to_logical_apicid, cpu) = ldr_apicid; 1643 + } 1636 1644 #endif 1637 1645 1638 1646 /*
+4
arch/x86/kernel/cpu/resctrl/ctrlmondata.c
··· 522 522 int ret = 0; 523 523 524 524 rdtgrp = rdtgroup_kn_lock_live(of->kn); 525 + if (!rdtgrp) { 526 + ret = -ENOENT; 527 + goto out; 528 + } 525 529 526 530 md.priv = of->kn->priv; 527 531 resid = md.u.rid;
+7
arch/x86/kernel/dumpstack_64.c
··· 94 94 BUILD_BUG_ON(N_EXCEPTION_STACKS != 6); 95 95 96 96 begin = (unsigned long)__this_cpu_read(cea_exception_stacks); 97 + /* 98 + * Handle the case where stack trace is collected _before_ 99 + * cea_exception_stacks had been initialized. 100 + */ 101 + if (!begin) 102 + return false; 103 + 97 104 end = begin + sizeof(struct cea_exception_stacks); 98 105 /* Bail if @stack is outside the exception stack area. */ 99 106 if (stk < begin || stk >= end)
+3
arch/x86/kernel/tsc.c
··· 1505 1505 return; 1506 1506 } 1507 1507 1508 + if (tsc_clocksource_reliable || no_tsc_watchdog) 1509 + clocksource_tsc_early.flags &= ~CLOCK_SOURCE_MUST_VERIFY; 1510 + 1508 1511 clocksource_register_khz(&clocksource_tsc_early, tsc_khz); 1509 1512 detect_art(); 1510 1513 }