diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-08-19 04:52:35 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-09-22 17:54:05 -0400 |
commit | fc48bad53142c991a5280940fd7ee8d226697b2c (patch) | |
tree | 6f01ec4311c0ab25c70f78e751f9d91a7cca16a0 | |
parent | ef24ba7091517d2bbf9ba2cb4256c0dccd51d248 (diff) |
powerpc/64/kexec: NULL check "clear_all" in kexec_sequence
With Radix, it can be NULL even on !BOOKE these days so replace
the ifdef with a NULL check which is cleaner anyway.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/kernel/misc_64.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 5d7e583f1588..939e3f50a345 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -660,7 +660,9 @@ _GLOBAL(kexec_sequence) | |||
660 | li r6,1 | 660 | li r6,1 |
661 | stw r6,kexec_flag-1b(5) | 661 | stw r6,kexec_flag-1b(5) |
662 | 662 | ||
663 | #ifndef CONFIG_PPC_BOOK3E | 663 | cmpdi r27,0 |
664 | beq 1f | ||
665 | |||
664 | /* clear out hardware hash page table and tlb */ | 666 | /* clear out hardware hash page table and tlb */ |
665 | #ifdef PPC64_ELF_ABI_v1 | 667 | #ifdef PPC64_ELF_ABI_v1 |
666 | ld r12,0(r27) /* deref function descriptor */ | 668 | ld r12,0(r27) /* deref function descriptor */ |
@@ -669,7 +671,6 @@ _GLOBAL(kexec_sequence) | |||
669 | #endif | 671 | #endif |
670 | mtctr r12 | 672 | mtctr r12 |
671 | bctrl /* mmu_hash_ops.hpte_clear_all(void); */ | 673 | bctrl /* mmu_hash_ops.hpte_clear_all(void); */ |
672 | #endif /* !CONFIG_PPC_BOOK3E */ | ||
673 | 674 | ||
674 | /* | 675 | /* |
675 | * kexec image calling is: | 676 | * kexec image calling is: |
@@ -696,7 +697,7 @@ _GLOBAL(kexec_sequence) | |||
696 | * are the boot cpu ????? | 697 | * are the boot cpu ????? |
697 | * other device tree differences (prop sizes, va vs pa, etc)... | 698 | * other device tree differences (prop sizes, va vs pa, etc)... |
698 | */ | 699 | */ |
699 | mr r3,r25 # my phys cpu | 700 | 1: mr r3,r25 # my phys cpu |
700 | mr r4,r30 # start, aka phys mem offset | 701 | mr r4,r30 # start, aka phys mem offset |
701 | mtlr 4 | 702 | mtlr 4 |
702 | li r5,0 | 703 | li r5,0 |