diff options
author | Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> | 2012-02-15 20:15:23 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-02-22 18:50:03 -0500 |
commit | 12d9299241241200e4f34f3b02f206fa8384a923 (patch) | |
tree | 3f659b2952e0277a63b4edd13bd6663997c117e3 /arch/powerpc/kernel/prom.c | |
parent | 67b43b9d7ced37a2e72e2c3e06464aa0a5be95f9 (diff) |
fadump: Remove the phyp assisted dump code.
Remove the phyp assisted dump implementation which is not is use.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 70222b35cfc5..89e850af3dd6 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <asm/machdep.h> | 52 | #include <asm/machdep.h> |
53 | #include <asm/pSeries_reconfig.h> | 53 | #include <asm/pSeries_reconfig.h> |
54 | #include <asm/pci-bridge.h> | 54 | #include <asm/pci-bridge.h> |
55 | #include <asm/phyp_dump.h> | ||
56 | #include <asm/kexec.h> | 55 | #include <asm/kexec.h> |
57 | #include <asm/opal.h> | 56 | #include <asm/opal.h> |
58 | #include <asm/fadump.h> | 57 | #include <asm/fadump.h> |
@@ -616,86 +615,6 @@ static void __init early_reserve_mem(void) | |||
616 | } | 615 | } |
617 | } | 616 | } |
618 | 617 | ||
619 | #ifdef CONFIG_PHYP_DUMP | ||
620 | /** | ||
621 | * phyp_dump_calculate_reserve_size() - reserve variable boot area 5% or arg | ||
622 | * | ||
623 | * Function to find the largest size we need to reserve | ||
624 | * during early boot process. | ||
625 | * | ||
626 | * It either looks for boot param and returns that OR | ||
627 | * returns larger of 256 or 5% rounded down to multiples of 256MB. | ||
628 | * | ||
629 | */ | ||
630 | static inline unsigned long phyp_dump_calculate_reserve_size(void) | ||
631 | { | ||
632 | unsigned long tmp; | ||
633 | |||
634 | if (phyp_dump_info->reserve_bootvar) | ||
635 | return phyp_dump_info->reserve_bootvar; | ||
636 | |||
637 | /* divide by 20 to get 5% of value */ | ||
638 | tmp = memblock_end_of_DRAM(); | ||
639 | do_div(tmp, 20); | ||
640 | |||
641 | /* round it down in multiples of 256 */ | ||
642 | tmp = tmp & ~0x0FFFFFFFUL; | ||
643 | |||
644 | return (tmp > PHYP_DUMP_RMR_END ? tmp : PHYP_DUMP_RMR_END); | ||
645 | } | ||
646 | |||
647 | /** | ||
648 | * phyp_dump_reserve_mem() - reserve all not-yet-dumped mmemory | ||
649 | * | ||
650 | * This routine may reserve memory regions in the kernel only | ||
651 | * if the system is supported and a dump was taken in last | ||
652 | * boot instance or if the hardware is supported and the | ||
653 | * scratch area needs to be setup. In other instances it returns | ||
654 | * without reserving anything. The memory in case of dump being | ||
655 | * active is freed when the dump is collected (by userland tools). | ||
656 | */ | ||
657 | static void __init phyp_dump_reserve_mem(void) | ||
658 | { | ||
659 | unsigned long base, size; | ||
660 | unsigned long variable_reserve_size; | ||
661 | |||
662 | if (!phyp_dump_info->phyp_dump_configured) { | ||
663 | printk(KERN_ERR "Phyp-dump not supported on this hardware\n"); | ||
664 | return; | ||
665 | } | ||
666 | |||
667 | if (!phyp_dump_info->phyp_dump_at_boot) { | ||
668 | printk(KERN_INFO "Phyp-dump disabled at boot time\n"); | ||
669 | return; | ||
670 | } | ||
671 | |||
672 | variable_reserve_size = phyp_dump_calculate_reserve_size(); | ||
673 | |||
674 | if (phyp_dump_info->phyp_dump_is_active) { | ||
675 | /* Reserve *everything* above RMR.Area freed by userland tools*/ | ||
676 | base = variable_reserve_size; | ||
677 | size = memblock_end_of_DRAM() - base; | ||
678 | |||
679 | /* XXX crashed_ram_end is wrong, since it may be beyond | ||
680 | * the memory_limit, it will need to be adjusted. */ | ||
681 | memblock_reserve(base, size); | ||
682 | |||
683 | phyp_dump_info->init_reserve_start = base; | ||
684 | phyp_dump_info->init_reserve_size = size; | ||
685 | } else { | ||
686 | size = phyp_dump_info->cpu_state_size + | ||
687 | phyp_dump_info->hpte_region_size + | ||
688 | variable_reserve_size; | ||
689 | base = memblock_end_of_DRAM() - size; | ||
690 | memblock_reserve(base, size); | ||
691 | phyp_dump_info->init_reserve_start = base; | ||
692 | phyp_dump_info->init_reserve_size = size; | ||
693 | } | ||
694 | } | ||
695 | #else | ||
696 | static inline void __init phyp_dump_reserve_mem(void) {} | ||
697 | #endif /* CONFIG_PHYP_DUMP && CONFIG_PPC_RTAS */ | ||
698 | |||
699 | void __init early_init_devtree(void *params) | 618 | void __init early_init_devtree(void *params) |
700 | { | 619 | { |
701 | phys_addr_t limit; | 620 | phys_addr_t limit; |
@@ -715,11 +634,6 @@ void __init early_init_devtree(void *params) | |||
715 | of_scan_flat_dt(early_init_dt_scan_opal, NULL); | 634 | of_scan_flat_dt(early_init_dt_scan_opal, NULL); |
716 | #endif | 635 | #endif |
717 | 636 | ||
718 | #ifdef CONFIG_PHYP_DUMP | ||
719 | /* scan tree to see if dump occurred during last boot */ | ||
720 | of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL); | ||
721 | #endif | ||
722 | |||
723 | #ifdef CONFIG_FA_DUMP | 637 | #ifdef CONFIG_FA_DUMP |
724 | /* scan tree to see if dump is active during last boot */ | 638 | /* scan tree to see if dump is active during last boot */ |
725 | of_scan_flat_dt(early_init_dt_scan_fw_dump, NULL); | 639 | of_scan_flat_dt(early_init_dt_scan_fw_dump, NULL); |
@@ -765,7 +679,6 @@ void __init early_init_devtree(void *params) | |||
765 | #endif | 679 | #endif |
766 | reserve_crashkernel(); | 680 | reserve_crashkernel(); |
767 | early_reserve_mem(); | 681 | early_reserve_mem(); |
768 | phyp_dump_reserve_mem(); | ||
769 | 682 | ||
770 | /* | 683 | /* |
771 | * Ensure that total memory size is page-aligned, because otherwise | 684 | * Ensure that total memory size is page-aligned, because otherwise |