kexec/kdump: Use generic elf code on ia64
horms at verge.net.au
Wed Apr 25 21:52:36 EDT 2007
On Wed, Apr 25, 2007 at 06:09:05PM +0900, Simon Horman wrote:
> Make use of the generic implementation of crash_save_cpu().
> On ia64 the registers are saved by a kdump-specific function
> ia64_dump_cpu_regs() rather than elf_core_copy_regs() which
> is used by other architectures via crash_save_cpu(). It seems
> that ia64_dump_cpu_regs() and elf_core_copy_regs() are indeed
> quite different
> In order to facilitate this kdump_elf_core_copy_regs()
> has been created, and it is called by crash_save_cpu().
> By default kdump_elf_core_copy_regs() is just defined to be
> elf_core_copy_regs() and ia64 defines its own implementation,
> which calls ia64_dump_cpu_regs(). The ia64 version also sets
> register 47 in accordance with the code that it replaces.
> crash_save_cpu() has also been modifued to use a pre-alocated,
> per-cpu variable for saving the cpu registers, as per the
> IA64 specific code that this patch removes. This is
> in order to reduce possible stack contention at crash-time.
There are a couple of areas of the kexec code that allocate
per-cpu variables either staticly or at boot time. I wonder
if a more lazy approach of initialising them when they are first
accessed would be better. I am thinking of cases such as this one
where the first access will occur at kexec load time, so there
shouldn't be any chance of contention occuring at the time when
kexec executes the new kernel, or in the case of kdump, crash-time.
More information about the kexec