kernel_optimize_test/arch/ia64
Simon Horman 85a0ee342e kdump: add is_vmcore_usable() and vmcore_unusable()
The usage of elfcorehdr_addr has changed recently such that being set to
ELFCORE_ADDR_MAX is used by is_kdump_kernel() to indicate if the code is
executing in a kernel executed as a crash kernel.

However, arch/ia64/kernel/setup.c:reserve_elfcorehdr will rest
elfcorehdr_addr to ELFCORE_ADDR_MAX on error, which means any subsequent
calls to is_kdump_kernel() will return 0, even though they should return
1.

Ok, at this point in time there are no subsequent calls, but I think its
fair to say that there is ample scope for error or at the very least
confusion.

This patch add an extra state, ELFCORE_ADDR_ERR, which indicates that
elfcorehdr_addr was passed on the command line, and thus execution is
taking place in a crashdump kernel, but vmcore can't be used for some
reason.  This is tested for using is_vmcore_usable() and set using
vmcore_unusable().  A subsequent patch makes use of this new code.

To summarise, the states that elfcorehdr_addr can now be in are as follows:

ELFCORE_ADDR_MAX: not a crashdump kernel
ELFCORE_ADDR_ERR: crashdump kernel but vmcore is unusable
any other value:  crash dump kernel and vmcore is usable

Signed-off-by: Simon Horman <horms@verge.net.au>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:40 -07:00
..
configs [IA64] Remove sn2_defconfig. 2008-08-18 15:33:40 -07:00
dig
hp kdump: use is_kdump_kernel() in sba_init() 2008-10-20 08:52:40 -07:00
ia32 Merge branch 'personality' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-10-16 12:32:52 -07:00
include/asm Merge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-10-16 15:36:00 -07:00
kernel kdump: add is_vmcore_usable() and vmcore_unusable() 2008-10-20 08:52:40 -07:00
kvm KVM: ia64: Add intel iommu support for guests. 2008-10-15 14:25:39 +02:00
lib
mm mm: cleanup to make remove_memory() arch-neutral 2008-10-20 08:50:25 -07:00
oprofile
pci [IA64] pci_acpi_scan_root cleanup 2008-08-18 15:41:21 -07:00
scripts
sn [IA64] arch/ia64/sn/pci/tioca_provider.c: introduce missing kfree 2008-09-10 10:49:36 -07:00
uv [IA64] Fix CONFIG_IA64_SGI_UV build error 2008-06-16 09:02:03 -07:00
install.sh
Kconfig container freezer: implement freezer cgroup subsystem 2008-10-20 08:52:34 -07:00
Kconfig.debug
Makefile Pull pvops into release branch 2008-07-17 10:53:37 -07:00
module.lds