aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/iSeries_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc64/kernel/iSeries_setup.c')
-rw-r--r--arch/ppc64/kernel/iSeries_setup.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
index 460e7df681a1..e47984ba7c7c 100644
--- a/arch/ppc64/kernel/iSeries_setup.c
+++ b/arch/ppc64/kernel/iSeries_setup.c
@@ -415,6 +415,22 @@ static void __init iSeries_init_early(void)
415 DBG(" <- iSeries_init_early()\n"); 415 DBG(" <- iSeries_init_early()\n");
416} 416}
417 417
418struct msChunks msChunks = {
419 /* XXX We don't use these, but Piranha might need them. */
420 .chunk_size = MSCHUNKS_CHUNK_SIZE,
421 .chunk_shift = MSCHUNKS_CHUNK_SHIFT,
422 .chunk_mask = MSCHUNKS_OFFSET_MASK,
423};
424EXPORT_SYMBOL(msChunks);
425
426void msChunks_alloc(unsigned long num_chunks)
427{
428 klimit = _ALIGN(klimit, sizeof(u32));
429 msChunks.abs = (u32 *)klimit;
430 klimit += num_chunks * sizeof(u32);
431 msChunks.num_chunks = num_chunks;
432}
433
418/* 434/*
419 * The iSeries may have very large memories ( > 128 GB ) and a partition 435 * The iSeries may have very large memories ( > 128 GB ) and a partition
420 * may get memory in "chunks" that may be anywhere in the 2**52 real 436 * may get memory in "chunks" that may be anywhere in the 2**52 real
@@ -452,7 +468,7 @@ static void __init build_iSeries_Memory_Map(void)
452 468
453 /* Chunk size on iSeries is 256K bytes */ 469 /* Chunk size on iSeries is 256K bytes */
454 totalChunks = (u32)HvLpConfig_getMsChunks(); 470 totalChunks = (u32)HvLpConfig_getMsChunks();
455 klimit = msChunks_alloc(klimit, totalChunks, 1UL << 18); 471 msChunks_alloc(totalChunks);
456 472
457 /* 473 /*
458 * Get absolute address of our load area 474 * Get absolute address of our load area
@@ -498,7 +514,7 @@ static void __init build_iSeries_Memory_Map(void)
498 */ 514 */
499 hptFirstChunk = (u32)addr_to_chunk(HvCallHpt_getHptAddress()); 515 hptFirstChunk = (u32)addr_to_chunk(HvCallHpt_getHptAddress());
500 hptSizePages = (u32)HvCallHpt_getHptPages(); 516 hptSizePages = (u32)HvCallHpt_getHptPages();
501 hptSizeChunks = hptSizePages >> (msChunks.chunk_shift - PAGE_SHIFT); 517 hptSizeChunks = hptSizePages >> (MSCHUNKS_CHUNK_SHIFT - PAGE_SHIFT);
502 hptLastChunk = hptFirstChunk + hptSizeChunks - 1; 518 hptLastChunk = hptFirstChunk + hptSizeChunks - 1;
503 519
504 printk("HPT absolute addr = %016lx, size = %dK\n", 520 printk("HPT absolute addr = %016lx, size = %dK\n",