diff options
author | Mika Westerberg <ext-mika.1.westerberg@nokia.com> | 2010-05-05 09:58:32 +0300 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2010-05-19 09:45:04 +0900 |
commit | 7429f91acaba453c819cc22b364a5f1339a275fd (patch) | |
tree | d27c78291c18a3e57e7ee09dab6aa991656d62ae /kexec/crashdump-elf.c | |
parent | 992971824134441065c29f475153a4c142696102 (diff) |
kexec: introduce phys_to_virt() function
This function is used by ELF crashdump code which prepares crash memory headers
for the dump capture kernel. Most architecture can use default version which
just adds PAGE_OFFSET to the virtual address but some architectures might need
some special handling.
Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/crashdump-elf.c')
-rw-r--r-- | kexec/crashdump-elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c index 6bcef8d..f000e42 100644 --- a/kexec/crashdump-elf.c +++ b/kexec/crashdump-elf.c @@ -236,7 +236,7 @@ int FUNC(struct kexec_info *info, * memory region. */ phdr->p_paddr = mstart; - phdr->p_vaddr = mstart + elf_info->page_offset; + phdr->p_vaddr = phys_to_virt(elf_info, mstart); phdr->p_filesz = phdr->p_memsz = mend - mstart + 1; /* Do we need any alignment of segments? */ phdr->p_align = 0; |