Skip to contentSkip to conversation

ia64, kexec: make use of ia64_disable_vhpt()

PATCH New Horms 1 participant 1 message Jun 21, 2006

lore
Share & tools
lore

Horms

author
#0 lore raw

PATCH 1/1 ia64, kexec: make use of ia64_disable_vhpt()

Quoted 3 lines · Ian Wienand

Kexec wants a way to enable and disable the VHPT, and it seems quite straight forward to abstract it. I think the reduced ia64_mmu_init is an improvement.

Here is a patch that makes use of that. Thanks.

Signature · 21 lines
Horms                                           http://www.vergenet.net/~horms/

ia64, kexec: make use of ia64_disable_vhpt()

Have kexec make use of ia64_disable_vhpt() which Ian Wienand recently
proposed and posted a patch for.

http://permalink.gmane.org/gmane.linux.ports.ia64/14425

This removes some duplicated macros in include/asm-ia64/kexec.h, and avoids
arch/ia64/kernel/smp.c needing to know anything about vhpt. It replaces
a cleanup patches that I posted the other day.

http://permalink.gmane.org/gmane.linux.ports.ia64/14406
http://permalink.gmane.org/gmane.linux.ports.ia64/14407

Signed-off-by: Horms <[email protected]>
---
 arch/ia64/kernel/smp.c   |    7 ++-----
 include/asm-ia64/kexec.h |    4 ----
 2 files changed, 2 insertions(+), 9 deletions(-)
arch/ia64/kernel/smp.c +2 -5
index 6337278..5277fdc 100644
@@ -93,7 +93,7 @@ #ifdef CONFIG_KEXEC
 void
 kexec_stop_this_cpu (void *func)
 {
-	unsigned long pta, impl_va_bits, pal_base;
+	unsigned long pal_base;
 
 	/*
 	 * Remove this CPU by putting it into fake SAL rendezvous
@@ -102,10 +102,7 @@ kexec_stop_this_cpu (void *func)
 	max_xtp();
 	ia64_eoi();
 
-	/* Disable VHPT */
-	impl_va_bits = ffz(~(local_cpu_data->unimpl_va_mask | (7UL << 61)));
-	pta = POW2(61) - POW2(vmlpt_bits);
-	ia64_set_pta(pta | (0 << 8) | (vmlpt_bits << 2) | 0);
+	ia64_disable_vhpt();
 
 	local_irq_disable();
 	pal_base = __get_cpu_var(ia64_mca_pal_base);
include/asm-ia64/kexec.h +0 -4
index d45c03f..e6dbe1d 100644
@@ -16,10 +16,6 @@ #define KEXEC_ARCH KEXEC_ARCH_IA_64
 
 #define MAX_NOTE_BYTES 1024
 
-#define pte_bits	3
-#define vmlpt_bits	(impl_va_bits - PAGE_SHIFT + pte_bits)
-#define POW2(n)		(1ULL << (n))
-
 DECLARE_PER_CPU(u64, ia64_mca_pal_base);
 const extern unsigned int relocate_new_kernel_size;
 volatile extern long kexec_rendez;
Signature · 1 line
1.4.0.gd281