Skip to contentSkip to conversation

powerpc: Remove Mac-on-Linux hooks

PATCH Applied Ben Hutchings 3 participants 6 messages Dec 2, 2016 – Mar 21, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

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
index 9d963547d243..87998430cd9b 100644
@@ -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
index 09cc50c8dace..cddf14f60bf3 100644
@@ -34,7 +34,6 @@
 	.globl mmu_hash_lock
 mmu_hash_lock:
 	.space	4
-EXPORT_SYMBOL(mmu_hash_lock)
 #endif /* CONFIG_SMP */
 
 /*
#1 lore raw

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
index e0baba1535e6..ba0225ff38f8 100644
@@ -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>
 
#3 lore raw
In reply to Ben Hutchings
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 18 lines
arch/powerpc/kernel/head_32.S +1 -5
index 9d963547d243..87998430cd9b 100644
@@ -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
index 09cc50c8dace..cddf14f60bf3 100644
@@ -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

#4 lore raw
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
index 9d963547d243..87998430cd9b 100644
@@ -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_table used 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
index 09cc50c8dace..cddf14f60bf3 100644
@@ -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_lock is 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.