[PATCH 2/2] sh: On 32bit segments may not be in P2
Simon Horman
horms at verge.net.au
Wed Oct 12 18:44:41 EDT 2011
Cc: Paul Mundt <lethal at linux-sh.org>
Signed-off-by: Simon Horman <horms at verge.net.au>
---
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;
--
1.7.6.3
More information about the kexec
mailing list