Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RAS updates from Ingo Molnar: "Two minor updates to AMD SMCA support, plus a timer_setup() conversion" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/MCE/AMD: Fix mce_severity_amd_smca() signature x86/MCE/AMD: Always give panic severity for UC errors in kernel context x86/mce: Convert timers to use timer_setup()
This commit is contained in:
Коммит
f2be8bd52e
|
@ -204,7 +204,7 @@ static int error_context(struct mce *m)
|
|||
return IN_KERNEL;
|
||||
}
|
||||
|
||||
static int mce_severity_amd_smca(struct mce *m, int err_ctx)
|
||||
static int mce_severity_amd_smca(struct mce *m, enum context err_ctx)
|
||||
{
|
||||
u32 addr = MSR_AMD64_SMCA_MCx_CONFIG(m->bank);
|
||||
u32 low, high;
|
||||
|
@ -245,6 +245,9 @@ static int mce_severity_amd(struct mce *m, int tolerant, char **msg, bool is_exc
|
|||
|
||||
if (m->status & MCI_STATUS_UC) {
|
||||
|
||||
if (ctx == IN_KERNEL)
|
||||
return MCE_PANIC_SEVERITY;
|
||||
|
||||
/*
|
||||
* On older systems where overflow_recov flag is not present, we
|
||||
* should simply panic if an error overflow occurs. If
|
||||
|
@ -255,10 +258,6 @@ static int mce_severity_amd(struct mce *m, int tolerant, char **msg, bool is_exc
|
|||
if (mce_flags.smca)
|
||||
return mce_severity_amd_smca(m, ctx);
|
||||
|
||||
/* software can try to contain */
|
||||
if (!(m->mcgstatus & MCG_STATUS_RIPV) && (ctx == IN_KERNEL))
|
||||
return MCE_PANIC_SEVERITY;
|
||||
|
||||
/* kill current process */
|
||||
return MCE_AR_SEVERITY;
|
||||
} else {
|
||||
|
|
|
@ -1367,13 +1367,12 @@ static void __start_timer(struct timer_list *t, unsigned long interval)
|
|||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static void mce_timer_fn(unsigned long data)
|
||||
static void mce_timer_fn(struct timer_list *t)
|
||||
{
|
||||
struct timer_list *t = this_cpu_ptr(&mce_timer);
|
||||
int cpu = smp_processor_id();
|
||||
struct timer_list *cpu_t = this_cpu_ptr(&mce_timer);
|
||||
unsigned long iv;
|
||||
|
||||
WARN_ON(cpu != data);
|
||||
WARN_ON(cpu_t != t);
|
||||
|
||||
iv = __this_cpu_read(mce_next_interval);
|
||||
|
||||
|
@ -1763,17 +1762,15 @@ static void mce_start_timer(struct timer_list *t)
|
|||
static void __mcheck_cpu_setup_timer(void)
|
||||
{
|
||||
struct timer_list *t = this_cpu_ptr(&mce_timer);
|
||||
unsigned int cpu = smp_processor_id();
|
||||
|
||||
setup_pinned_timer(t, mce_timer_fn, cpu);
|
||||
timer_setup(t, mce_timer_fn, TIMER_PINNED);
|
||||
}
|
||||
|
||||
static void __mcheck_cpu_init_timer(void)
|
||||
{
|
||||
struct timer_list *t = this_cpu_ptr(&mce_timer);
|
||||
unsigned int cpu = smp_processor_id();
|
||||
|
||||
setup_pinned_timer(t, mce_timer_fn, cpu);
|
||||
timer_setup(t, mce_timer_fn, TIMER_PINNED);
|
||||
mce_start_timer(t);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче