aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/LparData.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-08-03 06:21:23 -0400
committerPaul Mackerras <paulus@samba.org>2005-08-28 20:53:35 -0400
commit34c8f6961fc601294a38c5bd5ca12131b2e52674 (patch)
tree98035e5581a0addfca935fa2d8afddfc7c56c631 /arch/ppc64/kernel/LparData.c
parent38e85dc18036804ada8698951cfad4e6114fec1b (diff)
[PATCH] ppc64: msChunks cleanups
Chunks are 256KB, so use constants for the size/shift/mask, rather than getting them from the msChunks struct. The iSeries debugger (??) might still need access to the values in the msChunks struct, so we keep them around for now, but set them from the constant values. Replace msChunks_entry typedef with regular u32. Simplify msChunks_alloc() to manipulate klimit directly, rather than via a parameter. Move msChunks_alloc() and msChunks into iSeries_setup.c, as that's where they're used. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/LparData.c')
-rw-r--r--arch/ppc64/kernel/LparData.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/ppc64/kernel/LparData.c b/arch/ppc64/kernel/LparData.c
index 0ed77b2f7d5f..0a9c23ca2f0c 100644
--- a/arch/ppc64/kernel/LparData.c
+++ b/arch/ppc64/kernel/LparData.c
@@ -225,21 +225,3 @@ struct ItVpdAreas itVpdAreas = {
225 0,0 225 0,0
226 } 226 }
227}; 227};
228
229struct msChunks msChunks;
230EXPORT_SYMBOL(msChunks);
231
232unsigned long
233msChunks_alloc(unsigned long mem, unsigned long num_chunks, unsigned long chunk_size)
234{
235 _msChunks->num_chunks = num_chunks;
236 _msChunks->chunk_size = chunk_size;
237 _msChunks->chunk_shift = __ilog2(chunk_size);
238 _msChunks->chunk_mask = (1UL<<_msChunks->chunk_shift)-1;
239
240 mem = _ALIGN(mem, sizeof(msChunks_entry));
241 _msChunks->abs = (msChunks_entry *)mem;
242 mem += num_chunks * sizeof(msChunks_entry);
243
244 return mem;
245}