From: Matthew McClintock <msm@freescale.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Kumar Gala <kumar.gala@freescale.com>,
Milton Miller <miltonm@bga.com>,
Matthew McClintock <msm@freescale.com>
Subject: [PATCH 1/2] powerpc/crashdump: Fix issues with kexec and 36bit physical addr
Date: Fri, 9 Jul 2010 00:37:59 -0500 [thread overview]
Message-ID: <1278653879-27093-1-git-send-email-msm@freescale.com> (raw)
In-Reply-To: <20100708-mitltonm-msm-reply@mdm.bga.com>
Fix sizes of variables so correct values are exported via /proc.
Cast variable in comparison to avoid compiler error.
Signed-off-by: Matthew McClintock <msm@freescale.com>
---
arch/powerpc/kernel/crash_dump.c | 4 ++--
arch/powerpc/kernel/machine_kexec.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 5fb667a..d254132 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -128,9 +128,9 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
if (!csize)
return 0;
- csize = min(csize, PAGE_SIZE);
+ csize = min_t(size_t, csize, PAGE_SIZE);
- if (pfn < max_pfn) {
+ if ((min_low_pfn < pfn) && (pfn < max_pfn)) {
vaddr = __va(pfn << PAGE_SHIFT);
csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf);
} else {
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index bb3d893..6ff15f0 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -144,24 +144,24 @@ int overlaps_crashkernel(unsigned long start, unsigned long size)
}
/* Values we need to export to the second kernel via the device tree. */
-static unsigned long kernel_end;
-static unsigned long crashk_size;
+static phys_addr_t kernel_end;
+static phys_addr_t crashk_size;
static struct property kernel_end_prop = {
.name = "linux,kernel-end",
- .length = sizeof(unsigned long),
+ .length = sizeof(phys_addr_t),
.value = &kernel_end,
};
static struct property crashk_base_prop = {
.name = "linux,crashkernel-base",
- .length = sizeof(unsigned long),
+ .length = sizeof(phys_addr_t),
.value = &crashk_res.start,
};
static struct property crashk_size_prop = {
.name = "linux,crashkernel-size",
- .length = sizeof(unsigned long),
+ .length = sizeof(phys_addr_t),
.value = &crashk_size,
};
--
1.6.6.1
prev parent reply other threads:[~2010-07-09 5:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 20:51 [PATCH 1/2] powerpc/crashdump: Fix issues with kexec and 36bit physical addr Matthew McClintock
2010-07-07 20:51 ` [PATCH 2/2] powerpc/booke: Enable building of a crash dump kernel Matthew McClintock
2010-07-08 9:07 ` [1/2] powerpc/crashdump: Fix issues with kexec and 36bit physical addr Milton Miller
2010-07-08 10:49 ` Benjamin Herrenschmidt
2010-07-08 12:40 ` Kumar Gala
2010-07-09 1:30 ` Benjamin Herrenschmidt
2010-07-08 14:27 ` Matthew McClintock
2010-07-09 5:37 ` Matthew McClintock [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278653879-27093-1-git-send-email-msm@freescale.com \
--to=msm@freescale.com \
--cc=kumar.gala@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=miltonm@bga.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).