linux_dsm_epyc7002/arch/x86/kernel
Andi Kleen 0d7482e3d7 x86, mce: implement dynamic machine check banks support
Impact: cleanup; making code future proof; memory saving on small systems

This patch replaces the hardcoded max number of machine check banks with 
dynamic allocation depending on what the CPU reports. The sysfs
data structures and the banks array are dynamically allocated.

There is still a hard bank limit (128) because the mcelog protocol uses
banks >= 128 as pseudo banks to escape other events. But we expect
that 128 banks is beyond any reasonable CPU for now.

This supersedes an earlier patch by Venki, but it solves the problem
more completely by making the limit fully dynamic (up to the 128
boundary).

This saves some memory on machines with less than 6 banks because
they won't need sysdevs for unused ones and also allows to 
use sysfs to control these banks on possible future CPUs with
more than 6 banks.

This is an updated patch addressing Venki's comments.  I also added in
another patch from Thomas which fixed the error allocation path (that
patch was previously separated)

Cc: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2009-02-19 14:50:58 -08:00
..
acpi x86: find nr_irqs_gsi with mp_ioapic_routing 2009-02-09 12:42:59 +01:00
cpu x86, mce: implement dynamic machine check banks support 2009-02-19 14:50:58 -08:00
.gitignore
alternative.c x86, mce: don't disable machine checks during code patching 2009-02-17 15:32:38 -08:00
amd_iommu_init.c
amd_iommu.c
aperture_64.c
apic.c x86, mce: fix ifdef for 64bit thermal apic vector clear on shutdown 2009-02-17 15:24:34 -08:00
apm_32.c
asm-offsets_32.c
asm-offsets_64.c
asm-offsets.c
audit_64.c
bios_uv.c
bootflag.c
check.c
cpuid.c
crash_dump_32.c
crash_dump_64.c
crash.c
doublefault_32.c
ds.c x86, ds, bts: cleanup/fix DS configuration 2009-01-22 14:35:00 +01:00
dumpstack_32.c
dumpstack_64.c
dumpstack.c
dumpstack.h
e820.c Merge branch 'linus' into release 2009-01-09 03:39:43 -05:00
early_printk.c
early-quirks.c x86: only scan the root bus in early PCI quirks 2009-01-09 12:46:22 -08:00
efi_32.c
efi_64.c
efi_stub_32.S
efi_stub_64.S
efi.c
entry_32.S Revert "i386: add TRACE_IRQS_OFF for the nmi" 2009-01-12 19:36:59 +01:00
entry_64.S x86: push old stack address on irqstack for unwinder 2009-02-02 21:18:03 -08:00
es7000_32.c
ftrace.c
genapic_64.c
genapic_flat_64.c
genx2apic_cluster.c
genx2apic_phys.c
genx2apic_uv_x.c
geode_32.c
head32.c
head64.c
head_32.S
head_64.S
head.c
hpet.c x86, hpet: fix for LS21 + HPET = boot hang 2009-02-13 09:15:46 +01:00
i386_ksyms_32.c
i387.c
i8237.c i8327: fix outb() parameter order 2009-02-10 13:13:23 +01:00
i8253.c
i8259.c
init_task.c
io_apic.c x86: find nr_irqs_gsi with mp_ioapic_routing 2009-02-09 12:42:59 +01:00
io_delay.c
ioport.c
ipi.c
irq_32.c
irq_64.c
irq.c
irqinit_32.c x86/Voyager: make it build and boot 2009-01-31 18:26:07 +01:00
irqinit_64.c
k8.c
kdebugfs.c
kgdb.c
kprobes.c kprobes: check CONFIG_FREEZER instead of CONFIG_PM 2009-01-16 14:32:17 -05:00
kvm.c
kvmclock.c
ldt.c
machine_kexec_32.c
machine_kexec_64.c
Makefile
mca_32.c
mfgpt_32.c trivial: fix then -> than typos in comments and documentation 2009-01-06 11:28:06 +01:00
microcode_amd.c
microcode_core.c
microcode_intel.c
mmconf-fam10h_64.c
module_32.c
module_64.c
mpparse.c x86: fix mpparse.c build error on latest git 2009-01-12 19:24:22 +01:00
msr.c
nmi.c x86: remove duplicated #include's 2009-01-06 13:34:03 +01:00
numaq_32.c
olpc.c x86, olpc: fix model detection without OFW 2009-02-14 23:05:25 +01:00
paravirt_patch_32.c
paravirt_patch_64.c
paravirt-spinlocks.c
paravirt.c x86: warn if arch_flush_lazy_mmu_cpu is called in preemptible context 2009-02-12 23:11:58 +01:00
pci-calgary_64.c
pci-dma.c PCI: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-07 11:12:23 -08:00
pci-gart_64.c Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
pci-nommu.c
pci-swiotlb_64.c
pcspeaker.c
pmtimer_64.c
probe_roms_32.c
process_32.c x86, rcu: fix strange load average and ksoftirqd behavior 2009-02-17 22:47:45 +01:00
process_64.c x86, 64-bit: print DMI info in the oops trace 2009-02-04 22:10:12 +01:00
process.c x86: add clflush before monitor for Intel 7400 series 2009-02-09 11:15:15 +01:00
ptrace.c x86, ptrace, mm: fix double-free on race 2009-02-11 15:44:20 +01:00
pvclock.c
quirks.c
reboot_fixups_32.c
reboot.c
relocate_kernel_32.S
relocate_kernel_64.S
rtc.c
scx200_32.c
setup_percpu.c x86: fix section mismatch warnings in kernel/setup_percpu.c 2009-01-18 23:59:22 +01:00
setup.c x86: fix grammar in user-visible BIOS warning 2009-02-05 01:14:38 +01:00
signal.c Revert "x86: signal: change type of paramter for sys_rt_sigreturn()" 2009-01-21 09:43:18 +01:00
smp.c Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-10 06:13:09 -08:00
smpboot.c Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-01-10 06:13:09 -08:00
smpcommon.c
stacktrace.c
step.c
summit_32.c
sys_i386_32.c
sys_x86_64.c
syscall_64.c
syscall_table_32.S [CVE-2009-0029] Rename old_readdir to sys_old_readdir 2009-01-14 14:15:15 +01:00
tce_64.c
test_nx.c
test_rodata.c
time_32.c
time_64.c
tlb_32.c
tlb_64.c
tlb_uv.c x86, UV: cpu_relax in uv_wait_completion 2009-01-15 23:48:20 +01:00
tls.c
tls.h
topology.c
trampoline_32.S
trampoline_64.S
trampoline.c
traps.c x86, vm86: fix preemption bug 2009-02-15 10:46:13 +01:00
tsc_sync.c
tsc.c
uv_irq.c
uv_sysfs.c
verify_cpu_64.S
visws_quirks.c
vm86_32.c
vmi_32.c x86, vmi: put a missing paravirt_release_pmd in pgd_dtor 2009-02-09 13:10:13 +01:00
vmiclock_32.c
vmlinux_32.lds.S
vmlinux_64.lds.S
vmlinux.lds.S
vsmp_64.c
vsyscall_64.c
x8664_ksyms_64.c
xsave.c