diff options
author | Simon Horman <horms@verge.net.au> | 2011-10-11 21:29:33 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-10-11 21:34:07 +0900 |
commit | ec4d31441ed4ea6ab320b63cc1472eda46e70ca2 (patch) | |
tree | 16673bb5506a88bb28a1833b0ffdfdbabdab9807 | |
parent | f68b2fe747eec1ad3cee4b1739787d26dfa82773 (diff) |
sh: On 32bit segments may not be in P2
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/sh/kexec-sh.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kexec/arch/sh/kexec-sh.c b/kexec/arch/sh/kexec-sh.c index a397d08..7710fdf 100644 --- a/kexec/arch/sh/kexec-sh.c +++ b/kexec/arch/sh/kexec-sh.c @@ -219,13 +219,15 @@ unsigned long virt_to_phys(unsigned long addr) { unsigned long seg = addr & 0xe0000000; unsigned long long start = 0; + int have_32bit = is_32bit(); - if (seg != 0x80000000 && seg != 0xc0000000) - die("Virtual address %p is not in P1 or P2\n", (void *)addr); + if (seg != 0x80000000 && (have_32bit || seg != 0xc0000000)) + die("Virtual address %p is not in P1%s\n", (void *)addr, + have_32bit ? "" : " or P2"); /* If 32bit addressing is used then the base of system RAM * is an offset into physical memory. */ - if (is_32bit()) { + if (have_32bit) { unsigned long long end; int ret; |