diff options
Diffstat (limited to 'arch/ppc64/kernel')
-rw-r--r-- | arch/ppc64/kernel/LparData.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/ppc64/kernel/LparData.c b/arch/ppc64/kernel/LparData.c index 3b9a2600fec2..0ed77b2f7d5f 100644 --- a/arch/ppc64/kernel/LparData.c +++ b/arch/ppc64/kernel/LparData.c | |||
@@ -229,24 +229,16 @@ struct ItVpdAreas itVpdAreas = { | |||
229 | struct msChunks msChunks; | 229 | struct msChunks msChunks; |
230 | EXPORT_SYMBOL(msChunks); | 230 | EXPORT_SYMBOL(msChunks); |
231 | 231 | ||
232 | /* Depending on whether this is called from iSeries or pSeries setup | ||
233 | * code, the location of the msChunks struct may or may not have | ||
234 | * to be reloc'd, so we force the caller to do that for us by passing | ||
235 | * in a pointer to the structure. | ||
236 | */ | ||
237 | unsigned long | 232 | unsigned long |
238 | msChunks_alloc(unsigned long mem, unsigned long num_chunks, unsigned long chunk_size) | 233 | msChunks_alloc(unsigned long mem, unsigned long num_chunks, unsigned long chunk_size) |
239 | { | 234 | { |
240 | unsigned long offset = reloc_offset(); | ||
241 | struct msChunks *_msChunks = PTRRELOC(&msChunks); | ||
242 | |||
243 | _msChunks->num_chunks = num_chunks; | 235 | _msChunks->num_chunks = num_chunks; |
244 | _msChunks->chunk_size = chunk_size; | 236 | _msChunks->chunk_size = chunk_size; |
245 | _msChunks->chunk_shift = __ilog2(chunk_size); | 237 | _msChunks->chunk_shift = __ilog2(chunk_size); |
246 | _msChunks->chunk_mask = (1UL<<_msChunks->chunk_shift)-1; | 238 | _msChunks->chunk_mask = (1UL<<_msChunks->chunk_shift)-1; |
247 | 239 | ||
248 | mem = _ALIGN(mem, sizeof(msChunks_entry)); | 240 | mem = _ALIGN(mem, sizeof(msChunks_entry)); |
249 | _msChunks->abs = (msChunks_entry *)(mem + offset); | 241 | _msChunks->abs = (msChunks_entry *)mem; |
250 | mem += num_chunks * sizeof(msChunks_entry); | 242 | mem += num_chunks * sizeof(msChunks_entry); |
251 | 243 | ||
252 | return mem; | 244 | return mem; |