Re: [PATCH 1/23] Make register values available to panic notifiers

From: David Howells
Date: Mon Apr 12 2010 - 07:16:56 EST


David VomLehn <dvomlehn@xxxxxxxxx> wrote:

> +NORET_TYPE void panic(const char *fmt, ...)
> +{
> + va_list args;
> + const struct pt_regs *regs;
> + int i;
> +
> + preempt_disable();
> + bust_spinlocks(1);
> + regs = save_ptregs(&__get_cpu_var(panic_panic_regs));
> + va_start(args, fmt);
> + vpanic_with_regs(regs, fmt, args);
> + /* Since vpanic_with_regs doesn't return, we skip va_end() */
> + /* Infinite loop so compiler doesn't complain about this returning */
> + for (i = 0; ; )
> + mdelay(1);
> +}

Can the use of va_start() clobber lots of registers, thereby rendering the
exercise pointless on some arches?

Also, can the save_ptregs() function be out of line asm? The FRV constructed
inline statement is huge (and wrong).

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/