kexec: add bit definitions for kimage entry flags
authorGeoff Levand <geoff@infradead.org>
Tue, 17 Feb 2015 21:45:56 +0000 (13:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 17 Feb 2015 22:34:51 +0000 (14:34 -0800)
commitcf2df6396ba78014289f322839a5cc785f09e1fd
treea1bf11c8e60c52cab03987c41caaf987fb074421
parent518a0c716377e5f2c6d22957a5937ec5f328ead1
kexec: add bit definitions for kimage entry flags

Define new kexec preprocessor macros IND_*_BIT that define the bit
position of the kimage entry flags.  Change the existing IND_* flag macros
to be defined as bit shifts of the corresponding IND_*_BIT macros.  Also
wrap all C language code in kexec.h with #if !defined(__ASSEMBLY__) so
assembly files can include kexec.h to get the IND_* and IND_*_BIT macros.

Some CPU instruction sets have tests for bit position which are convenient
in implementing routines that operate on the kimage entry list.  The
addition of these bit position macros in a common location will avoid
duplicate definitions and the chance that changes to the IND_* flags will
not be propagated to assembly files.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Maximilian Attems <max@stro.at>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/kexec.h