Commit 56e97b71 authored by Michael Ellerman's avatar Michael Ellerman Committed by Paul Mackerras

[PATCH] ppc64: Rename msChunks structure

Rename the msChunks struct to get rid of the StUdlY caps and make it a bit
clearer what it's for.
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 34c8f696
...@@ -96,12 +96,12 @@ END_FTR_SECTION(0, 1) ...@@ -96,12 +96,12 @@ END_FTR_SECTION(0, 1)
.llong hvReleaseData-KERNELBASE .llong hvReleaseData-KERNELBASE
/* /*
* At offset 0x28 and 0x30 are offsets to the msChunks * At offset 0x28 and 0x30 are offsets to the mschunks_map
* array (used by the iSeries LPAR debugger to do translation * array (used by the iSeries LPAR debugger to do translation
* between physical addresses and absolute addresses) and * between physical addresses and absolute addresses) and
* to the pidhash table (also used by the debugger) * to the pidhash table (also used by the debugger)
*/ */
.llong msChunks-KERNELBASE .llong mschunks_map-KERNELBASE
.llong 0 /* pidhash-KERNELBASE SFRXXX */ .llong 0 /* pidhash-KERNELBASE SFRXXX */
/* Offset 0x38 - Pointer to start of embedded System.map */ /* Offset 0x38 - Pointer to start of embedded System.map */
......
...@@ -415,20 +415,20 @@ static void __init iSeries_init_early(void) ...@@ -415,20 +415,20 @@ static void __init iSeries_init_early(void)
DBG(" <- iSeries_init_early()\n"); DBG(" <- iSeries_init_early()\n");
} }
struct msChunks msChunks = { struct mschunks_map mschunks_map = {
/* XXX We don't use these, but Piranha might need them. */ /* XXX We don't use these, but Piranha might need them. */
.chunk_size = MSCHUNKS_CHUNK_SIZE, .chunk_size = MSCHUNKS_CHUNK_SIZE,
.chunk_shift = MSCHUNKS_CHUNK_SHIFT, .chunk_shift = MSCHUNKS_CHUNK_SHIFT,
.chunk_mask = MSCHUNKS_OFFSET_MASK, .chunk_mask = MSCHUNKS_OFFSET_MASK,
}; };
EXPORT_SYMBOL(msChunks); EXPORT_SYMBOL(mschunks_map);
void msChunks_alloc(unsigned long num_chunks) void mschunks_alloc(unsigned long num_chunks)
{ {
klimit = _ALIGN(klimit, sizeof(u32)); klimit = _ALIGN(klimit, sizeof(u32));
msChunks.abs = (u32 *)klimit; mschunks_map.mapping = (u32 *)klimit;
klimit += num_chunks * sizeof(u32); klimit += num_chunks * sizeof(u32);
msChunks.num_chunks = num_chunks; mschunks_map.num_chunks = num_chunks;
} }
/* /*
...@@ -468,7 +468,7 @@ static void __init build_iSeries_Memory_Map(void) ...@@ -468,7 +468,7 @@ static void __init build_iSeries_Memory_Map(void)
/* Chunk size on iSeries is 256K bytes */ /* Chunk size on iSeries is 256K bytes */
totalChunks = (u32)HvLpConfig_getMsChunks(); totalChunks = (u32)HvLpConfig_getMsChunks();
msChunks_alloc(totalChunks); mschunks_alloc(totalChunks);
/* /*
* Get absolute address of our load area * Get absolute address of our load area
...@@ -505,7 +505,7 @@ static void __init build_iSeries_Memory_Map(void) ...@@ -505,7 +505,7 @@ static void __init build_iSeries_Memory_Map(void)
printk("Load area size %dK\n", loadAreaSize * 256); printk("Load area size %dK\n", loadAreaSize * 256);
for (nextPhysChunk = 0; nextPhysChunk < loadAreaSize; ++nextPhysChunk) for (nextPhysChunk = 0; nextPhysChunk < loadAreaSize; ++nextPhysChunk)
msChunks.abs[nextPhysChunk] = mschunks_map.mapping[nextPhysChunk] =
loadAreaFirstChunk + nextPhysChunk; loadAreaFirstChunk + nextPhysChunk;
/* /*
...@@ -571,7 +571,8 @@ static void __init build_iSeries_Memory_Map(void) ...@@ -571,7 +571,8 @@ static void __init build_iSeries_Memory_Map(void)
(absChunk > hptLastChunk)) && (absChunk > hptLastChunk)) &&
((absChunk < loadAreaFirstChunk) || ((absChunk < loadAreaFirstChunk) ||
(absChunk > loadAreaLastChunk))) { (absChunk > loadAreaLastChunk))) {
msChunks.abs[nextPhysChunk] = absChunk; mschunks_map.mapping[nextPhysChunk] =
absChunk;
++nextPhysChunk; ++nextPhysChunk;
} }
} }
......
...@@ -17,18 +17,17 @@ ...@@ -17,18 +17,17 @@
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/lmb.h> #include <asm/lmb.h>
struct msChunks { #ifdef CONFIG_MSCHUNKS
struct mschunks_map {
unsigned long num_chunks; unsigned long num_chunks;
unsigned long chunk_size; unsigned long chunk_size;
unsigned long chunk_shift; unsigned long chunk_shift;
unsigned long chunk_mask; unsigned long chunk_mask;
u32 *abs; u32 *mapping;
}; };
extern struct msChunks msChunks; extern struct mschunks_map mschunks_map;
#ifdef CONFIG_MSCHUNKS
/* Chunks are 256 KB */ /* Chunks are 256 KB */
#define MSCHUNKS_CHUNK_SHIFT (18) #define MSCHUNKS_CHUNK_SHIFT (18)
...@@ -52,10 +51,10 @@ static inline unsigned long chunk_offset(unsigned long addr) ...@@ -52,10 +51,10 @@ static inline unsigned long chunk_offset(unsigned long addr)
static inline unsigned long abs_chunk(unsigned long pchunk) static inline unsigned long abs_chunk(unsigned long pchunk)
{ {
if (pchunk >= msChunks.num_chunks) if (pchunk >= mschunks_map.num_chunks)
return pchunk; return pchunk;
return msChunks.abs[pchunk]; return mschunks_map.mapping[pchunk];
} }
/* A macro so it can take pointers or unsigned long. */ /* A macro so it can take pointers or unsigned long. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment