diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-08-03 06:21:26 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-08-28 20:53:37 -0400 |
commit | 180379dcefb39e8bd05d562b0685e9084dffcc0a (patch) | |
tree | d4a3f2bec69481d3f21903b5bee7c2d1a5e86c16 /arch/ppc64/mm | |
parent | e88bcd1b29f63738b702e57d831758706162347e (diff) |
[PATCH] ppc64: Remove physbase from the lmb_property struct
We no longer need the lmb code to know about abs and phys addresses, so
remove the physbase variable from the lmb_property struct.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/mm')
-rw-r--r-- | arch/ppc64/mm/hash_utils.c | 2 | ||||
-rw-r--r-- | arch/ppc64/mm/init.c | 27 | ||||
-rw-r--r-- | arch/ppc64/mm/numa.c | 2 |
3 files changed, 14 insertions, 17 deletions
diff --git a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c index 65d6e852794..09475c8edf7 100644 --- a/arch/ppc64/mm/hash_utils.c +++ b/arch/ppc64/mm/hash_utils.c | |||
@@ -210,7 +210,7 @@ void __init htab_initialize(void) | |||
210 | 210 | ||
211 | /* create bolted the linear mapping in the hash table */ | 211 | /* create bolted the linear mapping in the hash table */ |
212 | for (i=0; i < lmb.memory.cnt; i++) { | 212 | for (i=0; i < lmb.memory.cnt; i++) { |
213 | base = lmb.memory.region[i].physbase + KERNELBASE; | 213 | base = lmb.memory.region[i].base + KERNELBASE; |
214 | size = lmb.memory.region[i].size; | 214 | size = lmb.memory.region[i].size; |
215 | 215 | ||
216 | DBG("creating mapping for region: %lx : %lx\n", base, size); | 216 | DBG("creating mapping for region: %lx : %lx\n", base, size); |
diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c index a16cf12c586..c02dc9809ca 100644 --- a/arch/ppc64/mm/init.c +++ b/arch/ppc64/mm/init.c | |||
@@ -482,9 +482,9 @@ void __init mm_init_ppc64(void) | |||
482 | for (i = 1; i < lmb.memory.cnt; i++) { | 482 | for (i = 1; i < lmb.memory.cnt; i++) { |
483 | unsigned long base, prevbase, prevsize; | 483 | unsigned long base, prevbase, prevsize; |
484 | 484 | ||
485 | prevbase = lmb.memory.region[i-1].physbase; | 485 | prevbase = lmb.memory.region[i-1].base; |
486 | prevsize = lmb.memory.region[i-1].size; | 486 | prevsize = lmb.memory.region[i-1].size; |
487 | base = lmb.memory.region[i].physbase; | 487 | base = lmb.memory.region[i].base; |
488 | if (base > (prevbase + prevsize)) { | 488 | if (base > (prevbase + prevsize)) { |
489 | io_hole_start = prevbase + prevsize; | 489 | io_hole_start = prevbase + prevsize; |
490 | io_hole_size = base - (prevbase + prevsize); | 490 | io_hole_size = base - (prevbase + prevsize); |
@@ -511,11 +511,8 @@ int page_is_ram(unsigned long pfn) | |||
511 | for (i=0; i < lmb.memory.cnt; i++) { | 511 | for (i=0; i < lmb.memory.cnt; i++) { |
512 | unsigned long base; | 512 | unsigned long base; |
513 | 513 | ||
514 | #ifdef CONFIG_MSCHUNKS | ||
515 | base = lmb.memory.region[i].physbase; | ||
516 | #else | ||
517 | base = lmb.memory.region[i].base; | 514 | base = lmb.memory.region[i].base; |
518 | #endif | 515 | |
519 | if ((paddr >= base) && | 516 | if ((paddr >= base) && |
520 | (paddr < (base + lmb.memory.region[i].size))) { | 517 | (paddr < (base + lmb.memory.region[i].size))) { |
521 | return 1; | 518 | return 1; |
@@ -556,25 +553,25 @@ void __init do_init_bootmem(void) | |||
556 | * present. | 553 | * present. |
557 | */ | 554 | */ |
558 | for (i=0; i < lmb.memory.cnt; i++) { | 555 | for (i=0; i < lmb.memory.cnt; i++) { |
559 | unsigned long physbase, size; | 556 | unsigned long base, size; |
560 | unsigned long start_pfn, end_pfn; | 557 | unsigned long start_pfn, end_pfn; |
561 | 558 | ||
562 | physbase = lmb.memory.region[i].physbase; | 559 | base = lmb.memory.region[i].base; |
563 | size = lmb.memory.region[i].size; | 560 | size = lmb.memory.region[i].size; |
564 | 561 | ||
565 | start_pfn = physbase >> PAGE_SHIFT; | 562 | start_pfn = base >> PAGE_SHIFT; |
566 | end_pfn = start_pfn + (size >> PAGE_SHIFT); | 563 | end_pfn = start_pfn + (size >> PAGE_SHIFT); |
567 | memory_present(0, start_pfn, end_pfn); | 564 | memory_present(0, start_pfn, end_pfn); |
568 | 565 | ||
569 | free_bootmem(physbase, size); | 566 | free_bootmem(base, size); |
570 | } | 567 | } |
571 | 568 | ||
572 | /* reserve the sections we're already using */ | 569 | /* reserve the sections we're already using */ |
573 | for (i=0; i < lmb.reserved.cnt; i++) { | 570 | for (i=0; i < lmb.reserved.cnt; i++) { |
574 | unsigned long physbase = lmb.reserved.region[i].physbase; | 571 | unsigned long base = lmb.reserved.region[i].base; |
575 | unsigned long size = lmb.reserved.region[i].size; | 572 | unsigned long size = lmb.reserved.region[i].size; |
576 | 573 | ||
577 | reserve_bootmem(physbase, size); | 574 | reserve_bootmem(base, size); |
578 | } | 575 | } |
579 | } | 576 | } |
580 | 577 | ||
@@ -613,10 +610,10 @@ static int __init setup_kcore(void) | |||
613 | int i; | 610 | int i; |
614 | 611 | ||
615 | for (i=0; i < lmb.memory.cnt; i++) { | 612 | for (i=0; i < lmb.memory.cnt; i++) { |
616 | unsigned long physbase, size; | 613 | unsigned long base, size; |
617 | struct kcore_list *kcore_mem; | 614 | struct kcore_list *kcore_mem; |
618 | 615 | ||
619 | physbase = lmb.memory.region[i].physbase; | 616 | base = lmb.memory.region[i].base; |
620 | size = lmb.memory.region[i].size; | 617 | size = lmb.memory.region[i].size; |
621 | 618 | ||
622 | /* GFP_ATOMIC to avoid might_sleep warnings during boot */ | 619 | /* GFP_ATOMIC to avoid might_sleep warnings during boot */ |
@@ -624,7 +621,7 @@ static int __init setup_kcore(void) | |||
624 | if (!kcore_mem) | 621 | if (!kcore_mem) |
625 | panic("mem_init: kmalloc failed\n"); | 622 | panic("mem_init: kmalloc failed\n"); |
626 | 623 | ||
627 | kclist_add(kcore_mem, __va(physbase), size); | 624 | kclist_add(kcore_mem, __va(base), size); |
628 | } | 625 | } |
629 | 626 | ||
630 | kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START); | 627 | kclist_add(&kcore_vmem, (void *)VMALLOC_START, VMALLOC_END-VMALLOC_START); |
diff --git a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c index 0b191f2de01..c3116f0d788 100644 --- a/arch/ppc64/mm/numa.c +++ b/arch/ppc64/mm/numa.c | |||
@@ -671,7 +671,7 @@ new_range: | |||
671 | * Mark reserved regions on this node | 671 | * Mark reserved regions on this node |
672 | */ | 672 | */ |
673 | for (i = 0; i < lmb.reserved.cnt; i++) { | 673 | for (i = 0; i < lmb.reserved.cnt; i++) { |
674 | unsigned long physbase = lmb.reserved.region[i].physbase; | 674 | unsigned long physbase = lmb.reserved.region[i].base; |
675 | unsigned long size = lmb.reserved.region[i].size; | 675 | unsigned long size = lmb.reserved.region[i].size; |
676 | 676 | ||
677 | if (pa_to_nid(physbase) != nid && | 677 | if (pa_to_nid(physbase) != nid && |