Here is a patch that will remove kexec_fake_sal_rendezvous code from
kexec. This code is no longer needed since we can use hotplug code.
Signed-off-by: Khalid Aziz <[EMAIL PROTECTED]>
----
diff -urNp linux-2.6.18.orig/arch/ia64/Kconfig linux-2.6.18/arch/ia64/Kconfig
--- linux-2.6.18.orig/arch/ia64/Kconfig 2006-10-11 10:09:16.000000000 -0600
+++ linux-2.6.18/arch/ia64/Kconfig 2006-10-19 13:21:22.000000000 -0600
@@ -433,7 +433,7 @@ source "drivers/sn/Kconfig"
config KEXEC
bool "kexec system call (EXPERIMENTAL)"
- depends on EXPERIMENTAL && !IA64_HP_SIM
+ depends on EXPERIMENTAL && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)
help
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
diff -urNp linux-2.6.18.orig/arch/ia64/kernel/machine_kexec.c
linux-2.6.18/arch/ia64/kernel/machine_kexec.c
--- linux-2.6.18.orig/arch/ia64/kernel/machine_kexec.c 2006-10-11
10:09:16.000000000 -0600
+++ linux-2.6.18/arch/ia64/kernel/machine_kexec.c 2006-10-19
13:26:49.000000000 -0600
@@ -67,7 +67,7 @@ void machine_kexec_cleanup(struct kimage
void machine_shutdown(void)
{
-#ifdef CONFIG_HOTPLUG_CPU
+#ifdef CONFIG_SMP
{
int cpu;
@@ -76,8 +76,6 @@ void machine_shutdown(void)
cpu_down(cpu);
}
}
-#elif defined(CONFIG_SMP)
- smp_call_function(kexec_stop_this_cpu, (void *)ia64_kimage->start, 0,
0);
#endif
kexec_disable_iosapic();
}
diff -urNp linux-2.6.18.orig/arch/ia64/kernel/relocate_kernel.S
linux-2.6.18/arch/ia64/kernel/relocate_kernel.S
--- linux-2.6.18.orig/arch/ia64/kernel/relocate_kernel.S 2006-10-11
10:09:16.000000000 -0600
+++ linux-2.6.18/arch/ia64/kernel/relocate_kernel.S 2006-10-19
13:47:19.000000000 -0600
@@ -192,165 +192,9 @@ register_stack_end:
relocate_new_kernel_end:
END(relocate_new_kernel)
-GLOBAL_ENTRY(kexec_fake_sal_rendez)
- .prologue
- alloc r31=ar.pfs,3,0,0,0
- .body
-.rendez_entry:
- rsm psr.i | psr.ic
- mov r25=ip
- ;;
- {
- flushrs
- srlz.i
- }
- ;;
- /* See where I am running, and compute gp */
- {
- mov ar.rsc = 0 /* Put RSE in enforce lacy, LE mode */
- mov gp = ip /* gp == relocate_new_kernel */
- }
-
- movl r8=0x00000100000000
- ;;
- mov cr.iva=r8
- /* Transition from virtual to physical mode */
- srlz.i
- ;;
- add r17=5f-.rendez_entry, r25
- movl r16=(IA64_PSR_AC | IA64_PSR_BN | IA64_PSR_IC | IA64_PSR_MFL)
- ;;
- tpa r17=r17
- mov cr.ipsr=r16
- ;;
- mov cr.iip=r17
- mov cr.ifs=r0
- ;;
- rfi
- ;;
-5:
- mov b6=in0 /* _start addr */
- mov r8=in1 /* ap_wakeup_vector */
- mov r26=in2 /* PAL addr */
- ;;
- /* Purge kernel TRs */
- movl r16=KERNEL_START
- mov r18=KERNEL_TR_PAGE_SHIFT<<2
- ;;
- ptr.i r16,r18
- ptr.d r16,r18
- ;;
- srlz.i
- ;;
- srlz.d
- ;;
- /* Purge percpu TR */
- movl r16=PERCPU_ADDR
- mov r18=PERCPU_PAGE_SHIFT<<2
- ;;
- ptr.d r16,r18
- ;;
- srlz.d
- ;;
- /* Purge PAL TR */
- mov r18=IA64_GRANULE_SHIFT<<2
- ;;
- ptr.i r26,r18
- ;;
- srlz.i
- ;;
- /* Purge stack TR */
- mov r16=IA64_KR(CURRENT_STACK)
- ;;
- shl r16=r16,IA64_GRANULE_SHIFT
- movl r19=PAGE_OFFSET
- ;;
- add r16=r19,r16
- mov r18=IA64_GRANULE_SHIFT<<2
- ;;
- ptr.d r16,r18
- ;;
- srlz.i
- ;;
-
- /* Ensure we can read and clear external interrupts */
- mov cr.tpr=r0
- srlz.d
-
- shr.u r9=r8,6 /* which irr */
- ;;
- and r8=63,r8 /* bit offset into irr */
- ;;
- mov r10=1;;
- ;;
- shl r10=r10,r8 /* bit mask off irr we want */
- cmp.eq p6,p0=0,r9
- ;;
-(p6) br.cond.sptk.few check_irr0
- cmp.eq p7,p0=1,r9
- ;;
-(p7) br.cond.sptk.few check_irr1
- cmp.eq p8,p0=2,r9
- ;;
-(p8) br.cond.sptk.few check_irr2
- cmp.eq p9,p0=3,r9
- ;;
-(p9) br.cond.sptk.few check_irr3
-
-check_irr0:
- mov r8=cr.irr0
- ;;
- and r8=r8,r10
- ;;
- cmp.eq p6,p0=0,r8
-(p6) br.cond.sptk.few check_irr0
- br.few call_start
-
-check_irr1:
- mov r8=cr.irr1
- ;;
- and r8=r8,r10
- ;;
- cmp.eq p6,p0=0,r8
-(p6) br.cond.sptk.few check_irr1
- br.few call_start
-
-check_irr2:
- mov r8=cr.irr2
- ;;
- and r8=r8,r10
- ;;
- cmp.eq p6,p0=0,r8
-(p6) br.cond.sptk.few check_irr2
- br.few call_start
-
-check_irr3:
- mov r8=cr.irr3
- ;;
- and r8=r8,r10
- ;;
- cmp.eq p6,p0=0,r8
-(p6) br.cond.sptk.few check_irr3
- br.few call_start
-
-call_start:
- mov cr.eoi=r0
- ;;
- srlz.d
- ;;
- mov r8=cr.ivr
- ;;
- srlz.d
- ;;
- cmp.eq p0,p6=15,r8
-(p6) br.cond.sptk.few call_start
- br.sptk.few b6
-kexec_fake_sal_rendez_end:
-END(kexec_fake_sal_rendez)
-
.global relocate_new_kernel_size
relocate_new_kernel_size:
- data8 kexec_fake_sal_rendez_end - relocate_new_kernel
+ data8 relocate_new_kernel_end - relocate_new_kernel
GLOBAL_ENTRY(ia64_dump_cpu_regs)
.prologue
diff -urNp linux-2.6.18.orig/arch/ia64/kernel/smp.c
linux-2.6.18/arch/ia64/kernel/smp.c
--- linux-2.6.18.orig/arch/ia64/kernel/smp.c 2006-10-11 10:42:51.000000000
-0600
+++ linux-2.6.18/arch/ia64/kernel/smp.c 2006-10-19 13:27:11.000000000 -0600
@@ -86,34 +86,6 @@ unlock_ipi_calllock(void)
spin_unlock_irq(&call_lock);
}
-#ifdef CONFIG_KEXEC
-/*
- * Stop the CPU and put it in fake SAL rendezvous. This allows CPU to wake
- * up with IPI from boot processor
- */
-void
-kexec_stop_this_cpu (void *func)
-{
- unsigned long pta, impl_va_bits, pal_base;
-
- /*
- * Remove this CPU by putting it into fake SAL rendezvous
- */
- cpu_clear(smp_processor_id(), cpu_online_map);
- 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);
-
- local_irq_disable();
- pal_base = __get_cpu_var(ia64_mca_pal_base);
- kexec_fake_sal_rendez(func, ap_wakeup_vector, pal_base);
-}
-#endif
-
static void
stop_this_cpu (void)
{
-------
Khalid
====================================================================
Khalid Aziz Open Source and Linux Organization
(970)898-9214 Hewlett-Packard
[EMAIL PROTECTED] Fort Collins, CO
"The Linux kernel is subject to relentless development"
- Alessandro Rubini
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot