WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] reset_system

# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 75f791c710dfcd086b80799a3498ff6e504811c5
# Parent  0f3bd7d237371e33581c82ef65faf9e1bbab3293
[IA64] reset_system

Cleanup: EFI_RESET_SYSTEM now always calls domain_shutdown.
machine_restart and machine_halt calls efi reset_system to do their job.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 xen/arch/ia64/linux-xen/head.S    |    2 ++
 xen/arch/ia64/linux-xen/smpboot.c |    1 -
 xen/arch/ia64/xen/domain.c        |   19 ++++++++-----------
 xen/arch/ia64/xen/fw_emul.c       |   22 +++++++++++++++-------
 xen/arch/ia64/xen/regionreg.c     |    2 +-
 xen/arch/ia64/xen/xenmisc.c       |   12 ------------
 xen/include/asm-ia64/config.h     |    6 ------
 7 files changed, 26 insertions(+), 38 deletions(-)

diff -r 0f3bd7d23737 -r 75f791c710df xen/arch/ia64/linux-xen/head.S
--- a/xen/arch/ia64/linux-xen/head.S    Thu Jun 15 09:47:19 2006 -0600
+++ b/xen/arch/ia64/linux-xen/head.S    Thu Jun 15 09:51:58 2006 -0600
@@ -1010,6 +1010,7 @@ 1:        br.cloop.sptk.few 1b
        br.ret.sptk.many rp
 END(ia64_delay_loop)
 
+#ifndef XEN
 /*
  * Return a CPU-local timestamp in nano-seconds.  This timestamp is
  * NOT synchronized across CPUs its return value must never be
@@ -1062,6 +1063,7 @@ GLOBAL_ENTRY(start_kernel_thread)
        br.call.sptk.many rp = sys_exit;;
 1:     br.sptk.few 1b                          // not reached
 END(start_kernel_thread)
+#endif /* XEN */
 
 #ifdef CONFIG_IA64_BRL_EMU
 
diff -r 0f3bd7d23737 -r 75f791c710df xen/arch/ia64/linux-xen/smpboot.c
--- a/xen/arch/ia64/linux-xen/smpboot.c Thu Jun 15 09:47:19 2006 -0600
+++ b/xen/arch/ia64/linux-xen/smpboot.c Thu Jun 15 09:51:58 2006 -0600
@@ -64,7 +64,6 @@
 #ifdef XEN
 #include <xen/domain.h>
 #include <asm/hw_irq.h>
-int ht_per_core = 1;
 #ifndef CONFIG_SMP
 cpumask_t cpu_online_map = CPU_MASK_CPU0;
 EXPORT_SYMBOL(cpu_online_map);
diff -r 0f3bd7d23737 -r 75f791c710df xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Thu Jun 15 09:47:19 2006 -0600
+++ b/xen/arch/ia64/xen/domain.c        Thu Jun 15 09:51:58 2006 -0600
@@ -891,22 +891,19 @@ int construct_dom0(struct domain *d,
 
 void machine_restart(char * __unused)
 {
-       if (running_on_sim) dummy();
-       printf("machine_restart called: spinning....\n");
+       if (running_on_sim)
+               printf ("machine_restart called.  spinning...\n");
+       else
+               (*efi.reset_system)(EFI_RESET_WARM,0,0,NULL);
        while(1);
 }
 
 void machine_halt(void)
 {
-       if (running_on_sim) dummy();
-       printf("machine_halt called: spinning....\n");
-       while(1);
-}
-
-void dummy_called(char *function)
-{
-       if (running_on_sim) asm("break 0;;");
-       printf("dummy called in %s: spinning....\n", function);
+       if (running_on_sim)
+               printf ("machine_halt called.  spinning...\n");
+       else
+               (*efi.reset_system)(EFI_RESET_SHUTDOWN,0,0,NULL);
        while(1);
 }
 
diff -r 0f3bd7d23737 -r 75f791c710df xen/arch/ia64/xen/fw_emul.c
--- a/xen/arch/ia64/xen/fw_emul.c       Thu Jun 15 09:47:19 2006 -0600
+++ b/xen/arch/ia64/xen/fw_emul.c       Thu Jun 15 09:51:58 2006 -0600
@@ -475,13 +475,21 @@ efi_emulator (struct pt_regs *regs, IA64
 
        switch (regs->r2) {
            case FW_HYPERCALL_EFI_RESET_SYSTEM:
-               printf("efi.reset_system called ");
-               if (current->domain == dom0) {
-                       printf("(by dom0)\n ");
-                       (*efi.reset_system)(EFI_RESET_WARM,0,0,NULL);
-               } else {
-                       printf("\n");
-                       domain_shutdown (current->domain, SHUTDOWN_reboot);
+               {
+                   u8 reason;
+                   unsigned long val = vcpu_get_gr(v,32);
+                   switch (val)
+                   {
+                   case EFI_RESET_SHUTDOWN:
+                           reason = SHUTDOWN_poweroff;
+                           break;
+                   case EFI_RESET_COLD:
+                   case EFI_RESET_WARM:
+                   default:
+                           reason = SHUTDOWN_reboot;
+                           break;
+                   }
+                   domain_shutdown (current->domain, reason);
                }
                status = EFI_UNSUPPORTED;
                break;
diff -r 0f3bd7d23737 -r 75f791c710df xen/arch/ia64/xen/regionreg.c
--- a/xen/arch/ia64/xen/regionreg.c     Thu Jun 15 09:47:19 2006 -0600
+++ b/xen/arch/ia64/xen/regionreg.c     Thu Jun 15 09:51:58 2006 -0600
@@ -287,7 +287,7 @@ void init_all_rr(struct vcpu *v)
        //rrv.rrval = v->domain->arch.metaphysical_rr0;
        rrv.ps = PAGE_SHIFT;
        rrv.ve = 1;
-if (!v->vcpu_info) { printf("Stopping in init_all_rr\n"); dummy(); }
+if (!v->vcpu_info) { panic("Stopping in init_all_rr\n"); }
        VCPU(v,rrs[0]) = -1;
        VCPU(v,rrs[1]) = rrv.rrval;
        VCPU(v,rrs[2]) = rrv.rrval;
diff -r 0f3bd7d23737 -r 75f791c710df xen/arch/ia64/xen/xenmisc.c
--- a/xen/arch/ia64/xen/xenmisc.c       Thu Jun 15 09:47:19 2006 -0600
+++ b/xen/arch/ia64/xen/xenmisc.c       Thu Jun 15 09:51:58 2006 -0600
@@ -94,18 +94,6 @@ void console_print(char *msg)
        printk("console_print called, how did start_kernel return???\n");
 }
 
-void kernel_thread_helper(void)
-{
-       printk("kernel_thread_helper not implemented\n");
-       dummy();
-}
-
-void sys_exit(void)
-{
-       printk("sys_exit not implemented\n");
-       dummy();
-}
-
 ////////////////////////////////////
 // called from unaligned.c
 ////////////////////////////////////
diff -r 0f3bd7d23737 -r 75f791c710df xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Thu Jun 15 09:47:19 2006 -0600
+++ b/xen/include/asm-ia64/config.h     Thu Jun 15 09:51:58 2006 -0600
@@ -235,12 +235,6 @@ struct screen_info { };
 #define seq_printf(a,b...) printf(b)
 //#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
 
-void dummy_called(char *function);
-#define dummy()        dummy_called((char *) __FUNCTION__)
-
-// these declarations got moved at some point, find a better place for them
-extern int ht_per_core;
-
 #ifdef CONFIG_XEN_IA64_DOM0_VP
 #define CONFIG_SHADOW  1
 #endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] reset_system, Xen patchbot-unstable <=