ia64/linux-2.6.18-xen.hg

changeset 627:2f1355579c9c

Move xen-pm options from dom0 cmdline option to start info.

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>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jul 28 11:43:36 2008 +0100 (2008-07-28)
parents e39575a1d8af
children b8916f4d48f6
files arch/i386/kernel/acpi/processor_extcntl_xen.c include/xen/interface/xen.h
line diff
     1.1 --- a/arch/i386/kernel/acpi/processor_extcntl_xen.c	Mon Jul 28 11:26:33 2008 +0100
     1.2 +++ b/arch/i386/kernel/acpi/processor_extcntl_xen.c	Mon Jul 28 11:43:36 2008 +0100
     1.3 @@ -33,13 +33,6 @@
     1.4  #include <asm/hypercall.h>
     1.5  
     1.6  static int xen_processor_pmbits;
     1.7 -static int __init set_xen_processor_pmbits(char *str)
     1.8 -{
     1.9 -	get_option(&str, &xen_processor_pmbits);
    1.10 -
    1.11 -	return 1;
    1.12 -}
    1.13 -__setup("xen_processor_pmbits=", set_xen_processor_pmbits);
    1.14  
    1.15  static int xen_cx_notifier(struct acpi_processor *pr, int action)
    1.16  {
    1.17 @@ -222,6 +215,8 @@ static struct processor_extcntl_ops xen_
    1.18  
    1.19  void arch_acpi_processor_init_extcntl(const struct processor_extcntl_ops **ops)
    1.20  {
    1.21 +	xen_processor_pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8;
    1.22 +
    1.23  	if (xen_processor_pmbits & XEN_PROCESSOR_PM_CX)
    1.24  		xen_extcntl_ops.pm_ops[PM_TYPE_IDLE] = xen_cx_notifier;
    1.25  	if (xen_processor_pmbits & XEN_PROCESSOR_PM_PX)
     2.1 --- a/include/xen/interface/xen.h	Mon Jul 28 11:26:33 2008 +0100
     2.2 +++ b/include/xen/interface/xen.h	Mon Jul 28 11:43:36 2008 +0100
     2.3 @@ -554,6 +554,7 @@ typedef struct start_info start_info_t;
     2.4  /* These flags are passed in the 'flags' field of start_info_t. */
     2.5  #define SIF_PRIVILEGED    (1<<0)  /* Is the domain privileged? */
     2.6  #define SIF_INITDOMAIN    (1<<1)  /* Is this the initial control domain? */
     2.7 +#define SIF_PM_MASK       (0xFF<<8) /* reserve 1 byte for xen-pm options */
     2.8  
     2.9  typedef struct dom0_vga_console_info {
    2.10      uint8_t video_type; /* DOM0_VGA_CONSOLE_??? */