diff options
author | Simon Horman <horms@verge.net.au> | 2008-03-06 18:22:32 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-03-06 18:50:46 +0900 |
commit | 7513645154273c6e1a8678c17b37c5f3fad2b490 (patch) | |
tree | ffdf0321196671131161b7daf26de58fa8d16b69 /kexec/kexec.h | |
parent | 8eeb3f9cdab8ffc9c576f9258df9a74f218ba1dc (diff) |
kexec-tools: mipsel: Remove #ifdef __MIPSEL__ from kexec/kexec.c
On all architectures except mipsel add_buffer() expects
add_segment() to work with the virtual address passed.
On mipsel it is expected that add_segment() converts
the virtual address to a physical address first.
add_buffer_virt() is porvided on mipsel for the handful
of cases that don't want the address to be converted.
This patch maintains that behaviour, but without the need for #ifdef
__MIPSEL__ from kexec/kexec.c and much duplicated code.
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec.h')
-rw-r--r-- | kexec/kexec.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kexec/kexec.h b/kexec/kexec.h index 3ae605e..9649ec7 100644 --- a/kexec/kexec.h +++ b/kexec/kexec.h @@ -188,12 +188,24 @@ extern void *xrealloc(void *ptr, size_t size); extern char *slurp_file(const char *filename, off_t *r_size); extern char *slurp_file_len(const char *filename, off_t size); extern char *slurp_decompress_file(const char *filename, off_t *r_size); +extern unsigned long virt_to_phys(unsigned long addr); extern void add_segment(struct kexec_info *info, const void *buf, size_t bufsz, unsigned long base, size_t memsz); +extern void add_segment_phys_virt(struct kexec_info *info, + const void *buf, size_t bufsz, unsigned long base, size_t memsz, + int phys); extern unsigned long add_buffer(struct kexec_info *info, const void *buf, unsigned long bufsz, unsigned long memsz, unsigned long buf_align, unsigned long buf_min, unsigned long buf_max, int buf_end); +extern unsigned long add_buffer_virt(struct kexec_info *info, + const void *buf, unsigned long bufsz, unsigned long memsz, + unsigned long buf_align, unsigned long buf_min, unsigned long buf_max, + int buf_end); +extern unsigned long add_buffer_phys_virt(struct kexec_info *info, + const void *buf, unsigned long bufsz, unsigned long memsz, + unsigned long buf_align, unsigned long buf_min, unsigned long buf_max, + int buf_end, int phys); extern unsigned char purgatory[]; extern size_t purgatory_size; |