summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSachin P. Sant <sachinp@in.ibm.com>2007-01-29 15:10:46 +0530
committerSimon Horman <horms@verge.net.au>2007-01-29 19:10:05 +0900
commit4b94de0aaa7b0fb911a7513f90e5b928799c7c2a (patch)
tree94e196fb8b51dbe959db8c33b721c7c31709228a
parentf8afe9befb4918853b3002725e53ddbbd43cf719 (diff)
ppc64 kexec tools code cleanup.
* PPC64 specific code in kexec tools uses struct exclude_range for storing * information related to exclude regions. This structure is not very different * from struct memory_range. So remove this extra structure and instead use * the memory_range structure. Signed-off-by : Sachin Sant <sachinp@in.ibm.com> Signed-off-by : Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/ppc64/kexec-ppc64.c15
-rw-r--r--kexec/arch/ppc64/kexec-ppc64.h6
2 files changed, 8 insertions, 13 deletions
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
index 5429863..3c6aa69 100644
--- a/kexec/arch/ppc64/kexec-ppc64.c
+++ b/kexec/arch/ppc64/kexec-ppc64.c
@@ -35,7 +35,7 @@
#include "crashdump-ppc64.h"
#include <arch/options.h>
-static struct exclude_range *exclude_range = NULL;
+static struct memory_range *exclude_range = NULL;
static struct memory_range *memory_range = NULL;
static struct memory_range *base_memory_range = NULL;
static unsigned long long rmo_top;
@@ -66,10 +66,9 @@ static void cleanup_memory_ranges()
*/
static int alloc_memory_ranges()
{
- int memory_range_len, exclude_range_len;
+ int memory_range_len;
memory_range_len = sizeof(struct memory_range) * max_memory_ranges;
- exclude_range_len = sizeof(struct exclude_range) * max_memory_ranges;
memory_range = (struct memory_range *) malloc(memory_range_len);
if (!memory_range)
@@ -79,19 +78,19 @@ static int alloc_memory_ranges()
if (!base_memory_range)
goto err1;
- exclude_range = (struct exclude_range *) malloc(exclude_range_len);
+ exclude_range = (struct memory_range *) malloc(memory_range_len);
if (!exclude_range)
goto err1;
- usablemem_rgns.ranges = (struct exclude_range *)
- malloc(exclude_range_len);
+ usablemem_rgns.ranges = (struct memory_range *)
+ malloc(memory_range_len);
if (!(usablemem_rgns.ranges))
goto err1;
memset(memory_range, 0, memory_range_len);
memset(base_memory_range, 0, memory_range_len);
- memset(exclude_range, 0, exclude_range_len);
- memset(usablemem_rgns.ranges, 0, exclude_range_len);
+ memset(exclude_range, 0, memory_range_len);
+ memset(usablemem_rgns.ranges, 0, memory_range_len);
return 0;
err1:
diff --git a/kexec/arch/ppc64/kexec-ppc64.h b/kexec/arch/ppc64/kexec-ppc64.h
index 9776cb1..deef671 100644
--- a/kexec/arch/ppc64/kexec-ppc64.h
+++ b/kexec/arch/ppc64/kexec-ppc64.h
@@ -33,13 +33,9 @@ struct arch_options_t {
int core_header_type;
};
-struct exclude_range {
- unsigned long long start, end;
-};
-
typedef struct mem_rgns {
unsigned int size;
- struct exclude_range *ranges;
+ struct memory_range *ranges;
} mem_rgns_t;
extern mem_rgns_t usablemem_rgns;