powerpc: Remove Mac-on-Linux hooks
PATCH 1/2 powerpc: Remove Mac-on-Linux hooks
The symbols exported for use by MOL aren't getting CRCs and I was about to fix that. But MOL is dead upstream, and the latest work on it was to make it use KVM instead of its own kernel module. So remove them instead.
--- arch/powerpc/kernel/head_32.S | 7 +------ arch/powerpc/mm/hash_low_32.S | 1 - 2 files changed, 1 insertion(+), 7 deletions(-)
arch/powerpc/kernel/head_32.S +1 -6
@@ -735,11 +735,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU) EXCEPTION(0x2c00, Trap_2c, unknown_exception, EXC_XFER_EE) EXCEPTION(0x2d00, Trap_2d, unknown_exception, EXC_XFER_EE) EXCEPTION(0x2e00, Trap_2e, unknown_exception, EXC_XFER_EE) - EXCEPTION(0x2f00, MOLTrampoline, unknown_exception, EXC_XFER_EE_LITE) - - .globl mol_trampoline - .set mol_trampoline, i0x2f00 - EXPORT_SYMBOL(mol_trampoline) + EXCEPTION(0x2f00, Trap_2f, unknown_exception, EXC_XFER_EE) . = 0x3000
@@ -1289,7 +1285,6 @@ intercept_table: .long 0, 0, 0, 0, 0, 0, 0, 0 .long 0, 0, 0, 0, 0, 0, 0, 0 .long 0, 0, 0, 0, 0, 0, 0, 0 -EXPORT_SYMBOL(intercept_table) /* Room for two PTE pointers, usually the kernel and current user pointers * to their respective root page table.
arch/powerpc/mm/hash_low_32.S +0 -1
@@ -34,7 +34,6 @@ .globl mmu_hash_lock mmu_hash_lock: .space 4 -EXPORT_SYMBOL(mmu_hash_lock) #endif /* CONFIG_SMP */ /*
PATCH 2/2 powerpc: Fix missing CRCs, add yet more asm-prototypes.h declarations
Add declarations for:
- __mfdcr, __mtdcr (if CONFIG_PPC_DCR_NATIVE=y; through <asm/dcr.h>)
- switch_mmu_context (if CONFIG_PPC_BOOK3S_64=n; through <asm/mmu_context.h>)
---
I checked all the symbols potentially exported from assembly under arch/powerpc, and these seem to be the only ones not yet declared through asm-prototypes.h (aside from those supporting Mac-on-Linux which are removed by the previous patch).
Ben.
arch/powerpc/include/asm/asm-prototypes.h | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/include/asm/asm-prototypes.h +2 -0
@@ -18,6 +18,8 @@#include <asm/checksum.h> #include <asm/uaccess.h> #include <asm/epapr_hcalls.h> +#include <asm/dcr.h> +#include <asm/mmu_context.h> #include <uapi/asm/ucontext.h>
Michael Ellerman
reviewerQuoted 5 lines · Ben Hutchings
[ Unknown signature status ]
The symbols exported for use by MOL aren't getting CRCs and I was about to fix that. But MOL is dead upstream, and the latest work on it was to make it use KVM instead of its own kernel module. So remove them instead.
Sounds good to me.
Quoted 18 lines
arch/powerpc/kernel/head_32.S +1
-5@@ -735,11 +735,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU) EXCEPTION(0x2c00, Trap_2c, unknown_exception, EXC_XFER_EE) EXCEPTION(0x2d00, Trap_2d, unknown_exception, EXC_XFER_EE) EXCEPTION(0x2e00, Trap_2e, unknown_exception, EXC_XFER_EE) - EXCEPTION(0x2f00, MOLTrampoline, unknown_exception, EXC_XFER_EE_LITE) - - .globl mol_trampoline - .set mol_trampoline, i0x2f00 - EXPORT_SYMBOL(mol_trampoline) + EXCEPTION(0x2f00, Trap_2f, unknown_exception, EXC_XFER_EE) . = 0x3000
arch/powerpc/kernel/head_32.S intercept_table: · line 1292
Quoted 4 lines
arch/powerpc/kernel/head_32.S +0
-1@@ -1289,7 +1285,6 @@ intercept_table: .long 0, 0, 0, 0, 0, 0, 0, 0 .long 0, 0, 0, 0, 0, 0, 0, 0 .long 0, 0, 0, 0, 0, 0, 0, 0 -EXPORT_SYMBOL(intercept_table)
I don't see intercept_table used anywhere, so I think we can just remove it entirely?
arch/powerpc/mm/hash_low_32.S line 37
Quoted 10 lines
arch/powerpc/mm/hash_low_32.S +0
-1@@ -34,7 +34,6 @@ .globl mmu_hash_lock mmu_hash_lock: .space 4 -EXPORT_SYMBOL(mmu_hash_lock) #endif /* CONFIG_SMP */
And now mmu_hash_lock is only used in this file, so doesn't need to be global anymore.
I can fix both of those up here, will just wait a bit to see if anyone else has comments.
cheers
Quoted 27 lines · Michael Ellerman
Quoted 5 lines · Ben Hutchings
[ Unknown signature status ]
The symbols exported for use by MOL aren't getting CRCs and I was about to fix that. But MOL is dead upstream, and the latest work on it was to make it use KVM instead of its own kernel module. So remove them instead.Sounds good to me.
Quoted 17 lines
arch/powerpc/kernel/head_32.S +1
-5@@ -735,11 +735,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU) EXCEPTION(0x2c00, Trap_2c, unknown_exception, EXC_XFER_EE) EXCEPTION(0x2d00, Trap_2d, unknown_exception, EXC_XFER_EE) EXCEPTION(0x2e00, Trap_2e, unknown_exception, EXC_XFER_EE) - EXCEPTION(0x2f00, MOLTrampoline, unknown_exception, EXC_XFER_EE_LITE) - - .globl mol_trampoline - .set mol_trampoline, i0x2f00 - EXPORT_SYMBOL(mol_trampoline) + EXCEPTION(0x2f00, Trap_2f, unknown_exception, EXC_XFER_EE) . = 0x3000
Quoted 8 lines
arch/powerpc/kernel/head_32.S intercept_table: · line 1292
Quoted 5 lines
arch/powerpc/kernel/head_32.S +0
-1@@ -1289,7 +1285,6 @@ intercept_table: .long 0, 0, 0, 0, 0, 0, 0, 0 .long 0, 0, 0, 0, 0, 0, 0, 0 .long 0, 0, 0, 0, 0, 0, 0, 0 -EXPORT_SYMBOL(intercept_table)I don't see
intercept_tableused anywhere, so I think we can just remove it entirely?
That's strange, so it's actually constant data.
And... I've managed to confuse myself about which symbols are for MOL. This one was actually used by rtlinux, which AFAICS is also long dead.
Quoted 5 lines
Quoted 5 lines
arch/powerpc/mm/hash_low_32.S +0
-0@@ -34,7 +34,6 @@
Quoted 8 lines
arch/powerpc/mm/hash_low_32.S line 37
Quoted 5 lines
arch/powerpc/mm/hash_low_32.S +0
-1.globl mmu_hash_lock mmu_hash_lock: .space 4 -EXPORT_SYMBOL(mmu_hash_lock) #endif /* CONFIG_SMP */And now
mmu_hash_lockis only used in this file, so doesn't need to be global anymore.
Right.
Ben.
Quoted 4 lines
I can fix both of those up here, will just wait a bit to see if anyone else has comments.
cheers
Signature · 2 lines
Ben Hutchings It's easier to fight for one's principles than to live up to them.
Michael Ellerman
AppliedRe: [2/2] powerpc: Fix missing CRCs, add yet more asm-prototypes.h declarations
In reply to Ben HutchingsQuoted 5 lines · Ben Hutchings
Add declarations for:
-__mfdcr,__mtdcr(ifCONFIG_PPC_DCR_NATIVE=y; through <asm/dcr.h>)
-switch_mmu_context(ifCONFIG_PPC_BOOK3S_64=n; through <asm/mmu_context.h>)Signed-off-by Ben Hutchings <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/43a8888f0a70db62488fc3ad1505f6
cheers
Michael Ellerman
AppliedQuoted 6 lines · Ben Hutchings
The symbols exported for use by MOL aren't getting CRCs and I was about to fix that. But MOL is dead upstream, and the latest work on it was to make it use KVM instead of its own kernel module. So remove them instead.
Signed-off-by Ben Hutchings <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/3072601375ffff92bddd0ce810dd64
cheers