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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux