diff options
-rw-r--r-- | arch/ppc64/kernel/head.S | 4 | ||||
-rw-r--r-- | arch/ppc64/kernel/iSeries_setup.c | 17 | ||||
-rw-r--r-- | include/asm-ppc64/abs_addr.h | 15 |
3 files changed, 18 insertions, 18 deletions
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index a0ff707d6fea..cccec4902646 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S | |||
@@ -96,12 +96,12 @@ END_FTR_SECTION(0, 1) | |||
96 | .llong hvReleaseData-KERNELBASE | 96 | .llong hvReleaseData-KERNELBASE |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * At offset 0x28 and 0x30 are offsets to the msChunks | 99 | * At offset 0x28 and 0x30 are offsets to the mschunks_map |
100 | * array (used by the iSeries LPAR debugger to do translation | 100 | * array (used by the iSeries LPAR debugger to do translation |
101 | * between physical addresses and absolute addresses) and | 101 | * between physical addresses and absolute addresses) and |
102 | * to the pidhash table (also used by the debugger) | 102 | * to the pidhash table (also used by the debugger) |
103 | */ | 103 | */ |
104 | .llong msChunks-KERNELBASE | 104 | .llong mschunks_map-KERNELBASE |
105 | .llong 0 /* pidhash-KERNELBASE SFRXXX */ | 105 | .llong 0 /* pidhash-KERNELBASE SFRXXX */ |
106 | 106 | ||
107 | /* Offset 0x38 - Pointer to start of embedded System.map */ | 107 | /* Offset 0x38 - Pointer to start of embedded System.map */ |
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c index e47984ba7c7c..b384a6ad0a57 100644 --- a/arch/ppc64/kernel/iSeries_setup.c +++ b/arch/ppc64/kernel/iSeries_setup.c | |||
@@ -415,20 +415,20 @@ static void __init iSeries_init_early(void) | |||
415 | DBG(" <- iSeries_init_early()\n"); | 415 | DBG(" <- iSeries_init_early()\n"); |
416 | } | 416 | } |
417 | 417 | ||
418 | struct msChunks msChunks = { | 418 | struct mschunks_map mschunks_map = { |
419 | /* XXX We don't use these, but Piranha might need them. */ | 419 | /* XXX We don't use these, but Piranha might need them. */ |
420 | .chunk_size = MSCHUNKS_CHUNK_SIZE, | 420 | .chunk_size = MSCHUNKS_CHUNK_SIZE, |
421 | .chunk_shift = MSCHUNKS_CHUNK_SHIFT, | 421 | .chunk_shift = MSCHUNKS_CHUNK_SHIFT, |
422 | .chunk_mask = MSCHUNKS_OFFSET_MASK, | 422 | .chunk_mask = MSCHUNKS_OFFSET_MASK, |
423 | }; | 423 | }; |
424 | EXPORT_SYMBOL(msChunks); | 424 | EXPORT_SYMBOL(mschunks_map); |
425 | 425 | ||
426 | void msChunks_alloc(unsigned long num_chunks) | 426 | void mschunks_alloc(unsigned long num_chunks) |
427 | { | 427 | { |
428 | klimit = _ALIGN(klimit, sizeof(u32)); | 428 | klimit = _ALIGN(klimit, sizeof(u32)); |
429 | msChunks.abs = (u32 *)klimit; | 429 | mschunks_map.mapping = (u32 *)klimit; |
430 | klimit += num_chunks * sizeof(u32); | 430 | klimit += num_chunks * sizeof(u32); |
431 | msChunks.num_chunks = num_chunks; | 431 | mschunks_map.num_chunks = num_chunks; |
432 | } | 432 | } |
433 | 433 | ||
434 | /* | 434 | /* |
@@ -468,7 +468,7 @@ static void __init build_iSeries_Memory_Map(void) | |||
468 | 468 | ||
469 | /* Chunk size on iSeries is 256K bytes */ | 469 | /* Chunk size on iSeries is 256K bytes */ |
470 | totalChunks = (u32)HvLpConfig_getMsChunks(); | 470 | totalChunks = (u32)HvLpConfig_getMsChunks(); |
471 | msChunks_alloc(totalChunks); | 471 | mschunks_alloc(totalChunks); |
472 | 472 | ||
473 | /* | 473 | /* |
474 | * Get absolute address of our load area | 474 | * Get absolute address of our load area |
@@ -505,7 +505,7 @@ static void __init build_iSeries_Memory_Map(void) | |||
505 | printk("Load area size %dK\n", loadAreaSize * 256); | 505 | printk("Load area size %dK\n", loadAreaSize * 256); |
506 | 506 | ||
507 | for (nextPhysChunk = 0; nextPhysChunk < loadAreaSize; ++nextPhysChunk) | 507 | for (nextPhysChunk = 0; nextPhysChunk < loadAreaSize; ++nextPhysChunk) |
508 | msChunks.abs[nextPhysChunk] = | 508 | mschunks_map.mapping[nextPhysChunk] = |
509 | loadAreaFirstChunk + nextPhysChunk; | 509 | loadAreaFirstChunk + nextPhysChunk; |
510 | 510 | ||
511 | /* | 511 | /* |
@@ -571,7 +571,8 @@ static void __init build_iSeries_Memory_Map(void) | |||
571 | (absChunk > hptLastChunk)) && | 571 | (absChunk > hptLastChunk)) && |
572 | ((absChunk < loadAreaFirstChunk) || | 572 | ((absChunk < loadAreaFirstChunk) || |
573 | (absChunk > loadAreaLastChunk))) { | 573 | (absChunk > loadAreaLastChunk))) { |
574 | msChunks.abs[nextPhysChunk] = absChunk; | 574 | mschunks_map.mapping[nextPhysChunk] = |
575 | absChunk; | ||
575 | ++nextPhysChunk; | 576 | ++nextPhysChunk; |
576 | } | 577 | } |
577 | } | 578 | } |
diff --git a/include/asm-ppc64/abs_addr.h b/include/asm-ppc64/abs_addr.h index 2276567f133a..05414a9bfdd1 100644 --- a/include/asm-ppc64/abs_addr.h +++ b/include/asm-ppc64/abs_addr.h | |||
@@ -17,18 +17,17 @@ | |||
17 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
18 | #include <asm/lmb.h> | 18 | #include <asm/lmb.h> |
19 | 19 | ||
20 | struct msChunks { | 20 | #ifdef CONFIG_MSCHUNKS |
21 | |||
22 | struct mschunks_map { | ||
21 | unsigned long num_chunks; | 23 | unsigned long num_chunks; |
22 | unsigned long chunk_size; | 24 | unsigned long chunk_size; |
23 | unsigned long chunk_shift; | 25 | unsigned long chunk_shift; |
24 | unsigned long chunk_mask; | 26 | unsigned long chunk_mask; |
25 | u32 *abs; | 27 | u32 *mapping; |
26 | }; | 28 | }; |
27 | 29 | ||
28 | extern struct msChunks msChunks; | 30 | extern struct mschunks_map mschunks_map; |
29 | |||
30 | |||
31 | #ifdef CONFIG_MSCHUNKS | ||
32 | 31 | ||
33 | /* Chunks are 256 KB */ | 32 | /* Chunks are 256 KB */ |
34 | #define MSCHUNKS_CHUNK_SHIFT (18) | 33 | #define MSCHUNKS_CHUNK_SHIFT (18) |
@@ -52,10 +51,10 @@ static inline unsigned long chunk_offset(unsigned long addr) | |||
52 | 51 | ||
53 | static inline unsigned long abs_chunk(unsigned long pchunk) | 52 | static inline unsigned long abs_chunk(unsigned long pchunk) |
54 | { | 53 | { |
55 | if (pchunk >= msChunks.num_chunks) | 54 | if (pchunk >= mschunks_map.num_chunks) |
56 | return pchunk; | 55 | return pchunk; |
57 | 56 | ||
58 | return msChunks.abs[pchunk]; | 57 | return mschunks_map.mapping[pchunk]; |
59 | } | 58 | } |
60 | 59 | ||
61 | /* A macro so it can take pointers or unsigned long. */ | 60 | /* A macro so it can take pointers or unsigned long. */ |