summaryrefslogtreecommitdiff
path: root/kexec/kexec.h
diff options
context:
space:
mode:
authorMagnus Damm <magnus@valinux.co.jp>2007-03-15 17:53:19 +0900
committerSimon Horman <horms@verge.net.au>2007-03-19 13:38:50 +0900
commit78cd98999c9e00c2fe3347d4664c5bdc8dd91497 (patch)
treec07f068fdb9b434ddd24878f59b3bdc58cf9bd62 /kexec/kexec.h
parentbc1eb4e071f864de82474bade25c0273a7fecb6b (diff)
Move memory range variables
Move memory range variables The common kexec code is currently using two global variables to keep track of memory ranges. Other data is kept in a per-instance structure. This mix is of per-instance and global variables is confusing and leads to messy code in general. So let's not. This patch moves the global variables into struct kexec_info and makes sure that structure is passed along where needed. No logic is changed. Signed-off-by: Magnus Damm <magnus@valinux.co.jp> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec.h')
-rw-r--r--kexec/kexec.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 8fd3edb..2b6ff81 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -112,6 +112,8 @@ struct memory_range {
struct kexec_info {
struct kexec_segment *segment;
int nr_segments;
+ struct memory_range *memory_range;
+ int memory_ranges;
void *entry;
struct mem_ehdr rhdr;
unsigned long backup_start;
@@ -124,8 +126,8 @@ struct kexec_info {
void usage(void);
int get_memory_ranges(struct memory_range **range, int *ranges,
unsigned long kexec_flags);
-int valid_memory_range(unsigned long sstart, unsigned long send);
-int valid_memory_segment(struct kexec_segment *segment);
+int valid_memory_range(struct kexec_info *info,
+ unsigned long sstart, unsigned long send);
void print_segments(FILE *file, struct kexec_info *info);
int sort_segments(struct kexec_info *info);
unsigned long locate_hole(struct kexec_info *info,