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.
Attached is the patch for this. Please review.
Thanks
-Sachin
Signed-off-by : Sachin Sant <[EMAIL PROTECTED]>
* 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 <[EMAIL PROTECTED]>
---
diff -Naurp a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c
--- a/kexec/arch/ppc64/kexec-ppc64.c 2007-01-29 11:39:02.000000000 +0530
+++ b/kexec/arch/ppc64/kexec-ppc64.c 2007-01-29 11:47:02.000000000 +0530
@@ -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 -Naurp a/kexec/arch/ppc64/kexec-ppc64.h b/kexec/arch/ppc64/kexec-ppc64.h
--- a/kexec/arch/ppc64/kexec-ppc64.h 2007-01-29 11:39:02.000000000 +0530
+++ b/kexec/arch/ppc64/kexec-ppc64.h 2007-01-29 11:43:19.000000000 +0530
@@ -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;
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot