# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID c52ba3176a285683f00beaa2e82d2ed39bcedae8
# Parent  cae64f65891af6e6f596f96245b7d09b6569078e
[LINUX][POWERPC] Use Xen property to decide if domain can control power

If Xen is not able to control the machine reboot/halt controls it will
create a /xen/power-control property indicating to the domain that it
has been given the capability to try.

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/xen/setup.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -r cae64f65891a -r c52ba3176a28 arch/powerpc/platforms/xen/setup.c
--- a/arch/powerpc/platforms/xen/setup.c        Mon Sep 18 12:46:10 2006 -0400
+++ b/arch/powerpc/platforms/xen/setup.c        Thu Sep 28 12:26:59 2006 -0400
@@ -114,8 +114,6 @@ static void __init xen_init_early(void)
        is_dom0 = !!(xen_start_info->flags & SIF_INITDOMAIN);
        
        if (is_dom0) {
-               xen_reboot_init(&mach_maple_md);
-
                ppc_md.pcibios_fixup            = mach_maple_md.pcibios_fixup;
                ppc_md.pci_get_legacy_ide_irq   = 
mach_maple_md.pci_get_legacy_ide_irq;
                ppc_md.get_boot_time            = mach_maple_md.get_boot_time;
@@ -123,9 +121,12 @@ static void __init xen_init_early(void)
                ppc_md.get_rtc_time             = mach_maple_md.get_rtc_time;
 
                add_preferred_console("ttyS", 0, NULL);
-       } else {
+       }
+
+       if (get_property(xen, "power-control", NULL))
+               xen_reboot_init(&mach_maple_md);
+       else
                xen_reboot_init(NULL);
-       }
 
        /* get the domain features */
        setup_xen_features();

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to