mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/detect-hyper', 'x86/doc', 'x86/dumpstack', 'x86/early-printk', 'x86/fpu', 'x86/idle', 'x86/io', 'x86/memory-corruption-check', 'x86/microcode', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/pat2', 'x86/pci-ioapic-boot-irq-quirks', 'x86/ptrace', 'x86/quirks', 'x86/reboot', 'x86/setup-memory', 'x86/signal', 'x86/sparse-fixes', 'x86/time', 'x86/uv' and 'x86/xen' into x86/core
This commit is contained in:
parent
3d44cc3e01
1ccedb7cdb
34945ede31
d437797406
c415b3dce3
beeb4195cb
f269b07e86
4e42ebd57b
e1286f2c68
878719e831
fd28a5b58d
adf77bac05
8f2466f45f
93093d099e
bb5574608a
f34a10bd9f
b6fd6f2673
30604bb410
5b9a0e14eb
67bac792cd
7a9787e1eb
f4166c54bf
69b88afa8d
8daa19051e
3e1e9002aa
8403295e0f
4db646b1af
205516c12d
c8182f0016
ecbf29cdb3
commit
fa623d1b02
173 changed files with 4121 additions and 3195 deletions
|
@ -131,6 +131,11 @@ static void report_broken_nmi(int cpu, int *prev_nmi_count)
|
|||
atomic_dec(&nmi_active);
|
||||
}
|
||||
|
||||
static void __acpi_nmi_disable(void *__unused)
|
||||
{
|
||||
apic_write(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
|
||||
}
|
||||
|
||||
int __init check_nmi_watchdog(void)
|
||||
{
|
||||
unsigned int *prev_nmi_count;
|
||||
|
@ -179,8 +184,12 @@ int __init check_nmi_watchdog(void)
|
|||
kfree(prev_nmi_count);
|
||||
return 0;
|
||||
error:
|
||||
if (nmi_watchdog == NMI_IO_APIC && !timer_through_8259)
|
||||
disable_8259A_irq(0);
|
||||
if (nmi_watchdog == NMI_IO_APIC) {
|
||||
if (!timer_through_8259)
|
||||
disable_8259A_irq(0);
|
||||
on_each_cpu(__acpi_nmi_disable, NULL, 1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
timer_ack = 0;
|
||||
#endif
|
||||
|
@ -199,12 +208,17 @@ static int __init setup_nmi_watchdog(char *str)
|
|||
++str;
|
||||
}
|
||||
|
||||
get_option(&str, &nmi);
|
||||
if (!strncmp(str, "lapic", 5))
|
||||
nmi_watchdog = NMI_LOCAL_APIC;
|
||||
else if (!strncmp(str, "ioapic", 6))
|
||||
nmi_watchdog = NMI_IO_APIC;
|
||||
else {
|
||||
get_option(&str, &nmi);
|
||||
if (nmi >= NMI_INVALID)
|
||||
return 0;
|
||||
nmi_watchdog = nmi;
|
||||
}
|
||||
|
||||
if (nmi >= NMI_INVALID)
|
||||
return 0;
|
||||
|
||||
nmi_watchdog = nmi;
|
||||
return 1;
|
||||
}
|
||||
__setup("nmi_watchdog=", setup_nmi_watchdog);
|
||||
|
@ -285,11 +299,6 @@ void acpi_nmi_enable(void)
|
|||
on_each_cpu(__acpi_nmi_enable, NULL, 1);
|
||||
}
|
||||
|
||||
static void __acpi_nmi_disable(void *__unused)
|
||||
{
|
||||
apic_write(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED);
|
||||
}
|
||||
|
||||
/*
|
||||
* Disable timer based NMIs on all CPUs:
|
||||
*/
|
||||
|
@ -340,6 +349,8 @@ void stop_apic_nmi_watchdog(void *unused)
|
|||
return;
|
||||
if (nmi_watchdog == NMI_LOCAL_APIC)
|
||||
lapic_watchdog_stop();
|
||||
else
|
||||
__acpi_nmi_disable(NULL);
|
||||
__get_cpu_var(wd_enabled) = 0;
|
||||
atomic_dec(&nmi_active);
|
||||
}
|
||||
|
@ -465,6 +476,24 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
|
|||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
|
||||
static void enable_ioapic_nmi_watchdog_single(void *unused)
|
||||
{
|
||||
__get_cpu_var(wd_enabled) = 1;
|
||||
atomic_inc(&nmi_active);
|
||||
__acpi_nmi_enable(NULL);
|
||||
}
|
||||
|
||||
static void enable_ioapic_nmi_watchdog(void)
|
||||
{
|
||||
on_each_cpu(enable_ioapic_nmi_watchdog_single, NULL, 1);
|
||||
touch_nmi_watchdog();
|
||||
}
|
||||
|
||||
static void disable_ioapic_nmi_watchdog(void)
|
||||
{
|
||||
on_each_cpu(stop_apic_nmi_watchdog, NULL, 1);
|
||||
}
|
||||
|
||||
static int __init setup_unknown_nmi_panic(char *str)
|
||||
{
|
||||
unknown_nmi_panic = 1;
|
||||
|
@ -507,6 +536,11 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
|
|||
enable_lapic_nmi_watchdog();
|
||||
else
|
||||
disable_lapic_nmi_watchdog();
|
||||
} else if (nmi_watchdog == NMI_IO_APIC) {
|
||||
if (nmi_watchdog_enabled)
|
||||
enable_ioapic_nmi_watchdog();
|
||||
else
|
||||
disable_ioapic_nmi_watchdog();
|
||||
} else {
|
||||
printk(KERN_WARNING
|
||||
"NMI watchdog doesn't know what hardware to touch\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue