]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
Move xen-pm options from dom0 cmdline option to start info.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 28 Jul 2008 10:43:36 +0000 (11:43 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 28 Jul 2008 10:43:36 +0000 (11:43 +0100)
Thus to avoid xen-pm being manually enforced by end user in dom0
cmdline but without enabling them in xen.

Signed-off-by: Wei Gang <gang.wei@intel.com>
arch/i386/kernel/acpi/processor_extcntl_xen.c
include/xen/interface/xen.h

index a4f1e275b528489e4179566f7b509525d610cf77..cab3a42b11dde3885177e6d9f293193e89dd3494 100644 (file)
 #include <asm/hypercall.h>
 
 static int xen_processor_pmbits;
-static int __init set_xen_processor_pmbits(char *str)
-{
-       get_option(&str, &xen_processor_pmbits);
-
-       return 1;
-}
-__setup("xen_processor_pmbits=", set_xen_processor_pmbits);
 
 static int xen_cx_notifier(struct acpi_processor *pr, int action)
 {
@@ -222,6 +215,8 @@ static struct processor_extcntl_ops xen_extcntl_ops = {
 
 void arch_acpi_processor_init_extcntl(const struct processor_extcntl_ops **ops)
 {
+       xen_processor_pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8;
+
        if (xen_processor_pmbits & XEN_PROCESSOR_PM_CX)
                xen_extcntl_ops.pm_ops[PM_TYPE_IDLE] = xen_cx_notifier;
        if (xen_processor_pmbits & XEN_PROCESSOR_PM_PX)
index f310fe8d12fdab4b3f6bbf7e85081b10f512e1af..4b444b4c71d51bfc97dce5c33a2133d15f43ae8b 100644 (file)
@@ -554,6 +554,7 @@ typedef struct start_info start_info_t;
 /* These flags are passed in the 'flags' field of start_info_t. */
 #define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */
 #define SIF_INITDOMAIN    (1<<1)  /* Is this the initial control domain? */
+#define SIF_PM_MASK       (0xFF<<8) /* reserve 1 byte for xen-pm options */
 
 typedef struct dom0_vga_console_info {
     uint8_t video_type; /* DOM0_VGA_CONSOLE_??? */