From: "Jan Beulich" Subject: [PATCH 05/11] ACPI: large cleanup Date: Wed, 09 Mar 2011 12:27:09 +0000 Message-ID: <4D77802D020000780003581A@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part2D011A0D.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part2D011A0D.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline In some cases, entire files turned out unnecessary. Of what remains, move whatever possible into .init.*, and some data items into .data.read_mostly. Signed-off-by: Jan Beulich --- 2011-02-10.orig/xen/arch/ia64/linux-xen/acpi.c +++ 2011-02-10/xen/arch/ia64/linux-xen/acpi.c @@ -165,8 +165,6 @@ int platform_intr_list[ACPI_MAX_PLATFORM [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] =3D -1 }; =20 -enum acpi_irq_model_id acpi_irq_model =3D ACPI_IRQ_MODEL_IOSAPIC; - /* * Interrupt routing API for device drivers. Provides interrupt vector = for * a generic platform event. Currently only CPEI is implemented. --- 2011-02-10.orig/xen/arch/ia64/linux-xen/acpi_numa.c +++ 2011-02-10/xen/arch/ia64/linux-xen/acpi_numa.c @@ -28,7 +28,6 @@ #include #include #include -#include #include =20 #ifndef XEN --- 2011-02-10.orig/xen/arch/x86/acpi/boot.c +++ 2011-02-10/xen/arch/x86/acpi/boot.c @@ -43,7 +43,6 @@ #include #include =20 -int sbf_port; #define CONFIG_ACPI_PCI =20 #define BAD_MADT_ENTRY(entry, end) ( = \ @@ -64,36 +63,24 @@ bool_t __initdata acpi_ht =3D 1; /* enable bool_t __initdata acpi_lapic; bool_t __initdata acpi_ioapic; =20 -u8 acpi_sci_flags __initdata; -int acpi_sci_override_gsi __initdata; bool_t acpi_skip_timer_override __initdata; =20 #ifdef CONFIG_X86_LOCAL_APIC static u64 acpi_lapic_addr __initdata =3D APIC_DEFAULT_PHYS_BASE; #endif =20 -u32 acpi_smi_cmd; -u8 acpi_enable_value, acpi_disable_value; +u32 __read_mostly acpi_smi_cmd; +u8 __read_mostly acpi_enable_value; +u8 __read_mostly acpi_disable_value; =20 -#ifndef __HAVE_ARCH_CMPXCHG -#warning ACPI uses CMPXCHG, i486 and later hardware -#endif - -u32 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =3D +u32 __read_mostly x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =3D {[0 ... MAX_MADT_ENTRIES - 1] =3D BAD_APICID }; -EXPORT_SYMBOL(x86_acpiid_to_apicid); =20 /* -----------------------------------------------------------------------= --- Boot-time Configuration -----------------------------------------------------------------------= --- */ =20 /* - * The default interrupt routing model is PIC (8259). This gets - * overriden if IOAPICs are enumerated (below). - */ -enum acpi_irq_model_id acpi_irq_model =3D ACPI_IRQ_MODEL_PIC; - -/* * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END, * to map the target physical address. The problem is that set_fixmap() * provides a single page, and it is possible that the page is not @@ -333,21 +320,6 @@ acpi_parse_nmi_src(struct acpi_subtable_ =20 #endif /* CONFIG_X86_IO_APIC */ =20 -static int __init acpi_parse_sbf(struct acpi_table_header *table) -{ - struct acpi_table_boot *sb; - - sb =3D (struct acpi_table_boot *)table; - if (!sb) { - printk(KERN_WARNING PREFIX "Unable to map SBF\n"); - return -ENODEV; - } - - sbf_port =3D sb->cmos_index; /* Save CMOS port */ - - return 0; -} - #ifdef CONFIG_HPET_TIMER =20 static int __init acpi_parse_hpet(struct acpi_table_header *table) @@ -360,18 +332,9 @@ static int __init acpi_parse_hpet(struct return -1; } =20 -#if 0/*def CONFIG_X86_64*/ - vxtime.hpet_address =3D hpet_tbl->address.address; - + hpet_address =3D hpet_tbl->address.address; printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", - hpet_tbl->id, vxtime.hpet_address); -#else /* X86 */ - { - hpet_address =3D hpet_tbl->address.address; - printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", - hpet_tbl->id, hpet_address); - } -#endif /* X86 */ + hpet_tbl->id, hpet_address); =20 return 0; } @@ -563,7 +526,7 @@ static int __init acpi_parse_madt_lapic_ } #endif /* CONFIG_X86_LOCAL_APIC */ =20 -#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/ +#ifdef CONFIG_X86_IO_APIC /* * Parse IOAPIC related entries in MADT * returns 0 on success, < 0 on error @@ -615,15 +578,6 @@ static int __init acpi_parse_madt_ioapic return count; } =20 -#ifdef CONFIG_ACPI_INTERPRETER - /* - * If BIOS did not supply an INT_SRC_OVR for the SCI - * pretend we got one so we can set the SCI flags. - */ - if (!acpi_sci_override_gsi) - acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0); -#endif - /* Fill in identity legacy mapings where no override */ mp_config_acpi_legacy_irqs(); =20 @@ -643,7 +597,7 @@ static inline int acpi_parse_madt_ioapic { return -1; } -#endif /* !(CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER) */ +#endif /* !CONFIG_X86_IO_APIC */ =20 =20 static void __init acpi_process_madt(void) @@ -666,7 +620,6 @@ static void __init acpi_process_madt(voi */ error =3D acpi_parse_madt_ioapic_entries(); if (!error) { - acpi_irq_model =3D ACPI_IRQ_MODEL_IOAPIC; acpi_irq_balance_set(NULL); acpi_ioapic =3D 1; =20 @@ -911,8 +864,6 @@ static struct dmi_system_id __initdata a * acpi_lapic =3D 1 if LAPIC found * acpi_ioapic =3D 1 if IOAPIC found * if (acpi_lapic && acpi_ioapic) smp_found_config =3D 1; - * if acpi_blacklisted() acpi_disabled =3D 1; - * acpi_irq_model=3D... * ... * * return value: (currently ignored) @@ -944,22 +895,6 @@ int __init acpi_boot_table_init(void) return error; } =20 - acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); - - /* - * blacklist may disable ACPI entirely - */ - error =3D acpi_blacklisted(); - if (error) { - if (acpi_force) { - printk(KERN_WARNING PREFIX "acpi=3Dforce override\n= "); - } else { - printk(KERN_WARNING PREFIX "Disabling ACPI = support\n"); - disable_acpi(); - return error; - } - } - return 0; } =20 @@ -972,8 +907,6 @@ int __init acpi_boot_init(void) if (acpi_disabled && !acpi_ht) return 1; =20 - acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); - /* * set sci_int and PM timer address */ --- 2011-02-10.orig/xen/drivers/acpi/hwregs.c +++ 2011-02-10/xen/drivers/acpi/hwregs.c @@ -64,7 +64,8 @@ ACPI_MODULE_NAME("hwregs") * DESCRIPTION: Map register_id into a register bitmask. * *************************************************************************= *****/ -struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 = register_id) +static struct acpi_bit_register_info * +acpi_hw_get_bit_register_info(u32 register_id) { ACPI_FUNCTION_ENTRY(); =20 @@ -91,7 +92,7 @@ struct acpi_bit_register_info *acpi_hw_g * *************************************************************************= *****/ =20 -acpi_status acpi_get_register_unlocked(u32 register_id, u32 * return_value= ) +acpi_status acpi_get_register(u32 register_id, u32 * return_value) { u32 register_value =3D 0; struct acpi_bit_register_info *bit_reg_info; @@ -129,16 +130,6 @@ acpi_status acpi_get_register_unlocked(u return_ACPI_STATUS(status); } =20 -acpi_status acpi_get_register(u32 register_id, u32 * return_value) -{ - acpi_status status; - //acpi_cpu_flags flags; - //flags =3D acpi_os_acquire_lock(acpi_gbl_hardware_lock); - status =3D acpi_get_register_unlocked(register_id, return_value); - //acpi_os_release_lock(acpi_gbl_hardware_lock, flags); - return status; -} - /*************************************************************************= ****** * * FUNCTION: acpi_set_register @@ -157,7 +148,6 @@ acpi_status acpi_set_register(u32 regist u32 register_value =3D 0; struct acpi_bit_register_info *bit_reg_info; acpi_status status; - //acpi_cpu_flags lock_flags; =20 ACPI_FUNCTION_TRACE_U32(acpi_set_register, register_id); =20 @@ -170,8 +160,6 @@ acpi_status acpi_set_register(u32 regist return_ACPI_STATUS(AE_BAD_PARAMETER); } =20 - //lock_flags =3D acpi_os_acquire_lock(acpi_gbl_hardware_lock); - /* Always do a register read first so we can insert the new bits = */ =20 status =3D acpi_hw_register_read(bit_reg_info->parent_register, @@ -276,8 +264,6 @@ acpi_status acpi_set_register(u32 regist =20 unlock_and_exit: =20 - //acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags); - /* Normalize the value that was read */ =20 ACPI_DEBUG_EXEC(register_value =3D --- 2011-02-10.orig/xen/drivers/acpi/numa.c +++ 2011-02-10/xen/drivers/acpi/numa.c @@ -28,7 +28,6 @@ #include #include #include -#include #include =20 #define ACPI_NUMA 0x80000000 --- 2011-02-10.orig/xen/drivers/acpi/osl.c +++ 2011-02-10/xen/drivers/acpi/osl.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -43,27 +42,12 @@ =20 #define _COMPONENT ACPI_OS_SERVICES ACPI_MODULE_NAME("osl") -#define PREFIX "ACPI: " -struct acpi_os_dpc { - acpi_osd_exec_callback function; - void *context; -}; =20 #ifdef CONFIG_ACPI_CUSTOM_DSDT #include CONFIG_ACPI_CUSTOM_DSDT_FILE #endif =20 -#ifdef ENABLE_DEBUGGER -#include - -/* stuff for debugger support */ -int acpi_in_debugger; -EXPORT_SYMBOL(acpi_in_debugger); - -extern char line_buf[80]; -#endif /*ENABLE_DEBUGGER */ - -void acpi_os_printf(const char *fmt, ...) +void __init acpi_os_printf(const char *fmt, ...) { va_list args; va_start(args, fmt); @@ -71,7 +55,7 @@ void acpi_os_printf(const char *fmt, ... va_end(args); } =20 -void acpi_os_vprintf(const char *fmt, va_list args) +void __init acpi_os_vprintf(const char *fmt, va_list args) { static char buffer[512]; =20 @@ -103,17 +87,15 @@ acpi_physical_address __init acpi_os_get } } =20 -void __iomem * +void __iomem *__init acpi_os_map_memory(acpi_physical_address phys, acpi_size size) { return __acpi_map_table((unsigned long)phys, size); } -EXPORT_SYMBOL_GPL(acpi_os_map_memory); =20 -void acpi_os_unmap_memory(void __iomem * virt, acpi_size size) +void __init acpi_os_unmap_memory(void __iomem * virt, acpi_size size) { } -EXPORT_SYMBOL_GPL(acpi_os_unmap_memory); =20 acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 = width) { @@ -136,8 +118,6 @@ acpi_status acpi_os_read_port(acpi_io_ad return AE_OK; } =20 -EXPORT_SYMBOL(acpi_os_read_port); - acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 = width) { if (width <=3D 8) { @@ -153,8 +133,6 @@ acpi_status acpi_os_write_port(acpi_io_a return AE_OK; } =20 -EXPORT_SYMBOL(acpi_os_write_port); - acpi_status acpi_os_read_memory(acpi_physical_address phys_addr, u32 * value, u32 = width) { @@ -209,26 +187,3 @@ acpi_os_write_memory(acpi_physical_addre =20 return AE_OK; } - -/* - * Acquire a spinlock. - * - * handle is a pointer to the spinlock_t. - */ - -acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp) -{ - acpi_cpu_flags flags; - spin_lock_irqsave(lockp, flags); - return flags; -} - -/* - * Release a spinlock. See above. - */ - -void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags) -{ - spin_unlock_irqrestore(lockp, flags); -} - --- 2011-02-10.orig/xen/drivers/acpi/tables.c +++ 2011-02-10/xen/drivers/acpi/tables.c @@ -269,7 +269,7 @@ acpi_table_parse_madt(enum acpi_madt_typ * Scan the ACPI System Descriptor Table (STD) for a table matching @id, * run @handler on it. Return 0 if table found, return on if not. */ -int acpi_table_parse(char *id, acpi_table_handler handler) +int __init acpi_table_parse(char *id, acpi_table_handler handler) { struct acpi_table_header *table =3D NULL; =20 @@ -324,7 +324,6 @@ static void __init check_multiple_madt(v =20 int __init acpi_table_init(void) { - acpi_ut_init_globals(); acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0); check_multiple_madt(); return 0; --- 2011-02-10.orig/xen/drivers/acpi/tables/tbinstal.c +++ 2011-02-10/xen/drivers/acpi/tables/tbinstal.c @@ -43,7 +43,6 @@ =20 #include #include -#include #include =20 #define _COMPONENT ACPI_TABLES @@ -60,7 +59,7 @@ ACPI_MODULE_NAME("tbinstal") * DESCRIPTION: this function is called to verify and map table * *************************************************************************= ****/ -acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc) +acpi_status __init acpi_tb_verify_table(struct acpi_table_desc *table_desc= ) { acpi_status status =3D AE_OK; =20 --- 2011-02-10.orig/xen/drivers/acpi/tables/tbutils.c +++ 2011-02-10/xen/drivers/acpi/tables/tbutils.c @@ -49,10 +49,6 @@ #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME("tbutils") =20 -/* Local prototypes */ -static acpi_physical_address -acpi_tb_get_root_table_entry(u8 * table_entry, - acpi_native_uint table_entry_size); /*************************************************************************= ****** * * FUNCTION: acpi_tb_check_xsdt @@ -68,7 +64,7 @@ acpi_tb_get_root_table_entry(u8 * table_ * DESCRIPTION: validate XSDT **************************************************************************= ****/ =20 -static acpi_status +static acpi_status __init acpi_tb_check_xsdt(acpi_physical_address address) { struct acpi_table_header *table; @@ -115,29 +111,6 @@ acpi_tb_check_xsdt(acpi_physical_address =20 /*************************************************************************= ****** * - * FUNCTION: acpi_tb_tables_loaded - * - * PARAMETERS: None - * - * RETURN: TRUE if required ACPI tables are loaded - * - * DESCRIPTION: Determine if the minimum required ACPI tables are present - * (FADT, FACS, DSDT) - * - *************************************************************************= *****/ - -u8 acpi_tb_tables_loaded(void) -{ - - if (acpi_gbl_root_table_list.count >=3D 3) { - return (TRUE); - } - - return (FALSE); -} - -/*************************************************************************= ****** - * * FUNCTION: acpi_tb_print_table_header * * PARAMETERS: Address - Table physical address @@ -202,7 +175,8 @@ acpi_tb_print_table_header(acpi_physical * *************************************************************************= *****/ =20 -acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 = length) +acpi_status __init +acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length) { u8 checksum; =20 @@ -309,13 +283,6 @@ acpi_tb_install_table(acpi_physical_addr =20 acpi_tb_print_table_header(address, table); =20 - if (table_index =3D=3D ACPI_TABLE_INDEX_DSDT) { - - /* Global integer width is based upon revision of the DSDT = */ - - acpi_ut_set_integer_width(table->revision); - } - unmap_and_exit: acpi_os_unmap_memory(table, sizeof(struct acpi_table_header)); } @@ -337,7 +304,7 @@ acpi_tb_install_table(acpi_physical_addr * *************************************************************************= *****/ =20 -static acpi_physical_address +static acpi_physical_address __init acpi_tb_get_root_table_entry(u8 * table_entry, acpi_native_uint table_entry_size) { --- 2011-02-10.orig/xen/drivers/acpi/tables/tbxface.c +++ 2011-02-10/xen/drivers/acpi/tables/tbxface.c @@ -45,7 +45,6 @@ #include #include #include -#include #include =20 #define _COMPONENT ACPI_TABLES @@ -164,7 +163,7 @@ acpi_initialize_tables(struct acpi_table * DESCRIPTION: Finds and verifies an ACPI table. * *************************************************************************= ****/ -acpi_status +acpi_status __init acpi_get_table(char *signature, acpi_native_uint instance, struct acpi_table_header = **out_table) { @@ -198,14 +197,10 @@ acpi_get_table(char *signature, *out_table =3D acpi_gbl_root_table_list.tables[i].p= ointer; } =20 - /*if (!acpi_gbl_permanent_mmap)*/ { - acpi_gbl_root_table_list.tables[i].pointer =3D = NULL; - } + acpi_gbl_root_table_list.tables[i].pointer =3D NULL; =20 return (status); } =20 return (AE_NOT_FOUND); } - -ACPI_EXPORT_SYMBOL(acpi_get_table) --- 2011-02-10.orig/xen/drivers/acpi/tables/tbxfroot.c +++ 2011-02-10/xen/drivers/acpi/tables/tbxfroot.c @@ -52,8 +52,6 @@ ACPI_MODULE_NAME("tbxfroot") /* Local prototypes */ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length); =20 -static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp); - /*************************************************************************= ****** * * FUNCTION: acpi_tb_validate_rsdp @@ -66,7 +64,7 @@ static acpi_status acpi_tb_validate_rsdp * *************************************************************************= *****/ =20 -static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) +static acpi_status __init acpi_tb_validate_rsdp(struct acpi_table_rsdp = *rsdp) { ACPI_FUNCTION_ENTRY(); =20 --- 2011-02-10.orig/xen/drivers/acpi/utilities/utglobal.c +++ 2011-02-10/xen/drivers/acpi/utilities/utglobal.c @@ -44,10 +44,10 @@ #define DEFINE_ACPI_GLOBALS =20 #include +#include #include #include #include -#include =20 ACPI_EXPORT_SYMBOL(acpi_gbl_FADT) #define _COMPONENT ACPI_UTILITIES @@ -55,53 +55,6 @@ ACPI_EXPORT_SYMBOL(acpi_gbl_FADT) =20 /*************************************************************************= ****** * - * Static global variable initialization. - * - *************************************************************************= *****/ -/* - * We want the debug switches statically initialized so they - * are already set when the debugger is entered. - */ -/* Debug switch - level and trace mask */ -u32 acpi_dbg_level =3D ACPI_DEBUG_DEFAULT; - -/* Debug switch - layer (component) mask */ - -u32 acpi_dbg_layer =3D ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; -u32 acpi_gbl_nesting_level =3D 0; - -/* Debugger globals */ - -u8 acpi_gbl_db_terminate_threads =3D FALSE; -u8 acpi_gbl_abort_method =3D FALSE; -u8 acpi_gbl_method_executing =3D FALSE; - -/* System flags */ - -u32 acpi_gbl_startup_flags =3D 0; - -/* System starts uninitialized */ - -u8 acpi_gbl_shutdown =3D TRUE; - -const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] =3D { - "\\_S0_", - "\\_S1_", - "\\_S2_", - "\\_S3_", - "\\_S4_", - "\\_S5_" -}; - -const char *acpi_gbl_highest_dstate_names[4] =3D { - "_S1D", - "_S2D", - "_S3D", - "_S4D" -}; - -/*************************************************************************= ****** - * * FUNCTION: acpi_format_exception * * PARAMETERS: Status - The acpi_status code to be formatted @@ -114,7 +67,7 @@ const char *acpi_gbl_highest_dstate_name * *************************************************************************= *****/ =20 -const char *acpi_format_exception(acpi_status status) +const char *__init acpi_format_exception(acpi_status status) { const char *exception =3D NULL; =20 @@ -135,106 +88,6 @@ const char *acpi_format_exception(acpi_s return (ACPI_CAST_PTR(const char, exception)); } =20 -ACPI_EXPORT_SYMBOL(acpi_format_exception) - -/*************************************************************************= ****** - * - * Namespace globals - * - *************************************************************************= *****/ -/* - * Predefined ACPI Names (Built-in to the Interpreter) - * - * NOTES: - * 1) _SB_ is defined to be a device to allow \_SB_._INI to be run - * during the initialization sequence. - * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to - * perform a Notify() operation on it. - */ -const struct acpi_predefined_names acpi_gbl_pre_defined_names[] =3D { - {"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL}, - {"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL}, - {"_SB_", ACPI_TYPE_DEVICE, NULL}, - {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL}, - {"_TZ_", ACPI_TYPE_THERMAL, NULL}, - {"_REV", ACPI_TYPE_INTEGER, (char *)ACPI_CA_SUPPORT_LEVEL}, - {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, - {"_GL_", ACPI_TYPE_MUTEX, (char *)1}, - -#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONL= Y) - {"_OSI", ACPI_TYPE_METHOD, (char *)1}, -#endif - - /* Table terminator */ - - {NULL, ACPI_TYPE_ANY, NULL} -}; - -/* - * Properties of the ACPI Object Types, both internal and external. - * The table is indexed by values of acpi_object_type - */ -const u8 acpi_gbl_ns_properties[] =3D { - ACPI_NS_NORMAL, /* 00 Any */ - ACPI_NS_NORMAL, /* 01 Number */ - ACPI_NS_NORMAL, /* 02 String */ - ACPI_NS_NORMAL, /* 03 Buffer */ - ACPI_NS_NORMAL, /* 04 Package */ - ACPI_NS_NORMAL, /* 05 field_unit */ - ACPI_NS_NEWSCOPE, /* 06 Device */ - ACPI_NS_NORMAL, /* 07 Event */ - ACPI_NS_NEWSCOPE, /* 08 Method */ - ACPI_NS_NORMAL, /* 09 Mutex */ - ACPI_NS_NORMAL, /* 10 Region */ - ACPI_NS_NEWSCOPE, /* 11 Power */ - ACPI_NS_NEWSCOPE, /* 12 Processor */ - ACPI_NS_NEWSCOPE, /* 13 Thermal */ - ACPI_NS_NORMAL, /* 14 buffer_field */ - ACPI_NS_NORMAL, /* 15 ddb_handle */ - ACPI_NS_NORMAL, /* 16 Debug Object */ - ACPI_NS_NORMAL, /* 17 def_field */ - ACPI_NS_NORMAL, /* 18 bank_field */ - ACPI_NS_NORMAL, /* 19 index_field */ - ACPI_NS_NORMAL, /* 20 Reference */ - ACPI_NS_NORMAL, /* 21 Alias */ - ACPI_NS_NORMAL, /* 22 method_alias */ - ACPI_NS_NORMAL, /* 23 Notify */ - ACPI_NS_NORMAL, /* 24 Address Handler */ - ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 25 Resource Desc */ - ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* 26 Resource Field */ - ACPI_NS_NEWSCOPE, /* 27 Scope */ - ACPI_NS_NORMAL, /* 28 Extra */ - ACPI_NS_NORMAL, /* 29 Data */ - ACPI_NS_NORMAL /* 30 Invalid */ -}; - -/* Hex to ASCII conversion table */ - -static const char acpi_gbl_hex_to_ascii[] =3D { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' -}; - -/*************************************************************************= ****** - * - * FUNCTION: acpi_ut_hex_to_ascii_char - * - * PARAMETERS: Integer - Contains the hex digit - * Position - bit position of the digit within = the - * integer (multiple of 4) - * - * RETURN: The converted Ascii character - * - * DESCRIPTION: Convert a hex digit to an Ascii character - * - *************************************************************************= *****/ - -char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position) -{ - - return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]); -} - /*************************************************************************= ***** * * Event and Hardware globals @@ -313,28 +166,7 @@ struct acpi_bit_register_info acpi_gbl_b ACPI_BITMASK_ARB_DISABLE} }; =20 -struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVEN= TS] =3D { - /* ACPI_EVENT_PMTIMER */ {ACPI_BITREG_TIMER_STATUS, - ACPI_BITREG_TIMER_ENABLE, - ACPI_BITMASK_TIMER_STATUS, - ACPI_BITMASK_TIMER_ENABLE}, - /* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_LOCK_STATUS, - ACPI_BITREG_GLOBAL_LOCK_ENABLE, - ACPI_BITMASK_GLOBAL_LOCK_STATUS, - ACPI_BITMASK_GLOBAL_LOCK_ENABLE}, - /* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS, - ACPI_BITREG_POWER_BUTTON_ENABLE, - ACPI_BITMASK_POWER_BUTTON_STATUS, - ACPI_BITMASK_POWER_BUTTON_ENABLE}, - /* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, - ACPI_BITREG_SLEEP_BUTTON_ENABLE, - ACPI_BITMASK_SLEEP_BUTTON_STATUS, - ACPI_BITMASK_SLEEP_BUTTON_ENABLE}, - /* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, - ACPI_BITREG_RT_CLOCK_ENABLE, - ACPI_BITMASK_RT_CLOCK_STATUS, - ACPI_BITMASK_RT_CLOCK_ENABLE}, -}; +#ifdef ACPI_DEBUG_OUTPUT =20 /*************************************************************************= ****** * @@ -350,7 +182,7 @@ struct acpi_fixed_event_info acpi_gbl_fi =20 /* Region type decoding */ =20 -const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =3D { +static const char *const acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS= ] =3D { "SystemMemory", "SystemIO", "PCI_Config", @@ -361,7 +193,7 @@ const char *acpi_gbl_region_types[ACPI_N "DataTable" }; =20 -char *acpi_ut_get_region_name(u8 space_id) +const char *acpi_ut_get_region_name(u8 space_id) { =20 if (space_id >=3D ACPI_USER_REGION_BEGIN) { @@ -373,369 +205,4 @@ char *acpi_ut_get_region_name(u8 space_i return (ACPI_CAST_PTR(char, acpi_gbl_region_types[space_id])); } =20 -/*************************************************************************= ****** - * - * FUNCTION: acpi_ut_get_event_name - * - * PARAMETERS: None. - * - * RETURN: Status - * - * DESCRIPTION: Translate a Event ID into a name string (Debug only) - * - *************************************************************************= *****/ - -/* Event type decoding */ - -static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =3D { - "PM_Timer", - "GlobalLock", - "PowerButton", - "SleepButton", - "RealTimeClock", -}; - -char *acpi_ut_get_event_name(u32 event_id) -{ - - if (event_id > ACPI_EVENT_MAX) { - return ("InvalidEventID"); - } - - return (ACPI_CAST_PTR(char, acpi_gbl_event_types[event_id])); -} - -/*************************************************************************= ****** - * - * FUNCTION: acpi_ut_get_type_name - * - * PARAMETERS: None. - * - * RETURN: Status - * - * DESCRIPTION: Translate a Type ID into a name string (Debug only) - * - *************************************************************************= *****/ - -/* - * Elements of acpi_gbl_ns_type_names below must match - * one-to-one with values of acpi_object_type - * - * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when = searching; - * when stored in a table it really means that we have thus far seen no - * evidence to indicate what type is actually going to be stored for this = entry. - */ -static const char acpi_gbl_bad_type[] =3D "UNDEFINED"; - -/* Printable names of the ACPI object types */ - -static const char *acpi_gbl_ns_type_names[] =3D { - /* 00 */ "Untyped", - /* 01 */ "Integer", - /* 02 */ "String", - /* 03 */ "Buffer", - /* 04 */ "Package", - /* 05 */ "FieldUnit", - /* 06 */ "Device", - /* 07 */ "Event", - /* 08 */ "Method", - /* 09 */ "Mutex", - /* 10 */ "Region", - /* 11 */ "Power", - /* 12 */ "Processor", - /* 13 */ "Thermal", - /* 14 */ "BufferField", - /* 15 */ "DdbHandle", - /* 16 */ "DebugObject", - /* 17 */ "RegionField", - /* 18 */ "BankField", - /* 19 */ "IndexField", - /* 20 */ "Reference", - /* 21 */ "Alias", - /* 22 */ "MethodAlias", - /* 23 */ "Notify", - /* 24 */ "AddrHandler", - /* 25 */ "ResourceDesc", - /* 26 */ "ResourceFld", - /* 27 */ "Scope", - /* 28 */ "Extra", - /* 29 */ "Data", - /* 30 */ "Invalid" -}; - -char *acpi_ut_get_type_name(acpi_object_type type) -{ - - if (type > ACPI_TYPE_INVALID) { - return (ACPI_CAST_PTR(char, acpi_gbl_bad_type)); - } - - return (ACPI_CAST_PTR(char, acpi_gbl_ns_type_names[type])); -} - -char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc) -{ - - if (!obj_desc) { - return ("[NULL Object Descriptor]"); - } - - return (acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE(obj_desc))); -} - -/*************************************************************************= ****** - * - * FUNCTION: acpi_ut_get_descriptor_name - * - * PARAMETERS: Object - An ACPI object - * - * RETURN: Pointer to a string - * - * DESCRIPTION: Validate object and return the descriptor type - * - *************************************************************************= *****/ - -/* Printable names of object descriptor types */ - -static const char *acpi_gbl_desc_type_names[] =3D { - /* 00 */ "Invalid", - /* 01 */ "Cached", - /* 02 */ "State-Generic", - /* 03 */ "State-Update", - /* 04 */ "State-Package", - /* 05 */ "State-Control", - /* 06 */ "State-RootParseScope", - /* 07 */ "State-ParseScope", - /* 08 */ "State-WalkScope", - /* 09 */ "State-Result", - /* 10 */ "State-Notify", - /* 11 */ "State-Thread", - /* 12 */ "Walk", - /* 13 */ "Parser", - /* 14 */ "Operand", - /* 15 */ "Node" -}; - -char *acpi_ut_get_descriptor_name(void *object) -{ - - if (!object) { - return ("NULL OBJECT"); - } - - if (ACPI_GET_DESCRIPTOR_TYPE(object) > ACPI_DESC_TYPE_MAX) { - return (ACPI_CAST_PTR(char, acpi_gbl_bad_type)); - } - - return (ACPI_CAST_PTR(char, - acpi_gbl_desc_type_names[ACPI_GET_DESCRIPTOR_= TYPE - (object)])); - -} - -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) -/* - * Strings and procedures used for debug only - */ - -/*************************************************************************= ****** - * - * FUNCTION: acpi_ut_get_mutex_name - * - * PARAMETERS: mutex_id - The predefined ID for this mutex. - * - * RETURN: String containing the name of the mutex. Always returns a = valid - * pointer. - * - * DESCRIPTION: Translate a mutex ID into a name string (Debug only) - * - *************************************************************************= *****/ - -char *acpi_ut_get_mutex_name(u32 mutex_id) -{ - - if (mutex_id > ACPI_MAX_MUTEX) { - return ("Invalid Mutex ID"); - } - - return (acpi_gbl_mutex_names[mutex_id]); -} - -/*************************************************************************= ****** - * - * FUNCTION: acpi_ut_get_notify_name - * - * PARAMETERS: notify_value - Value from the Notify() request - * - * RETURN: String corresponding to the Notify Value. - * - * DESCRIPTION: Translate a Notify Value to a notify namestring. - * - *************************************************************************= *****/ - -/* Names for Notify() values, used for debug output */ - -static const char *acpi_gbl_notify_value_names[] =3D { - "Bus Check", - "Device Check", - "Device Wake", - "Eject Request", - "Device Check Light", - "Frequency Mismatch", - "Bus Mode Mismatch", - "Power Fault", - "Capabilities Check", - "Device PLD Check", - "Reserved", - "System Locality Update" -}; - -const char *acpi_ut_get_notify_name(u32 notify_value) -{ - - if (notify_value <=3D ACPI_NOTIFY_MAX) { - return (acpi_gbl_notify_value_names[notify_value]); - } else if (notify_value <=3D ACPI_MAX_SYS_NOTIFY) { - return ("Reserved"); - } else { /* Greater or equal to 0x80 */ - - return ("**Device Specific**"); - } -} #endif - -/*************************************************************************= ****** - * - * FUNCTION: acpi_ut_valid_object_type - * - * PARAMETERS: Type - Object type to be validated - * - * RETURN: TRUE if valid object type, FALSE otherwise - * - * DESCRIPTION: Validate an object type - * - *************************************************************************= *****/ - -u8 acpi_ut_valid_object_type(acpi_object_type type) -{ - - if (type > ACPI_TYPE_LOCAL_MAX) { - - /* Note: Assumes all TYPEs are contiguous (external/local) = */ - - return (FALSE); - } - - return (TRUE); -} - -/*************************************************************************= ****** - * - * FUNCTION: acpi_ut_init_globals - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Init library globals. All globals that require specific - * initialization should be initialized here! - * - *************************************************************************= *****/ - -void acpi_ut_init_globals(void) -{ -#if 0 - acpi_status status; -#endif - u32 i; - - ACPI_FUNCTION_TRACE(ut_init_globals); - -#if 0 - /* Create all memory caches */ - - status =3D acpi_ut_create_caches(); - if (ACPI_FAILURE(status)) { - return; - } -#endif - - /* Mutex locked flags */ - - for (i =3D 0; i < ACPI_NUM_MUTEX; i++) { - acpi_gbl_mutex_info[i].mutex =3D NULL; - acpi_gbl_mutex_info[i].thread_id =3D ACPI_MUTEX_NOT_ACQUIRE= D; - acpi_gbl_mutex_info[i].use_count =3D 0; - } - - for (i =3D 0; i < ACPI_NUM_OWNERID_MASKS; i++) { - acpi_gbl_owner_id_mask[i] =3D 0; - } - acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] =3D 0x80000000; = /* Last ID is never valid */ - - /* GPE support */ - - acpi_gbl_gpe_xrupt_list_head =3D NULL; - acpi_gbl_gpe_fadt_blocks[0] =3D NULL; - acpi_gbl_gpe_fadt_blocks[1] =3D NULL; - - /* Global handlers */ - - acpi_gbl_system_notify.handler =3D NULL; - acpi_gbl_device_notify.handler =3D NULL; - acpi_gbl_exception_handler =3D NULL; - acpi_gbl_init_handler =3D NULL; - /*acpi_gbl_table_handler =3D NULL;*/ - - /* Global Lock support */ - - acpi_gbl_global_lock_semaphore =3D NULL; - acpi_gbl_global_lock_mutex =3D NULL; - acpi_gbl_global_lock_acquired =3D FALSE; - acpi_gbl_global_lock_handle =3D 0; - - /* Miscellaneous variables */ - - acpi_gbl_cm_single_step =3D FALSE; - acpi_gbl_db_terminate_threads =3D FALSE; - acpi_gbl_shutdown =3D FALSE; - acpi_gbl_ns_lookup_count =3D 0; - acpi_gbl_ps_find_count =3D 0; - acpi_gbl_acpi_hardware_present =3D TRUE; - acpi_gbl_last_owner_id_index =3D 0; - acpi_gbl_next_owner_id_offset =3D 0; - acpi_gbl_trace_method_name =3D 0; - acpi_gbl_trace_dbg_level =3D 0; - acpi_gbl_trace_dbg_layer =3D 0; - acpi_gbl_debugger_configuration =3D DEBUGGER_THREADING; - acpi_gbl_db_output_flags =3D ACPI_DB_CONSOLE_OUTPUT; - - /* Hardware oriented */ - - acpi_gbl_events_initialized =3D FALSE; - acpi_gbl_system_awake_and_running =3D TRUE; - - /* Namespace */ - - acpi_gbl_root_node =3D NULL; - acpi_gbl_root_node_struct.name.integer =3D ACPI_ROOT_NAME; - acpi_gbl_root_node_struct.descriptor_type =3D ACPI_DESC_TYPE_NAMED;= - acpi_gbl_root_node_struct.type =3D ACPI_TYPE_DEVICE; - acpi_gbl_root_node_struct.child =3D NULL; - acpi_gbl_root_node_struct.peer =3D NULL; - acpi_gbl_root_node_struct.object =3D NULL; - acpi_gbl_root_node_struct.flags =3D ANOBJ_END_OF_PEER_LIST; - -#ifdef ACPI_DEBUG_OUTPUT - acpi_gbl_lowest_stack_pointer =3D ACPI_CAST_PTR(acpi_size, = ACPI_SIZE_MAX); -#endif - -#ifdef ACPI_DBG_TRACK_ALLOCATIONS - acpi_gbl_display_final_mem_stats =3D FALSE; -#endif - - return_VOID; -} - -ACPI_EXPORT_SYMBOL(acpi_dbg_level) - ACPI_EXPORT_SYMBOL(acpi_dbg_layer) --- 2011-02-10.orig/xen/drivers/acpi/utilities/utmisc.c +++ 2011-02-10/xen/drivers/acpi/utilities/utmisc.c @@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utmisc") * an ASCII string. * *************************************************************************= *****/ -const char *acpi_ut_validate_exception(acpi_status status) +const char *__init acpi_ut_validate_exception(acpi_status status) { acpi_status sub_status; const char *exception =3D NULL; @@ -122,40 +122,6 @@ const char *acpi_ut_validate_exception(a =20 /*************************************************************************= ****** * - * FUNCTION: acpi_ut_set_integer_width - * - * PARAMETERS: Revision From DSDT header - * - * RETURN: None - * - * DESCRIPTION: Set the global integer bit width based upon the revision - * of the DSDT. For Revision 1 and 0, Integers are 32 bits. - * For Revision 2 and above, Integers are 64 bits. Yes, = this - * makes a difference. - * - *************************************************************************= *****/ - -void acpi_ut_set_integer_width(u8 revision) -{ - - if (revision < 2) { - - /* 32-bit case */ - - acpi_gbl_integer_bit_width =3D 32; - acpi_gbl_integer_nybble_width =3D 8; - acpi_gbl_integer_byte_width =3D 4; - } else { - /* 64-bit case (ACPI 2.0+) */ - - acpi_gbl_integer_bit_width =3D 64; - acpi_gbl_integer_nybble_width =3D 16; - acpi_gbl_integer_byte_width =3D 8; - } -} - -/*************************************************************************= ****** - * * FUNCTION: acpi_ut_error, acpi_ut_warning, acpi_ut_info * * PARAMETERS: module_name - Caller's module name (for error = output) @@ -168,7 +134,7 @@ void acpi_ut_set_integer_width(u8 revisi * *************************************************************************= *****/ =20 -void ACPI_INTERNAL_VAR_XFACE +void ACPI_INTERNAL_VAR_XFACE __init acpi_ut_error(char *module_name, u32 line_number, char *format, ...) { va_list args; @@ -181,23 +147,7 @@ acpi_ut_error(char *module_name, u32 lin va_end(args); } =20 -void ACPI_INTERNAL_VAR_XFACE -acpi_ut_exception(char *module_name, - u32 line_number, acpi_status status, char *format, ...) -{ - va_list args; - - acpi_os_printf("ACPI Exception (%s-%04d): %s, ", module_name, - line_number, acpi_format_exception(status)); - - va_start(args, format); - acpi_os_vprintf(format, args); - acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); -} - -EXPORT_SYMBOL(acpi_ut_exception); - -void ACPI_INTERNAL_VAR_XFACE +void ACPI_INTERNAL_VAR_XFACE __init acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) { va_list args; @@ -211,7 +161,7 @@ acpi_ut_warning(char *module_name, u32 l va_end(args); } =20 -void ACPI_INTERNAL_VAR_XFACE +void ACPI_INTERNAL_VAR_XFACE __init acpi_ut_info(char *module_name, u32 line_number, char *format, ...) { va_list args; --- 2011-02-10.orig/xen/drivers/passthrough/vtd/dmar.c +++ 2011-02-10/xen/drivers/passthrough/vtd/dmar.c @@ -46,6 +46,7 @@ LIST_HEAD_READ_MOSTLY(acpi_rmrr_units); static LIST_HEAD_READ_MOSTLY(acpi_atsr_units); static LIST_HEAD_READ_MOSTLY(acpi_rhsa_units); =20 +static struct acpi_table_header *__read_mostly dmar_table; static u64 __read_mostly igd_drhd_address; =20 void dmar_scope_add_buses(struct dmar_scope *scope, u16 sec_bus, u16 = sub_bus) @@ -681,6 +682,7 @@ static int __init acpi_parse_dmar(struct u8 dmar_host_address_width; int ret =3D 0; =20 + dmar_table =3D table; dmar =3D (struct acpi_table_dmar *)table; =20 if ( !iommu_enabled ) @@ -772,22 +774,8 @@ int __init acpi_dmar_init(void) return parse_dmar_table(acpi_parse_dmar); } =20 -static struct acpi_table_header *get_dmar(void) -{ - struct acpi_table_header *dmar_table =3D NULL; - unsigned long flags; - - /* Disabling IRQs avoids cross-CPU TLB flush in map_pages_to_xen(). = */ - local_irq_save(flags); - acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_table); - local_irq_restore(flags); - - return dmar_table; -} - void acpi_dmar_reinstate(void) { - struct acpi_table_header *dmar_table =3D get_dmar(); if ( dmar_table =3D=3D NULL ) return; dmar_table->signature[0] =3D 'D'; @@ -796,7 +784,6 @@ void acpi_dmar_reinstate(void) =20 void acpi_dmar_zap(void) { - struct acpi_table_header *dmar_table =3D get_dmar(); if ( dmar_table =3D=3D NULL ) return; dmar_table->signature[0] =3D 'X'; --- 2011-02-10.orig/xen/include/acpi/acexcep.h +++ 2011-02-10/xen/include/acpi/acexcep.h @@ -189,7 +189,7 @@ * String versions of the exception codes above * These strings must match the corresponding defines exactly */ -char const *acpi_gbl_exception_names_env[] =3D { +char const *__initdata acpi_gbl_exception_names_env[] =3D { "AE_OK", "AE_ERROR", "AE_NO_ACPI_TABLES", @@ -224,7 +224,7 @@ char const *acpi_gbl_exception_names_env "AE_OWNER_ID_LIMIT" }; =20 -char const *acpi_gbl_exception_names_pgm[] =3D { +char const *__initdata acpi_gbl_exception_names_pgm[] =3D { "AE_BAD_PARAMETER", "AE_BAD_CHARACTER", "AE_BAD_PATHNAME", @@ -236,7 +236,7 @@ char const *acpi_gbl_exception_names_pgm "AE_BAD_DECIMAL_CONSTANT" }; =20 -char const *acpi_gbl_exception_names_tbl[] =3D { +char const *__initdata acpi_gbl_exception_names_tbl[] =3D { "AE_BAD_SIGNATURE", "AE_BAD_HEADER", "AE_BAD_CHECKSUM", @@ -245,7 +245,7 @@ char const *acpi_gbl_exception_names_tbl "AE_INVALID_TABLE_LENGTH" }; =20 -char const *acpi_gbl_exception_names_aml[] =3D { +char const *__initdata acpi_gbl_exception_names_aml[] =3D { "AE_AML_ERROR", "AE_AML_PARSE", "AE_AML_BAD_OPCODE", @@ -282,7 +282,7 @@ char const *acpi_gbl_exception_names_aml "AE_AML_ILLEGAL_ADDRESS" }; =20 -char const *acpi_gbl_exception_names_ctrl[] =3D { +char const *__initdata acpi_gbl_exception_names_ctrl[] =3D { "AE_CTRL_RETURN_VALUE", "AE_CTRL_PENDING", "AE_CTRL_TERMINATE", --- 2011-02-10.orig/xen/include/acpi/acglobal.h +++ 2011-02-10/xen/include/acpi/acglobal.h @@ -60,74 +60,6 @@ =20 /*************************************************************************= **** * - * Runtime configuration (static defaults that can be overriden at = runtime) - * - *************************************************************************= ***/ - -/* - * Enable "slack" in the AML interpreter? Default is FALSE, and the - * interpreter strictly follows the ACPI specification. Setting to TRUE - * allows the interpreter to ignore certain errors and/or bad AML = constructs. - * - * Currently, these features are enabled by this flag: - * - * 1) Allow "implicit return" of last value in a control method - * 2) Allow access beyond the end of an operation region - * 3) Allow access to uninitialized locals/args (auto-init to integer 0) - * 4) Allow ANY object type to be a source operand for the Store() = operator - * 5) Allow unresolved references (invalid target name) in package = objects - * 6) Enable warning messages for behavior that is not ACPI spec = compliant - */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, = FALSE); - -/* - * Automatically serialize ALL control methods? Default is FALSE, meaning - * to use the Serialized/not_serialized method flags on a per method = basis. - * Only change this if the ASL code is poorly written and cannot handle - * reentrancy even though methods are marked "NotSerialized". - */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE); - -/* - * Create the predefined _OSI method in the namespace? Default is TRUE - * because ACPI CA is fully compatible with other ACPI implementations. - * Changing this will revert ACPI CA (and machine ASL) to pre-OSI = behavior. - */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE); - -/* - * Disable wakeup GPEs during runtime? Default is TRUE because WAKE and - * RUNTIME GPEs should never be shared, and WAKE GPEs should typically = only - * be enabled just before going to sleep. - */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE); - -/*************************************************************************= **** - * - * Debug support - * - *************************************************************************= ***/ - -/* Runtime configuration of debug print levels */ - -extern u32 acpi_dbg_level; -extern u32 acpi_dbg_layer; - -/* Procedure nesting level for debug output */ - -extern u32 acpi_gbl_nesting_level; - -/* Support for dynamic control method tracing mechanism */ - -ACPI_EXTERN u32 acpi_gbl_original_dbg_level; -ACPI_EXTERN u32 acpi_gbl_original_dbg_layer; -ACPI_EXTERN acpi_name acpi_gbl_trace_method_name; -ACPI_EXTERN u32 acpi_gbl_trace_dbg_level; -ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; -ACPI_EXTERN u32 acpi_gbl_trace_flags; - -/*************************************************************************= **** - * * ACPI Table globals * *************************************************************************= ***/ @@ -140,109 +72,18 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags; */ ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list; ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT; -extern acpi_native_uint acpi_gbl_permanent_mmap; =20 /* These addresses are calculated from FADT address values */ =20 ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable; ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable; =20 -/* - * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is - * determined by the revision of the DSDT: If the DSDT revision is less = than - * 2, use only the lower 32 bits of the internal 64-bit Integer. - */ -ACPI_EXTERN u8 acpi_gbl_integer_bit_width; -ACPI_EXTERN u8 acpi_gbl_integer_byte_width; -ACPI_EXTERN u8 acpi_gbl_integer_nybble_width; - -/*************************************************************************= **** - * - * Mutual exlusion within ACPICA subsystem - * - *************************************************************************= ***/ - -/* - * Predefined mutex objects. This array contains the - * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. - * (The table maps local handles to the real OS handles) - */ -ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX]; - -/* - * Global lock semaphore works in conjunction with the actual HW global = lock - */ -ACPI_EXTERN acpi_mutex acpi_gbl_global_lock_mutex; -ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore; - -/* - * Spinlocks are used for interfaces that can be possibly called at - * interrupt level - */ -ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs = and registers */ -ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W = except GPE registers */ -#define acpi_gbl_gpe_lock &_acpi_gbl_gpe_lock -#define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock - /*************************************************************************= **** * * Miscellaneous globals * *************************************************************************= ***/ =20 -#ifdef ACPI_DBG_TRACK_ALLOCATIONS - -/* Lists for tracking memory allocations */ - -ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; -ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; -ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats; -#endif - -/* Object caches */ - -ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache; - -/* Global handlers */ - -ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify; -ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; -ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; -ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; -ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; - -/* Misc */ - -ACPI_EXTERN u32 acpi_gbl_original_mode; -ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; -ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; -ACPI_EXTERN u32 acpi_gbl_ps_find_count; -ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS]; -ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; -ACPI_EXTERN u16 acpi_gbl_global_lock_handle; -ACPI_EXTERN u8 acpi_gbl_last_owner_id_index; -ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset; -ACPI_EXTERN u8 acpi_gbl_debugger_configuration; -ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; -ACPI_EXTERN u8 acpi_gbl_step_to_next_call; -ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present; -ACPI_EXTERN u8 acpi_gbl_global_lock_present; -ACPI_EXTERN u8 acpi_gbl_events_initialized; -ACPI_EXTERN u8 acpi_gbl_system_awake_and_running; - -extern u8 acpi_gbl_shutdown; -extern u32 acpi_gbl_startup_flags; -extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT]; -extern const char *acpi_gbl_highest_dstate_names[4]; -extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES]= ; -extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS]; - -/* Exception codes */ - #ifndef DEFINE_ACPI_GLOBALS =20 extern char const *acpi_gbl_exception_names_env[]; @@ -255,127 +96,11 @@ extern char const *acpi_gbl_exception_na =20 /*************************************************************************= **** * - * Namespace globals - * - *************************************************************************= ***/ - -#define NUM_NS_TYPES ACPI_TYPE_INVALID+1 - -#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONL= Y) -#define NUM_PREDEFINED_NAMES 10 -#else -#define NUM_PREDEFINED_NAMES 9 -#endif - -ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device; - -extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES]; -extern const struct acpi_predefined_names - acpi_gbl_pre_defined_names[NUM_PREDEFINED_NAMES]; - -#ifdef ACPI_DEBUG_OUTPUT -ACPI_EXTERN u32 acpi_gbl_current_node_count; -ACPI_EXTERN u32 acpi_gbl_current_node_size; -ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count; -ACPI_EXTERN acpi_size acpi_gbl_entry_stack_pointer; -ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer; -ACPI_EXTERN u32 acpi_gbl_deepest_nesting; -#endif - -/*************************************************************************= **** - * - * Interpreter globals - * - *************************************************************************= ***/ - -ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list; - -/* Control method single step flag */ - -ACPI_EXTERN u8 acpi_gbl_cm_single_step; - -/*************************************************************************= **** - * * Hardware globals * *************************************************************************= ***/ =20 extern struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG]; -ACPI_EXTERN u8 acpi_gbl_sleep_type_a; -ACPI_EXTERN u8 acpi_gbl_sleep_type_b; - -/*************************************************************************= **** - * - * Event and GPE globals - * - *************************************************************************= ***/ - -extern struct acpi_fixed_event_info - acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS]; -ACPI_EXTERN struct acpi_fixed_event_handler - acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS]; -ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; -ACPI_EXTERN struct acpi_gpe_block_info -*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; - -/*************************************************************************= **** - * - * Debugger globals - * - *************************************************************************= ***/ - -ACPI_EXTERN u8 acpi_gbl_db_output_flags; - -#ifdef ACPI_DISASSEMBLER - -ACPI_EXTERN u8 acpi_gbl_db_opt_disasm; -ACPI_EXTERN u8 acpi_gbl_db_opt_verbose; -#endif - -#ifdef ACPI_DEBUGGER - -extern u8 acpi_gbl_method_executing; -extern u8 acpi_gbl_abort_method; -extern u8 acpi_gbl_db_terminate_threads; - -ACPI_EXTERN int optind; -ACPI_EXTERN char *optarg; - -ACPI_EXTERN u8 acpi_gbl_db_opt_tables; -ACPI_EXTERN u8 acpi_gbl_db_opt_stats; -ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods; - -ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]; -ACPI_EXTERN char acpi_gbl_db_line_buf[80]; -ACPI_EXTERN char acpi_gbl_db_parsed_buf[80]; -ACPI_EXTERN char acpi_gbl_db_scope_buf[40]; -ACPI_EXTERN char acpi_gbl_db_debug_filename[40]; -ACPI_EXTERN u8 acpi_gbl_db_output_to_file; -ACPI_EXTERN char *acpi_gbl_db_buffer; -ACPI_EXTERN char *acpi_gbl_db_filename; -ACPI_EXTERN u32 acpi_gbl_db_debug_level; -ACPI_EXTERN u32 acpi_gbl_db_console_debug_level; -ACPI_EXTERN struct acpi_table_header *acpi_gbl_db_table_ptr; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node; - -/* - * Statistic globals - */ -ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1]; -ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1]; -ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc; -ACPI_EXTERN u16 acpi_gbl_node_type_count_misc; -ACPI_EXTERN u32 acpi_gbl_num_nodes; -ACPI_EXTERN u32 acpi_gbl_num_objects; - -ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree; -ACPI_EXTERN u32 acpi_gbl_size_of_method_trees; -ACPI_EXTERN u32 acpi_gbl_size_of_node_entries; -ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects; - -#endif /* ACPI_DEBUGGER */ =20 #endif /* __ACGLOBAL_H__ */ --- 2011-02-10.orig/xen/include/acpi/achware.h +++ 2011-02-10/xen/include/acpi/achware.h @@ -44,32 +44,9 @@ #ifndef __ACHWARE_H__ #define __ACHWARE_H__ =20 -/* PM Timer ticks per second (HZ) */ - -#define PM_TIMER_FREQUENCY 3579545 - -/* Values for the _SST reserved method */ - -#define ACPI_SST_INDICATOR_OFF 0 -#define ACPI_SST_WORKING 1 -#define ACPI_SST_WAKING 2 -#define ACPI_SST_SLEEPING 3 -#define ACPI_SST_SLEEP_CONTEXT 4 - -/* Prototypes */ - -/* - * hwacpi - high level functions - */ -acpi_status acpi_hw_set_mode(u32 mode); - -u32 acpi_hw_get_mode(void); - /* * hwregs - ACPI Register I/O */ -struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 = register_id); - acpi_status acpi_hw_register_read(u32 register_id, u32 * return_value); =20 @@ -82,50 +59,4 @@ acpi_hw_low_level_read(u32 width, acpi_status acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address = *reg); =20 -acpi_status acpi_hw_clear_acpi_status(void); - -/* - * hwgpe - GPE support - */ -acpi_status -acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info); - -acpi_status -acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, - struct acpi_gpe_block_info *gpe_block); - -acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info);= - -acpi_status -acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, - struct acpi_gpe_block_info *gpe_block); - -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info, - acpi_event_status * event_status); -#endif /* ACPI_FUTURE_USAGE */ - -acpi_status acpi_hw_disable_all_gpes(void); - -acpi_status acpi_hw_enable_all_runtime_gpes(void); - -acpi_status acpi_hw_enable_all_wakeup_gpes(void); - -acpi_status -acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_inf= o, - struct acpi_gpe_block_info *gpe_block); - -#ifdef ACPI_FUTURE_USAGE -/* - * hwtimer - ACPI Timer prototypes - */ -acpi_status acpi_get_timer_resolution(u32 * resolution); - -acpi_status acpi_get_timer(u32 * ticks); - -acpi_status -acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * time_elapsed= ); -#endif /* ACPI_FUTURE_USAGE */ - #endif /* __ACHWARE_H__ */ --- 2011-02-10.orig/xen/include/acpi/aclocal.h +++ 2011-02-10/xen/include/acpi/aclocal.h @@ -46,176 +46,18 @@ =20 /* acpisrc:struct_defs -- for acpisrc conversion */ =20 -#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec = */ -#define ACPI_DO_NOT_WAIT 0 -#define ACPI_SERIALIZED 0xFF - -typedef u32 acpi_mutex_handle; -#define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1) - -/* Total number of aml opcodes defined */ - -#define AML_NUM_OPCODES 0x7F - -/* Forward declarations */ - -struct acpi_walk_state; -struct acpi_obj_mutex; -union acpi_parse_object; - -/*************************************************************************= **** - * - * Mutex typedefs and structs - * - *************************************************************************= ***/ - -/* - * Predefined handles for the mutex objects used within the subsystem - * All mutex objects are automatically created by acpi_ut_mutex_initialize= . - * - * The acquire/release ordering protocol is implied via this list. = Mutexes - * with a lower value must be acquired before mutexes with a higher = value. - * - * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names - * table below also! - */ -#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main = lock */ -#define ACPI_MTX_NAMESPACE 1 /* ACPI Namespace */ -#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */ -#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */ -#define ACPI_MTX_CACHES 4 /* Internal caches, = general purposes */ -#define ACPI_MTX_MEMORY 5 /* Debug memory tracking = lists */ -#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */ -#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */ - -#define ACPI_MAX_MUTEX 7 -#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 - -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) -#ifdef DEFINE_ACPI_GLOBALS - -/* Debug names for the mutexes above */ - -static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] =3D { - "ACPI_MTX_Interpreter", - "ACPI_MTX_Tables", - "ACPI_MTX_Namespace", - "ACPI_MTX_Events", - "ACPI_MTX_Caches", - "ACPI_MTX_Memory", - "ACPI_MTX_CommandComplete", - "ACPI_MTX_CommandReady" -}; - -#endif -#endif - -/* - * Predefined handles for spinlocks used within the subsystem. - * These spinlocks are created by acpi_ut_mutex_initialize - */ -#define ACPI_LOCK_GPES 0 -#define ACPI_LOCK_HARDWARE 1 - -#define ACPI_MAX_LOCK 1 -#define ACPI_NUM_LOCK ACPI_MAX_LOCK+1 - -/* Owner IDs are used to track namespace nodes for selective deletion */ - -typedef u8 acpi_owner_id; -#define ACPI_OWNER_ID_MAX 0xFF - -/* This Thread ID means that the mutex is not in use (unlocked) */ - -#define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0 - -/* Table for the global mutexes */ - -struct acpi_mutex_info { - acpi_mutex mutex; - u32 use_count; - acpi_thread_id thread_id; -}; - -/* Lock flag parameter for various interfaces */ - -#define ACPI_MTX_DO_NOT_LOCK 0 -#define ACPI_MTX_LOCK 1 - -/* Field access granularities */ - -#define ACPI_FIELD_BYTE_GRANULARITY 1 -#define ACPI_FIELD_WORD_GRANULARITY 2 -#define ACPI_FIELD_DWORD_GRANULARITY 4 -#define ACPI_FIELD_QWORD_GRANULARITY 8 - -#define ACPI_ENTRY_NOT_FOUND NULL - /*************************************************************************= **** * * Namespace typedefs and structs * *************************************************************************= ***/ =20 -/* Operational modes of the AML interpreter/scanner */ - -typedef enum { - ACPI_IMODE_LOAD_PASS1 =3D 0x01, - ACPI_IMODE_LOAD_PASS2 =3D 0x02, - ACPI_IMODE_EXECUTE =3D 0x03 -} acpi_interpreter_mode; - union acpi_name_union { u32 integer; char ascii[4]; }; =20 /* - * The Namespace Node describes a named object that appears in the AML. - * descriptor_type is used to differentiate between internal descriptors. - * - * The node is optimized for both 32-bit and 64-bit platforms: - * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case. - * - * Note: The descriptor_type and Type fields must appear in the identical - * position in both the struct acpi_namespace_node and union acpi_operand_= object - * structures. - */ -struct acpi_namespace_node { - union acpi_operand_object *object; /* Interpreter object */ - u8 descriptor_type; /* Differentiate object descriptor types = */ - u8 type; /* ACPI Type associated with this name */ - u8 flags; /* Miscellaneous flags */ - acpi_owner_id owner_id; /* Node creator */ - union acpi_name_union name; /* ACPI Name, always 4 chars per = ACPI spec */ - struct acpi_namespace_node *child; /* First child */ - struct acpi_namespace_node *peer; /* Peer. Parent if = ANOBJ_END_OF_PEER_LIST set */ - - /* - * The following fields are used by the ASL compiler and disassembl= er only - */ -#ifdef ACPI_LARGE_NAMESPACE_NODE - union acpi_parse_object *op; - u32 value; - u32 length; -#endif -}; - -/* Namespace Node flags */ - -#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field = points to parent */ -#define ANOBJ_TEMPORARY 0x02 /* Node is create by a = method and is temporary */ -#define ANOBJ_METHOD_ARG 0x04 /* Node is a method = argument */ -#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local = */ -#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device = initialization */ - -#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object = created via External() */ -#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has = no return value */ -#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* i_aSL only: Method has = at least one return value */ -#define ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference = is a bit offset */ -#define ANOBJ_IS_REFERENCED 0x80 /* i_aSL only: Object was = referenced */ - -/* * ACPI Table Descriptor. One per ACPI table */ struct acpi_table_desc { @@ -223,7 +65,6 @@ struct acpi_table_desc { struct acpi_table_header *pointer; u32 length; /* Length fixed at 32 bits */ union acpi_name_union signature; - acpi_owner_id owner_id; u8 flags; }; =20 @@ -255,465 +96,12 @@ struct acpi_internal_rsdt { #define ACPI_TABLE_INDEX_DSDT (0) #define ACPI_TABLE_INDEX_FACS (1) =20 -struct acpi_find_context { - char *search_for; - acpi_handle *list; - u32 *count; -}; - -struct acpi_ns_search_data { - struct acpi_namespace_node *node; -}; - -/* - * Predefined Namespace items - */ -struct acpi_predefined_names { - char *name; - u8 type; - char *val; -}; - -/* Object types used during package copies */ - -#define ACPI_COPY_TYPE_SIMPLE 0 -#define ACPI_COPY_TYPE_PACKAGE 1 - -/* Info structure used to convert external<->internal namestrings */ - -struct acpi_namestring_info { - char *external_name; - char *next_external_char; - char *internal_name; - u32 length; - u32 num_segments; - u32 num_carats; - u8 fully_qualified; -}; - -/* Field creation info */ - -struct acpi_create_field_info { - struct acpi_namespace_node *region_node; - struct acpi_namespace_node *field_node; - struct acpi_namespace_node *register_node; - struct acpi_namespace_node *data_register_node; - u32 bank_value; - u32 field_bit_position; - u32 field_bit_length; - u8 field_flags; - u8 attribute; - u8 field_type; -}; - -typedef -acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state); - -/* - * Bitmapped ACPI types. Used internally only - */ -#define ACPI_BTYPE_ANY 0x00000000 -#define ACPI_BTYPE_INTEGER 0x00000001 -#define ACPI_BTYPE_STRING 0x00000002 -#define ACPI_BTYPE_BUFFER 0x00000004 -#define ACPI_BTYPE_PACKAGE 0x00000008 -#define ACPI_BTYPE_FIELD_UNIT 0x00000010 -#define ACPI_BTYPE_DEVICE 0x00000020 -#define ACPI_BTYPE_EVENT 0x00000040 -#define ACPI_BTYPE_METHOD 0x00000080 -#define ACPI_BTYPE_MUTEX 0x00000100 -#define ACPI_BTYPE_REGION 0x00000200 -#define ACPI_BTYPE_POWER 0x00000400 -#define ACPI_BTYPE_PROCESSOR 0x00000800 -#define ACPI_BTYPE_THERMAL 0x00001000 -#define ACPI_BTYPE_BUFFER_FIELD 0x00002000 -#define ACPI_BTYPE_DDB_HANDLE 0x00004000 -#define ACPI_BTYPE_DEBUG_OBJECT 0x00008000 -#define ACPI_BTYPE_REFERENCE 0x00010000 -#define ACPI_BTYPE_RESOURCE 0x00020000 - -#define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_S= TRING | ACPI_BTYPE_BUFFER) - -#define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | = ACPI_BTYPE_PACKAGE) -#define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFE= RENCE | ACPI_BTYPE_DDB_HANDLE) -#define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_TH= ERMAL | ACPI_BTYPE_PROCESSOR) -#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ -#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF - -/*************************************************************************= **** - * - * Event typedefs and structs - * - *************************************************************************= ***/ - -/* Dispatch info for each GPE -- either a method or handler, cannot be = both */ - -struct acpi_handler_info { - acpi_event_handler address; /* Address of handler, if any */ - void *context; /* Context to be passed to handler */ - struct acpi_namespace_node *method_node; /* Method node for = this GPE level (saved) */ -}; - -union acpi_gpe_dispatch_info { - struct acpi_namespace_node *method_node; /* Method node for = this GPE level */ - struct acpi_handler_info *handler; -}; - -/* - * Information about a GPE, one per each GPE in an array. - * NOTE: Important to keep this struct as small as possible. - */ -struct acpi_gpe_event_info { - union acpi_gpe_dispatch_info dispatch; /* Either Method or = Handler */ - struct acpi_gpe_register_info *register_info; /* Backpointer to = register info */ - u8 flags; /* Misc info about this GPE */ - u8 gpe_number; /* This GPE */ -}; - -/* Information about a GPE register pair, one per each status/enable pair = in an array */ - -struct acpi_gpe_register_info { - struct acpi_generic_address status_address; /* Address of = status reg */ - struct acpi_generic_address enable_address; /* Address of = enable reg */ - u8 enable_for_wake; /* GPEs to keep enabled when sleeping */ - u8 enable_for_run; /* GPEs to keep enabled when running */ - u8 base_gpe_number; /* Base GPE number for this register */ -}; - -/* - * Information about a GPE register block, one per each installed block = -- - * GPE0, GPE1, and one per each installed GPE Block Device. - */ -struct acpi_gpe_block_info { - struct acpi_namespace_node *node; - struct acpi_gpe_block_info *previous; - struct acpi_gpe_block_info *next; - struct acpi_gpe_xrupt_info *xrupt_block; /* Backpointer to = interrupt block */ - struct acpi_gpe_register_info *register_info; /* One per GPE = register pair */ - struct acpi_gpe_event_info *event_info; /* One for each GPE */ - struct acpi_generic_address block_address; /* Base address of = the block */ - u32 register_count; /* Number of register pairs in block */ - u8 block_base_number; /* Base GPE number for this block */ -}; - -/* Information about GPE interrupt handlers, one per each interrupt level = used for GPEs */ - -struct acpi_gpe_xrupt_info { - struct acpi_gpe_xrupt_info *previous; - struct acpi_gpe_xrupt_info *next; - struct acpi_gpe_block_info *gpe_block_list_head; /* List of = GPE blocks for this xrupt */ - u32 interrupt_number; /* System interrupt number */ -}; - -struct acpi_gpe_walk_info { - struct acpi_namespace_node *gpe_device; - struct acpi_gpe_block_info *gpe_block; -}; - -typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info * - gpe_xrupt_info, - struct acpi_gpe_block_info * - gpe_block); - -/* Information about each particular fixed event */ - -struct acpi_fixed_event_handler { - acpi_event_handler handler; /* Address of handler. */ - void *context; /* Context to be passed to handler */ -}; - -struct acpi_fixed_event_info { - u8 status_register_id; - u8 enable_register_id; - u16 status_bit_mask; - u16 enable_bit_mask; -}; - -/* Information used during field processing */ - -struct acpi_field_info { - u8 skip_field; - u8 field_flag; - u32 pkg_length; -}; - -/*************************************************************************= **** - * - * Generic "state" object for stacks - * - *************************************************************************= ***/ - -#define ACPI_CONTROL_NORMAL 0xC0 -#define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1 -#define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2 -#define ACPI_CONTROL_PREDICATE_FALSE 0xC3 -#define ACPI_CONTROL_PREDICATE_TRUE 0xC4 - -#define ACPI_STATE_COMMON \ - void *next; \ - u8 descriptor_type; /* To differentiat= e various internal objs */\ - u8 flags; \ - u16 value; \ - u16 state; - - /* There are 2 bytes available here until the next natural = alignment boundary */ - -struct acpi_common_state { -ACPI_STATE_COMMON}; - -/* - * Update state - used to traverse complex objects such as packages - */ -struct acpi_update_state { - ACPI_STATE_COMMON union acpi_operand_object *object; -}; - -/* - * Pkg state - used to traverse nested package structures - */ -struct acpi_pkg_state { - ACPI_STATE_COMMON u16 index; - union acpi_operand_object *source_object; - union acpi_operand_object *dest_object; - struct acpi_walk_state *walk_state; - void *this_target_obj; - u32 num_packages; -}; - -/* - * Control state - one per if/else and while constructs. - * Allows nesting of these constructs - */ -struct acpi_control_state { - ACPI_STATE_COMMON u16 opcode; - union acpi_parse_object *predicate_op; - u8 *aml_predicate_start; /* Start of if/while predicate */ - u8 *package_end; /* End of if/while block */ -}; - -/* - * Scope state - current scope during namespace lookups - */ -struct acpi_scope_state { - ACPI_STATE_COMMON struct acpi_namespace_node *node; -}; - -struct acpi_pscope_state { - ACPI_STATE_COMMON u32 arg_count; /* Number of fixed = arguments */ - union acpi_parse_object *op; /* Current op being parsed */ - u8 *arg_end; /* Current argument end */ - u8 *pkg_end; /* Current package end */ - u32 arg_list; /* Next argument to parse */ -}; - -/* - * Thread state - one per thread across multiple walk states. Multiple = walk - * states are created when there are nested control methods executing. - */ -struct acpi_thread_state { - ACPI_STATE_COMMON u8 current_sync_level; /* Mutex Sync = (nested acquire) level */ - struct acpi_walk_state *walk_state_list; /* Head of list of = walk_states for this thread */ - union acpi_operand_object *acquired_mutex_list; /* List of all = currently acquired mutexes */ - acpi_thread_id thread_id; /* Running thread ID */ -}; - -/* - * Result values - used to accumulate the results of nested - * AML arguments - */ -struct acpi_result_values { - ACPI_STATE_COMMON u8 num_results; - u8 last_insert; - union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS]; -}; - -typedef -acpi_status(*acpi_parse_downwards) (struct acpi_walk_state * walk_state, - union acpi_parse_object ** out_op); - -typedef acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * = walk_state); - -/* - * Notify info - used to pass info to the deferred notify - * handler/dispatcher. - */ -struct acpi_notify_info { - ACPI_STATE_COMMON struct acpi_namespace_node *node; - union acpi_operand_object *handler_obj; -}; - -/* Generic state is union of structs above */ - -union acpi_generic_state { - struct acpi_common_state common; - struct acpi_control_state control; - struct acpi_update_state update; - struct acpi_scope_state scope; - struct acpi_pscope_state parse_scope; - struct acpi_pkg_state pkg; - struct acpi_thread_state thread; - struct acpi_result_values results; - struct acpi_notify_info notify; -}; - -/*************************************************************************= **** - * - * Interpreter typedefs and structs - * - *************************************************************************= ***/ - -typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state= ); - -/*************************************************************************= **** - * - * Parser typedefs and structs - * - *************************************************************************= ***/ - -/* - * AML opcode, name, and argument layout - */ -struct acpi_opcode_info { -#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT) - char *name; /* Opcode name (disassembler/debug only) = */ -#endif - u32 parse_args; /* Grammar/Parse time arguments */ - u32 runtime_args; /* Interpret time arguments */ - u16 flags; /* Misc flags */ - u8 object_type; /* Corresponding internal object type */ - u8 class; /* Opcode class */ - u8 type; /* Opcode type */ -}; - -union acpi_parse_value { - acpi_integer integer; /* Integer constant (Up to 64 bits) */ - struct uint64_struct integer64; /* Structure overlay for 2 32-bit = Dwords */ - u32 size; /* bytelist or field size */ - char *string; /* NULL terminated string */ - u8 *buffer; /* buffer or string */ - char *name; /* NULL terminated string */ - union acpi_parse_object *arg; /* arguments and contained ops */ -}; - -#define ACPI_PARSE_COMMON \ - union acpi_parse_object *parent; /* Parent op */\ - u8 descriptor_type; /* To differentiat= e various internal objs */\ - u8 flags; /* Type of Op */\ - u16 aml_opcode; /* AML opcode */\ - u32 aml_offset; /* Offset of = declaration in AML */\ - union acpi_parse_object *next; /* Next op */\ - struct acpi_namespace_node *node; /* For use by = interpreter */\ - union acpi_parse_value value; /* Value or args = associated with the opcode */\ - ACPI_DISASM_ONLY_MEMBERS (\ - u8 disasm_flags; /* Used during AML = disassembly */\ - u8 disasm_opcode; /* Subtype used = for disassembly */\ - char aml_op_name[16]) /* Op name = (debug only) */ - -#define ACPI_DASM_BUFFER 0x00 -#define ACPI_DASM_RESOURCE 0x01 -#define ACPI_DASM_STRING 0x02 -#define ACPI_DASM_UNICODE 0x03 -#define ACPI_DASM_EISAID 0x04 -#define ACPI_DASM_MATCHOP 0x05 -#define ACPI_DASM_LNOT_PREFIX 0x06 -#define ACPI_DASM_LNOT_SUFFIX 0x07 -#define ACPI_DASM_IGNORE 0x08 - -/* - * Generic operation (for example: If, While, Store) - */ -struct acpi_parse_obj_common { -ACPI_PARSE_COMMON}; - -/* - * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods = and op_regions), - * and bytelists. - */ -struct acpi_parse_obj_named { - ACPI_PARSE_COMMON u8 *path; - u8 *data; /* AML body or bytelist data */ - u32 length; /* AML length */ - u32 name; /* 4-byte name or zero if no name */ -}; - -/* This version is used by the i_aSL compiler only */ - -#define ACPI_MAX_PARSEOP_NAME 20 - -struct acpi_parse_obj_asl { - ACPI_PARSE_COMMON union acpi_parse_object *child; - union acpi_parse_object *parent_method; - char *filename; - char *external_name; - char *namepath; - char name_seg[4]; - u32 extra_value; - u32 column; - u32 line_number; - u32 logical_line_number; - u32 logical_byte_offset; - u32 end_line; - u32 end_logical_line; - u32 acpi_btype; - u32 aml_length; - u32 aml_subtree_length; - u32 final_aml_length; - u32 final_aml_offset; - u32 compile_flags; - u16 parse_opcode; - u8 aml_opcode_length; - u8 aml_pkg_len_bytes; - u8 extra; - char parse_op_name[ACPI_MAX_PARSEOP_NAME]; -}; - -union acpi_parse_object { - struct acpi_parse_obj_common common; - struct acpi_parse_obj_named named; - struct acpi_parse_obj_asl asl; -}; - -/* - * Parse state - one state per parser invocation and each control - * method. - */ -struct acpi_parse_state { - u8 *aml_start; /* First AML byte */ - u8 *aml; /* Next AML byte */ - u8 *aml_end; /* (last + 1) AML byte */ - u8 *pkg_start; /* Current package begin */ - u8 *pkg_end; /* Current package end */ - union acpi_parse_object *start_op; /* Root of parse tree */ - struct acpi_namespace_node *start_node; - union acpi_generic_state *scope; /* Current scope */ - union acpi_parse_object *start_scope; - u32 aml_size; -}; - -/* Parse object flags */ - -#define ACPI_PARSEOP_GENERIC 0x01 -#define ACPI_PARSEOP_NAMED 0x02 -#define ACPI_PARSEOP_DEFERRED 0x04 -#define ACPI_PARSEOP_BYTELIST 0x08 -#define ACPI_PARSEOP_IN_CACHE 0x80 - -/* Parse object disasm_flags */ - -#define ACPI_PARSEOP_IGNORE 0x01 -#define ACPI_PARSEOP_PARAMLIST 0x02 -#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 -#define ACPI_PARSEOP_SPECIAL 0x10 - /*************************************************************************= **** * * Hardware (ACPI registers) and PNP * *************************************************************************= ***/ =20 -#define PCI_ROOT_HID_STRING "PNP0A03" -#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08" - struct acpi_bit_register_info { u8 parent_register; u8 bit_position; @@ -814,152 +202,4 @@ struct acpi_bit_register_info { #define ACPI_ADDRESS_TYPE_IO_RANGE 1 #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2 =20 -/* Resource descriptor types and masks */ - -#define ACPI_RESOURCE_NAME_LARGE 0x80 -#define ACPI_RESOURCE_NAME_SMALL 0x00 - -#define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 = contain the type */ -#define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 = contain the length */ -#define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 = contain the type */ - -/* - * Small resource descriptor "names" as defined by the ACPI specification.= - * Note: Bits 2:0 are used for the descriptor length - */ -#define ACPI_RESOURCE_NAME_IRQ 0x20 -#define ACPI_RESOURCE_NAME_DMA 0x28 -#define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30 -#define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38 -#define ACPI_RESOURCE_NAME_IO 0x40 -#define ACPI_RESOURCE_NAME_FIXED_IO 0x48 -#define ACPI_RESOURCE_NAME_RESERVED_S1 0x50 -#define ACPI_RESOURCE_NAME_RESERVED_S2 0x58 -#define ACPI_RESOURCE_NAME_RESERVED_S3 0x60 -#define ACPI_RESOURCE_NAME_RESERVED_S4 0x68 -#define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70 -#define ACPI_RESOURCE_NAME_END_TAG 0x78 - -/* - * Large resource descriptor "names" as defined by the ACPI specification.= - * Note: includes the Large Descriptor bit in bit[7] - */ -#define ACPI_RESOURCE_NAME_MEMORY24 0x81 -#define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82 -#define ACPI_RESOURCE_NAME_RESERVED_L1 0x83 -#define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84 -#define ACPI_RESOURCE_NAME_MEMORY32 0x85 -#define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86 -#define ACPI_RESOURCE_NAME_ADDRESS32 0x87 -#define ACPI_RESOURCE_NAME_ADDRESS16 0x88 -#define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89 -#define ACPI_RESOURCE_NAME_ADDRESS64 0x8A -#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B -#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B - -/*************************************************************************= **** - * - * Miscellaneous - * - *************************************************************************= ***/ - -#define ACPI_ASCII_ZERO 0x30 - -/*************************************************************************= **** - * - * Debugger - * - *************************************************************************= ***/ - -struct acpi_db_method_info { - acpi_handle main_thread_gate; - acpi_handle thread_complete_gate; - u32 *threads; - u32 num_threads; - u32 num_created; - u32 num_completed; - - char *name; - u32 flags; - u32 num_loops; - char pathname[128]; - char **args; - - /* - * Arguments to be passed to method for the command - * Threads - - * the Number of threads, ID of current thread and - * Index of current thread inside all them created. - */ - char init_args; - char *arguments[4]; - char num_threads_str[11]; - char id_of_thread_str[11]; - char index_of_thread_str[11]; -}; - -struct acpi_integrity_info { - u32 nodes; - u32 objects; -}; - -#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01 -#define ACPI_DB_CONSOLE_OUTPUT 0x02 -#define ACPI_DB_DUPLICATE_OUTPUT 0x03 - -/*************************************************************************= **** - * - * Debug - * - *************************************************************************= ***/ - -/* Entry for a memory allocation (debug only) */ - -#define ACPI_MEM_MALLOC 0 -#define ACPI_MEM_CALLOC 1 -#define ACPI_MAX_MODULE_NAME 16 - -#define ACPI_COMMON_DEBUG_MEM_HEADER \ - struct acpi_debug_mem_block *previous; \ - struct acpi_debug_mem_block *next; \ - u32 size; \ - u32 component; \ - u32 line; \ - char module[ACPI_MAX_MODULE_NAME]; \ - u8 alloc_type; - -struct acpi_debug_mem_header { -ACPI_COMMON_DEBUG_MEM_HEADER}; - -struct acpi_debug_mem_block { - ACPI_COMMON_DEBUG_MEM_HEADER u64 user_space; -}; - -#define ACPI_MEM_LIST_GLOBAL 0 -#define ACPI_MEM_LIST_NSNODE 1 -#define ACPI_MEM_LIST_MAX 1 -#define ACPI_NUM_MEM_LISTS 2 - -struct acpi_memory_list { - char *list_name; - void *list_head; - u16 object_size; - u16 max_depth; - u16 current_depth; - u16 link_offset; - -#ifdef ACPI_DBG_TRACK_ALLOCATIONS - - /* Statistics for debug memory tracking only */ - - u32 total_allocated; - u32 total_freed; - u32 max_occupied; - u32 total_size; - u32 current_total_size; - u32 requests; - u32 hits; -#endif -}; - #endif /* __ACLOCAL_H__ */ --- 2011-02-10.orig/xen/include/acpi/acmacros.h +++ 2011-02-10/xen/include/acpi/acmacros.h @@ -431,7 +431,6 @@ */ #define ACPI_INFO(plist) acpi_ut_info plist #define ACPI_WARNING(plist) acpi_ut_warning plist -#define ACPI_EXCEPTION(plist) acpi_ut_exception plist #define ACPI_ERROR(plist) acpi_ut_error plist #define ACPI_ERROR_NAMESPACE(s,e) acpi_ns_report_error (AE_INFO, s, = e); #define ACPI_ERROR_METHOD(s,n,p,e) acpi_ns_report_method_error = (AE_INFO, s, n, p, e); @@ -442,7 +441,6 @@ =20 #define ACPI_INFO(plist) #define ACPI_WARNING(plist) -#define ACPI_EXCEPTION(plist) #define ACPI_ERROR(plist) #define ACPI_ERROR_NAMESPACE(s,e) #define ACPI_ERROR_METHOD(s,n,p,e) @@ -595,16 +593,6 @@ #define ACPI_DEBUG_ONLY_MEMBERS(a) a; #define _VERBOSE_STRUCTURES =20 -/* Stack and buffer dumping */ - -#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0) -#define ACPI_DUMP_OPERANDS(a,b,c,d,e) acpi_ex_dump_operands(a,b,c,d,e,_a= cpi_module_name,__LINE__) - -#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b) -#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) -#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) -#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_B= YTE_DISPLAY,_COMPONENT) - /* * Master debug print macros * Print iff: @@ -633,13 +621,6 @@ #define ACPI_FUNCTION_STATUS_EXIT(s) do { } while(0) #define ACPI_FUNCTION_VALUE_EXIT(s) do { } while(0) #define ACPI_FUNCTION_ENTRY() do { } while(0) -#define ACPI_DUMP_STACK_ENTRY(a) do { } while(0) -#define ACPI_DUMP_OPERANDS(a,b,c,d,e) do { } while(0) -#define ACPI_DUMP_ENTRY(a,b) do { } while(0) -#define ACPI_DUMP_TABLES(a,b) do { } while(0) -#define ACPI_DUMP_PATHNAME(a,b,c,d) do { } while(0) -#define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0) -#define ACPI_DUMP_BUFFER(a,b) do { } while(0) #define ACPI_DEBUG_PRINT(pl) do { } while(0) #define ACPI_DEBUG_PRINT_RAW(pl) do { } while(0) =20 @@ -652,56 +633,4 @@ =20 #endif =20 -/* - * Some code only gets executed when the debugger is built in. - * Note that this is entirely independent of whether the - * DEBUG_PRINT stuff (set by ACPI_DEBUG_OUTPUT) is on, or not. - */ -#ifdef ACPI_DEBUGGER -#define ACPI_DEBUGGER_EXEC(a) a -#else -#define ACPI_DEBUGGER_EXEC(a) -#endif - -#ifdef ACPI_DEBUG_OUTPUT -/* - * 1) Set name to blanks - * 2) Copy the object name - */ -#define ACPI_ADD_OBJECT_NAME(a,b) ACPI_MEMSET (a->common.name, ' ', = sizeof (a->common.name));\ - = ACPI_STRNCPY (a->common.name, acpi_gbl_ns_type_names[b], sizeof (a->common.= name)) -#else - -#define ACPI_ADD_OBJECT_NAME(a,b) -#endif - -/* - * Memory allocation tracking (DEBUG ONLY) - */ -#ifndef ACPI_DBG_TRACK_ALLOCATIONS - -/* Memory allocation */ - -#ifndef ACPI_ALLOCATE -#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPO= NENT,_acpi_module_name,__LINE__) -#endif -#ifndef ACPI_ALLOCATE_ZEROED -#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a)= , _COMPONENT,_acpi_module_name,__LINE__) -#endif -#ifndef ACPI_FREE -#define ACPI_FREE(a) acpio_os_free(a) -#endif -#define ACPI_MEM_TRACKING(a) - -#else - -/* Memory allocation */ - -#define ACPI_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)= (a),_COMPONENT,_acpi_module_name,__LINE__) -#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acp= i_size)(a), _COMPONENT,_acpi_module_name,__LINE__) -#define ACPI_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_a= cpi_module_name,__LINE__) -#define ACPI_MEM_TRACKING(a) a - -#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ - #endif /* ACMACROS_H */ --- 2011-02-10.orig/xen/include/acpi/acnamesp.h +++ /dev/null @@ -1,305 +0,0 @@ -/*************************************************************************= ***** - * - * Name: acnamesp.h - Namespace subcomponent prototypes and defines - * - *************************************************************************= ****/ - -/* - * Copyright (C) 2000 - 2008, Intel Corp. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a = disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for = further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the = names - * of any contributors may be used to endorse or promote products = derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENT= IAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ - -#ifndef __ACNAMESP_H__ -#define __ACNAMESP_H__ - -/* To search the entire name space, pass this as search_base */ - -#define ACPI_NS_ALL ((acpi_handle)0) - -/* - * Elements of acpi_ns_properties are bit significant - * and should be one-to-one with values of acpi_object_type - */ -#define ACPI_NS_NORMAL 0 -#define ACPI_NS_NEWSCOPE 1 /* a definition of this type opens = a name scope */ -#define ACPI_NS_LOCAL 2 /* suppress search of enclosing = scopes */ - -/* Flags for acpi_ns_lookup, acpi_ns_search_and_enter */ - -#define ACPI_NS_NO_UPSEARCH 0 -#define ACPI_NS_SEARCH_PARENT 0x01 -#define ACPI_NS_DONT_OPEN_SCOPE 0x02 -#define ACPI_NS_NO_PEER_SEARCH 0x04 -#define ACPI_NS_ERROR_IF_FOUND 0x08 -#define ACPI_NS_PREFIX_IS_SCOPE 0x10 -#define ACPI_NS_EXTERNAL 0x20 -#define ACPI_NS_TEMPORARY 0x40 - -/* Flags for acpi_ns_walk_namespace */ - -#define ACPI_NS_WALK_NO_UNLOCK 0 -#define ACPI_NS_WALK_UNLOCK 0x01 -#define ACPI_NS_WALK_TEMP_NODES 0x02 - -/* - * nsinit - Namespace initialization - */ -acpi_status acpi_ns_initialize_objects(void); - -acpi_status acpi_ns_initialize_devices(void); - -/* - * nsload - Namespace loading - */ -acpi_status acpi_ns_load_namespace(void); - -acpi_status -acpi_ns_load_table(acpi_native_uint table_index, - struct acpi_namespace_node *node); - -/* - * nswalk - walk the namespace - */ -acpi_status -acpi_ns_walk_namespace(acpi_object_type type, - acpi_handle start_object, - u32 max_depth, - u32 flags, - acpi_walk_callback user_function, - void *context, void **return_value); - -struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, = struct acpi_namespace_node - *parent, struct = acpi_namespace_node - *child); - -/* - * nsparse - table parsing - */ -acpi_status -acpi_ns_parse_table(acpi_native_uint table_index, - struct acpi_namespace_node *start_node); - -acpi_status -acpi_ns_one_complete_parse(acpi_native_uint pass_number, - acpi_native_uint table_index, - struct acpi_namespace_node *start_node); - -/* - * nsaccess - Top-level namespace access - */ -acpi_status acpi_ns_root_initialize(void); - -acpi_status -acpi_ns_lookup(union acpi_generic_state *scope_info, - char *name, - acpi_object_type type, - acpi_interpreter_mode interpreter_mode, - u32 flags, - struct acpi_walk_state *walk_state, - struct acpi_namespace_node **ret_node); - -/* - * nsalloc - Named object allocation/deallocation - */ -struct acpi_namespace_node *acpi_ns_create_node(u32 name); - -void acpi_ns_delete_node(struct acpi_namespace_node *node); - -void -acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_handle= ); - -void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id); - -void acpi_ns_detach_object(struct acpi_namespace_node *node); - -void acpi_ns_delete_children(struct acpi_namespace_node *parent); - -int acpi_ns_compare_names(char *name1, char *name2); - -/* - * nsdump - Namespace dump/print utilities - */ -#ifdef ACPI_FUTURE_USAGE -void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth); -#endif /* ACPI_FUTURE_USAGE */ - -void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level); - -void -acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 level, u32 = component); - -void acpi_ns_print_pathname(u32 num_segments, char *pathname); - -acpi_status -acpi_ns_dump_one_object(acpi_handle obj_handle, - u32 level, void *context, void **return_value); - -#ifdef ACPI_FUTURE_USAGE -void -acpi_ns_dump_objects(acpi_object_type type, - u8 display_type, - u32 max_depth, - acpi_owner_id owner_id, acpi_handle start_handle); -#endif /* ACPI_FUTURE_USAGE */ - -/* - * nseval - Namespace evaluation functions - */ -acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info); - -/* - * nsnames - Name and Scope manipulation - */ -u32 acpi_ns_opens_scope(acpi_object_type type); - -void -acpi_ns_build_external_path(struct acpi_namespace_node *node, - acpi_size size, char *name_buffer); - -char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node); - -char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state); - -acpi_status -acpi_ns_handle_to_pathname(acpi_handle target_handle, - struct acpi_buffer *buffer); - -u8 -acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char = *search_for); - -acpi_status -acpi_ns_get_node(struct acpi_namespace_node *prefix_node, - char *external_pathname, - u32 flags, struct acpi_namespace_node **out_node); - -acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node); - -/* - * nsobject - Object management for namespace nodes - */ -acpi_status -acpi_ns_attach_object(struct acpi_namespace_node *node, - union acpi_operand_object *object, acpi_object_type = type); - -union acpi_operand_object *acpi_ns_get_attached_object(struct - acpi_namespace_node - *node); - -union acpi_operand_object *acpi_ns_get_secondary_object(union - acpi_operand_object= - *obj_desc); - -acpi_status -acpi_ns_attach_data(struct acpi_namespace_node *node, - acpi_object_handler handler, void *data); - -acpi_status -acpi_ns_detach_data(struct acpi_namespace_node *node, - acpi_object_handler handler); - -acpi_status -acpi_ns_get_attached_data(struct acpi_namespace_node *node, - acpi_object_handler handler, void **data); - -/* - * nssearch - Namespace searching and entry - */ -acpi_status -acpi_ns_search_and_enter(u32 entry_name, - struct acpi_walk_state *walk_state, - struct acpi_namespace_node *node, - acpi_interpreter_mode interpreter_mode, - acpi_object_type type, - u32 flags, struct acpi_namespace_node **ret_node);= - -acpi_status -acpi_ns_search_one_scope(u32 entry_name, - struct acpi_namespace_node *node, - acpi_object_type type, - struct acpi_namespace_node **ret_node); - -void -acpi_ns_install_node(struct acpi_walk_state *walk_state, - struct acpi_namespace_node *parent_node, - struct acpi_namespace_node *node, acpi_object_type = type); - -/* - * nsutils - Utility functions - */ -u8 acpi_ns_valid_root_prefix(char prefix); - -acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node); - -u32 acpi_ns_local(acpi_object_type type); - -void -acpi_ns_report_error(char *module_name, - u32 line_number, - char *internal_name, acpi_status lookup_status); - -void -acpi_ns_report_method_error(char *module_name, - u32 line_number, - char *message, - struct acpi_namespace_node *node, - char *path, acpi_status lookup_status); - -void acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char = *msg); - -acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info = *info); - -void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info); - -acpi_status acpi_ns_internalize_name(char *dotted_name, char **converted_n= ame); - -acpi_status -acpi_ns_externalize_name(u32 internal_name_length, - char *internal_name, - u32 * converted_name_length, char **converted_name= ); - -struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle = handle); - -acpi_handle acpi_ns_convert_entry_to_handle(struct acpi_namespace_node = *node); - -void acpi_ns_terminate(void); - -struct acpi_namespace_node *acpi_ns_get_parent_node(struct acpi_namespace_= node - *node); - -struct acpi_namespace_node *acpi_ns_get_next_valid_node(struct - acpi_namespace_node= - *node); - -#endif /* __ACNAMESP_H__ */ --- 2011-02-10.orig/xen/include/acpi/acobject.h +++ /dev/null @@ -1,422 +0,0 @@ - -/*************************************************************************= ***** - * - * Name: acobject.h - Definition of union acpi_operand_object (Internal = object only) - * - *************************************************************************= ****/ - -/* - * Copyright (C) 2000 - 2007, R. Byron Moore - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a = disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for = further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the = names - * of any contributors may be used to endorse or promote products = derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENT= IAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ - -#ifndef _ACOBJECT_H -#define _ACOBJECT_H - -/* acpisrc:struct_defs -- for acpisrc conversion */ - -/* - * The union acpi_operand_object is used to pass AML operands from the = dispatcher - * to the interpreter, and to keep track of the various handlers such as - * address space handlers and notify handlers. The object is a constant - * size in order to allow it to be cached and reused. - * - * Note: The object is optimized to be aligned and will not work if it is - * byte-packed. - */ -#if ACPI_MACHINE_WIDTH =3D=3D 64 -#pragma pack(8) -#else -#pragma pack(4) -#endif - -/*************************************************************************= ****** - * - * Common Descriptors - * - *************************************************************************= *****/ - -/* - * Common area for all objects. - * - * descriptor_type is used to differentiate between internal descriptors, = and - * must be in the same place across all descriptors - * - * Note: The descriptor_type and Type fields must appear in the identical - * position in both the struct acpi_namespace_node and union acpi_operand_= object - * structures. - */ -#define ACPI_OBJECT_COMMON_HEADER \ - union acpi_operand_object *next_object; /* Objects = linked to parent NS node */\ - u8 descriptor_type; /* To = differentiate various internal objs */\ - u8 type; /* acpi_object_= type */\ - u16 reference_count; /* For object = deletion management */\ - u8 flags; - /* - * Note: There are 3 bytes available here before the - * next natural alignment boundary (for both 32/64 cases) - */ - -/* Values for Flag byte above */ - -#define AOPOBJ_AML_CONSTANT 0x01 -#define AOPOBJ_STATIC_POINTER 0x02 -#define AOPOBJ_DATA_VALID 0x04 -#define AOPOBJ_OBJECT_INITIALIZED 0x08 -#define AOPOBJ_SETUP_COMPLETE 0x10 -#define AOPOBJ_SINGLE_DATUM 0x20 -#define AOPOBJ_INVALID 0x40 /* Used if host OS won't = allow an op_region address */ - -/*************************************************************************= ***** - * - * Basic data types - * - *************************************************************************= ****/ - -struct acpi_object_common { -ACPI_OBJECT_COMMON_HEADER}; - -struct acpi_object_integer { - ACPI_OBJECT_COMMON_HEADER u8 fill[3]; /* Prevent warning on some = compilers */ - acpi_integer value; -}; - -/* - * Note: The String and Buffer object must be identical through the = Pointer - * and length elements. There is code that depends on this. - * - * Fields common to both Strings and Buffers - */ -#define ACPI_COMMON_BUFFER_INFO(_type) \ - _type *pointer; \ - u32 length; - -struct acpi_object_string { /* Null terminated, ASCII characters only = */ - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String = in AML stream or allocated string */ -}; - -struct acpi_object_buffer { - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(u8) /* Buffer = in AML stream or allocated buffer */ - u32 aml_length; - u8 *aml_start; - struct acpi_namespace_node *node; /* Link back to parent = node */ -}; - -struct acpi_object_package { - ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* = Link back to parent node */ - union acpi_operand_object **elements; /* Array of pointers to = acpi_objects */ - u8 *aml_start; - u32 aml_length; - u32 count; /* # of elements in package */ -}; - -/*************************************************************************= ***** - * - * Complex data types - * - *************************************************************************= ****/ - -struct acpi_object_event { - ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual = OS synchronization object */ -}; - -struct acpi_object_mutex { - ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified = in Mutex() call */ - u16 acquisition_depth; /* Allow multiple Acquires, same thread */ - struct acpi_thread_state *owner_thread; /* Current owner of the = mutex */ - acpi_mutex os_mutex; /* Actual OS synchronization object */ - union acpi_operand_object *prev; /* Link for list of = acquired mutexes */ - union acpi_operand_object *next; /* Link for list of = acquired mutexes */ - struct acpi_namespace_node *node; /* Containing namespace = node */ - u8 original_sync_level; /* Owner's original sync level (0-15) */ -}; - -struct acpi_object_region { - ACPI_OBJECT_COMMON_HEADER u8 space_id; - struct acpi_namespace_node *node; /* Containing namespace = node */ - union acpi_operand_object *handler; /* Handler for region = access */ - union acpi_operand_object *next; - acpi_physical_address address; - u32 length; -}; - -struct acpi_object_method { - ACPI_OBJECT_COMMON_HEADER u8 method_flags; - u8 param_count; - u8 sync_level; - union acpi_operand_object *mutex; - u8 *aml_start; - ACPI_INTERNAL_METHOD implementation; - u32 aml_length; - u8 thread_count; - acpi_owner_id owner_id; -}; - -/*************************************************************************= ***** - * - * Objects that can be notified. All share a common notify_info area. - * - *************************************************************************= ****/ - -/* - * Common fields for objects that support ASL notifications - */ -#define ACPI_COMMON_NOTIFY_INFO \ - union acpi_operand_object *system_notify; /* Handler for = system notifies */\ - union acpi_operand_object *device_notify; /* Handler for = driver notifies */\ - union acpi_operand_object *handler; /* Handler for = Address space */ - -struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, = PROCESSOR, DEVICE, and THERMAL */ -ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; - -struct acpi_object_device { - ACPI_OBJECT_COMMON_HEADER - ACPI_COMMON_NOTIFY_INFO struct acpi_gpe_block_info *gpe_block; -}; - -struct acpi_object_power_resource { - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 system_level;= - u32 resource_order; -}; - -struct acpi_object_processor { - ACPI_OBJECT_COMMON_HEADER - /* The next two fields take advantage of the 3-byte space = before NOTIFY_INFO */ - u8 proc_id; - u8 length; - ACPI_COMMON_NOTIFY_INFO acpi_io_address address; -}; - -struct acpi_object_thermal_zone { -ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; - -/*************************************************************************= ***** - * - * Fields. All share a common header/info field. - * - *************************************************************************= ****/ - -/* - * Common bitfield for the field objects - * "Field Datum" -- a datum from the actual field object - * "Buffer Datum" -- a datum from a user buffer, read from or to be = written to the field - */ -#define ACPI_COMMON_FIELD_INFO \ - u8 field_flags; /* Access, = update, and lock bits */\ - u8 attribute; /* From = access_as keyword */\ - u8 access_byte_width; /* Read/Write = size in bytes */\ - struct acpi_namespace_node *node; /* Link back = to parent node */\ - u32 bit_length; /* Length of = field in bits */\ - u32 base_byte_offset; /* Byte offset = within containing object */\ - u32 value; /* Value to = store into the Bank or Index register */\ - u8 start_field_bit_offset;/* Bit = offset within first field datum (0-63) */\ - u8 access_bit_width; /* = Read/Write size in bits (8-64) */ - -struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, = REGION, BANK, and INDEX fields) */ - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand= _object *region_obj; /* Parent Operation Region object (REGION/BANK = fields only) */ -}; - -struct acpi_object_region_field { - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand= _object *region_obj; /* Containing op_region object */ -}; - -struct acpi_object_bank_field { - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand= _object *region_obj; /* Containing op_region object */ - union acpi_operand_object *bank_obj; /* bank_select Register = object */ -}; - -struct acpi_object_index_field { - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO - /* - * No "RegionObj" pointer needed since the Index and Data = registers - * are each field definitions unto themselves. - */ - union acpi_operand_object *index_obj; /* Index register */ - union acpi_operand_object *data_obj; /* Data register */ -}; - -/* The buffer_field is different in that it is part of a Buffer, not an = op_region */ - -struct acpi_object_buffer_field { - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand= _object *buffer_obj; /* Containing Buffer object */ -}; - -/*************************************************************************= ***** - * - * Objects for handlers - * - *************************************************************************= ****/ - -struct acpi_object_notify_handler { - ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* = Parent device */ - acpi_notify_handler handler; - void *context; -}; - -struct acpi_object_addr_handler { - ACPI_OBJECT_COMMON_HEADER u8 space_id; - u8 handler_flags; - acpi_adr_space_handler handler; - struct acpi_namespace_node *node; /* Parent device */ - void *context; - acpi_adr_space_setup setup; - union acpi_operand_object *region_list; /* regions using this = handler */ - union acpi_operand_object *next; -}; - -/* Flags for address handler (handler_flags) */ - -#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01 - -/*************************************************************************= ***** - * - * Special internal objects - * - *************************************************************************= ****/ - -/* - * The Reference object type is used for these opcodes: - * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, = debug_op - */ -struct acpi_object_reference { - ACPI_OBJECT_COMMON_HEADER u8 target_type; /* Used for = index_op */ - u16 opcode; - void *object; /* name_op=3D>HANDLE to obj, index_op=3D>un= ion acpi_operand_object */ - struct acpi_namespace_node *node; - union acpi_operand_object **where; - u32 offset; /* Used for arg_op, local_op, and index_op = */ -}; - -/* - * Extra object is used as additional storage for types that - * have AML code in their declarations (term_args) that must be - * evaluated at run time. - * - * Currently: Region and field_unit types - */ -struct acpi_object_extra { - ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; = /* _REG method for this region (if any) */ - void *region_context; /* Region-specific data */ - u8 *aml_start; - u32 aml_length; -}; - -/* Additional data that can be attached to namespace nodes */ - -struct acpi_object_data { - ACPI_OBJECT_COMMON_HEADER acpi_object_handler handler; - void *pointer; -}; - -/* Structure used when objects are cached for reuse */ - -struct acpi_object_cache_list { - ACPI_OBJECT_COMMON_HEADER union acpi_operand_object *next; /* = Link for object cache and internal lists */ -}; - -/*************************************************************************= ***** - * - * union acpi_operand_object Descriptor - a giant union of all of the = above - * - *************************************************************************= ****/ - -union acpi_operand_object { - struct acpi_object_common common; - struct acpi_object_integer integer; - struct acpi_object_string string; - struct acpi_object_buffer buffer; - struct acpi_object_package package; - struct acpi_object_event event; - struct acpi_object_method method; - struct acpi_object_mutex mutex; - struct acpi_object_region region; - struct acpi_object_notify_common common_notify; - struct acpi_object_device device; - struct acpi_object_power_resource power_resource; - struct acpi_object_processor processor; - struct acpi_object_thermal_zone thermal_zone; - struct acpi_object_field_common common_field; - struct acpi_object_region_field field; - struct acpi_object_buffer_field buffer_field; - struct acpi_object_bank_field bank_field; - struct acpi_object_index_field index_field; - struct acpi_object_notify_handler notify; - struct acpi_object_addr_handler address_space; - struct acpi_object_reference reference; - struct acpi_object_extra extra; - struct acpi_object_data data; - struct acpi_object_cache_list cache; -}; - -/*************************************************************************= ***** - * - * union acpi_descriptor - objects that share a common descriptor = identifier - * - *************************************************************************= ****/ - -/* Object descriptor types */ - -#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object = is cached */ -#define ACPI_DESC_TYPE_STATE 0x02 -#define ACPI_DESC_TYPE_STATE_UPDATE 0x03 -#define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 -#define ACPI_DESC_TYPE_STATE_CONTROL 0x05 -#define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06 -#define ACPI_DESC_TYPE_STATE_PSCOPE 0x07 -#define ACPI_DESC_TYPE_STATE_WSCOPE 0x08 -#define ACPI_DESC_TYPE_STATE_RESULT 0x09 -#define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A -#define ACPI_DESC_TYPE_STATE_THREAD 0x0B -#define ACPI_DESC_TYPE_WALK 0x0C -#define ACPI_DESC_TYPE_PARSER 0x0D -#define ACPI_DESC_TYPE_OPERAND 0x0E -#define ACPI_DESC_TYPE_NAMED 0x0F -#define ACPI_DESC_TYPE_MAX 0x0F - -struct acpi_common_descriptor { - void *common_pointer; - u8 descriptor_type; /* To differentiate various internal objs = */ -}; - -union acpi_descriptor { - struct acpi_common_descriptor common; - union acpi_operand_object object; - struct acpi_namespace_node node; - union acpi_parse_object op; -}; - -#pragma pack() - -#endif /* _ACOBJECT_H */ --- 2011-02-10.orig/xen/include/acpi/acpi.h +++ 2011-02-10/xen/include/acpi/acpi.h @@ -44,6 +44,8 @@ #ifndef __ACPI_H__ #define __ACPI_H__ =20 +#define PREFIX "ACPI: " + /* * Common includes for all ACPI driver files * We put them here because we don't want to duplicate them @@ -60,8 +62,6 @@ #include "acoutput.h" /* Error output and Debug macros */ #include "acpiosxf.h" /* Interfaces to the ACPI-to-OS layer */ #include "acpixf.h" /* ACPI core subsystem external interfaces = */ -#include "acobject.h" /* ACPI internal object */ -#include "acstruct.h" /* Common structures */ #include "acglobal.h" /* All global variables */ #include "achware.h" /* Hardware defines and interfaces */ #include "acutils.h" /* Utility interfaces */ --- 2011-02-10.orig/xen/include/acpi/acpi_bus.h +++ /dev/null @@ -1,389 +0,0 @@ -/* - * acpi_bus.h - ACPI Bus Driver ($Revision: 22 $) - * - * Copyright (C) 2001, 2002 Andy Grover - * Copyright (C) 2001, 2002 Paul Diefenbaugh - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License = along - * with this program; if not, write to the Free Software Foundation, = Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ - */ - -#ifndef __ACPI_BUS_H__ -#define __ACPI_BUS_H__ - -#include - -#define PREFIX "ACPI: " - -/* TBD: Make dynamic */ -#define ACPI_MAX_HANDLES 10 -struct acpi_handle_list { - u32 count; - acpi_handle handles[ACPI_MAX_HANDLES]; -}; - -/* acpi_utils.h */ -acpi_status -acpi_extract_package(union acpi_object *package, - struct acpi_buffer *format, struct acpi_buffer = *buffer); -acpi_status -acpi_evaluate_integer(acpi_handle handle, - acpi_string pathname, - struct acpi_object_list *arguments, unsigned long = *data); -acpi_status -acpi_evaluate_reference(acpi_handle handle, - acpi_string pathname, - struct acpi_object_list *arguments, - struct acpi_handle_list *list); - -#if 0//def CONFIG_ACPI - -#include - -#define ACPI_BUS_FILE_ROOT "acpi" -extern struct proc_dir_entry *acpi_root_dir; - -enum acpi_bus_removal_type { - ACPI_BUS_REMOVAL_NORMAL =3D 0, - ACPI_BUS_REMOVAL_EJECT, - ACPI_BUS_REMOVAL_SUPRISE, - ACPI_BUS_REMOVAL_TYPE_COUNT -}; - -enum acpi_bus_device_type { - ACPI_BUS_TYPE_DEVICE =3D 0, - ACPI_BUS_TYPE_POWER, - ACPI_BUS_TYPE_PROCESSOR, - ACPI_BUS_TYPE_THERMAL, - ACPI_BUS_TYPE_SYSTEM, - ACPI_BUS_TYPE_POWER_BUTTON, - ACPI_BUS_TYPE_SLEEP_BUTTON, - ACPI_BUS_DEVICE_TYPE_COUNT -}; - -struct acpi_driver; -struct acpi_device; - -/* - * ACPI Driver - * ----------- - */ - -typedef int (*acpi_op_add) (struct acpi_device * device); -typedef int (*acpi_op_remove) (struct acpi_device * device, int type); -typedef int (*acpi_op_lock) (struct acpi_device * device, int type); -typedef int (*acpi_op_start) (struct acpi_device * device); -typedef int (*acpi_op_stop) (struct acpi_device * device, int type); -typedef int (*acpi_op_suspend) (struct acpi_device * device, - pm_message_t state); -typedef int (*acpi_op_resume) (struct acpi_device * device); -typedef int (*acpi_op_scan) (struct acpi_device * device); -typedef int (*acpi_op_bind) (struct acpi_device * device); -typedef int (*acpi_op_unbind) (struct acpi_device * device); -typedef int (*acpi_op_shutdown) (struct acpi_device * device); - -struct acpi_bus_ops { - u32 acpi_op_add:1; - u32 acpi_op_remove:1; - u32 acpi_op_lock:1; - u32 acpi_op_start:1; - u32 acpi_op_stop:1; - u32 acpi_op_suspend:1; - u32 acpi_op_resume:1; - u32 acpi_op_scan:1; - u32 acpi_op_bind:1; - u32 acpi_op_unbind:1; - u32 acpi_op_shutdown:1; - u32 reserved:21; -}; - -struct acpi_device_ops { - acpi_op_add add; - acpi_op_remove remove; - acpi_op_lock lock; - acpi_op_start start; - acpi_op_stop stop; - acpi_op_suspend suspend; - acpi_op_resume resume; - acpi_op_scan scan; - acpi_op_bind bind; - acpi_op_unbind unbind; - acpi_op_shutdown shutdown; -}; - -struct acpi_driver { - char name[80]; - char class[80]; - const struct acpi_device_id *ids; /* Supported Hardware IDs */ - struct acpi_device_ops ops; - struct device_driver drv; - struct module *owner; -}; - -/* - * ACPI Device - * ----------- - */ - -/* Status (_STA) */ - -struct acpi_device_status { - u32 present:1; - u32 enabled:1; - u32 show_in_ui:1; - u32 functional:1; - u32 battery_present:1; - u32 reserved:27; -}; - -/* Flags */ - -struct acpi_device_flags { - u32 dynamic_status:1; - u32 hardware_id:1; - u32 compatible_ids:1; - u32 bus_address:1; - u32 unique_id:1; - u32 removable:1; - u32 ejectable:1; - u32 lockable:1; - u32 suprise_removal_ok:1; - u32 power_manageable:1; - u32 performance_manageable:1; - u32 wake_capable:1; /* Wakeup(_PRW) supported? */ - u32 force_power_state:1; - u32 reserved:19; -}; - -/* File System */ - -struct acpi_device_dir { - struct proc_dir_entry *entry; -}; - -#define acpi_device_dir(d) ((d)->dir.entry) - -/* Plug and Play */ - -typedef char acpi_bus_id[5]; -typedef unsigned long acpi_bus_address; -typedef char acpi_hardware_id[15]; -typedef char acpi_unique_id[9]; -typedef char acpi_device_name[40]; -typedef char acpi_device_class[20]; - -struct acpi_device_pnp { - acpi_bus_id bus_id; /* Object name */ - acpi_bus_address bus_address; /* _ADR */ - acpi_hardware_id hardware_id; /* _HID */ - struct acpi_compatible_id_list *cid_list; /* _CIDs */ - acpi_unique_id unique_id; /* _UID */ - acpi_device_name device_name; /* Driver-determined */ - acpi_device_class device_class; /* " */ -}; - -#define acpi_device_bid(d) ((d)->pnp.bus_id) -#define acpi_device_adr(d) ((d)->pnp.bus_address) -#define acpi_device_hid(d) ((d)->pnp.hardware_id) -#define acpi_device_uid(d) ((d)->pnp.unique_id) -#define acpi_device_name(d) ((d)->pnp.device_name) -#define acpi_device_class(d) ((d)->pnp.device_class) - -/* Power Management */ - -struct acpi_device_power_flags { - u32 explicit_get:1; /* _PSC present? */ - u32 power_resources:1; /* Power resources */ - u32 inrush_current:1; /* Serialize Dx->D0 */ - u32 power_removed:1; /* Optimize Dx->D0 */ - u32 reserved:28; -}; - -struct acpi_device_power_state { - struct { - u8 valid:1; - u8 explicit_set:1; /* _PSx present? */ - u8 reserved:6; - } flags; - int power; /* % Power (compared to D0) */ - int latency; /* Dx->D0 time (microseconds) */ - struct acpi_handle_list resources; /* Power resources = referenced */ -}; - -struct acpi_device_power { - int state; /* Current state */ - struct acpi_device_power_flags flags; - struct acpi_device_power_state states[4]; /* Power states = (D0-D3) */ -}; - -/* Performance Management */ - -struct acpi_device_perf_flags { - u8 reserved:8; -}; - -struct acpi_device_perf_state { - struct { - u8 valid:1; - u8 reserved:7; - } flags; - u8 power; /* % Power (compared to P0) */ - u8 performance; /* % Performance ( " ) */ - int latency; /* Px->P0 time (microseconds) */ -}; - -struct acpi_device_perf { - int state; - struct acpi_device_perf_flags flags; - int state_count; - struct acpi_device_perf_state *states; -}; - -/* Wakeup Management */ -struct acpi_device_wakeup_flags { - u8 valid:1; /* Can successfully enable wakeup? */ - u8 run_wake:1; /* Run-Wake GPE devices */ -}; - -struct acpi_device_wakeup_state { - u8 enabled:1; -}; - -struct acpi_device_wakeup { - acpi_handle gpe_device; - acpi_integer gpe_number; - acpi_integer sleep_state; - struct acpi_handle_list resources; - struct acpi_device_wakeup_state state; - struct acpi_device_wakeup_flags flags; -}; - -/* Device */ - -struct acpi_device { - acpi_handle handle; - struct acpi_device *parent; - struct list_head children; - struct list_head node; - struct list_head wakeup_list; - struct list_head g_list; - struct acpi_device_status status; - struct acpi_device_flags flags; - struct acpi_device_pnp pnp; - struct acpi_device_power power; - struct acpi_device_wakeup wakeup; - struct acpi_device_perf performance; - struct acpi_device_dir dir; - struct acpi_device_ops ops; - struct acpi_driver *driver; - void *driver_data; - struct device dev; - struct acpi_bus_ops bus_ops; /* workaround for different code = path for hotplug */ - enum acpi_bus_removal_type removal_type; /* indicate for = different removal type */ -}; - -#define acpi_driver_data(d) ((d)->driver_data) -#define to_acpi_device(d) container_of(d, struct acpi_device, dev) -#define to_acpi_driver(d) container_of(d, struct acpi_driver, drv) - -/* acpi_device.dev.bus =3D=3D &acpi_bus_type */ -extern struct bus_type acpi_bus_type; - -/* - * Events - * ------ - */ - -struct acpi_bus_event { - struct list_head node; - acpi_device_class device_class; - acpi_bus_id bus_id; - u32 type; - u32 data; -}; - -extern struct kobject *acpi_kobj; -extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, = int); -void acpi_bus_private_data_handler(acpi_handle, u32, void *); -int acpi_bus_get_private_data(acpi_handle, void **); -extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32); -extern int register_acpi_notifier(struct notifier_block *); -extern int unregister_acpi_notifier(struct notifier_block *); -/* - * External Functions - */ - -int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); -void acpi_bus_data_handler(acpi_handle handle, u32 function, void = *context); -int acpi_bus_get_status(struct acpi_device *device); -int acpi_bus_get_power(acpi_handle handle, int *state); -int acpi_bus_set_power(acpi_handle handle, int state); -#ifdef CONFIG_ACPI_PROC_EVENT -int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int = data); -int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 = type, int data); -int acpi_bus_receive_event(struct acpi_bus_event *event); -#else -static inline int acpi_bus_generate_proc_event(struct acpi_device = *device, u8 type, int data) - { return 0; } -#endif -int acpi_bus_register_driver(struct acpi_driver *driver); -void acpi_bus_unregister_driver(struct acpi_driver *driver); -int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, - acpi_handle handle, int type); -int acpi_bus_trim(struct acpi_device *start, int rmdevice); -int acpi_bus_start(struct acpi_device *device); -acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); -int acpi_match_device_ids(struct acpi_device *device, - const struct acpi_device_id *ids); -int acpi_create_dir(struct acpi_device *); -void acpi_remove_dir(struct acpi_device *); - -/* - * Bind physical devices with ACPI devices - */ -#include -struct acpi_bus_type { - struct list_head list; - struct bus_type *bus; - /* For general devices under the bus */ - int (*find_device) (struct device *, acpi_handle *); - /* For bridges, such as PCI root bridge, IDE controller */ - int (*find_bridge) (struct device *, acpi_handle *); -}; -int register_acpi_bus_type(struct acpi_bus_type *); -int unregister_acpi_bus_type(struct acpi_bus_type *); -struct device *acpi_get_physical_device(acpi_handle); -/* helper */ -acpi_handle acpi_get_child(acpi_handle, acpi_integer); -acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); -#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle= )) - -#ifdef CONFIG_PM_SLEEP -int acpi_pm_device_sleep_state(struct device *, int, int *); -#else /* !CONFIG_PM_SLEEP */ -static inline int acpi_pm_device_sleep_state(struct device *d, int w, int = *p) -{ - if (p) - *p =3D ACPI_STATE_D0; - return ACPI_STATE_D3; -} -#endif /* !CONFIG_PM_SLEEP */ - -#endif /* CONFIG_ACPI */ - -#endif /*__ACPI_BUS_H__*/ --- 2011-02-10.orig/xen/include/acpi/acpi_drivers.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * acpi_drivers.h ($Revision: 31 $) - * - * Copyright (C) 2001, 2002 Andy Grover - * Copyright (C) 2001, 2002 Paul Diefenbaugh - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License = along - * with this program; if not, write to the Free Software Foundation, = Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~ - */ - -#ifndef __ACPI_DRIVERS_H__ -#define __ACPI_DRIVERS_H__ - -#include -#include - - -#define ACPI_MAX_STRING 80 - -#define ACPI_BUS_COMPONENT 0x00010000 -#define ACPI_SYSTEM_COMPONENT 0x02000000 - -/* _HID definitions */ - -#define ACPI_POWER_HID "ACPI_PWR" -#define ACPI_PROCESSOR_HID "ACPI_CPU" -#define ACPI_SYSTEM_HID "ACPI_SYS" -#define ACPI_THERMAL_HID "ACPI_THM" -#define ACPI_BUTTON_HID_POWERF "ACPI_FPB" -#define ACPI_BUTTON_HID_SLEEPF "ACPI_FSB" - - -/* -----------------------------------------------------------------------= --- - PCI - -----------------------------------------------------------------------= --- */ - -#ifdef CONFIG_ACPI_PCI - -#define ACPI_PCI_COMPONENT 0x00400000 - -/* ACPI PCI Interrupt Link (pci_link.c) */ - -int acpi_irq_penalty_init (void); -int acpi_pci_link_get_irq (acpi_handle handle, int index, int* edge_level,= int* active_high_low); - -/* ACPI PCI Interrupt Routing (pci_irq.c) */ - -int acpi_pci_irq_add_prt (acpi_handle handle, int segment, int bus); -void acpi_pci_irq_del_prt (int segment, int bus); - -/* ACPI PCI Device Binding (pci_bind.c) */ - -struct pci_bus; - -int acpi_pci_bind (struct acpi_device *device); -int acpi_pci_unbind (struct acpi_device *device); -int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id = *id, struct pci_bus *bus); - -/* Arch-defined function to add a bus to the system */ - -struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int = domain, int bus); - -#endif /*CONFIG_ACPI_PCI*/ - - -/* -----------------------------------------------------------------------= --- - Power Resource - -----------------------------------------------------------------------= --- */ - -#ifdef CONFIG_ACPI_POWER -int acpi_enable_wakeup_device_power (struct acpi_device *dev); -int acpi_disable_wakeup_device_power (struct acpi_device *dev); -int acpi_power_get_inferred_state (struct acpi_device *device); -int acpi_power_transition (struct acpi_device *device, int state); -#endif - - -/* -----------------------------------------------------------------------= --- - Embedded Controller - -----------------------------------------------------------------------= --- */ -#ifdef CONFIG_ACPI_EC -int acpi_ec_ecdt_probe (void); -#endif - -/* -----------------------------------------------------------------------= --- - Processor - -----------------------------------------------------------------------= --- */ - -#define ACPI_PROCESSOR_LIMIT_NONE 0x00 -#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 -#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 - -int acpi_processor_set_thermal_limit(acpi_handle handle, int type); - - -#endif /*__ACPI_DRIVERS_H__*/ --- 2011-02-10.orig/xen/include/acpi/acpiosxf.h +++ 2011-02-10/xen/include/acpi/acpiosxf.h @@ -50,155 +50,19 @@ #include "platform/acenv.h" #include "actypes.h" =20 -/* Types for acpi_os_execute */ - -typedef enum { - OSL_GLOBAL_LOCK_HANDLER, - OSL_NOTIFY_HANDLER, - OSL_GPE_HANDLER, - OSL_DEBUGGER_THREAD, - OSL_EC_POLL_HANDLER, - OSL_EC_BURST_HANDLER -} acpi_execute_type; - -#define ACPI_NO_UNIT_LIMIT ((u32) -1) -#define ACPI_MUTEX_SEM 1 - -/* Functions for acpi_os_signal */ - -#define ACPI_SIGNAL_FATAL 0 -#define ACPI_SIGNAL_BREAKPOINT 1 - -struct acpi_signal_fatal_info { - u32 type; - u32 code; - u32 argument; -}; - -/* - * OSL Initialization and shutdown primitives - */ -acpi_status acpi_os_initialize(void); - -acpi_status acpi_os_terminate(void); - /* * ACPI Table interfaces */ acpi_physical_address acpi_os_get_root_pointer(void); =20 -acpi_status -acpi_os_predefined_override(const struct acpi_predefined_names *init_val, - acpi_string * new_val); - -acpi_status -acpi_os_table_override(struct acpi_table_header *existing_table, - struct acpi_table_header **new_table); - -/* - * Spinlock primitives - */ -acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); - -void acpi_os_delete_lock(acpi_spinlock handle); - -acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); - -void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags); - /* - * Semaphore primitives + * Memory mapping */ -acpi_status -acpi_os_create_semaphore(u32 max_units, - u32 initial_units, acpi_semaphore * out_handle); - -acpi_status acpi_os_delete_semaphore(acpi_semaphore handle); - -acpi_status -acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout); - -acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units); - -/* - * Mutex primitives - */ -acpi_status acpi_os_create_mutex(acpi_mutex * out_handle); - -void acpi_os_delete_mutex(acpi_mutex handle); - -acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout); - -void acpi_os_release_mutex(acpi_mutex handle); - -/* Temporary macros for Mutex* interfaces, map to existing semaphore = xfaces */ - -#define acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, = 1, out_handle) -#define acpi_os_delete_mutex(handle) (void) acpi_os_delete_semaphor= e (handle) -#define acpi_os_acquire_mutex(handle,time) acpi_os_wait_semaphore = (handle, 1, time) -#define acpi_os_release_mutex(handle) (void) acpi_os_signal_semaphor= e (handle, 1) - -/* - * Memory allocation and mapping - */ -void *acpi_os_allocate(acpi_size size); - void __iomem *acpi_os_map_memory(acpi_physical_address where, acpi_native_uint length); =20 void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size = size); =20 -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_os_get_physical_address(void *logical_address, - acpi_physical_address * physical_address); -#endif - -/* - * Memory/Object Cache - */ -acpi_status -acpi_os_create_cache(char *cache_name, - u16 object_size, - u16 max_depth, acpi_cache_t ** return_cache); - -acpi_status acpi_os_delete_cache(acpi_cache_t * cache); - -acpi_status acpi_os_purge_cache(acpi_cache_t * cache); - -void *acpi_os_acquire_object(acpi_cache_t * cache); - -acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object); - -/* - * Interrupt handlers - */ -acpi_status -acpi_os_install_interrupt_handler(u32 gsi, - acpi_osd_handler service_routine, - void *context); - -acpi_status -acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine= ); - -void acpi_os_gpe_count(u32 gpe_number); -void acpi_os_fixed_event_count(u32 fixed_event_number); - -/* - * Threads and Scheduling - */ -acpi_thread_id acpi_os_get_thread_id(void); - -acpi_status -acpi_os_execute(acpi_execute_type type, - acpi_osd_exec_callback function, void *context); - -void acpi_os_wait_events_complete(void *context); - -void acpi_os_sleep(acpi_integer milliseconds); - -void acpi_os_stall(u32 microseconds); - /* * Platform and hardware-independent I/O interfaces */ @@ -216,68 +80,10 @@ acpi_status acpi_os_write_memory(acpi_physical_address address, u32 value, u32 = width); =20 /* - * Platform and hardware-independent PCI configuration space access - * Note: Can't use "Register" as a parameter, changed to "Reg" -- - * certain compilers complain. - */ -acpi_status -acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, - u32 reg, u32 *value, u32 width); - -acpi_status -acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, - u32 reg, acpi_integer value, u32 width); - -/* - * Interim function needed for PCI IRQ routing - */ -void -acpi_os_derive_pci_id(acpi_handle rhandle, - acpi_handle chandle, struct acpi_pci_id **pci_id); - -/* - * Miscellaneous - */ -acpi_status acpi_os_validate_interface(char *interface); -acpi_status acpi_osi_invalidate(char* interface); - -acpi_status -acpi_os_validate_address(u8 space_id, acpi_physical_address address, - acpi_size length, char *name); - -u64 acpi_os_get_timer(void); - -acpi_status acpi_os_signal(u32 function, void *info); - -/* * Debug print routines */ void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...); =20 void acpi_os_vprintf(const char *format, va_list args); =20 -void acpi_os_redirect_output(void *destination); - -#ifdef ACPI_FUTURE_USAGE -/* - * Debug input - */ -u32 acpi_os_get_line(char *buffer); -#endif - -/* - * Directory manipulation - */ -void *acpi_os_open_directory(char *pathname, - char *wildcard_spec, char requested_file_type)= ; - -/* requeste_file_type values */ - -#define REQUEST_FILE_ONLY 0 -#define REQUEST_DIR_ONLY 1 - -char *acpi_os_get_next_filename(void *dir_handle); - -void acpi_os_close_directory(void *dir_handle); - #endif /* __ACPIOSXF_H__ */ --- 2011-02-10.orig/xen/include/acpi/acpixf.h +++ 2011-02-10/xen/include/acpi/acpixf.h @@ -55,44 +55,8 @@ acpi_status acpi_initialize_tables(struct acpi_table_desc *initial_storage, u32 initial_table_count, u8 allow_resize); =20 -acpi_status acpi_initialize_subsystem(void); - -acpi_status acpi_enable_subsystem(u32 flags); - -acpi_status acpi_initialize_objects(u32 flags); - -acpi_status acpi_terminate(void); - -#ifdef ACPI_FUTURE_USAGE -acpi_status acpi_subsystem_status(void); -#endif - -acpi_status acpi_enable(void); - -acpi_status acpi_disable(void); - -#ifdef ACPI_FUTURE_USAGE -acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); -#endif - const char *acpi_format_exception(acpi_status exception); =20 -acpi_status acpi_purge_cached_objects(void); - -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_install_initialization_handler(acpi_init_handler handler, u32 = function); -#endif - -/* - * ACPI Memory management - */ -void *acpi_allocate(u32 size); - -void *acpi_callocate(u32 size); - -void acpi_free(void *address); - /* * ACPI table manipulation interfaces */ @@ -104,8 +68,6 @@ acpi_status acpi_load_tables(void); =20 acpi_status acpi_load_table(struct acpi_table_header *table_ptr); =20 -acpi_status acpi_unload_table_id(acpi_owner_id id); - acpi_status acpi_get_table_header(acpi_string signature, acpi_native_uint instance, @@ -115,207 +77,28 @@ acpi_status acpi_get_table(acpi_string signature, acpi_native_uint instance, struct acpi_table_header = **out_table); =20 -acpi_status -acpi_get_table_by_index(acpi_native_uint table_index, - struct acpi_table_header **out_table); - /* * Namespace and name interfaces */ acpi_status -acpi_walk_namespace(acpi_object_type type, - acpi_handle start_object, - u32 max_depth, - acpi_walk_callback user_function, - void *context, void **return_value); - -acpi_status -acpi_get_devices(const char *HID, - acpi_walk_callback user_function, - void *context, void **return_value); - -acpi_status -acpi_get_name(acpi_handle handle, - u32 name_type, struct acpi_buffer *ret_path_ptr); - -acpi_status acpi_get_handle(acpi_handle parent, acpi_string pathname, acpi_handle * ret_handle); =20 acpi_status -acpi_attach_data(acpi_handle obj_handle, - acpi_object_handler handler, void *data); - -acpi_status -acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler); - -acpi_status -acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void = **data); - -acpi_status acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 = flags); =20 -/* - * Object manipulation and enumeration - */ -acpi_status -acpi_evaluate_object(acpi_handle object, - acpi_string pathname, - struct acpi_object_list *parameter_objects, - struct acpi_buffer *return_object_buffer); - -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_evaluate_object_typed(acpi_handle object, - acpi_string pathname, - struct acpi_object_list *external_params, - struct acpi_buffer *return_buffer, - acpi_object_type return_type); -#endif - acpi_status acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer= ); =20 -acpi_status -acpi_get_next_object(acpi_object_type type, - acpi_handle parent, - acpi_handle child, acpi_handle * out_handle); - acpi_status acpi_get_type(acpi_handle object, acpi_object_type * = out_type); =20 -acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type); - acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle);= =20 /* - * Event handler interfaces - */ -acpi_status -acpi_install_fixed_event_handler(u32 acpi_event, - acpi_event_handler handler, void = *context); - -acpi_status -acpi_remove_fixed_event_handler(u32 acpi_event, acpi_event_handler = handler); - -acpi_status -acpi_install_notify_handler(acpi_handle device, - u32 handler_type, - acpi_notify_handler handler, void *context); - -acpi_status -acpi_remove_notify_handler(acpi_handle device, - u32 handler_type, acpi_notify_handler handler); - -acpi_status -acpi_install_address_space_handler(acpi_handle device, - acpi_adr_space_type space_id, - acpi_adr_space_handler handler, - acpi_adr_space_setup setup, void = *context); - -acpi_status -acpi_remove_address_space_handler(acpi_handle device, - acpi_adr_space_type space_id, - acpi_adr_space_handler handler); - -acpi_status -acpi_install_gpe_handler(acpi_handle gpe_device, - u32 gpe_number, - u32 type, acpi_event_handler address, void = *context); - -#ifdef ACPI_FUTURE_USAGE -acpi_status acpi_install_exception_handler(acpi_exception_handler = handler); -#endif - -/* - * Event interfaces - */ -acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle); - -acpi_status acpi_release_global_lock(u32 handle); - -acpi_status -acpi_remove_gpe_handler(acpi_handle gpe_device, - u32 gpe_number, acpi_event_handler address); - -acpi_status acpi_enable_event(u32 event, u32 flags); - -acpi_status acpi_disable_event(u32 event, u32 flags); - -acpi_status acpi_clear_event(u32 event); - -#ifdef ACPI_FUTURE_USAGE -acpi_status acpi_get_event_status(u32 event, acpi_event_status * = event_status); -#endif /* ACPI_FUTURE_USAGE */ - -acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 = type); - -acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 = flags); - -acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 = flags); - -acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 = flags); - -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_get_gpe_status(acpi_handle gpe_device, - u32 gpe_number, - u32 flags, acpi_event_status * event_status); -#endif /* ACPI_FUTURE_USAGE */ - -acpi_status -acpi_install_gpe_block(acpi_handle gpe_device, - struct acpi_generic_address *gpe_block_address, - u32 register_count, u32 interrupt_number); - -acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); - -/* - * Resource interfaces - */ -typedef -acpi_status(*acpi_walk_resource_callback) (struct acpi_resource * = resource, - void *context); - -acpi_status -acpi_get_vendor_resource(acpi_handle device_handle, - char *name, - struct acpi_vendor_uuid *uuid, - struct acpi_buffer *ret_buffer); - -acpi_status -acpi_get_current_resources(acpi_handle device_handle, - struct acpi_buffer *ret_buffer); - -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_get_possible_resources(acpi_handle device_handle, - struct acpi_buffer *ret_buffer); -#endif - -acpi_status -acpi_walk_resources(acpi_handle device_handle, - char *name, - acpi_walk_resource_callback user_function, void = *context); - -acpi_status -acpi_set_current_resources(acpi_handle device_handle, - struct acpi_buffer *in_buffer); - -acpi_status -acpi_get_irq_routing_table(acpi_handle bus_device_handle, - struct acpi_buffer *ret_buffer); - -acpi_status -acpi_resource_to_address64(struct acpi_resource *resource, - struct acpi_resource_address64 *out); - -/* * Hardware (ACPI device) interfaces */ acpi_status acpi_get_register(u32 register_id, u32 * return_value); =20 -acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value)= ; - acpi_status acpi_set_register(u32 register_id, u32 value); =20 acpi_status --- 2011-02-10.orig/xen/include/acpi/acstruct.h +++ /dev/null @@ -1,231 +0,0 @@ -/*************************************************************************= ***** - * - * Name: acstruct.h - Internal structs - * - *************************************************************************= ****/ - -/* - * Copyright (C) 2000 - 2007, R. Byron Moore - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a = disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for = further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the = names - * of any contributors may be used to endorse or promote products = derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENT= IAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ - -#ifndef __ACSTRUCT_H__ -#define __ACSTRUCT_H__ - -/* acpisrc:struct_defs -- for acpisrc conversion */ - -/*************************************************************************= **** - * - * Tree walking typedefs and structs - * - *************************************************************************= ***/ - -/* - * Walk state - current state of a parse tree walk. Used for both a = leisurely - * stroll through the tree (for whatever reason), and for control method - * execution. - */ -#define ACPI_NEXT_OP_DOWNWARD 1 -#define ACPI_NEXT_OP_UPWARD 2 - -/* - * Groups of definitions for walk_type used for different implementations = of - * walkers (never simultaneously) - flags for interpreter: - */ -#define ACPI_WALK_NON_METHOD 0 -#define ACPI_WALK_METHOD 0x01 -#define ACPI_WALK_METHOD_RESTART 0x02 - -/* Flags for i_aSL compiler only */ - -#define ACPI_WALK_CONST_REQUIRED 0x10 -#define ACPI_WALK_CONST_OPTIONAL 0x20 - -struct acpi_walk_state { - struct acpi_walk_state *next; /* Next walk_state in list */ - u8 descriptor_type; /* To differentiate various internal objs = */ - u8 walk_type; - u16 opcode; /* Current AML opcode */ - u8 next_op_info; /* Info about next_op */ - u8 num_operands; /* Stack pointer for Operands[] array */ - acpi_owner_id owner_id; /* Owner of objects created during the = walk */ - u8 last_predicate; /* Result of last predicate */ - u8 current_result; - u8 return_used; - u8 scope_depth; - u8 pass_number; /* Parse pass during table load */ - u32 aml_offset; - u32 arg_types; - u32 method_breakpoint; /* For single stepping */ - u32 user_breakpoint; /* User AML breakpoint */ - u32 parse_flags; - - struct acpi_parse_state parser_state; /* Current state of parser = */ - u32 prev_arg_types; - u32 arg_count; /* push for fixed or var args */ - - struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* = Control method arguments */ - struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS];= /* Control method locals */ - union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS + 1]; /* = Operands passed to the interpreter (+1 for NULL terminator) */ - union acpi_operand_object **params; - - u8 *aml_last_while; - union acpi_operand_object **caller_return_desc; - union acpi_generic_state *control_state; /* List of control = states (nested IFs) */ - struct acpi_namespace_node *deferred_node; /* Used when = executing deferred opcodes */ - struct acpi_gpe_event_info *gpe_event_info; /* Info for GPE = (_Lxx/_Exx methods only */ - union acpi_operand_object *implicit_return_obj; - struct acpi_namespace_node *method_call_node; /* Called method = Node */ - union acpi_parse_object *method_call_op; /* method_call Op = if running a method */ - union acpi_operand_object *method_desc; /* Method descriptor if = running a method */ - struct acpi_namespace_node *method_node; /* Method node if = running a method. */ - union acpi_parse_object *op; /* Current parser op */ - const struct acpi_opcode_info *op_info; /* Info on current opcode = */ - union acpi_parse_object *origin; /* Start of walk [Obsolete]= */ - union acpi_operand_object *result_obj; - union acpi_generic_state *results; /* Stack of accumulated = results */ - union acpi_operand_object *return_desc; /* Return object, if any = */ - union acpi_generic_state *scope_info; /* Stack of nested scopes = */ - union acpi_parse_object *prev_op; /* Last op that was = processed */ - union acpi_parse_object *next_op; /* next op to be processed = */ - struct acpi_thread_state *thread; - acpi_parse_downwards descending_callback; - acpi_parse_upwards ascending_callback; -}; - -/* Info used by acpi_ps_init_objects */ - -struct acpi_init_walk_info { - u16 method_count; - u16 device_count; - u16 op_region_count; - u16 field_count; - u16 buffer_count; - u16 package_count; - u16 op_region_init; - u16 field_init; - u16 buffer_init; - u16 package_init; - u16 object_count; - acpi_owner_id owner_id; - acpi_native_uint table_index; -}; - -struct acpi_get_devices_info { - acpi_walk_callback user_function; - void *context; - const char *hid; -}; - -union acpi_aml_operands { - union acpi_operand_object *operands[7]; - - struct { - struct acpi_object_integer *type; - struct acpi_object_integer *code; - struct acpi_object_integer *argument; - - } fatal; - - struct { - union acpi_operand_object *source; - struct acpi_object_integer *index; - union acpi_operand_object *target; - - } index; - - struct { - union acpi_operand_object *source; - struct acpi_object_integer *index; - struct acpi_object_integer *length; - union acpi_operand_object *target; - - } mid; -}; - -/* - * Structure used to pass object evaluation parameters. - * Purpose is to reduce CPU stack use. - */ -struct acpi_evaluate_info { - struct acpi_namespace_node *prefix_node; - char *pathname; - union acpi_operand_object *obj_desc; - union acpi_operand_object **parameters; - struct acpi_namespace_node *resolved_node; - union acpi_operand_object *return_object; - u8 pass_number; - u8 parameter_type; - u8 return_object_type; - u8 flags; -}; - -/* Types for parameter_type above */ - -#define ACPI_PARAM_ARGS 0 -#define ACPI_PARAM_GPE 1 - -/* Values for Flags above */ - -#define ACPI_IGNORE_RETURN_VALUE 1 - -/* Info used by acpi_ns_initialize_devices */ - -struct acpi_device_walk_info { - u16 device_count; - u16 num_STA; - u16 num_INI; - struct acpi_table_desc *table_desc; - struct acpi_evaluate_info *evaluate_info; -}; - -/* TBD: [Restructure] Merge with struct above */ - -struct acpi_walk_info { - u32 debug_level; - u32 count; - acpi_owner_id owner_id; - u8 display_type; -}; - -/* Display Types */ - -#define ACPI_DISPLAY_SUMMARY (u8) 0 -#define ACPI_DISPLAY_OBJECTS (u8) 1 -#define ACPI_DISPLAY_MASK (u8) 1 - -#define ACPI_DISPLAY_SHORT (u8) 2 - -#endif --- 2011-02-10.orig/xen/include/acpi/actables.h +++ 2011-02-10/xen/include/acpi/actables.h @@ -81,15 +81,6 @@ void acpi_tb_delete_table(struct acpi_ta =20 void acpi_tb_terminate(void); =20 -void acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index); - -acpi_status acpi_tb_allocate_owner_id(acpi_native_uint table_index); - -acpi_status acpi_tb_release_owner_id(acpi_native_uint table_index); - -acpi_status -acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_id * = owner_id); - u8 acpi_tb_is_table_loaded(acpi_native_uint table_index); =20 void acpi_tb_set_table_loaded_flag(acpi_native_uint table_index, u8 = is_loaded); @@ -97,8 +88,6 @@ void acpi_tb_set_table_loaded_flag(acpi_ /* * tbutils - table manager utilities */ -u8 acpi_tb_tables_loaded(void); - void acpi_tb_print_table_header(acpi_physical_address address, struct acpi_table_header *header); --- 2011-02-10.orig/xen/include/acpi/actypes.h +++ 2011-02-10/xen/include/acpi/actypes.h @@ -222,24 +222,6 @@ typedef acpi_native_uint acpi_size; #define acpi_thread_id acpi_native_uint #endif =20 -/* Object returned from acpi_os_create_lock */ - -#ifndef acpi_spinlock -#define acpi_spinlock void * -#endif - -/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ - -#ifndef acpi_cpu_flags -#define acpi_cpu_flags acpi_native_uint -#endif - -/* Object returned from acpi_os_create_cache */ - -#ifndef acpi_cache_t -#define acpi_cache_t struct acpi_memory_list -#endif - /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise = */ =20 #ifndef acpi_uintptr_t @@ -539,62 +521,6 @@ typedef u32 acpi_event_status; #define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02 #define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04 =20 -/* - * General Purpose Events (GPE) - */ -#define ACPI_GPE_INVALID 0xFF -#define ACPI_GPE_MAX 0xFF -#define ACPI_NUM_GPE 256 - -#define ACPI_GPE_ENABLE 0 -#define ACPI_GPE_DISABLE 1 - -/* - * GPE info flags - Per GPE - * +-+-+-+---+---+-+ - * |7|6|5|4:3|2:1|0| - * +-+-+-+---+---+-+ - * | | | | | | - * | | | | | +--- Interrupt type: Edge or Level Triggered - * | | | | +--- Type: Wake-only, Runtime-only, or wake/runtime - * | | | +--- Type of dispatch -- to method, handler, or none - * | | +--- Enabled for runtime? - * | +--- Enabled for wake? - * +--- Unused - */ -#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 -#define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x01 -#define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 - -#define ACPI_GPE_TYPE_MASK (u8) 0x06 -#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06 -#define ACPI_GPE_TYPE_WAKE (u8) 0x02 -#define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */ - -#define ACPI_GPE_DISPATCH_MASK (u8) 0x18 -#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08 -#define ACPI_GPE_DISPATCH_METHOD (u8) 0x10 -#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */ - -#define ACPI_GPE_RUN_ENABLE_MASK (u8) 0x20 -#define ACPI_GPE_RUN_ENABLED (u8) 0x20 -#define ACPI_GPE_RUN_DISABLED (u8) 0x00 /* Default */ - -#define ACPI_GPE_WAKE_ENABLE_MASK (u8) 0x40 -#define ACPI_GPE_WAKE_ENABLED (u8) 0x40 -#define ACPI_GPE_WAKE_DISABLED (u8) 0x00 /* Default */ - -#define ACPI_GPE_ENABLE_MASK (u8) 0x60 /* Both run/wake = */ - -/* - * Flags for GPE and Lock interfaces - */ -#define ACPI_EVENT_WAKE_ENABLE 0x2 /* acpi_gpe_enable */ -#define ACPI_EVENT_WAKE_DISABLE 0x2 /* acpi_gpe_disable */ - -#define ACPI_NOT_ISR 0x1 -#define ACPI_ISR 0x0 - /* Notify types */ =20 #define ACPI_SYSTEM_NOTIFY 0x1 @@ -720,175 +646,6 @@ struct acpi_buffer { }; =20 /* - * name_type for acpi_get_name - */ -#define ACPI_FULL_PATHNAME 0 -#define ACPI_SINGLE_NAME 1 -#define ACPI_NAME_TYPE_MAX 1 - -/* - * Structure and flags for acpi_get_system_info - */ -#define ACPI_SYS_MODE_UNKNOWN 0x0000 -#define ACPI_SYS_MODE_ACPI 0x0001 -#define ACPI_SYS_MODE_LEGACY 0x0002 -#define ACPI_SYS_MODES_MASK 0x0003 - -/* - * System info returned by acpi_get_system_info() - */ -struct acpi_system_info { - u32 acpi_ca_version; - u32 flags; - u32 timer_resolution; - u32 reserved1; - u32 reserved2; - u32 debug_level; - u32 debug_layer; -}; - -/* - * Types specific to the OS service interfaces - */ -typedef u32(ACPI_SYSTEM_XFACE * acpi_osd_handler) (void *context); - -typedef void - (ACPI_SYSTEM_XFACE * acpi_osd_exec_callback) (void *context); - -/* - * Various handlers and callback procedures - */ -typedef u32(*acpi_event_handler) (void *context); - -typedef -void (*acpi_notify_handler) (acpi_handle device, u32 value, void = *context); - -typedef -void (*acpi_object_handler) (acpi_handle object, u32 function, void = *data); - -typedef acpi_status(*acpi_init_handler) (acpi_handle object, u32 = function); - -#define ACPI_INIT_DEVICE_INI 1 - -typedef -acpi_status(*acpi_exception_handler) (acpi_status aml_status, - acpi_name name, - u16 opcode, - u32 aml_offset, void *context); - -/* Address Spaces (For Operation Regions) */ - -typedef -acpi_status(*acpi_adr_space_handler) (u32 function, - acpi_physical_address address, - u32 bit_width, - acpi_integer * value, - void *handler_context, - void *region_context); - -#define ACPI_DEFAULT_HANDLER NULL - -typedef -acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, - u32 function, - void *handler_context, - void **region_context); - -#define ACPI_REGION_ACTIVATE 0 -#define ACPI_REGION_DEACTIVATE 1 - -typedef -acpi_status(*acpi_walk_callback) (acpi_handle obj_handle, - u32 nesting_level, - void *context, void **return_value); - -/* Interrupt handler return values */ - -#define ACPI_INTERRUPT_NOT_HANDLED 0x00 -#define ACPI_INTERRUPT_HANDLED 0x01 - -/* Common string version of device HIDs and UIDs */ - -struct acpica_device_id { - char value[ACPI_DEVICE_ID_LENGTH]; -}; - -/* Common string version of device CIDs */ - -struct acpi_compatible_id { - char value[ACPI_MAX_CID_LENGTH]; -}; - -struct acpi_compatible_id_list { - u32 count; - u32 size; - struct acpi_compatible_id id[1]; -}; - -/* Structure and flags for acpi_get_object_info */ - -#define ACPI_VALID_STA 0x0001 -#define ACPI_VALID_ADR 0x0002 -#define ACPI_VALID_HID 0x0004 -#define ACPI_VALID_UID 0x0008 -#define ACPI_VALID_CID 0x0010 -#define ACPI_VALID_SXDS 0x0020 - -/* Flags for _STA method */ - -#define ACPI_STA_DEVICE_PRESENT 0x01 -#define ACPI_STA_DEVICE_ENABLED 0x02 -#define ACPI_STA_DEVICE_UI 0x04 -#define ACPI_STA_DEVICE_FUNCTIONING 0x08 -#define ACPI_STA_DEVICE_OK 0x08 /* Synonym */ -#define ACPI_STA_BATTERY_PRESENT 0x10 - -#define ACPI_COMMON_OBJ_INFO \ - acpi_object_type type; /* ACPI object = type */ \ - acpi_name name /* ACPI object Name */ - -struct acpi_obj_info_header { - ACPI_COMMON_OBJ_INFO; -}; - -/* Structure returned from Get Object Info */ - -struct acpi_device_info { - ACPI_COMMON_OBJ_INFO; - - u32 valid; /* Indicates which fields below are valid = */ - u32 current_status; /* _STA value */ - acpi_integer address; /* _ADR value if any */ - struct acpica_device_id hardware_id; /* _HID value if any */ - struct acpica_device_id unique_id; /* _UID value if any */ - u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid = */ - struct acpi_compatible_id_list compatibility_id; /* List of = _CIDs if any */ -}; - -/* Context structs for address space handlers */ - -struct acpi_pci_id { - u16 segment; - u16 bus; - u16 device; - u16 function; -}; - -struct acpi_mem_space_context { - u32 length; - acpi_physical_address address; - acpi_physical_address mapped_physical_address; - u8 *mapped_logical_address; - acpi_size mapped_length; -}; - -/* - * Definitions for Resource Attributes - */ -typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 = bits */ -typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is = (Length+3) =3D (64_k-1)+3 */ - -/* * Memory Attributes */ #define ACPI_READ_ONLY_MEMORY (u8) 0x00 @@ -968,270 +725,4 @@ typedef u32 acpi_rsdesc_size; /* Max Res #define ACPI_PRODUCER (u8) 0x00 #define ACPI_CONSUMER (u8) 0x01 =20 -/* - * If possible, pack the following structures to byte alignment - */ -#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED -#pragma pack(1) -#endif - -/* UUID data structures for use in vendor-defined resource descriptors */ - -struct acpi_uuid { - u8 data[ACPI_UUID_LENGTH]; -}; - -struct acpi_vendor_uuid { - u8 subtype; - u8 data[ACPI_UUID_LENGTH]; -}; - -/* - * Structures used to describe device resources - */ -struct acpi_resource_irq { - u8 triggering; - u8 polarity; - u8 sharable; - u8 interrupt_count; - u8 interrupts[1]; -}; - -struct acpi_resource_dma { - u8 type; - u8 bus_master; - u8 transfer; - u8 channel_count; - u8 channels[1]; -}; - -struct acpi_resource_start_dependent { - u8 compatibility_priority; - u8 performance_robustness; -}; - -/* - * END_DEPENDENT_FUNCTIONS_RESOURCE struct is not - * needed because it has no fields - */ - -struct acpi_resource_io { - u8 io_decode; - u8 alignment; - u8 address_length; - u16 minimum; - u16 maximum; -}; - -struct acpi_resource_fixed_io { - u16 address; - u8 address_length; -}; - -struct acpi_resource_vendor { - u16 byte_length; - u8 byte_data[1]; -}; - -/* Vendor resource with UUID info (introduced in ACPI 3.0) */ - -struct acpi_resource_vendor_typed { - u16 byte_length; - u8 uuid_subtype; - u8 uuid[ACPI_UUID_LENGTH]; - u8 byte_data[1]; -}; - -struct acpi_resource_end_tag { - u8 checksum; -}; - -struct acpi_resource_memory24 { - u8 write_protect; - u16 minimum; - u16 maximum; - u16 alignment; - u16 address_length; -}; - -struct acpi_resource_memory32 { - u8 write_protect; - u32 minimum; - u32 maximum; - u32 alignment; - u32 address_length; -}; - -struct acpi_resource_fixed_memory32 { - u8 write_protect; - u32 address; - u32 address_length; -}; - -struct acpi_memory_attribute { - u8 write_protect; - u8 caching; - u8 range_type; - u8 translation; -}; - -struct acpi_io_attribute { - u8 range_type; - u8 translation; - u8 translation_type; - u8 reserved1; -}; - -union acpi_resource_attribute { - struct acpi_memory_attribute mem; - struct acpi_io_attribute io; - - /* Used for the *word_space macros */ - - u8 type_specific; -}; - -struct acpi_resource_source { - u8 index; - u16 string_length; - char *string_ptr; -}; - -/* Fields common to all address descriptors, 16/32/64 bit */ - -#define ACPI_RESOURCE_ADDRESS_COMMON \ - u8 resource_type; \ - u8 producer_consumer; \ - u8 decode; \ - u8 min_address_fixed; \ - u8 max_address_fixed; \ - union acpi_resource_attribute info; - -struct acpi_resource_address { -ACPI_RESOURCE_ADDRESS_COMMON}; - -struct acpi_resource_address16 { - ACPI_RESOURCE_ADDRESS_COMMON u16 granularity; - u16 minimum; - u16 maximum; - u16 translation_offset; - u16 address_length; - struct acpi_resource_source resource_source; -}; - -struct acpi_resource_address32 { - ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; - u32 minimum; - u32 maximum; - u32 translation_offset; - u32 address_length; - struct acpi_resource_source resource_source; -}; - -struct acpi_resource_address64 { - ACPI_RESOURCE_ADDRESS_COMMON u64 granularity; - u64 minimum; - u64 maximum; - u64 translation_offset; - u64 address_length; - struct acpi_resource_source resource_source; -}; - -struct acpi_resource_extended_address64 { - ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD; - u64 granularity; - u64 minimum; - u64 maximum; - u64 translation_offset; - u64 address_length; - u64 type_specific; -}; - -struct acpi_resource_extended_irq { - u8 producer_consumer; - u8 triggering; - u8 polarity; - u8 sharable; - u8 interrupt_count; - struct acpi_resource_source resource_source; - u32 interrupts[1]; -}; - -struct acpi_resource_generic_register { - u8 space_id; - u8 bit_width; - u8 bit_offset; - u8 access_size; - u64 address; -}; - -/* ACPI_RESOURCE_TYPEs */ - -#define ACPI_RESOURCE_TYPE_IRQ 0 -#define ACPI_RESOURCE_TYPE_DMA 1 -#define ACPI_RESOURCE_TYPE_START_DEPENDENT 2 -#define ACPI_RESOURCE_TYPE_END_DEPENDENT 3 -#define ACPI_RESOURCE_TYPE_IO 4 -#define ACPI_RESOURCE_TYPE_FIXED_IO 5 -#define ACPI_RESOURCE_TYPE_VENDOR 6 -#define ACPI_RESOURCE_TYPE_END_TAG 7 -#define ACPI_RESOURCE_TYPE_MEMORY24 8 -#define ACPI_RESOURCE_TYPE_MEMORY32 9 -#define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10 -#define ACPI_RESOURCE_TYPE_ADDRESS16 11 -#define ACPI_RESOURCE_TYPE_ADDRESS32 12 -#define ACPI_RESOURCE_TYPE_ADDRESS64 13 -#define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ -#define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 -#define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 -#define ACPI_RESOURCE_TYPE_MAX 16 - -union acpi_resource_data { - struct acpi_resource_irq irq; - struct acpi_resource_dma dma; - struct acpi_resource_start_dependent start_dpf; - struct acpi_resource_io io; - struct acpi_resource_fixed_io fixed_io; - struct acpi_resource_vendor vendor; - struct acpi_resource_vendor_typed vendor_typed; - struct acpi_resource_end_tag end_tag; - struct acpi_resource_memory24 memory24; - struct acpi_resource_memory32 memory32; - struct acpi_resource_fixed_memory32 fixed_memory32; - struct acpi_resource_address16 address16; - struct acpi_resource_address32 address32; - struct acpi_resource_address64 address64; - struct acpi_resource_extended_address64 ext_address64; - struct acpi_resource_extended_irq extended_irq; - struct acpi_resource_generic_register generic_reg; - - /* Common fields */ - - struct acpi_resource_address address; /* Common 16/32/64 address = fields */ -}; - -struct acpi_resource { - u32 type; - u32 length; - union acpi_resource_data data; -}; - -/* restore default alignment */ - -#pragma pack() - -#define ACPI_RS_SIZE_MIN 12 -#define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */ -#define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + = sizeof (type)) - -#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 = *) res + res->length) - -struct acpi_pci_routing_table { - u32 length; - u32 pin; - acpi_integer address; /* here for 64-bit alignment */ - u32 source_index; - char source[4]; /* pad to 64 bits so sizeof() works in all = cases */ -}; - #endif /* __ACTYPES_H__ */ --- 2011-02-10.orig/xen/include/acpi/acutils.h +++ 2011-02-10/xen/include/acpi/acutils.h @@ -44,32 +44,6 @@ #ifndef _ACUTILS_H #define _ACUTILS_H =20 -extern const u8 acpi_gbl_resource_aml_sizes[]; - -/* Strings used by the disassembler and debugger resource dump routines = */ - -#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) - -extern const char *acpi_gbl_bm_decode[]; -extern const char *acpi_gbl_config_decode[]; -extern const char *acpi_gbl_consume_decode[]; -extern const char *acpi_gbl_dec_decode[]; -extern const char *acpi_gbl_he_decode[]; -extern const char *acpi_gbl_io_decode[]; -extern const char *acpi_gbl_ll_decode[]; -extern const char *acpi_gbl_max_decode[]; -extern const char *acpi_gbl_mem_decode[]; -extern const char *acpi_gbl_min_decode[]; -extern const char *acpi_gbl_mtp_decode[]; -extern const char *acpi_gbl_rng_decode[]; -extern const char *acpi_gbl_rw_decode[]; -extern const char *acpi_gbl_shr_decode[]; -extern const char *acpi_gbl_siz_decode[]; -extern const char *acpi_gbl_trs_decode[]; -extern const char *acpi_gbl_ttp_decode[]; -extern const char *acpi_gbl_typ_decode[]; -#endif - /* Types for Resource descriptor entries */ =20 #define ACPI_INVALID_RESOURCE 0 @@ -77,69 +51,10 @@ extern const char *acpi_gbl_typ_decode[] #define ACPI_VARIABLE_LENGTH 2 #define ACPI_SMALL_VARIABLE_LENGTH 3 =20 -typedef -acpi_status(*acpi_walk_aml_callback) (u8 * aml, - u32 length, - u32 offset, - u8 resource_index, void **context); - -typedef -acpi_status(*acpi_pkg_callback) (u8 object_type, - union acpi_operand_object * source_object,= - union acpi_generic_state * state, - void *context); - -struct acpi_pkg_info { - u8 *free_space; - acpi_size length; - u32 object_space; - u32 num_packages; -}; - -#define REF_INCREMENT (u16) 0 -#define REF_DECREMENT (u16) 1 -#define REF_FORCE_DELETE (u16) 2 - -/* acpi_ut_dump_buffer */ - -#define DB_BYTE_DISPLAY 1 -#define DB_WORD_DISPLAY 2 -#define DB_DWORD_DISPLAY 4 -#define DB_QWORD_DISPLAY 8 - /* * utglobal - Global data structures and procedures */ -void acpi_ut_init_globals(void); - -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) - -char *acpi_ut_get_mutex_name(u32 mutex_id); - -#endif - -char *acpi_ut_get_type_name(acpi_object_type type); - -char *acpi_ut_get_node_name(void *object); - -char *acpi_ut_get_descriptor_name(void *object); - -char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc); - -char *acpi_ut_get_region_name(u8 space_id); - -char *acpi_ut_get_event_name(u32 event_id); - -char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position); - -u8 acpi_ut_valid_object_type(acpi_object_type type); - -/* - * utinit - miscellaneous initialization and shutdown - */ -acpi_status acpi_ut_hardware_initialize(void); - -void acpi_ut_subsystem_shutdown(void); +const char *acpi_ut_get_region_name(u8 space_id); =20 /* * utclib - Local implementations of C library functions @@ -200,45 +115,8 @@ extern const u8 _acpi_ctype[]; #endif /* ACPI_USE_SYSTEM_CLIBRARY */ =20 /* - * utcopy - Object construction and conversion interfaces - */ -acpi_status -acpi_ut_build_simple_object(union acpi_operand_object *obj, - union acpi_object *user_obj, - u8 * data_space, u32 * buffer_space_used); - -acpi_status -acpi_ut_build_package_object(union acpi_operand_object *obj, - u8 * buffer, u32 * space_used); - -acpi_status -acpi_ut_copy_iobject_to_eobject(union acpi_operand_object *obj, - struct acpi_buffer *ret_buffer); - -acpi_status -acpi_ut_copy_eobject_to_iobject(union acpi_object *obj, - union acpi_operand_object **internal_obj); - -acpi_status -acpi_ut_copy_isimple_to_isimple(union acpi_operand_object *source_obj, - union acpi_operand_object *dest_obj); - -acpi_status -acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc, - union acpi_operand_object **dest_desc, - struct acpi_walk_state *walk_state); - -/* - * utcreate - Object creation - */ -acpi_status -acpi_ut_update_object_reference(union acpi_operand_object *object, u16 = action); - -/* * utdebug - Debug interfaces */ -void acpi_ut_init_stack_ptr_trace(void); - void acpi_ut_track_stack_ptr(void); =20 void @@ -279,16 +157,6 @@ acpi_ut_ptr_exit(u32 line_number, const char *function_name, char *module_name, u32 component_id, u8 * ptr); =20 -void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 = component_id); - -void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display); - -void acpi_ut_report_error(char *module_name, u32 line_number); - -void acpi_ut_report_info(char *module_name, u32 line_number); - -void acpi_ut_report_warning(char *module_name, u32 line_number); - /* Error and message reporting interfaces */ =20 void ACPI_INTERNAL_VAR_XFACE @@ -324,248 +192,8 @@ acpi_ut_info(char *module_name, u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); =20 /* - * utdelete - Object deletion and reference counts - */ -void acpi_ut_add_reference(union acpi_operand_object *object); - -void acpi_ut_remove_reference(union acpi_operand_object *object); - -void acpi_ut_delete_internal_package_object(union acpi_operand_object = *object); - -void acpi_ut_delete_internal_simple_object(union acpi_operand_object = *object); - -void acpi_ut_delete_internal_object_list(union acpi_operand_object = **obj_list); - -/* - * uteval - object evaluation - */ -acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)= ; - -acpi_status -acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, - char *path, - u32 expected_return_btypes, - union acpi_operand_object **return_desc); - -acpi_status -acpi_ut_evaluate_numeric_object(char *object_name, - struct acpi_namespace_node *device_node, - acpi_integer * address); - -acpi_status -acpi_ut_execute_HID(struct acpi_namespace_node *device_node, - struct acpica_device_id *hid); - -acpi_status -acpi_ut_execute_CID(struct acpi_namespace_node *device_node, - struct acpi_compatible_id_list **return_cid_list); - -acpi_status -acpi_ut_execute_STA(struct acpi_namespace_node *device_node, - u32 * status_flags); - -acpi_status -acpi_ut_execute_UID(struct acpi_namespace_node *device_node, - struct acpica_device_id *uid); - -acpi_status -acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * = highest); - -/* - * utobject - internal object create/delete/cache routines - */ -union acpi_operand_object *acpi_ut_create_internal_object_dbg(char = *module_name, - u32 = line_number, - u32 = component_id, - acpi_object_t= ype - type); - -void *acpi_ut_allocate_object_desc_dbg(char *module_name, - u32 line_number, u32 component_id); - -#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_d= bg (_acpi_module_name,__LINE__,_COMPONENT,t) -#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg = (_acpi_module_name,__LINE__,_COMPONENT) - -void acpi_ut_delete_object_desc(union acpi_operand_object *object); - -u8 acpi_ut_valid_internal_object(void *object); - -union acpi_operand_object *acpi_ut_create_package_object(u32 count); - -union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size = buffer_size); - -union acpi_operand_object *acpi_ut_create_string_object(acpi_size = string_size); - -acpi_status -acpi_ut_get_object_size(union acpi_operand_object *obj, acpi_size * = obj_length); - -/* - * utstate - Generic state creation/cache routines - */ -void -acpi_ut_push_generic_state(union acpi_generic_state **list_head, - union acpi_generic_state *state); - -union acpi_generic_state *acpi_ut_pop_generic_state(union acpi_generic_sta= te - **list_head); - -union acpi_generic_state *acpi_ut_create_generic_state(void); - -struct acpi_thread_state *acpi_ut_create_thread_state(void); - -union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_o= bject - *object, u16 = action); - -union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object, - void *external_object, - u16 index); - -acpi_status -acpi_ut_create_update_state_and_push(union acpi_operand_object *object, - u16 action, - union acpi_generic_state **state_list)= ; - -#ifdef ACPI_FUTURE_USAGE -acpi_status -acpi_ut_create_pkg_state_and_push(void *internal_object, - void *external_object, - u16 index, - union acpi_generic_state **state_list); -#endif /* ACPI_FUTURE_USAGE */ - -union acpi_generic_state *acpi_ut_create_control_state(void); - -void acpi_ut_delete_generic_state(union acpi_generic_state *state); - -/* - * utmath - */ -acpi_status -acpi_ut_divide(acpi_integer in_dividend, - acpi_integer in_divisor, - acpi_integer * out_quotient, acpi_integer * out_remainder); - -acpi_status -acpi_ut_short_divide(acpi_integer in_dividend, - u32 divisor, - acpi_integer * out_quotient, u32 * out_remainder); - -/* * utmisc */ const char *acpi_ut_validate_exception(acpi_status status); =20 -u8 acpi_ut_is_aml_table(struct acpi_table_header *table); - -acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); - -void acpi_ut_release_owner_id(acpi_owner_id * owner_id); - -acpi_status -acpi_ut_walk_package_tree(union acpi_operand_object *source_object, - void *target_object, - acpi_pkg_callback walk_callback, void *context); - -void acpi_ut_strupr(char *src_string); - -void acpi_ut_print_string(char *string, u8 max_length); - -u8 acpi_ut_valid_acpi_name(u32 name); - -acpi_name acpi_ut_repair_name(char *name); - -u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position); - -acpi_status -acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); - -/* Values for Base above (16=3DHex, 10=3DDecimal) */ - -#define ACPI_ANY_BASE 0 - -u32 acpi_ut_dword_byte_swap(u32 value); - -void acpi_ut_set_integer_width(u8 revision); - -#ifdef ACPI_DEBUG_OUTPUT -void -acpi_ut_display_init_pathname(u8 type, - struct acpi_namespace_node *obj_handle, - char *path); -#endif - -/* - * utresrc - */ -acpi_status -acpi_ut_walk_aml_resources(u8 * aml, - acpi_size aml_length, - acpi_walk_aml_callback user_function, - void **context); - -acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); - -u32 acpi_ut_get_descriptor_length(void *aml); - -u16 acpi_ut_get_resource_length(void *aml); - -u8 acpi_ut_get_resource_header_length(void *aml); - -u8 acpi_ut_get_resource_type(void *aml); - -acpi_status -acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, - u8 ** end_tag); - -/* - * utmutex - mutex support - */ -acpi_status acpi_ut_mutex_initialize(void); - -void acpi_ut_mutex_terminate(void); - -acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id); - -acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id); - -/* - * utalloc - memory allocation and object caching - */ -acpi_status acpi_ut_create_caches(void); - -acpi_status acpi_ut_delete_caches(void); - -acpi_status acpi_ut_validate_buffer(struct acpi_buffer *buffer); - -acpi_status -acpi_ut_initialize_buffer(struct acpi_buffer *buffer, - acpi_size required_length); - -void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 = line); - -void *acpi_ut_allocate_zeroed(acpi_size size, - u32 component, char *module, u32 line); - -#ifdef ACPI_DBG_TRACK_ALLOCATIONS -void *acpi_ut_allocate_and_track(acpi_size size, - u32 component, char *module, u32 line); - -void *acpi_ut_allocate_zeroed_and_track(acpi_size size, - u32 component, char *module, u32 = line); - -void -acpi_ut_free_and_track(void *address, u32 component, char *module, u32 = line); - -#ifdef ACPI_FUTURE_USAGE -void acpi_ut_dump_allocation_info(void); -#endif /* ACPI_FUTURE_USAGE */ - -void acpi_ut_dump_allocations(u32 component, char *module); - -acpi_status -acpi_ut_create_list(char *list_name, - u16 object_size, struct acpi_memory_list **return_cache= ); - -#endif - #endif /* _ACUTILS_H */ --- 2011-02-10.orig/xen/include/asm-x86/acpi.h +++ 2011-02-10/xen/include/asm-x86/acpi.h @@ -84,8 +84,6 @@ extern bool_t acpi_disabled, acpi_pci_di extern bool_t acpi_skip_timer_override; extern u32 acpi_smi_cmd; extern u8 acpi_enable_value, acpi_disable_value; -extern u8 acpi_sci_flags; -extern int acpi_sci_override_gsi; void acpi_pic_sci_set_trigger(unsigned int, u16); =20 static inline void disable_acpi(void) --- 2011-02-10.orig/xen/include/asm-x86/system.h +++ 2011-02-10/xen/include/asm-x86/system.h @@ -132,8 +132,6 @@ static always_inline unsigned long __cmp return old; } =20 -#define __HAVE_ARCH_CMPXCHG - #define cmpxchgptr(ptr,o,n) ({ \ const __typeof__(**(ptr)) *__o =3D (o); = \ __typeof__(**(ptr)) *__n =3D (n); = \ --- 2011-02-10.orig/xen/include/xen/acpi.h +++ 2011-02-10/xen/include/xen/acpi.h @@ -32,21 +32,10 @@ #include =20 #include -#include -#include #include =20 #ifdef CONFIG_ACPI_BOOT =20 -enum acpi_irq_model_id { - ACPI_IRQ_MODEL_PIC =3D 0, - ACPI_IRQ_MODEL_IOAPIC, - ACPI_IRQ_MODEL_IOSAPIC, - ACPI_IRQ_MODEL_COUNT -}; - -extern enum acpi_irq_model_id acpi_irq_model; - enum acpi_madt_entry_id { ACPI_MADT_LAPIC =3D 0, ACPI_MADT_IOAPIC, @@ -316,8 +305,6 @@ extern int acpi_mp_config; =20 extern u32 pci_mmcfg_base_addr; =20 -extern int sbf_port ; - #else /*!CONFIG_ACPI_BOOT*/ =20 #define acpi_mp_config 0 @@ -346,67 +333,6 @@ int acpi_gsi_to_irq (u32 gsi, unsigned i void acpi_unregister_gsi (u32 gsi); #endif =20 -#ifdef CONFIG_ACPI_PCI - -struct acpi_prt_entry { - struct list_head node; - struct acpi_pci_id id; - u8 pin; - struct { - acpi_handle handle; - u32 index; - } link; - u32 irq; -}; - -struct acpi_prt_list { - int count; - struct list_head entries; -}; - -extern struct acpi_prt_list acpi_prt; - -struct pci_dev; - -int acpi_pci_irq_enable (struct pci_dev *dev); -void acpi_penalize_isa_irq(int irq); - -#ifdef CONFIG_ACPI_DEALLOCATE_IRQ -void acpi_pci_irq_disable (struct pci_dev *dev); -#endif - -struct acpi_pci_driver { - struct acpi_pci_driver *next; - int (*add)(acpi_handle handle); - void (*remove)(acpi_handle handle); -}; - -int acpi_pci_register_driver(struct acpi_pci_driver *driver); -void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); - -#endif /*CONFIG_ACPI_PCI*/ - -#ifdef CONFIG_ACPI_EC - -extern int ec_read(u8 addr, u8 *val); -extern int ec_write(u8 addr, u8 val); - -#endif /*CONFIG_ACPI_EC*/ - -#ifdef CONFIG_ACPI_INTERPRETER - -extern int acpi_blacklisted(void); -extern void acpi_bios_year(char *s); - -#else /*!CONFIG_ACPI_INTERPRETER*/ - -static inline int acpi_blacklisted(void) -{ - return 0; -} - -#endif /*!CONFIG_ACPI_INTERPRETER*/ - #ifdef CONFIG_ACPI_CSTATE /* * Set highest legal C-state --=__Part2D011A0D.0__= Content-Type: text/plain; name="acpi-cleanup.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="acpi-cleanup.patch" In some cases, entire files turned out unnecessary. Of what remains,=0Amove= whatever possible into .init.*, and some data items into=0A.data.read_most= ly.=0A=0ASigned-off-by: Jan Beulich =0A=0A--- = 2011-02-10.orig/xen/arch/ia64/linux-xen/acpi.c=0A+++ 2011-02-10/xen/arch/ia= 64/linux-xen/acpi.c=0A@@ -165,8 +165,6 @@ int platform_intr_list[ACPI_MAX_P= LATFORM=0A [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] =3D -1=0A };=0A = =0A-enum acpi_irq_model_id acpi_irq_model =3D ACPI_IRQ_MODEL_IOSAPIC;=0A-= =0A /*=0A * Interrupt routing API for device drivers. Provides interrupt = vector for=0A * a generic platform event. Currently only CPEI is = implemented.=0A--- 2011-02-10.orig/xen/arch/ia64/linux-xen/acpi_numa.c=0A++= + 2011-02-10/xen/arch/ia64/linux-xen/acpi_numa.c=0A@@ -28,7 +28,6 @@=0A = #include =0A #include =0A #include =0A-#include =0A #include =0A =0A = #ifndef XEN=0A--- 2011-02-10.orig/xen/arch/x86/acpi/boot.c=0A+++ 2011-02-10= /xen/arch/x86/acpi/boot.c=0A@@ -43,7 +43,6 @@=0A #include =0A = #include =0A =0A-int sbf_port;=0A #define CONFIG_ACPI_PCI= =0A =0A #define BAD_MADT_ENTRY(entry, end) ( = \=0A@@ -64,36 +63,24 @@ bool_t __initdata acpi_ht =3D 1; /* = enable=0A bool_t __initdata acpi_lapic;=0A bool_t __initdata acpi_ioapic;= =0A =0A-u8 acpi_sci_flags __initdata;=0A-int acpi_sci_override_gsi = __initdata;=0A bool_t acpi_skip_timer_override __initdata;=0A =0A #ifdef = CONFIG_X86_LOCAL_APIC=0A static u64 acpi_lapic_addr __initdata =3D = APIC_DEFAULT_PHYS_BASE;=0A #endif=0A =0A-u32 acpi_smi_cmd;=0A-u8 acpi_enabl= e_value, acpi_disable_value;=0A+u32 __read_mostly acpi_smi_cmd;=0A+u8 = __read_mostly acpi_enable_value;=0A+u8 __read_mostly acpi_disable_value;=0A= =0A-#ifndef __HAVE_ARCH_CMPXCHG=0A-#warning ACPI uses CMPXCHG, i486 and = later hardware=0A-#endif=0A-=0A-u32 x86_acpiid_to_apicid[MAX_MADT_ENTRIES] = =3D=0A+u32 __read_mostly x86_acpiid_to_apicid[MAX_MADT_ENTRIES] =3D=0A = {[0 ... MAX_MADT_ENTRIES - 1] =3D BAD_APICID };=0A-EXPORT_SYMBOL(x86_acpiid= _to_apicid);=0A =0A /* ----------------------------------------------------= ----------------------=0A Boot-time = Configuration=0A -------------------------------------------------------= ------------------- */=0A =0A /*=0A- * The default interrupt routing model = is PIC (8259). This gets=0A- * overriden if IOAPICs are enumerated = (below).=0A- */=0A-enum acpi_irq_model_id acpi_irq_model =3D = ACPI_IRQ_MODEL_PIC;=0A-=0A-/*=0A * Temporarily use the virtual area = starting from FIX_IO_APIC_BASE_END,=0A * to map the target physical = address. The problem is that set_fixmap()=0A * provides a single page, = and it is possible that the page is not=0A@@ -333,21 +320,6 @@ acpi_parse_n= mi_src(struct acpi_subtable_=0A =0A #endif /* CONFIG_X86_IO_APIC */=0A = =0A-static int __init acpi_parse_sbf(struct acpi_table_header *table)=0A-{= =0A- struct acpi_table_boot *sb;=0A-=0A- sb =3D (struct acpi_table_b= oot *)table;=0A- if (!sb) {=0A- printk(KERN_WARNING PREFIX = "Unable to map SBF\n");=0A- return -ENODEV;=0A- }=0A-=0A- = sbf_port =3D sb->cmos_index; /* Save CMOS port */=0A-=0A- return = 0;=0A-}=0A-=0A #ifdef CONFIG_HPET_TIMER=0A =0A static int __init acpi_parse= _hpet(struct acpi_table_header *table)=0A@@ -360,18 +332,9 @@ static int = __init acpi_parse_hpet(struct=0A return -1;=0A }=0A = =0A-#if 0/*def CONFIG_X86_64*/=0A- vxtime.hpet_address =3D hpet_tbl->a= ddress.address;=0A-=0A+ hpet_address =3D hpet_tbl->address.address;=0A = printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n",=0A- = hpet_tbl->id, vxtime.hpet_address);=0A-#else /* X86 */=0A- {=0A- = hpet_address =3D hpet_tbl->address.address;=0A- printk(KERN_INFO = PREFIX "HPET id: %#x base: %#lx\n",=0A- hpet_tbl->id, = hpet_address);=0A- }=0A-#endif /* X86 */=0A+ hpet_tbl->id= , hpet_address);=0A =0A return 0;=0A }=0A@@ -563,7 +526,7 @@ = static int __init acpi_parse_madt_lapic_=0A }=0A #endif /* CONFIG_X86_LOCAL= _APIC */=0A =0A-#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_IN= TERPRETER)*/=0A+#ifdef CONFIG_X86_IO_APIC=0A /*=0A * Parse IOAPIC related = entries in MADT=0A * returns 0 on success, < 0 on error=0A@@ -615,15 = +578,6 @@ static int __init acpi_parse_madt_ioapic=0A return = count;=0A }=0A =0A-#ifdef CONFIG_ACPI_INTERPRETER=0A- /*=0A- * = If BIOS did not supply an INT_SRC_OVR for the SCI=0A- * pretend we got = one so we can set the SCI flags.=0A- */=0A- if (!acpi_sci_override_gsi)= =0A- acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);=0A-#endif= =0A-=0A /* Fill in identity legacy mapings where no override */=0A = mp_config_acpi_legacy_irqs();=0A =0A@@ -643,7 +597,7 @@ static = inline int acpi_parse_madt_ioapic=0A {=0A return -1;=0A }=0A-#endif = /* !(CONFIG_X86_IO_APIC && CONFIG_ACPI_INTERPRETER) */=0A+#endif /* = !CONFIG_X86_IO_APIC */=0A =0A =0A static void __init acpi_process_madt(void= )=0A@@ -666,7 +620,6 @@ static void __init acpi_process_madt(voi=0A = */=0A error =3D acpi_parse_madt_ioapic_entries();= =0A if (!error) {=0A- = acpi_irq_model =3D ACPI_IRQ_MODEL_IOAPIC;=0A = acpi_irq_balance_set(NULL);=0A acpi_ioapic =3D = 1;=0A =0A@@ -911,8 +864,6 @@ static struct dmi_system_id __initdata a=0A = * acpi_lapic =3D 1 if LAPIC found=0A * acpi_ioapic =3D 1 if = IOAPIC found=0A * if (acpi_lapic && acpi_ioapic) smp_found_config = =3D 1;=0A- * if acpi_blacklisted() acpi_disabled =3D 1;=0A- * = acpi_irq_model=3D...=0A * ...=0A *=0A * return value: (currently = ignored)=0A@@ -944,22 +895,6 @@ int __init acpi_boot_table_init(void)=0A = return error;=0A }=0A =0A- acpi_table_parse(ACPI_SIG_B= OOT, acpi_parse_sbf);=0A-=0A- /*=0A- * blacklist may disable ACPI = entirely=0A- */=0A- error =3D acpi_blacklisted();=0A- if (error) = {=0A- if (acpi_force) {=0A- printk(KERN_WARNING= PREFIX "acpi=3Dforce override\n");=0A- } else {=0A- = printk(KERN_WARNING PREFIX "Disabling ACPI support\n");=0A- = disable_acpi();=0A- return error;=0A- = }=0A- }=0A-=0A return 0;=0A }=0A =0A@@ -972,8 +907,6 @@ int = __init acpi_boot_init(void)=0A if (acpi_disabled && !acpi_ht)=0A = return 1;=0A =0A- acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf);=0A= -=0A /*=0A * set sci_int and PM timer address=0A */=0A--- = 2011-02-10.orig/xen/drivers/acpi/hwregs.c=0A+++ 2011-02-10/xen/drivers/acpi= /hwregs.c=0A@@ -64,7 +64,8 @@ ACPI_MODULE_NAME("hwregs")=0A * DESCRIPTION:= Map register_id into a register bitmask.=0A *=0A ***********************= *******************************************************/=0A-struct = acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)=0A+s= tatic struct acpi_bit_register_info *=0A+acpi_hw_get_bit_register_info(u32 = register_id)=0A {=0A ACPI_FUNCTION_ENTRY();=0A =0A@@ -91,7 +92,7 @@ = struct acpi_bit_register_info *acpi_hw_g=0A *=0A ************************= ******************************************************/=0A =0A-acpi_status = acpi_get_register_unlocked(u32 register_id, u32 * return_value)=0A+acpi_sta= tus acpi_get_register(u32 register_id, u32 * return_value)=0A {=0A = u32 register_value =3D 0;=0A struct acpi_bit_register_info *bit_reg_info= ;=0A@@ -129,16 +130,6 @@ acpi_status acpi_get_register_unlocked(u=0A = return_ACPI_STATUS(status);=0A }=0A =0A-acpi_status acpi_get_register(u32 = register_id, u32 * return_value)=0A-{=0A- acpi_status status;=0A- = //acpi_cpu_flags flags;=0A- //flags =3D acpi_os_acquire_lock(acpi_gbl_h= ardware_lock);=0A- status =3D acpi_get_register_unlocked(register_id, = return_value);=0A- //acpi_os_release_lock(acpi_gbl_hardware_lock, = flags);=0A- return status;=0A-}=0A-=0A /*******************************= ************************************************=0A *=0A * FUNCTION: = acpi_set_register=0A@@ -157,7 +148,6 @@ acpi_status acpi_set_register(u32 = regist=0A u32 register_value =3D 0;=0A struct acpi_bit_register_in= fo *bit_reg_info;=0A acpi_status status;=0A- //acpi_cpu_flags lock_flags= ;=0A =0A ACPI_FUNCTION_TRACE_U32(acpi_set_register, register_id);=0A= =0A@@ -170,8 +160,6 @@ acpi_status acpi_set_register(u32 regist=0A = return_ACPI_STATUS(AE_BAD_PARAMETER);=0A }=0A =0A- //lock_flag= s =3D acpi_os_acquire_lock(acpi_gbl_hardware_lock);=0A-=0A /* Always = do a register read first so we can insert the new bits */=0A =0A = status =3D acpi_hw_register_read(bit_reg_info->parent_register,=0A@@ = -276,8 +264,6 @@ acpi_status acpi_set_register(u32 regist=0A =0A = unlock_and_exit:=0A =0A- //acpi_os_release_lock(acpi_gbl_hardware_lo= ck, lock_flags);=0A-=0A /* Normalize the value that was read */=0A = =0A ACPI_DEBUG_EXEC(register_value =3D=0A--- 2011-02-10.orig/xen/driver= s/acpi/numa.c=0A+++ 2011-02-10/xen/drivers/acpi/numa.c=0A@@ -28,7 +28,6 = @@=0A #include =0A #include =0A #include = =0A-#include =0A #include =0A= =0A #define ACPI_NUMA 0x80000000=0A--- 2011-02-10.orig/xen/drivers/acpi/o= sl.c=0A+++ 2011-02-10/xen/drivers/acpi/osl.c=0A@@ -31,7 +31,6 @@=0A = #include =0A #include =0A #include =0A= -#include =0A #include =0A #include = =0A #include =0A@@ -43,27 +42,12 = @@=0A =0A #define _COMPONENT ACPI_OS_SERVICES=0A ACPI_MODULE_NAM= E("osl")=0A-#define PREFIX "ACPI: "=0A-struct acpi_os_dpc = {=0A- acpi_osd_exec_callback function;=0A- void *context;=0A-};=0A = =0A #ifdef CONFIG_ACPI_CUSTOM_DSDT=0A #include CONFIG_ACPI_CUSTOM_DSDT_FILE= =0A #endif=0A =0A-#ifdef ENABLE_DEBUGGER=0A-#include =0A-=0A-/= * stuff for debugger support */=0A-int acpi_in_debugger;=0A-EXPORT_SYMBOL(a= cpi_in_debugger);=0A-=0A-extern char line_buf[80];=0A-#endif = /*ENABLE_DEBUGGER */=0A-=0A-void acpi_os_printf(const char *fmt, = ...)=0A+void __init acpi_os_printf(const char *fmt, ...)=0A {=0A = va_list args;=0A va_start(args, fmt);=0A@@ -71,7 +55,7 @@ void = acpi_os_printf(const char *fmt, ...=0A va_end(args);=0A }=0A =0A-void = acpi_os_vprintf(const char *fmt, va_list args)=0A+void __init acpi_os_vprin= tf(const char *fmt, va_list args)=0A {=0A static char buffer[512];=0A= =0A@@ -103,17 +87,15 @@ acpi_physical_address __init acpi_os_get=0A = }=0A }=0A =0A-void __iomem *=0A+void __iomem *__init=0A acpi_os_map_memory(= acpi_physical_address phys, acpi_size size)=0A {=0A return __acpi_map_t= able((unsigned long)phys, size);=0A }=0A-EXPORT_SYMBOL_GPL(acpi_os_map_memo= ry);=0A =0A-void acpi_os_unmap_memory(void __iomem * virt, acpi_size = size)=0A+void __init acpi_os_unmap_memory(void __iomem * virt, acpi_size = size)=0A {=0A }=0A-EXPORT_SYMBOL_GPL(acpi_os_unmap_memory);=0A =0A = acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 = width)=0A {=0A@@ -136,8 +118,6 @@ acpi_status acpi_os_read_port(acpi_io_ad= =0A return AE_OK;=0A }=0A =0A-EXPORT_SYMBOL(acpi_os_read_port);=0A-=0A = acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 = width)=0A {=0A if (width <=3D 8) {=0A@@ -153,8 +133,6 @@ acpi_status = acpi_os_write_port(acpi_io_a=0A return AE_OK;=0A }=0A =0A-EXPORT_SY= MBOL(acpi_os_write_port);=0A-=0A acpi_status=0A acpi_os_read_memory(acpi_ph= ysical_address phys_addr, u32 * value, u32 width)=0A {=0A@@ -209,26 +187,3 = @@ acpi_os_write_memory(acpi_physical_addre=0A =0A return AE_OK;=0A = }=0A-=0A-/*=0A- * Acquire a spinlock.=0A- *=0A- * handle is a pointer to = the spinlock_t.=0A- */=0A-=0A-acpi_cpu_flags acpi_os_acquire_lock(acpi_spin= lock lockp)=0A-{=0A- acpi_cpu_flags flags;=0A- spin_lock_irqsave(l= ockp, flags);=0A- return flags;=0A-}=0A-=0A-/*=0A- * Release a = spinlock. See above.=0A- */=0A-=0A-void acpi_os_release_lock(acpi_spinlock = lockp, acpi_cpu_flags flags)=0A-{=0A- spin_unlock_irqrestore(lockp, = flags);=0A-}=0A-=0A--- 2011-02-10.orig/xen/drivers/acpi/tables.c=0A+++ = 2011-02-10/xen/drivers/acpi/tables.c=0A@@ -269,7 +269,7 @@ acpi_table_parse= _madt(enum acpi_madt_typ=0A * Scan the ACPI System Descriptor Table (STD) = for a table matching @id,=0A * run @handler on it. Return 0 if table = found, return on if not.=0A */=0A-int acpi_table_parse(char *id, = acpi_table_handler handler)=0A+int __init acpi_table_parse(char *id, = acpi_table_handler handler)=0A {=0A struct acpi_table_header *table = =3D NULL;=0A =0A@@ -324,7 +324,6 @@ static void __init check_multiple_madt(= v=0A =0A int __init acpi_table_init(void)=0A {=0A- acpi_ut_init_global= s();=0A acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, = 0);=0A check_multiple_madt();=0A return 0;=0A--- 2011-02-10.orig/xen= /drivers/acpi/tables/tbinstal.c=0A+++ 2011-02-10/xen/drivers/acpi/tables/tb= instal.c=0A@@ -43,7 +43,6 @@=0A =0A #include =0A #include = =0A-#include =0A #include = =0A =0A #define _COMPONENT ACPI_TABLES=0A@@ -60,7 +59,7 @@ = ACPI_MODULE_NAME("tbinstal")=0A * DESCRIPTION: this function is called to = verify and map table=0A *=0A ********************************************= *********************************/=0A-acpi_status acpi_tb_verify_table(stru= ct acpi_table_desc *table_desc)=0A+acpi_status __init acpi_tb_verify_table(= struct acpi_table_desc *table_desc)=0A {=0A acpi_status status =3D = AE_OK;=0A =0A--- 2011-02-10.orig/xen/drivers/acpi/tables/tbutils.c=0A+++ = 2011-02-10/xen/drivers/acpi/tables/tbutils.c=0A@@ -49,10 +49,6 @@=0A = #define _COMPONENT ACPI_TABLES=0A ACPI_MODULE_NAME("tbutils")=0A = =0A-/* Local prototypes */=0A-static acpi_physical_address=0A-acpi_tb_get_r= oot_table_entry(u8 * table_entry,=0A- acpi_native_ui= nt table_entry_size);=0A /*************************************************= ******************************=0A *=0A * FUNCTION: acpi_tb_check_xsdt= =0A@@ -68,7 +64,7 @@ acpi_tb_get_root_table_entry(u8 * table_=0A * = DESCRIPTION: validate XSDT=0A *********************************************= *********************************/=0A =0A-static acpi_status=0A+static = acpi_status __init=0A acpi_tb_check_xsdt(acpi_physical_address address)=0A = {=0A struct acpi_table_header *table;=0A@@ -115,29 +111,6 @@ acpi_tb_che= ck_xsdt(acpi_physical_address=0A =0A /*************************************= ******************************************=0A *=0A- * FUNCTION: = acpi_tb_tables_loaded=0A- *=0A- * PARAMETERS: None=0A- *=0A- * RETURN: = TRUE if required ACPI tables are loaded=0A- *=0A- * DESCRIPTION: = Determine if the minimum required ACPI tables are present=0A- * = (FADT, FACS, DSDT)=0A- *=0A- ********************************************= **********************************/=0A-=0A-u8 acpi_tb_tables_loaded(void)= =0A-{=0A-=0A- if (acpi_gbl_root_table_list.count >=3D 3) {=0A- = return (TRUE);=0A- }=0A-=0A- return (FALSE);=0A-}=0A-=0A-/******= *************************************************************************= =0A- *=0A * FUNCTION: acpi_tb_print_table_header=0A *=0A * PARAMETERS= : Address - Table physical address=0A@@ -202,7 +175,8 @@ = acpi_tb_print_table_header(acpi_physical=0A *=0A ************************= ******************************************************/=0A =0A-acpi_status = acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)=0A+acp= i_status __init=0A+acpi_tb_verify_checksum(struct acpi_table_header = *table, u32 length)=0A {=0A u8 checksum;=0A =0A@@ -309,13 +283,6 @@ = acpi_tb_install_table(acpi_physical_addr=0A =0A acpi_tb_print_table= _header(address, table);=0A =0A- if (table_index =3D=3D ACPI_TABLE_I= NDEX_DSDT) {=0A-=0A- /* Global integer width is based upon = revision of the DSDT */=0A-=0A- acpi_ut_set_integer_width(table->re= vision);=0A- }=0A-=0A unmap_and_exit:=0A acpi_os_unmap_memor= y(table, sizeof(struct acpi_table_header));=0A }=0A@@ -337,7 +304,7 @@ = acpi_tb_install_table(acpi_physical_addr=0A *=0A ************************= ******************************************************/=0A =0A-static = acpi_physical_address=0A+static acpi_physical_address __init=0A acpi_tb_get= _root_table_entry(u8 * table_entry,=0A acpi_native_ui= nt table_entry_size)=0A {=0A--- 2011-02-10.orig/xen/drivers/acpi/tables/tbx= face.c=0A+++ 2011-02-10/xen/drivers/acpi/tables/tbxface.c=0A@@ -45,7 +45,6 = @@=0A #include =0A #include =0A #include = =0A-#include =0A #include = =0A =0A #define _COMPONENT ACPI_TABLES=0A@@ -164,7 +163,7 @@ = acpi_initialize_tables(struct acpi_table=0A * DESCRIPTION: Finds and = verifies an ACPI table.=0A *=0A *****************************************= ************************************/=0A-acpi_status=0A+acpi_status = __init=0A acpi_get_table(char *signature,=0A acpi_native_uint = instance, struct acpi_table_header **out_table)=0A {=0A@@ -198,14 +197,10 = @@ acpi_get_table(char *signature,=0A *out_table =3D = acpi_gbl_root_table_list.tables[i].pointer;=0A }=0A =0A- = /*if (!acpi_gbl_permanent_mmap)*/ {=0A- acpi_gbl_root_table= _list.tables[i].pointer =3D NULL;=0A- }=0A+ acpi_gbl_ro= ot_table_list.tables[i].pointer =3D NULL;=0A =0A return = (status);=0A }=0A =0A return (AE_NOT_FOUND);=0A }=0A-=0A-ACPI_EXP= ORT_SYMBOL(acpi_get_table)=0A--- 2011-02-10.orig/xen/drivers/acpi/tables/tb= xfroot.c=0A+++ 2011-02-10/xen/drivers/acpi/tables/tbxfroot.c=0A@@ -52,8 = +52,6 @@ ACPI_MODULE_NAME("tbxfroot")=0A /* Local prototypes */=0A static = u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length);=0A = =0A-static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp = *rsdp);=0A-=0A /***********************************************************= ********************=0A *=0A * FUNCTION: acpi_tb_validate_rsdp=0A@@ = -66,7 +64,7 @@ static acpi_status acpi_tb_validate_rsdp=0A *=0A = ***************************************************************************= ***/=0A =0A-static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp= *rsdp)=0A+static acpi_status __init acpi_tb_validate_rsdp(struct = acpi_table_rsdp *rsdp)=0A {=0A ACPI_FUNCTION_ENTRY();=0A =0A--- 2011-02-10= .orig/xen/drivers/acpi/utilities/utglobal.c=0A+++ 2011-02-10/xen/drivers/ac= pi/utilities/utglobal.c=0A@@ -44,10 +44,10 @@=0A #define DEFINE_ACPI_GLOBAL= S=0A =0A #include =0A+#include =0A #include = =0A #include =0A #include =0A-#inc= lude =0A =0A ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)=0A #define = _COMPONENT ACPI_UTILITIES=0A@@ -55,53 +55,6 @@ ACPI_EXPORT_SYMBOL(= acpi_gbl_FADT)=0A =0A /****************************************************= ***************************=0A *=0A- * Static global variable initializati= on.=0A- *=0A- *************************************************************= *****************/=0A-/*=0A- * We want the debug switches statically = initialized so they=0A- * are already set when the debugger is entered.=0A-= */=0A-/* Debug switch - level and trace mask */=0A-u32 acpi_dbg_level =3D = ACPI_DEBUG_DEFAULT;=0A-=0A-/* Debug switch - layer (component) mask = */=0A-=0A-u32 acpi_dbg_layer =3D ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;= =0A-u32 acpi_gbl_nesting_level =3D 0;=0A-=0A-/* Debugger globals */=0A-=0A-= u8 acpi_gbl_db_terminate_threads =3D FALSE;=0A-u8 acpi_gbl_abort_method = =3D FALSE;=0A-u8 acpi_gbl_method_executing =3D FALSE;=0A-=0A-/* System = flags */=0A-=0A-u32 acpi_gbl_startup_flags =3D 0;=0A-=0A-/* System starts = uninitialized */=0A-=0A-u8 acpi_gbl_shutdown =3D TRUE;=0A-=0A-const char = *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] =3D {=0A- = "\\_S0_",=0A- "\\_S1_",=0A- "\\_S2_",=0A- "\\_S3_",=0A- = "\\_S4_",=0A- "\\_S5_"=0A-};=0A-=0A-const char *acpi_gbl_highest_dstate_n= ames[4] =3D {=0A- "_S1D",=0A- "_S2D",=0A- "_S3D",=0A- = "_S4D"=0A-};=0A-=0A-/******************************************************= *************************=0A- *=0A * FUNCTION: acpi_format_exception=0A= *=0A * PARAMETERS: Status - The acpi_status code to be = formatted=0A@@ -114,7 +67,7 @@ const char *acpi_gbl_highest_dstate_name=0A = *=0A ********************************************************************= **********/=0A =0A-const char *acpi_format_exception(acpi_status status)=0A= +const char *__init acpi_format_exception(acpi_status status)=0A {=0A = const char *exception =3D NULL;=0A =0A@@ -135,106 +88,6 @@ const char = *acpi_format_exception(acpi_s=0A return (ACPI_CAST_PTR(const char, = exception));=0A }=0A =0A-ACPI_EXPORT_SYMBOL(acpi_format_exception)=0A-=0A-/= ***************************************************************************= ****=0A- *=0A- * Namespace globals=0A- *=0A- ******************************= ************************************************/=0A-/*=0A- * Predefined = ACPI Names (Built-in to the Interpreter)=0A- *=0A- * NOTES:=0A- * 1) _SB_ = is defined to be a device to allow \_SB_._INI to be run=0A- * during = the initialization sequence.=0A- * 2) _TZ_ is defined to be a thermal zone = in order to allow ASL code to=0A- * perform a Notify() operation on = it.=0A- */=0A-const struct acpi_predefined_names acpi_gbl_pre_defined_names= [] =3D {=0A- {"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL},=0A- {"_PR_", = ACPI_TYPE_LOCAL_SCOPE, NULL},=0A- {"_SB_", ACPI_TYPE_DEVICE, = NULL},=0A- {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},=0A- {"_TZ_", = ACPI_TYPE_THERMAL, NULL},=0A- {"_REV", ACPI_TYPE_INTEGER, (char = *)ACPI_CA_SUPPORT_LEVEL},=0A- {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},= =0A- {"_GL_", ACPI_TYPE_MUTEX, (char *)1},=0A-=0A-#if !defined = (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)=0A- = {"_OSI", ACPI_TYPE_METHOD, (char *)1},=0A-#endif=0A-=0A- /* Table = terminator */=0A-=0A- {NULL, ACPI_TYPE_ANY, NULL}=0A-};=0A-=0A-/*=0A- * = Properties of the ACPI Object Types, both internal and external.=0A- * The = table is indexed by values of acpi_object_type=0A- */=0A-const u8 = acpi_gbl_ns_properties[] =3D {=0A- ACPI_NS_NORMAL, /* 00 Any = */=0A- ACPI_NS_NORMAL, /* 01 Number = */=0A- ACPI_NS_NORMAL, /* 02 String */=0A- ACPI_NS_NOR= MAL, /* 03 Buffer */=0A- ACPI_NS_NORMAL, /* = 04 Package */=0A- ACPI_NS_NORMAL, /* 05 field_unit = */=0A- ACPI_NS_NEWSCOPE, /* 06 Device */=0A- = ACPI_NS_NORMAL, /* 07 Event */=0A- ACPI_NS_NEWSCOPE, = /* 08 Method */=0A- ACPI_NS_NORMAL, /* 09 Mutex = */=0A- ACPI_NS_NORMAL, /* 10 Region */=0A- = ACPI_NS_NEWSCOPE, /* 11 Power */=0A- ACPI_NS_NEWSCOPE, = /* 12 Processor */=0A- ACPI_NS_NEWSCOPE, /* 13 Thermal = */=0A- ACPI_NS_NORMAL, /* 14 buffer_field */=0A- = ACPI_NS_NORMAL, /* 15 ddb_handle */=0A- ACPI_NS_NORMAL, = /* 16 Debug Object */=0A- ACPI_NS_NORMAL, /* 17 def_field = */=0A- ACPI_NS_NORMAL, /* 18 bank_field */=0A- = ACPI_NS_NORMAL, /* 19 index_field */=0A- ACPI_NS_NORMAL, = /* 20 Reference */=0A- ACPI_NS_NORMAL, /* 21 Alias = */=0A- ACPI_NS_NORMAL, /* 22 method_alias */=0A- = ACPI_NS_NORMAL, /* 23 Notify */=0A- ACPI_NS_NORMAL, = /* 24 Address Handler */=0A- ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* = 25 Resource Desc */=0A- ACPI_NS_NEWSCOPE | ACPI_NS_LOCAL, /* = 26 Resource Field */=0A- ACPI_NS_NEWSCOPE, /* 27 Scope = */=0A- ACPI_NS_NORMAL, /* 28 Extra */=0A- = ACPI_NS_NORMAL, /* 29 Data */=0A- ACPI_NS_NORMAL = /* 30 Invalid */=0A-};=0A-=0A-/* Hex to ASCII conversion table = */=0A-=0A-static const char acpi_gbl_hex_to_ascii[] =3D {=0A- '0', '1', = '2', '3', '4', '5', '6', '7',=0A- '8', '9', 'A', 'B', 'C', 'D', 'E', = 'F'=0A-};=0A-=0A-/*********************************************************= **********************=0A- *=0A- * FUNCTION: acpi_ut_hex_to_ascii_char= =0A- *=0A- * PARAMETERS: Integer - Contains the hex digit=0A- = * Position - bit position of the digit within = the=0A- * integer (multiple of 4)=0A- = *=0A- * RETURN: The converted Ascii character=0A- *=0A- * DESCRIPTION:= Convert a hex digit to an Ascii character=0A- *=0A- **********************= ********************************************************/=0A-=0A-char = acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position)=0A-{=0A-=0A- = return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]);=0A-}=0A-=0A = /**************************************************************************= ****=0A *=0A * Event and Hardware globals=0A@@ -313,28 +166,7 @@ struct = acpi_bit_register_info acpi_gbl_b=0A = ACPI_BITMASK_ARB_DISABLE}=0A };=0A =0A-struct acpi_fixed_event_info = acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =3D {=0A- /* = ACPI_EVENT_PMTIMER */ {ACPI_BITREG_TIMER_STATUS,=0A- = ACPI_BITREG_TIMER_ENABLE,=0A- = ACPI_BITMASK_TIMER_STATUS,=0A- ACPI_BITMAS= K_TIMER_ENABLE},=0A- /* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_= LOCK_STATUS,=0A- ACPI_BITREG_GLOBAL_= LOCK_ENABLE,=0A- ACPI_BITMASK_GLOBAL= _LOCK_STATUS,=0A- ACPI_BITMASK_GLOBAL= _LOCK_ENABLE},=0A- /* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_B= UTTON_STATUS,=0A- ACPI_BITREG_POWER_B= UTTON_ENABLE,=0A- ACPI_BITMASK_POWER_= BUTTON_STATUS,=0A- ACPI_BITMASK_POWER_= BUTTON_ENABLE},=0A- /* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_B= UTTON_STATUS,=0A- ACPI_BITREG_SLEEP_B= UTTON_ENABLE,=0A- ACPI_BITMASK_SLEEP_= BUTTON_STATUS,=0A- ACPI_BITMASK_SLEEP_= BUTTON_ENABLE},=0A- /* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOC= K_STATUS,=0A- ACPI_BITREG_RT_CLOCK_ENABLE= ,=0A- ACPI_BITMASK_RT_CLOCK_STATUS,=0A- = ACPI_BITMASK_RT_CLOCK_ENABLE},=0A-};=0A+#if= def ACPI_DEBUG_OUTPUT=0A =0A /*********************************************= **********************************=0A *=0A@@ -350,7 +182,7 @@ struct = acpi_fixed_event_info acpi_gbl_fi=0A =0A /* Region type decoding */=0A = =0A-const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =3D = {=0A+static const char *const acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REG= IONS] =3D {=0A "SystemMemory",=0A "SystemIO",=0A "PCI_Config",=0A@@ = -361,7 +193,7 @@ const char *acpi_gbl_region_types[ACPI_N=0A "DataTable"= =0A };=0A =0A-char *acpi_ut_get_region_name(u8 space_id)=0A+const char = *acpi_ut_get_region_name(u8 space_id)=0A {=0A =0A if (space_id >=3D = ACPI_USER_REGION_BEGIN) {=0A@@ -373,369 +205,4 @@ char *acpi_ut_get_region_= name(u8 space_i=0A return (ACPI_CAST_PTR(char, acpi_gbl_region_types[s= pace_id]));=0A }=0A =0A-/**************************************************= *****************************=0A- *=0A- * FUNCTION: acpi_ut_get_event_na= me=0A- *=0A- * PARAMETERS: None.=0A- *=0A- * RETURN: Status=0A- = *=0A- * DESCRIPTION: Translate a Event ID into a name string (Debug = only)=0A- *=0A- ***********************************************************= *******************/=0A-=0A-/* Event type decoding */=0A-=0A-static const = char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =3D {=0A- "PM_Timer",= =0A- "GlobalLock",=0A- "PowerButton",=0A- "SleepButton",=0A- = "RealTimeClock",=0A-};=0A-=0A-char *acpi_ut_get_event_name(u32 event_id)=0A= -{=0A-=0A- if (event_id > ACPI_EVENT_MAX) {=0A- return = ("InvalidEventID");=0A- }=0A-=0A- return (ACPI_CAST_PTR(char, = acpi_gbl_event_types[event_id]));=0A-}=0A-=0A-/****************************= ***************************************************=0A- *=0A- * FUNCTION: = acpi_ut_get_type_name=0A- *=0A- * PARAMETERS: None.=0A- *=0A- * RETURN: = Status=0A- *=0A- * DESCRIPTION: Translate a Type ID into a name = string (Debug only)=0A- *=0A- *********************************************= *********************************/=0A-=0A-/*=0A- * Elements of acpi_gbl_ns_= type_names below must match=0A- * one-to-one with values of acpi_object_typ= e=0A- *=0A- * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" = when searching;=0A- * when stored in a table it really means that we have = thus far seen no=0A- * evidence to indicate what type is actually going to = be stored for this entry.=0A- */=0A-static const char acpi_gbl_bad_type[] = =3D "UNDEFINED";=0A-=0A-/* Printable names of the ACPI object types = */=0A-=0A-static const char *acpi_gbl_ns_type_names[] =3D {=0A- /* 00 */ = "Untyped",=0A- /* 01 */ "Integer",=0A- /* 02 */ "String",=0A- /* 03 */ = "Buffer",=0A- /* 04 */ "Package",=0A- /* 05 */ "FieldUnit",=0A- /* = 06 */ "Device",=0A- /* 07 */ "Event",=0A- /* 08 */ "Method",=0A- /* = 09 */ "Mutex",=0A- /* 10 */ "Region",=0A- /* 11 */ "Power",=0A- /* = 12 */ "Processor",=0A- /* 13 */ "Thermal",=0A- /* 14 */ "BufferField",=0A-= /* 15 */ "DdbHandle",=0A- /* 16 */ "DebugObject",=0A- /* = 17 */ "RegionField",=0A- /* 18 */ "BankField",=0A- /* 19 */ = "IndexField",=0A- /* 20 */ "Reference",=0A- /* 21 */ = "Alias",=0A- /* 22 */ "MethodAlias",=0A- /* 23 */ "Notify",=0A- /* = 24 */ "AddrHandler",=0A- /* 25 */ "ResourceDesc",=0A- /* 26 */ = "ResourceFld",=0A- /* 27 */ "Scope",=0A- /* 28 */ "Extra",=0A- /* = 29 */ "Data",=0A- /* 30 */ "Invalid"=0A-};=0A-=0A-char *acpi_ut_get_t= ype_name(acpi_object_type type)=0A-{=0A-=0A- if (type > ACPI_TYPE_INVALI= D) {=0A- return (ACPI_CAST_PTR(char, acpi_gbl_bad_type));=0A= - }=0A-=0A- return (ACPI_CAST_PTR(char, acpi_gbl_ns_type_names[= type]));=0A-}=0A-=0A-char *acpi_ut_get_object_type_name(union acpi_operand_= object *obj_desc)=0A-{=0A-=0A- if (!obj_desc) {=0A- return = ("[NULL Object Descriptor]");=0A- }=0A-=0A- return (acpi_ut_get= _type_name(ACPI_GET_OBJECT_TYPE(obj_desc)));=0A-}=0A-=0A-/*****************= **************************************************************=0A- *=0A- * = FUNCTION: acpi_ut_get_descriptor_name=0A- *=0A- * PARAMETERS: Object = - An ACPI object=0A- *=0A- * RETURN: Pointer to a = string=0A- *=0A- * DESCRIPTION: Validate object and return the descriptor = type=0A- *=0A- ************************************************************= ******************/=0A-=0A-/* Printable names of object descriptor types = */=0A-=0A-static const char *acpi_gbl_desc_type_names[] =3D {=0A- /* = 00 */ "Invalid",=0A- /* 01 */ "Cached",=0A- /* 02 */ "State-Generic",= =0A- /* 03 */ "State-Update",=0A- /* 04 */ "State-Package",=0A- /* = 05 */ "State-Control",=0A- /* 06 */ "State-RootParseScope",=0A- /* = 07 */ "State-ParseScope",=0A- /* 08 */ "State-WalkScope",=0A- /* 09 */ = "State-Result",=0A- /* 10 */ "State-Notify",=0A- /* 11 */ "State-Thr= ead",=0A- /* 12 */ "Walk",=0A- /* 13 */ "Parser",=0A- /* 14 */ = "Operand",=0A- /* 15 */ "Node"=0A-};=0A-=0A-char *acpi_ut_get_descriptor_n= ame(void *object)=0A-{=0A-=0A- if (!object) {=0A- return = ("NULL OBJECT");=0A- }=0A-=0A- if (ACPI_GET_DESCRIPTOR_TYPE(object= ) > ACPI_DESC_TYPE_MAX) {=0A- return (ACPI_CAST_PTR(char, = acpi_gbl_bad_type));=0A- }=0A-=0A- return (ACPI_CAST_PTR(char,= =0A- acpi_gbl_desc_type_names[ACPI_GET_DESCRIPTOR_= TYPE=0A- (object)]));= =0A-=0A-}=0A-=0A-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)= =0A-/*=0A- * Strings and procedures used for debug only=0A- */=0A-=0A-/****= ***************************************************************************= =0A- *=0A- * FUNCTION: acpi_ut_get_mutex_name=0A- *=0A- * PARAMETERS: = mutex_id - The predefined ID for this mutex.=0A- *=0A- * RETURN: = String containing the name of the mutex. Always returns a valid=0A- * = pointer.=0A- *=0A- * DESCRIPTION: Translate a mutex ID into a = name string (Debug only)=0A- *=0A- ****************************************= **************************************/=0A-=0A-char *acpi_ut_get_mutex_name= (u32 mutex_id)=0A-{=0A-=0A- if (mutex_id > ACPI_MAX_MUTEX) {=0A- = return ("Invalid Mutex ID");=0A- }=0A-=0A- return (acpi_gbl_mu= tex_names[mutex_id]);=0A-}=0A-=0A-/****************************************= ***************************************=0A- *=0A- * FUNCTION: acpi_ut_ge= t_notify_name=0A- *=0A- * PARAMETERS: notify_value - Value from the = Notify() request=0A- *=0A- * RETURN: String corresponding to the = Notify Value.=0A- *=0A- * DESCRIPTION: Translate a Notify Value to a = notify namestring.=0A- *=0A- **********************************************= ********************************/=0A-=0A-/* Names for Notify() values, = used for debug output */=0A-=0A-static const char *acpi_gbl_notify_value_na= mes[] =3D {=0A- "Bus Check",=0A- "Device Check",=0A- "Device = Wake",=0A- "Eject Request",=0A- "Device Check Light",=0A- = "Frequency Mismatch",=0A- "Bus Mode Mismatch",=0A- "Power = Fault",=0A- "Capabilities Check",=0A- "Device PLD Check",=0A- = "Reserved",=0A- "System Locality Update"=0A-};=0A-=0A-const char *acpi_ut_g= et_notify_name(u32 notify_value)=0A-{=0A-=0A- if (notify_value <=3D = ACPI_NOTIFY_MAX) {=0A- return (acpi_gbl_notify_value_names[notify_= value]);=0A- } else if (notify_value <=3D ACPI_MAX_SYS_NOTIFY) {=0A- = return ("Reserved");=0A- } else { /* Greater or = equal to 0x80 */=0A-=0A- return ("**Device Specific**");=0A-= }=0A-}=0A #endif=0A-=0A-/******************************************= *************************************=0A- *=0A- * FUNCTION: acpi_ut_vali= d_object_type=0A- *=0A- * PARAMETERS: Type - Object type to be = validated=0A- *=0A- * RETURN: TRUE if valid object type, FALSE = otherwise=0A- *=0A- * DESCRIPTION: Validate an object type=0A- *=0A- = ***************************************************************************= ***/=0A-=0A-u8 acpi_ut_valid_object_type(acpi_object_type type)=0A-{=0A-=0A= - if (type > ACPI_TYPE_LOCAL_MAX) {=0A-=0A- /* Note: = Assumes all TYPEs are contiguous (external/local) */=0A-=0A- = return (FALSE);=0A- }=0A-=0A- return (TRUE);=0A-}=0A-=0A-/*******= ************************************************************************=0A= - *=0A- * FUNCTION: acpi_ut_init_globals=0A- *=0A- * PARAMETERS: = None=0A- *=0A- * RETURN: None=0A- *=0A- * DESCRIPTION: Init library = globals. All globals that require specific=0A- * initializati= on should be initialized here!=0A- *=0A- **********************************= ********************************************/=0A-=0A-void acpi_ut_init_glob= als(void)=0A-{=0A-#if 0=0A- acpi_status status;=0A-#endif=0A- = u32 i;=0A-=0A- ACPI_FUNCTION_TRACE(ut_init_globals);=0A-=0A-#if 0=0A- /* = Create all memory caches */=0A-=0A- status =3D acpi_ut_create_caches();= =0A- if (ACPI_FAILURE(status)) {=0A- return;=0A- }=0A-#endif= =0A-=0A- /* Mutex locked flags */=0A-=0A- for (i =3D 0; i < = ACPI_NUM_MUTEX; i++) {=0A- acpi_gbl_mutex_info[i].mutex =3D = NULL;=0A- acpi_gbl_mutex_info[i].thread_id =3D ACPI_MUTEX_NOT= _ACQUIRED;=0A- acpi_gbl_mutex_info[i].use_count =3D 0;=0A- = }=0A-=0A- for (i =3D 0; i < ACPI_NUM_OWNERID_MASKS; i++) {=0A- = acpi_gbl_owner_id_mask[i] =3D 0;=0A- }=0A- acpi_gbl_owner_id_mask[ACPI= _NUM_OWNERID_MASKS - 1] =3D 0x80000000; /* Last ID is never valid = */=0A-=0A- /* GPE support */=0A-=0A- acpi_gbl_gpe_xrupt_list_hea= d =3D NULL;=0A- acpi_gbl_gpe_fadt_blocks[0] =3D NULL;=0A- acpi_gbl_gp= e_fadt_blocks[1] =3D NULL;=0A-=0A- /* Global handlers */=0A-=0A- = acpi_gbl_system_notify.handler =3D NULL;=0A- acpi_gbl_device_notify.hand= ler =3D NULL;=0A- acpi_gbl_exception_handler =3D NULL;=0A- = acpi_gbl_init_handler =3D NULL;=0A- /*acpi_gbl_table_handler =3D = NULL;*/=0A-=0A- /* Global Lock support */=0A-=0A- acpi_gbl_global_loc= k_semaphore =3D NULL;=0A- acpi_gbl_global_lock_mutex =3D NULL;=0A- = acpi_gbl_global_lock_acquired =3D FALSE;=0A- acpi_gbl_global_lock_handle= =3D 0;=0A-=0A- /* Miscellaneous variables */=0A-=0A- acpi_gbl_cm_single_= step =3D FALSE;=0A- acpi_gbl_db_terminate_threads =3D FALSE;=0A- = acpi_gbl_shutdown =3D FALSE;=0A- acpi_gbl_ns_lookup_count =3D = 0;=0A- acpi_gbl_ps_find_count =3D 0;=0A- acpi_gbl_acpi_hardware_pres= ent =3D TRUE;=0A- acpi_gbl_last_owner_id_index =3D 0;=0A- acpi_gbl_ne= xt_owner_id_offset =3D 0;=0A- acpi_gbl_trace_method_name =3D 0;=0A- = acpi_gbl_trace_dbg_level =3D 0;=0A- acpi_gbl_trace_dbg_layer =3D = 0;=0A- acpi_gbl_debugger_configuration =3D DEBUGGER_THREADING;=0A- = acpi_gbl_db_output_flags =3D ACPI_DB_CONSOLE_OUTPUT;=0A-=0A- /* = Hardware oriented */=0A-=0A- acpi_gbl_events_initialized =3D FALSE;=0A- = acpi_gbl_system_awake_and_running =3D TRUE;=0A-=0A- /* Namespace = */=0A-=0A- acpi_gbl_root_node =3D NULL;=0A- acpi_gbl_root_node_= struct.name.integer =3D ACPI_ROOT_NAME;=0A- acpi_gbl_root_node_struct.d= escriptor_type =3D ACPI_DESC_TYPE_NAMED;=0A- acpi_gbl_root_node_struct.t= ype =3D ACPI_TYPE_DEVICE;=0A- acpi_gbl_root_node_struct.child =3D = NULL;=0A- acpi_gbl_root_node_struct.peer =3D NULL;=0A- acpi_gbl_ro= ot_node_struct.object =3D NULL;=0A- acpi_gbl_root_node_struct.flags = =3D ANOBJ_END_OF_PEER_LIST;=0A-=0A-#ifdef ACPI_DEBUG_OUTPUT=0A- acpi_gbl_lo= west_stack_pointer =3D ACPI_CAST_PTR(acpi_size, ACPI_SIZE_MAX);=0A-#endif= =0A-=0A-#ifdef ACPI_DBG_TRACK_ALLOCATIONS=0A- acpi_gbl_display_final_mem_= stats =3D FALSE;=0A-#endif=0A-=0A- return_VOID;=0A-}=0A-=0A-ACPI_EXPOR= T_SYMBOL(acpi_dbg_level)=0A- ACPI_EXPORT_SYMBOL(acpi_dbg_layer)=0A--- = 2011-02-10.orig/xen/drivers/acpi/utilities/utmisc.c=0A+++ 2011-02-10/xen/dr= ivers/acpi/utilities/utmisc.c=0A@@ -61,7 +61,7 @@ ACPI_MODULE_NAME("utmisc"= )=0A * an ASCII string.=0A *=0A ***************************= ***************************************************/=0A-const char = *acpi_ut_validate_exception(acpi_status status)=0A+const char *__init = acpi_ut_validate_exception(acpi_status status)=0A {=0A acpi_status = sub_status;=0A const char *exception =3D NULL;=0A@@ -122,40 +122,6 @@ = const char *acpi_ut_validate_exception(a=0A =0A /**************************= *****************************************************=0A *=0A- * = FUNCTION: acpi_ut_set_integer_width=0A- *=0A- * PARAMETERS: Revision = From DSDT header=0A- *=0A- * RETURN: None=0A- *=0A- * = DESCRIPTION: Set the global integer bit width based upon the revision=0A- = * of the DSDT. For Revision 1 and 0, Integers are 32 = bits.=0A- * For Revision 2 and above, Integers are 64 bits. = Yes, this=0A- * makes a difference.=0A- *=0A- ****************= **************************************************************/=0A-=0A-void= acpi_ut_set_integer_width(u8 revision)=0A-{=0A-=0A- if (revision < 2) = {=0A-=0A- /* 32-bit case */=0A-=0A- acpi_gbl_in= teger_bit_width =3D 32;=0A- acpi_gbl_integer_nybble_width =3D = 8;=0A- acpi_gbl_integer_byte_width =3D 4;=0A- } else {=0A- = /* 64-bit case (ACPI 2.0+) */=0A-=0A- acpi_gbl_integer_bit_width = =3D 64;=0A- acpi_gbl_integer_nybble_width =3D 16;=0A- = acpi_gbl_integer_byte_width =3D 8;=0A- }=0A-}=0A-=0A-/********************= ***********************************************************=0A- *=0A * = FUNCTION: acpi_ut_error, acpi_ut_warning, acpi_ut_info=0A *=0A * = PARAMETERS: module_name - Caller's module name (for error = output)=0A@@ -168,7 +134,7 @@ void acpi_ut_set_integer_width(u8 revisi=0A = *=0A *********************************************************************= *********/=0A =0A-void ACPI_INTERNAL_VAR_XFACE=0A+void ACPI_INTERNAL_VAR_XF= ACE __init=0A acpi_ut_error(char *module_name, u32 line_number, char = *format, ...)=0A {=0A va_list args;=0A@@ -181,23 +147,7 @@ acpi_ut_error(= char *module_name, u32 lin=0A va_end(args);=0A }=0A =0A-void ACPI_INTERNA= L_VAR_XFACE=0A-acpi_ut_exception(char *module_name,=0A- u32 = line_number, acpi_status status, char *format, ...)=0A-{=0A- va_list = args;=0A-=0A- acpi_os_printf("ACPI Exception (%s-%04d): %s, ", module_nam= e,=0A- line_number, acpi_format_exception(status));=0A-=0A-= va_start(args, format);=0A- acpi_os_vprintf(format, args);=0A- = acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);=0A-}=0A-=0A-EXPORT_SYMBOL(acpi_= ut_exception);=0A-=0A-void ACPI_INTERNAL_VAR_XFACE=0A+void ACPI_INTERNAL_VA= R_XFACE __init=0A acpi_ut_warning(char *module_name, u32 line_number, char = *format, ...)=0A {=0A va_list args;=0A@@ -211,7 +161,7 @@ acpi_ut_warning= (char *module_name, u32 l=0A va_end(args);=0A }=0A =0A-void ACPI_INTERNA= L_VAR_XFACE=0A+void ACPI_INTERNAL_VAR_XFACE __init=0A acpi_ut_info(char = *module_name, u32 line_number, char *format, ...)=0A {=0A va_list = args;=0A--- 2011-02-10.orig/xen/drivers/passthrough/vtd/dmar.c=0A+++ = 2011-02-10/xen/drivers/passthrough/vtd/dmar.c=0A@@ -46,6 +46,7 @@ = LIST_HEAD_READ_MOSTLY(acpi_rmrr_units);=0A static LIST_HEAD_READ_MOSTLY(acp= i_atsr_units);=0A static LIST_HEAD_READ_MOSTLY(acpi_rhsa_units);=0A = =0A+static struct acpi_table_header *__read_mostly dmar_table;=0A static = u64 __read_mostly igd_drhd_address;=0A =0A void dmar_scope_add_buses(struct= dmar_scope *scope, u16 sec_bus, u16 sub_bus)=0A@@ -681,6 +682,7 @@ static = int __init acpi_parse_dmar(struct=0A u8 dmar_host_address_width;=0A = int ret =3D 0;=0A =0A+ dmar_table =3D table;=0A dmar =3D (struct = acpi_table_dmar *)table;=0A =0A if ( !iommu_enabled )=0A@@ -772,22 = +774,8 @@ int __init acpi_dmar_init(void)=0A return parse_dmar_table(ac= pi_parse_dmar);=0A }=0A =0A-static struct acpi_table_header *get_dmar(void)= =0A-{=0A- struct acpi_table_header *dmar_table =3D NULL;=0A- = unsigned long flags;=0A-=0A- /* Disabling IRQs avoids cross-CPU TLB = flush in map_pages_to_xen(). */=0A- local_irq_save(flags);=0A- = acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_table);=0A- local_irq_restore(fla= gs);=0A-=0A- return dmar_table;=0A-}=0A-=0A void acpi_dmar_reinstate(voi= d)=0A {=0A- struct acpi_table_header *dmar_table =3D get_dmar();=0A = if ( dmar_table =3D=3D NULL )=0A return;=0A dmar_table->signatu= re[0] =3D 'D';=0A@@ -796,7 +784,6 @@ void acpi_dmar_reinstate(void)=0A =0A = void acpi_dmar_zap(void)=0A {=0A- struct acpi_table_header *dmar_table = =3D get_dmar();=0A if ( dmar_table =3D=3D NULL )=0A return;=0A = dmar_table->signature[0] =3D 'X';=0A--- 2011-02-10.orig/xen/include/acp= i/acexcep.h=0A+++ 2011-02-10/xen/include/acpi/acexcep.h=0A@@ -189,7 +189,7 = @@=0A * String versions of the exception codes above=0A * These strings = must match the corresponding defines exactly=0A */=0A-char const = *acpi_gbl_exception_names_env[] =3D {=0A+char const *__initdata acpi_gbl_ex= ception_names_env[] =3D {=0A "AE_OK",=0A "AE_ERROR",=0A "AE_NO_ACPI= _TABLES",=0A@@ -224,7 +224,7 @@ char const *acpi_gbl_exception_names_env=0A= "AE_OWNER_ID_LIMIT"=0A };=0A =0A-char const *acpi_gbl_exception_nam= es_pgm[] =3D {=0A+char const *__initdata acpi_gbl_exception_names_pgm[] = =3D {=0A "AE_BAD_PARAMETER",=0A "AE_BAD_CHARACTER",=0A "AE_BAD_PAT= HNAME",=0A@@ -236,7 +236,7 @@ char const *acpi_gbl_exception_names_pgm=0A = "AE_BAD_DECIMAL_CONSTANT"=0A };=0A =0A-char const *acpi_gbl_exception_names= _tbl[] =3D {=0A+char const *__initdata acpi_gbl_exception_names_tbl[] =3D = {=0A "AE_BAD_SIGNATURE",=0A "AE_BAD_HEADER",=0A "AE_BAD_CHECKSUM",= =0A@@ -245,7 +245,7 @@ char const *acpi_gbl_exception_names_tbl=0A = "AE_INVALID_TABLE_LENGTH"=0A };=0A =0A-char const *acpi_gbl_exception_names= _aml[] =3D {=0A+char const *__initdata acpi_gbl_exception_names_aml[] =3D = {=0A "AE_AML_ERROR",=0A "AE_AML_PARSE",=0A "AE_AML_BAD_OPCODE"= ,=0A@@ -282,7 +282,7 @@ char const *acpi_gbl_exception_names_aml=0A = "AE_AML_ILLEGAL_ADDRESS"=0A };=0A =0A-char const *acpi_gbl_exception_names_= ctrl[] =3D {=0A+char const *__initdata acpi_gbl_exception_names_ctrl[] =3D = {=0A "AE_CTRL_RETURN_VALUE",=0A "AE_CTRL_PENDING",=0A "AE_CTRL_TE= RMINATE",=0A--- 2011-02-10.orig/xen/include/acpi/acglobal.h=0A+++ = 2011-02-10/xen/include/acpi/acglobal.h=0A@@ -60,74 +60,6 @@=0A =0A = /**************************************************************************= ***=0A *=0A- * Runtime configuration (static defaults that can be = overriden at runtime)=0A- *=0A- *******************************************= *********************************/=0A-=0A-/*=0A- * Enable "slack" in the = AML interpreter? Default is FALSE, and the=0A- * interpreter strictly = follows the ACPI specification. Setting to TRUE=0A- * allows the = interpreter to ignore certain errors and/or bad AML constructs.=0A- *=0A- = * Currently, these features are enabled by this flag:=0A- *=0A- * 1) Allow = "implicit return" of last value in a control method=0A- * 2) Allow access = beyond the end of an operation region=0A- * 3) Allow access to uninitialize= d locals/args (auto-init to integer 0)=0A- * 4) Allow ANY object type to = be a source operand for the Store() operator=0A- * 5) Allow unresolved = references (invalid target name) in package objects=0A- * 6) Enable = warning messages for behavior that is not ACPI spec compliant=0A- = */=0A-ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, = FALSE);=0A-=0A-/*=0A- * Automatically serialize ALL control methods? = Default is FALSE, meaning=0A- * to use the Serialized/not_serialized = method flags on a per method basis.=0A- * Only change this if the ASL code = is poorly written and cannot handle=0A- * reentrancy even though methods = are marked "NotSerialized".=0A- */=0A-ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_= gbl_all_methods_serialized, FALSE);=0A-=0A-/*=0A- * Create the predefined = _OSI method in the namespace? Default is TRUE=0A- * because ACPI CA is = fully compatible with other ACPI implementations.=0A- * Changing this will = revert ACPI CA (and machine ASL) to pre-OSI behavior.=0A- */=0A-ACPI_EXTERN= u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE);=0A-=0A-/*=0A- * = Disable wakeup GPEs during runtime? Default is TRUE because WAKE and=0A- * = RUNTIME GPEs should never be shared, and WAKE GPEs should typically = only=0A- * be enabled just before going to sleep.=0A- */=0A-ACPI_EXTERN u8 = ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE);=0A-=0A-/********= *********************************************************************=0A- = *=0A- * Debug support=0A- *=0A- *******************************************= *********************************/=0A-=0A-/* Runtime configuration of = debug print levels */=0A-=0A-extern u32 acpi_dbg_level;=0A-extern u32 = acpi_dbg_layer;=0A-=0A-/* Procedure nesting level for debug output = */=0A-=0A-extern u32 acpi_gbl_nesting_level;=0A-=0A-/* Support for dynamic = control method tracing mechanism */=0A-=0A-ACPI_EXTERN u32 acpi_gbl_origina= l_dbg_level;=0A-ACPI_EXTERN u32 acpi_gbl_original_dbg_layer;=0A-ACPI_EXTERN= acpi_name acpi_gbl_trace_method_name;=0A-ACPI_EXTERN u32 acpi_gbl_trace_db= g_level;=0A-ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;=0A-ACPI_EXTERN u32 = acpi_gbl_trace_flags;=0A-=0A-/*********************************************= ********************************=0A- *=0A * ACPI Table globals=0A *=0A = ***************************************************************************= */=0A@@ -140,109 +72,18 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags;=0A */=0A = ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list;=0A = ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT;=0A-extern acpi_native_uin= t acpi_gbl_permanent_mmap;=0A =0A /* These addresses are calculated from = FADT address values */=0A =0A ACPI_EXTERN struct acpi_generic_address = acpi_gbl_xpm1a_enable;=0A ACPI_EXTERN struct acpi_generic_address = acpi_gbl_xpm1b_enable;=0A =0A-/*=0A- * Handle both ACPI 1.0 and ACPI 2.0 = Integer widths. The integer width is=0A- * determined by the revision of = the DSDT: If the DSDT revision is less than=0A- * 2, use only the lower 32 = bits of the internal 64-bit Integer.=0A- */=0A-ACPI_EXTERN u8 acpi_gbl_inte= ger_bit_width;=0A-ACPI_EXTERN u8 acpi_gbl_integer_byte_width;=0A-ACPI_EXTER= N u8 acpi_gbl_integer_nybble_width;=0A-=0A-/*******************************= **********************************************=0A- *=0A- * Mutual exlusion = within ACPICA subsystem=0A- *=0A- *****************************************= ***********************************/=0A-=0A-/*=0A- * Predefined mutex = objects. This array contains the=0A- * actual OS mutex handles, indexed by = the local ACPI_MUTEX_HANDLEs.=0A- * (The table maps local handles to the = real OS handles)=0A- */=0A-ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mute= x_info[ACPI_NUM_MUTEX];=0A-=0A-/*=0A- * Global lock semaphore works in = conjunction with the actual HW global lock=0A- */=0A-ACPI_EXTERN acpi_mutex= acpi_gbl_global_lock_mutex;=0A-ACPI_EXTERN acpi_semaphore acpi_gbl_global_= lock_semaphore;=0A-=0A-/*=0A- * Spinlocks are used for interfaces that can = be possibly called at=0A- * interrupt level=0A- */=0A-ACPI_EXTERN = spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs and registers = */=0A-ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W = except GPE registers */=0A-#define acpi_gbl_gpe_lock &_acpi_gbl_gpe_lock= =0A-#define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock=0A-=0A = /**************************************************************************= ***=0A *=0A * Miscellaneous globals=0A *=0A ***************************= *************************************************/=0A =0A-#ifdef ACPI_DBG_T= RACK_ALLOCATIONS=0A-=0A-/* Lists for tracking memory allocations */=0A-=0A-= ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;=0A-ACPI_EXTERN = struct acpi_memory_list *acpi_gbl_ns_node_list;=0A-ACPI_EXTERN u8 = acpi_gbl_display_final_mem_stats;=0A-#endif=0A-=0A-/* Object caches = */=0A-=0A-ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache;=0A-ACPI_EXTER= N acpi_cache_t *acpi_gbl_state_cache;=0A-ACPI_EXTERN acpi_cache_t = *acpi_gbl_ps_node_cache;=0A-ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_= cache;=0A-ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache;=0A-=0A-/* = Global handlers */=0A-=0A-ACPI_EXTERN struct acpi_object_notify_handler = acpi_gbl_device_notify;=0A-ACPI_EXTERN struct acpi_object_notify_handler = acpi_gbl_system_notify;=0A-ACPI_EXTERN acpi_exception_handler acpi_gbl_exce= ption_handler;=0A-ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;=0A-A= CPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;=0A-=0A-/* = Misc */=0A-=0A-ACPI_EXTERN u32 acpi_gbl_original_mode;=0A-ACPI_EXTERN u32 = acpi_gbl_rsdp_original_location;=0A-ACPI_EXTERN u32 acpi_gbl_ns_lookup_coun= t;=0A-ACPI_EXTERN u32 acpi_gbl_ps_find_count;=0A-ACPI_EXTERN u32 acpi_gbl_o= wner_id_mask[ACPI_NUM_OWNERID_MASKS];=0A-ACPI_EXTERN u16 acpi_gbl_pm1_enabl= e_register_save;=0A-ACPI_EXTERN u16 acpi_gbl_global_lock_handle;=0A-ACPI_EX= TERN u8 acpi_gbl_last_owner_id_index;=0A-ACPI_EXTERN u8 acpi_gbl_next_owner= _id_offset;=0A-ACPI_EXTERN u8 acpi_gbl_debugger_configuration;=0A-ACPI_EXTE= RN u8 acpi_gbl_global_lock_acquired;=0A-ACPI_EXTERN u8 acpi_gbl_step_to_nex= t_call;=0A-ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;=0A-ACPI_EXTERN = u8 acpi_gbl_global_lock_present;=0A-ACPI_EXTERN u8 acpi_gbl_events_initiali= zed;=0A-ACPI_EXTERN u8 acpi_gbl_system_awake_and_running;=0A-=0A-extern u8 = acpi_gbl_shutdown;=0A-extern u32 acpi_gbl_startup_flags;=0A-extern const = char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];=0A-extern const char = *acpi_gbl_highest_dstate_names[4];=0A-extern const struct acpi_opcode_info = acpi_gbl_aml_op_info[AML_NUM_OPCODES];=0A-extern const char *acpi_gbl_regio= n_types[ACPI_NUM_PREDEFINED_REGIONS];=0A-=0A-/* Exception codes */=0A-=0A = #ifndef DEFINE_ACPI_GLOBALS=0A =0A extern char const *acpi_gbl_exception_na= mes_env[];=0A@@ -255,127 +96,11 @@ extern char const *acpi_gbl_exception_na= =0A =0A /******************************************************************= ***********=0A *=0A- * Namespace globals=0A- *=0A- ***********************= *****************************************************/=0A-=0A-#define = NUM_NS_TYPES ACPI_TYPE_INVALID+1=0A-=0A-#if !defined = (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)=0A-#define = NUM_PREDEFINED_NAMES 10=0A-#else=0A-#define NUM_PREDEFINED_NAMES= 9=0A-#endif=0A-=0A-ACPI_EXTERN struct acpi_namespace_node = acpi_gbl_root_node_struct;=0A-ACPI_EXTERN struct acpi_namespace_node = *acpi_gbl_root_node;=0A-ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fa= dt_gpe_device;=0A-=0A-extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES];= =0A-extern const struct acpi_predefined_names=0A- acpi_gbl_pre_defined_n= ames[NUM_PREDEFINED_NAMES];=0A-=0A-#ifdef ACPI_DEBUG_OUTPUT=0A-ACPI_EXTERN = u32 acpi_gbl_current_node_count;=0A-ACPI_EXTERN u32 acpi_gbl_current_node_s= ize;=0A-ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;=0A-ACPI_EXTERN = acpi_size acpi_gbl_entry_stack_pointer;=0A-ACPI_EXTERN acpi_size acpi_gbl_l= owest_stack_pointer;=0A-ACPI_EXTERN u32 acpi_gbl_deepest_nesting;=0A-#endif= =0A-=0A-/******************************************************************= ***********=0A- *=0A- * Interpreter globals=0A- *=0A- *********************= *******************************************************/=0A-=0A-ACPI_EXTERN= struct acpi_thread_state *acpi_gbl_current_walk_list;=0A-=0A-/* Control = method single step flag */=0A-=0A-ACPI_EXTERN u8 acpi_gbl_cm_single_step;= =0A-=0A-/******************************************************************= ***********=0A- *=0A * Hardware globals=0A *=0A ************************= ****************************************************/=0A =0A extern struct = acpi_bit_register_info=0A acpi_gbl_bit_register_info[ACPI_NUM_BITREG];= =0A-ACPI_EXTERN u8 acpi_gbl_sleep_type_a;=0A-ACPI_EXTERN u8 acpi_gbl_sleep_= type_b;=0A-=0A-/***********************************************************= ******************=0A- *=0A- * Event and GPE globals=0A- *=0A- ************= ****************************************************************/=0A-=0A-ex= tern struct acpi_fixed_event_info=0A- acpi_gbl_fixed_event_info[ACPI_NUM= _FIXED_EVENTS];=0A-ACPI_EXTERN struct acpi_fixed_event_handler=0A- = acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];=0A-ACPI_EXTERN = struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;=0A-ACPI_EXTERN = struct acpi_gpe_block_info=0A-*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS= ];=0A-=0A-/****************************************************************= *************=0A- *=0A- * Debugger globals=0A- *=0A- **********************= ******************************************************/=0A-=0A-ACPI_EXTERN = u8 acpi_gbl_db_output_flags;=0A-=0A-#ifdef ACPI_DISASSEMBLER=0A-=0A-ACPI_EX= TERN u8 acpi_gbl_db_opt_disasm;=0A-ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;= =0A-#endif=0A-=0A-#ifdef ACPI_DEBUGGER=0A-=0A-extern u8 acpi_gbl_method_exe= cuting;=0A-extern u8 acpi_gbl_abort_method;=0A-extern u8 acpi_gbl_db_termin= ate_threads;=0A-=0A-ACPI_EXTERN int optind;=0A-ACPI_EXTERN char *optarg;=0A= -=0A-ACPI_EXTERN u8 acpi_gbl_db_opt_tables;=0A-ACPI_EXTERN u8 acpi_gbl_db_o= pt_stats;=0A-ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;=0A-=0A-ACPI_EXTERN= char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];=0A-ACPI_EXTERN char = acpi_gbl_db_line_buf[80];=0A-ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];= =0A-ACPI_EXTERN char acpi_gbl_db_scope_buf[40];=0A-ACPI_EXTERN char = acpi_gbl_db_debug_filename[40];=0A-ACPI_EXTERN u8 acpi_gbl_db_output_to_fil= e;=0A-ACPI_EXTERN char *acpi_gbl_db_buffer;=0A-ACPI_EXTERN char *acpi_gbl_d= b_filename;=0A-ACPI_EXTERN u32 acpi_gbl_db_debug_level;=0A-ACPI_EXTERN u32 = acpi_gbl_db_console_debug_level;=0A-ACPI_EXTERN struct acpi_table_header = *acpi_gbl_db_table_ptr;=0A-ACPI_EXTERN struct acpi_namespace_node = *acpi_gbl_db_scope_node;=0A-=0A-/*=0A- * Statistic globals=0A- */=0A-ACPI_E= XTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1];=0A-ACPI_EXTER= N u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1];=0A-ACPI_EXTERN = u16 acpi_gbl_obj_type_count_misc;=0A-ACPI_EXTERN u16 acpi_gbl_node_type_cou= nt_misc;=0A-ACPI_EXTERN u32 acpi_gbl_num_nodes;=0A-ACPI_EXTERN u32 = acpi_gbl_num_objects;=0A-=0A-ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;= =0A-ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;=0A-ACPI_EXTERN u32 = acpi_gbl_size_of_node_entries;=0A-ACPI_EXTERN u32 acpi_gbl_size_of_acpi_obj= ects;=0A-=0A-#endif /* ACPI_DEBUGGER */=0A =0A = #endif /* __ACGLOBAL_H__ */=0A--- 2011-02-10.orig/= xen/include/acpi/achware.h=0A+++ 2011-02-10/xen/include/acpi/achware.h=0A@@= -44,32 +44,9 @@=0A #ifndef __ACHWARE_H__=0A #define __ACHWARE_H__=0A = =0A-/* PM Timer ticks per second (HZ) */=0A-=0A-#define PM_TIMER_FREQUENCY = 3579545=0A-=0A-/* Values for the _SST reserved method */=0A-=0A-#define = ACPI_SST_INDICATOR_OFF 0=0A-#define ACPI_SST_WORKING 1=0A-#define = ACPI_SST_WAKING 2=0A-#define ACPI_SST_SLEEPING 3=0A-#define = ACPI_SST_SLEEP_CONTEXT 4=0A-=0A-/* Prototypes */=0A-=0A-/*=0A- * hwacpi - = high level functions=0A- */=0A-acpi_status acpi_hw_set_mode(u32 mode);=0A-= =0A-u32 acpi_hw_get_mode(void);=0A-=0A /*=0A * hwregs - ACPI Register = I/O=0A */=0A-struct acpi_bit_register_info *acpi_hw_get_bit_register_info(= u32 register_id);=0A-=0A acpi_status=0A acpi_hw_register_read(u32 = register_id, u32 * return_value);=0A =0A@@ -82,50 +59,4 @@ acpi_hw_low_leve= l_read(u32 width,=0A acpi_status=0A acpi_hw_low_level_write(u32 width, u32 = value, struct acpi_generic_address *reg);=0A =0A-acpi_status acpi_hw_clear_= acpi_status(void);=0A-=0A-/*=0A- * hwgpe - GPE support=0A- */=0A-acpi_statu= s=0A-acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_inf= o);=0A-=0A-acpi_status=0A-acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_i= nfo *gpe_xrupt_info,=0A- struct acpi_gpe_block_inf= o *gpe_block);=0A-=0A-acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_i= nfo *gpe_event_info);=0A-=0A-acpi_status=0A-acpi_hw_clear_gpe_block(struct = acpi_gpe_xrupt_info *gpe_xrupt_info,=0A- struct = acpi_gpe_block_info *gpe_block);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_s= tatus=0A-acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info,= =0A- acpi_event_status * event_status);=0A-#endif = /* ACPI_FUTURE_USAGE */=0A-=0A-acpi_status acpi_hw_disable_= all_gpes(void);=0A-=0A-acpi_status acpi_hw_enable_all_runtime_gpes(void);= =0A-=0A-acpi_status acpi_hw_enable_all_wakeup_gpes(void);=0A-=0A-acpi_statu= s=0A-acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt= _info,=0A- struct acpi_gpe_block_info = *gpe_block);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-/*=0A- * hwtimer - = ACPI Timer prototypes=0A- */=0A-acpi_status acpi_get_timer_resolution(u32 = * resolution);=0A-=0A-acpi_status acpi_get_timer(u32 * ticks);=0A-=0A-acpi_= status=0A-acpi_get_timer_duration(u32 start_ticks, u32 end_ticks, u32 * = time_elapsed);=0A-#endif /* ACPI_FUTURE_USAG= E */=0A-=0A #endif /* __ACHWARE_H__ */=0A--- = 2011-02-10.orig/xen/include/acpi/aclocal.h=0A+++ 2011-02-10/xen/include/acp= i/aclocal.h=0A@@ -46,176 +46,18 @@=0A =0A /* acpisrc:struct_defs -- for = acpisrc conversion */=0A =0A-#define ACPI_WAIT_FOREVER = 0xFFFF /* u16, as per ACPI spec */=0A-#define ACPI_DO_NOT_WAIT = 0=0A-#define ACPI_SERIALIZED 0xFF=0A-=0A-typedef u32 = acpi_mutex_handle;=0A-#define ACPI_GLOBAL_LOCK (acpi_semapho= re) (-1)=0A-=0A-/* Total number of aml opcodes defined */=0A-=0A-#define = AML_NUM_OPCODES 0x7F=0A-=0A-/* Forward declarations = */=0A-=0A-struct acpi_walk_state;=0A-struct acpi_obj_mutex;=0A-union = acpi_parse_object;=0A-=0A-/************************************************= *****************************=0A- *=0A- * Mutex typedefs and structs=0A- = *=0A- *********************************************************************= *******/=0A-=0A-/*=0A- * Predefined handles for the mutex objects used = within the subsystem=0A- * All mutex objects are automatically created by = acpi_ut_mutex_initialize.=0A- *=0A- * The acquire/release ordering = protocol is implied via this list. Mutexes=0A- * with a lower value must = be acquired before mutexes with a higher value.=0A- *=0A- * NOTE: any = changes here must be reflected in the acpi_gbl_mutex_names=0A- * table = below also!=0A- */=0A-#define ACPI_MTX_INTERPRETER 0 /* AML = Interpreter, main lock */=0A-#define ACPI_MTX_NAMESPACE 1 /* = ACPI Namespace */=0A-#define ACPI_MTX_TABLES 2 /* Data = for ACPI tables */=0A-#define ACPI_MTX_EVENTS 3 /* Data = for ACPI events */=0A-#define ACPI_MTX_CACHES 4 /* = Internal caches, general purposes */=0A-#define ACPI_MTX_MEMORY = 5 /* Debug memory tracking lists */=0A-#define ACPI_MTX_DEBUG_CMD_COM= PLETE 6 /* AML debugger */=0A-#define ACPI_MTX_DEBUG_CMD_READY = 7 /* AML debugger */=0A-=0A-#define ACPI_MAX_MUTEX = 7=0A-#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1=0A-=0A-#if = defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)=0A-#ifdef DEFINE_ACPI_= GLOBALS=0A-=0A-/* Debug names for the mutexes above */=0A-=0A-static char = *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] =3D {=0A- "ACPI_MTX_Interpreter",=0A-= "ACPI_MTX_Tables",=0A- "ACPI_MTX_Namespace",=0A- "ACPI_MTX_E= vents",=0A- "ACPI_MTX_Caches",=0A- "ACPI_MTX_Memory",=0A- "ACPI_MTX_C= ommandComplete",=0A- "ACPI_MTX_CommandReady"=0A-};=0A-=0A-#endif=0A-#end= if=0A-=0A-/*=0A- * Predefined handles for spinlocks used within the = subsystem.=0A- * These spinlocks are created by acpi_ut_mutex_initialize=0A= - */=0A-#define ACPI_LOCK_GPES 0=0A-#define ACPI_LOCK_HARD= WARE 1=0A-=0A-#define ACPI_MAX_LOCK = 1=0A-#define ACPI_NUM_LOCK ACPI_MAX_LOCK+1=0A-=0A-/* = Owner IDs are used to track namespace nodes for selective deletion = */=0A-=0A-typedef u8 acpi_owner_id;=0A-#define ACPI_OWNER_ID_MAX = 0xFF=0A-=0A-/* This Thread ID means that the mutex is not in use = (unlocked) */=0A-=0A-#define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_i= d) 0=0A-=0A-/* Table for the global mutexes */=0A-=0A-struct acpi_mutex_inf= o {=0A- acpi_mutex mutex;=0A- u32 use_count;=0A- acpi_thread_id = thread_id;=0A-};=0A-=0A-/* Lock flag parameter for various interfaces = */=0A-=0A-#define ACPI_MTX_DO_NOT_LOCK 0=0A-#define ACPI_MTX_LOC= K 1=0A-=0A-/* Field access granularities */=0A-=0A-#defin= e ACPI_FIELD_BYTE_GRANULARITY 1=0A-#define ACPI_FIELD_WORD_GRANULARITY = 2=0A-#define ACPI_FIELD_DWORD_GRANULARITY 4=0A-#define ACPI_FIELD_QW= ORD_GRANULARITY 8=0A-=0A-#define ACPI_ENTRY_NOT_FOUND = NULL=0A-=0A /**************************************************************= ***************=0A *=0A * Namespace typedefs and structs=0A *=0A = ***************************************************************************= */=0A =0A-/* Operational modes of the AML interpreter/scanner */=0A-=0A-typ= edef enum {=0A- ACPI_IMODE_LOAD_PASS1 =3D 0x01,=0A- ACPI_IMODE_LOAD_PAS= S2 =3D 0x02,=0A- ACPI_IMODE_EXECUTE =3D 0x03=0A-} acpi_interpreter_m= ode;=0A-=0A union acpi_name_union {=0A u32 integer;=0A char = ascii[4];=0A };=0A =0A /*=0A- * The Namespace Node describes a named = object that appears in the AML.=0A- * descriptor_type is used to differenti= ate between internal descriptors.=0A- *=0A- * The node is optimized for = both 32-bit and 64-bit platforms:=0A- * 20 bytes for the 32-bit case, 32 = bytes for the 64-bit case.=0A- *=0A- * Note: The descriptor_type and Type = fields must appear in the identical=0A- * position in both the struct = acpi_namespace_node and union acpi_operand_object=0A- * structures.=0A- = */=0A-struct acpi_namespace_node {=0A- union acpi_operand_object *object; = /* Interpreter object */=0A- u8 descriptor_type; /* Differentiate = object descriptor types */=0A- u8 type; /* ACPI Type = associated with this name */=0A- u8 flags; /* = Miscellaneous flags */=0A- acpi_owner_id owner_id; /* Node creator = */=0A- union acpi_name_union name; /* ACPI Name, always 4 chars per = ACPI spec */=0A- struct acpi_namespace_node *child; /* First = child */=0A- struct acpi_namespace_node *peer; /* Peer. Parent if = ANOBJ_END_OF_PEER_LIST set */=0A-=0A- /*=0A- * The following fields = are used by the ASL compiler and disassembler only=0A- */=0A-#ifdef = ACPI_LARGE_NAMESPACE_NODE=0A- union acpi_parse_object *op;=0A- = u32 value;=0A- u32 length;=0A-#endif=0A-};=0A-=0A-/* Namespace Node flags = */=0A-=0A-#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, = Peer field points to parent */=0A-#define ANOBJ_TEMPORARY = 0x02 /* Node is create by a method and is temporary */=0A-#define = ANOBJ_METHOD_ARG 0x04 /* Node is a method argument = */=0A-#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a = method local */=0A-#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to = optimize device initialization */=0A-=0A-#define ANOBJ_IS_EXTERNAL = 0x08 /* i_aSL only: This object created via External() = */=0A-#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: = Method has no return value */=0A-#define ANOBJ_METHOD_SOME_NO_RETVAL = 0x20 /* i_aSL only: Method has at least one return value */=0A-#define = ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference is a bit = offset */=0A-#define ANOBJ_IS_REFERENCED 0x80 /* i_aSL = only: Object was referenced */=0A-=0A-/*=0A * ACPI Table Descriptor. One = per ACPI table=0A */=0A struct acpi_table_desc {=0A@@ -223,7 +65,6 @@ = struct acpi_table_desc {=0A struct acpi_table_header *pointer;=0A = u32 length; /* Length fixed at 32 bits */=0A union = acpi_name_union signature;=0A- acpi_owner_id owner_id;=0A u8 = flags;=0A };=0A =0A@@ -255,465 +96,12 @@ struct acpi_internal_rsdt {=0A = #define ACPI_TABLE_INDEX_DSDT (0)=0A #define ACPI_TABLE_INDEX_FAC= S (1)=0A =0A-struct acpi_find_context {=0A- char *search_for;= =0A- acpi_handle *list;=0A- u32 *count;=0A-};=0A-=0A-struct acpi_ns_sea= rch_data {=0A- struct acpi_namespace_node *node;=0A-};=0A-=0A-/*=0A- * = Predefined Namespace items=0A- */=0A-struct acpi_predefined_names {=0A- = char *name;=0A- u8 type;=0A- char *val;=0A-};=0A-=0A-/* Object types = used during package copies */=0A-=0A-#define ACPI_COPY_TYPE_SIMPLE = 0=0A-#define ACPI_COPY_TYPE_PACKAGE 1=0A-=0A-/* Info structure = used to convert external<->internal namestrings */=0A-=0A-struct acpi_names= tring_info {=0A- char *external_name;=0A- char *next_external= _char;=0A- char *internal_name;=0A- u32 length;=0A- u32 = num_segments;=0A- u32 num_carats;=0A- u8 fully_qualified;=0A-};= =0A-=0A-/* Field creation info */=0A-=0A-struct acpi_create_field_info = {=0A- struct acpi_namespace_node *region_node;=0A- struct acpi_namespa= ce_node *field_node;=0A- struct acpi_namespace_node *register_node;= =0A- struct acpi_namespace_node *data_register_node;=0A- u32 = bank_value;=0A- u32 field_bit_position;=0A- u32 field_bit_length;=0A- = u8 field_flags;=0A- u8 attribute;=0A- u8 field_type;=0A-};=0A-=0A= -typedef=0A-acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * = walk_state);=0A-=0A-/*=0A- * Bitmapped ACPI types. Used internally = only=0A- */=0A-#define ACPI_BTYPE_ANY 0x00000000=0A-#defin= e ACPI_BTYPE_INTEGER 0x00000001=0A-#define ACPI_BTYPE_STRING = 0x00000002=0A-#define ACPI_BTYPE_BUFFER = 0x00000004=0A-#define ACPI_BTYPE_PACKAGE 0x00000008=0A-#define= ACPI_BTYPE_FIELD_UNIT 0x00000010=0A-#define ACPI_BTYPE_DEVICE = 0x00000020=0A-#define ACPI_BTYPE_EVENT = 0x00000040=0A-#define ACPI_BTYPE_METHOD 0x00000080=0A-#define= ACPI_BTYPE_MUTEX 0x00000100=0A-#define ACPI_BTYPE_REGION = 0x00000200=0A-#define ACPI_BTYPE_POWER = 0x00000400=0A-#define ACPI_BTYPE_PROCESSOR 0x00000800=0A-#define= ACPI_BTYPE_THERMAL 0x00001000=0A-#define ACPI_BTYPE_BUFFER_FI= ELD 0x00002000=0A-#define ACPI_BTYPE_DDB_HANDLE = 0x00004000=0A-#define ACPI_BTYPE_DEBUG_OBJECT 0x00008000=0A-#define= ACPI_BTYPE_REFERENCE 0x00010000=0A-#define ACPI_BTYPE_RESOURCE = 0x00020000=0A-=0A-#define ACPI_BTYPE_COMPUTE_DATA = (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)=0A-=0A-#define= ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PAC= KAGE)=0A-#define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | = ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)=0A-#define ACPI_BTYPE_DEVICE_= OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSO= R)=0A-#define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or = LOCAL */=0A-#define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF=0A-=0A-/****= *************************************************************************= =0A- *=0A- * Event typedefs and structs=0A- *=0A- *************************= ***************************************************/=0A-=0A-/* Dispatch = info for each GPE -- either a method or handler, cannot be both */=0A-=0A-s= truct acpi_handler_info {=0A- acpi_event_handler address; /* Address = of handler, if any */=0A- void *context; /* Context to be = passed to handler */=0A- struct acpi_namespace_node *method_node; = /* Method node for this GPE level (saved) */=0A-};=0A-=0A-union acpi_gpe_di= spatch_info {=0A- struct acpi_namespace_node *method_node; /* = Method node for this GPE level */=0A- struct acpi_handler_info = *handler;=0A-};=0A-=0A-/*=0A- * Information about a GPE, one per each GPE = in an array.=0A- * NOTE: Important to keep this struct as small as = possible.=0A- */=0A-struct acpi_gpe_event_info {=0A- union acpi_gpe_disp= atch_info dispatch; /* Either Method or Handler */=0A- struct = acpi_gpe_register_info *register_info; /* Backpointer to register info = */=0A- u8 flags; /* Misc info about this GPE */=0A- u8 = gpe_number; /* This GPE */=0A-};=0A-=0A-/* Information about a = GPE register pair, one per each status/enable pair in an array */=0A-=0A-st= ruct acpi_gpe_register_info {=0A- struct acpi_generic_address = status_address; /* Address of status reg */=0A- struct acpi_generic_address= enable_address; /* Address of enable reg */=0A- u8 enable_for_wake;= /* GPEs to keep enabled when sleeping */=0A- u8 enable_for_run; = /* GPEs to keep enabled when running */=0A- u8 base_gpe_number; /* = Base GPE number for this register */=0A-};=0A-=0A-/*=0A- * Information = about a GPE register block, one per each installed block --=0A- * GPE0, = GPE1, and one per each installed GPE Block Device.=0A- */=0A-struct = acpi_gpe_block_info {=0A- struct acpi_namespace_node *node;=0A- = struct acpi_gpe_block_info *previous;=0A- struct acpi_gpe_block_info = *next;=0A- struct acpi_gpe_xrupt_info *xrupt_block; /* = Backpointer to interrupt block */=0A- struct acpi_gpe_register_info = *register_info; /* One per GPE register pair */=0A- struct acpi_gpe_eve= nt_info *event_info; /* One for each GPE */=0A- struct acpi_generic= _address block_address; /* Base address of the block */=0A- u32 = register_count; /* Number of register pairs in block */=0A- u8 = block_base_number; /* Base GPE number for this block */=0A-};=0A-=0A-/= * Information about GPE interrupt handlers, one per each interrupt level = used for GPEs */=0A-=0A-struct acpi_gpe_xrupt_info {=0A- struct = acpi_gpe_xrupt_info *previous;=0A- struct acpi_gpe_xrupt_info = *next;=0A- struct acpi_gpe_block_info *gpe_block_list_head; /* = List of GPE blocks for this xrupt */=0A- u32 interrupt_number; /* = System interrupt number */=0A-};=0A-=0A-struct acpi_gpe_walk_info {=0A- = struct acpi_namespace_node *gpe_device;=0A- struct acpi_gpe_block_info = *gpe_block;=0A-};=0A-=0A-typedef acpi_status(*acpi_gpe_callback) (struct = acpi_gpe_xrupt_info *=0A- gpe_xrupt_= info,=0A- struct acpi_gpe_block_info= *=0A- gpe_block);=0A-=0A-/* Information = about each particular fixed event */=0A-=0A-struct acpi_fixed_event_handler= {=0A- acpi_event_handler handler; /* Address of handler. */=0A- = void *context; /* Context to be passed to handler */=0A-};=0A-=0A-= struct acpi_fixed_event_info {=0A- u8 status_register_id;=0A- u8 = enable_register_id;=0A- u16 status_bit_mask;=0A- u16 enable_bit_mask= ;=0A-};=0A-=0A-/* Information used during field processing */=0A-=0A-struct= acpi_field_info {=0A- u8 skip_field;=0A- u8 field_flag;=0A- = u32 pkg_length;=0A-};=0A-=0A-/*********************************************= ********************************=0A- *=0A- * Generic "state" object for = stacks=0A- *=0A- **********************************************************= ******************/=0A-=0A-#define ACPI_CONTROL_NORMAL = 0xC0=0A-#define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1=0A-#define = ACPI_CONTROL_PREDICATE_EXECUTING 0xC2=0A-#define ACPI_CONTROL_PREDICATE= _FALSE 0xC3=0A-#define ACPI_CONTROL_PREDICATE_TRUE = 0xC4=0A-=0A-#define ACPI_STATE_COMMON \=0A- void = *next; \=0A- u8 descriptor_type; = /* To differentiate various internal objs */\=0A- u8 = flags; \=0A- u16 value; = \=0A- u16 state;=0A-=0A- /* There are 2 = bytes available here until the next natural alignment boundary */=0A-=0A-st= ruct acpi_common_state {=0A-ACPI_STATE_COMMON};=0A-=0A-/*=0A- * Update = state - used to traverse complex objects such as packages=0A- */=0A-struct = acpi_update_state {=0A- ACPI_STATE_COMMON union acpi_operand_object = *object;=0A-};=0A-=0A-/*=0A- * Pkg state - used to traverse nested package = structures=0A- */=0A-struct acpi_pkg_state {=0A- ACPI_STATE_COMMON = u16 index;=0A- union acpi_operand_object *source_object;=0A- union = acpi_operand_object *dest_object;=0A- struct acpi_walk_state *walk_state;= =0A- void *this_target_obj;=0A- u32 num_packages;=0A-};=0A-=0A-/*= =0A- * Control state - one per if/else and while constructs.=0A- * Allows = nesting of these constructs=0A- */=0A-struct acpi_control_state {=0A- = ACPI_STATE_COMMON u16 opcode;=0A- union acpi_parse_object *predicate_= op;=0A- u8 *aml_predicate_start; /* Start of if/while predicate = */=0A- u8 *package_end; /* End of if/while block */=0A-};=0A-=0A-/*= =0A- * Scope state - current scope during namespace lookups=0A- */=0A-struc= t acpi_scope_state {=0A- ACPI_STATE_COMMON struct acpi_namespace_nod= e *node;=0A-};=0A-=0A-struct acpi_pscope_state {=0A- ACPI_STATE_COMMON = u32 arg_count; /* Number of fixed arguments */=0A- union acpi_parse_ob= ject *op; /* Current op being parsed */=0A- u8 *arg_end; = /* Current argument end */=0A- u8 *pkg_end; /* Current package = end */=0A- u32 arg_list; /* Next argument to parse = */=0A-};=0A-=0A-/*=0A- * Thread state - one per thread across multiple = walk states. Multiple walk=0A- * states are created when there are nested = control methods executing.=0A- */=0A-struct acpi_thread_state {=0A- = ACPI_STATE_COMMON u8 current_sync_level; /* Mutex Sync (nested = acquire) level */=0A- struct acpi_walk_state *walk_state_list; /* = Head of list of walk_states for this thread */=0A- union acpi_operand_= object *acquired_mutex_list; /* List of all currently acquired mutexes = */=0A- acpi_thread_id thread_id; /* Running thread ID */=0A-};=0A-= =0A-/*=0A- * Result values - used to accumulate the results of nested=0A- = * AML arguments=0A- */=0A-struct acpi_result_values {=0A- ACPI_STATE_= COMMON u8 num_results;=0A- u8 last_insert;=0A- union acpi_operand_= object *obj_desc[ACPI_OBJ_NUM_OPERANDS];=0A-};=0A-=0A-typedef=0A-acpi_statu= s(*acpi_parse_downwards) (struct acpi_walk_state * walk_state,=0A- = union acpi_parse_object ** out_op);=0A-=0A-typedef = acpi_status(*acpi_parse_upwards) (struct acpi_walk_state * walk_state);=0A-= =0A-/*=0A- * Notify info - used to pass info to the deferred notify=0A- * = handler/dispatcher.=0A- */=0A-struct acpi_notify_info {=0A- ACPI_STATE_= COMMON struct acpi_namespace_node *node;=0A- union acpi_operand_object = *handler_obj;=0A-};=0A-=0A-/* Generic state is union of structs above = */=0A-=0A-union acpi_generic_state {=0A- struct acpi_common_state = common;=0A- struct acpi_control_state control;=0A- struct acpi_update_= state update;=0A- struct acpi_scope_state scope;=0A- struct = acpi_pscope_state parse_scope;=0A- struct acpi_pkg_state pkg;=0A- = struct acpi_thread_state thread;=0A- struct acpi_result_values = results;=0A- struct acpi_notify_info notify;=0A-};=0A-=0A-/*************= ****************************************************************=0A- *=0A- = * Interpreter typedefs and structs=0A- *=0A- ******************************= **********************************************/=0A-=0A-typedef acpi_status(= *ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state);=0A-=0A-/**********= *******************************************************************=0A- = *=0A- * Parser typedefs and structs=0A- *=0A- *****************************= ***********************************************/=0A-=0A-/*=0A- * AML = opcode, name, and argument layout=0A- */=0A-struct acpi_opcode_info = {=0A-#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)=0A- = char *name; /* Opcode name (disassembler/debug only) */=0A-#end= if=0A- u32 parse_args; /* Grammar/Parse time arguments */=0A- = u32 runtime_args; /* Interpret time arguments */=0A- u16 flags; = /* Misc flags */=0A- u8 object_type; /* Corresponding = internal object type */=0A- u8 class; /* Opcode class = */=0A- u8 type; /* Opcode type */=0A-};=0A-=0A-union = acpi_parse_value {=0A- acpi_integer integer; /* Integer constant (Up to = 64 bits) */=0A- struct uint64_struct integer64; /* Structure overlay for 2 = 32-bit Dwords */=0A- u32 size; /* bytelist or field size = */=0A- char *string; /* NULL terminated string */=0A- u8 = *buffer; /* buffer or string */=0A- char *name; = /* NULL terminated string */=0A- union acpi_parse_object *arg; /* = arguments and contained ops */=0A-};=0A-=0A-#define ACPI_PARSE_COMMON = \=0A- union acpi_parse_object *parent; /* Parent op = */\=0A- u8 descriptor_type; /* To differentiat= e various internal objs */\=0A- u8 flags; = /* Type of Op */\=0A- u16 aml_opcode;= /* AML opcode */\=0A- u32 aml_offset;= /* Offset of declaration in AML */\=0A- union acpi_parse_object = *next; /* Next op */\=0A- struct acpi_namespace_node = *node; /* For use by interpreter */\=0A- union acpi_parse_va= lue value; /* Value or args associated with the opcode = */\=0A- ACPI_DISASM_ONLY_MEMBERS (\=0A- u8 = disasm_flags; /* Used during AML disassembly */\=0A- u8 = disasm_opcode; /* Subtype used for disassembly */\=0A- = char aml_op_name[16]) /* Op name (debug = only) */=0A-=0A-#define ACPI_DASM_BUFFER 0x00=0A-#define = ACPI_DASM_RESOURCE 0x01=0A-#define ACPI_DASM_STRING = 0x02=0A-#define ACPI_DASM_UNICODE 0x03=0A-#define = ACPI_DASM_EISAID 0x04=0A-#define ACPI_DASM_MATCHOP = 0x05=0A-#define ACPI_DASM_LNOT_PREFIX 0x06=0A-#define = ACPI_DASM_LNOT_SUFFIX 0x07=0A-#define ACPI_DASM_IGNORE = 0x08=0A-=0A-/*=0A- * Generic operation (for example: If, While, = Store)=0A- */=0A-struct acpi_parse_obj_common {=0A-ACPI_PARSE_COMMON};=0A-= =0A-/*=0A- * Extended Op for named ops (Scope, Method, etc.), deferred ops = (Methods and op_regions),=0A- * and bytelists.=0A- */=0A-struct acpi_parse_= obj_named {=0A- ACPI_PARSE_COMMON u8 *path;=0A- u8 *data; /* = AML body or bytelist data */=0A- u32 length; /* AML = length */=0A- u32 name; /* 4-byte name or zero if no name = */=0A-};=0A-=0A-/* This version is used by the i_aSL compiler only = */=0A-=0A-#define ACPI_MAX_PARSEOP_NAME 20=0A-=0A-struct acpi_parse_obj_a= sl {=0A- ACPI_PARSE_COMMON union acpi_parse_object *child;=0A- = union acpi_parse_object *parent_method;=0A- char *filename;=0A- = char *external_name;=0A- char *namepath;=0A- char name_seg[4];= =0A- u32 extra_value;=0A- u32 column;=0A- u32 line_number;=0A- = u32 logical_line_number;=0A- u32 logical_byte_offset;=0A- u32 = end_line;=0A- u32 end_logical_line;=0A- u32 acpi_btype;=0A- = u32 aml_length;=0A- u32 aml_subtree_length;=0A- u32 final_aml_lengt= h;=0A- u32 final_aml_offset;=0A- u32 compile_flags;=0A- u16 = parse_opcode;=0A- u8 aml_opcode_length;=0A- u8 aml_pkg_len_byte= s;=0A- u8 extra;=0A- char parse_op_name[ACPI_MAX_PARSEOP_NAME];=0A-};=0A= -=0A-union acpi_parse_object {=0A- struct acpi_parse_obj_common = common;=0A- struct acpi_parse_obj_named named;=0A- struct acpi_parse_o= bj_asl asl;=0A-};=0A-=0A-/*=0A- * Parse state - one state per parser = invocation and each control=0A- * method.=0A- */=0A-struct acpi_parse_state= {=0A- u8 *aml_start; /* First AML byte */=0A- u8 *aml; = /* Next AML byte */=0A- u8 *aml_end; /* (last + 1) AML = byte */=0A- u8 *pkg_start; /* Current package begin */=0A- u8 = *pkg_end; /* Current package end */=0A- union acpi_parse_ob= ject *start_op; /* Root of parse tree */=0A- struct acpi_namespace_node = *start_node;=0A- union acpi_generic_state *scope; /* Current = scope */=0A- union acpi_parse_object *start_scope;=0A- u32 = aml_size;=0A-};=0A-=0A-/* Parse object flags */=0A-=0A-#define ACPI_PARSEOP= _GENERIC 0x01=0A-#define ACPI_PARSEOP_NAMED = 0x02=0A-#define ACPI_PARSEOP_DEFERRED 0x04=0A-#define ACPI_PARSEO= P_BYTELIST 0x08=0A-#define ACPI_PARSEOP_IN_CACHE = 0x80=0A-=0A-/* Parse object disasm_flags */=0A-=0A-#define ACPI_PARSEOP_IGN= ORE 0x01=0A-#define ACPI_PARSEOP_PARAMLIST 0x02=0A-#de= fine ACPI_PARSEOP_EMPTY_TERMLIST 0x04=0A-#define ACPI_PARSEOP_SPECIAL = 0x10=0A-=0A /****************************************************= *************************=0A *=0A * Hardware (ACPI registers) and PNP=0A = *=0A ********************************************************************= ********/=0A =0A-#define PCI_ROOT_HID_STRING "PNP0A03"=0A-#defi= ne PCI_EXPRESS_ROOT_HID_STRING "PNP0A08"=0A-=0A struct acpi_bit_registe= r_info {=0A u8 parent_register;=0A u8 bit_position;=0A@@ -814,152 = +202,4 @@ struct acpi_bit_register_info {=0A #define ACPI_ADDRESS_TYPE_IO_R= ANGE 1=0A #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE = 2=0A =0A-/* Resource descriptor types and masks */=0A-=0A-#define = ACPI_RESOURCE_NAME_LARGE 0x80=0A-#define ACPI_RESOURCE_NAME_= SMALL 0x00=0A-=0A-#define ACPI_RESOURCE_NAME_SMALL_MASK = 0x78 /* Bits 6:3 contain the type */=0A-#define ACPI_RESOURCE_NA= ME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */=0A-#defin= e ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the = type */=0A-=0A-/*=0A- * Small resource descriptor "names" as defined by = the ACPI specification.=0A- * Note: Bits 2:0 are used for the descriptor = length=0A- */=0A-#define ACPI_RESOURCE_NAME_IRQ 0x20=0A-#d= efine ACPI_RESOURCE_NAME_DMA 0x28=0A-#define ACPI_RESOURCE= _NAME_START_DEPENDENT 0x30=0A-#define ACPI_RESOURCE_NAME_END_DEPENDENT= 0x38=0A-#define ACPI_RESOURCE_NAME_IO 0x40=0A-#de= fine ACPI_RESOURCE_NAME_FIXED_IO 0x48=0A-#define ACPI_RESOURCE_= NAME_RESERVED_S1 0x50=0A-#define ACPI_RESOURCE_NAME_RESERVED_S2 = 0x58=0A-#define ACPI_RESOURCE_NAME_RESERVED_S3 0x60=0A-#def= ine ACPI_RESOURCE_NAME_RESERVED_S4 0x68=0A-#define ACPI_RESOURCE_N= AME_VENDOR_SMALL 0x70=0A-#define ACPI_RESOURCE_NAME_END_TAG = 0x78=0A-=0A-/*=0A- * Large resource descriptor "names" as defined by = the ACPI specification.=0A- * Note: includes the Large Descriptor bit in = bit[7]=0A- */=0A-#define ACPI_RESOURCE_NAME_MEMORY24 0x81=0A-#d= efine ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82=0A-#define ACPI_RESOURCE= _NAME_RESERVED_L1 0x83=0A-#define ACPI_RESOURCE_NAME_VENDOR_LARGE = 0x84=0A-#define ACPI_RESOURCE_NAME_MEMORY32 0x85=0A-#de= fine ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86=0A-#define ACPI_RESOURCE_= NAME_ADDRESS32 0x87=0A-#define ACPI_RESOURCE_NAME_ADDRESS16 = 0x88=0A-#define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89=0A-#def= ine ACPI_RESOURCE_NAME_ADDRESS64 0x8A=0A-#define ACPI_RESOURCE_N= AME_EXTENDED_ADDRESS64 0x8B=0A-#define ACPI_RESOURCE_NAME_LARGE_MAX = 0x8B=0A-=0A-/********************************************************= *********************=0A- *=0A- * Miscellaneous=0A- *=0A- *****************= ***********************************************************/=0A-=0A-#define= ACPI_ASCII_ZERO 0x30=0A-=0A-/*****************************= ************************************************=0A- *=0A- * Debugger=0A- = *=0A- *********************************************************************= *******/=0A-=0A-struct acpi_db_method_info {=0A- acpi_handle = main_thread_gate;=0A- acpi_handle thread_complete_gate;=0A- u32 = *threads;=0A- u32 num_threads;=0A- u32 num_created;=0A- u32 = num_completed;=0A-=0A- char *name;=0A- u32 flags;=0A- u32 num_loops;=0A- = char pathname[128];=0A- char **args;=0A-=0A- /*=0A- * Arguments to be = passed to method for the command=0A- * Threads -=0A- * the = Number of threads, ID of current thread and=0A- * Index of current = thread inside all them created.=0A- */=0A- char init_args;=0A- = char *arguments[4];=0A- char num_threads_str[11];=0A- char id_of_thread_s= tr[11];=0A- char index_of_thread_str[11];=0A-};=0A-=0A-struct = acpi_integrity_info {=0A- u32 nodes;=0A- u32 objects;=0A-};=0A-=0A-#= define ACPI_DB_REDIRECTABLE_OUTPUT 0x01=0A-#define ACPI_DB_CONSOLE_OUTP= UT 0x02=0A-#define ACPI_DB_DUPLICATE_OUTPUT 0x03=0A-=0A-/**= ***************************************************************************= =0A- *=0A- * Debug=0A- *=0A- **********************************************= ******************************/=0A-=0A-/* Entry for a memory allocation = (debug only) */=0A-=0A-#define ACPI_MEM_MALLOC 0=0A-#define= ACPI_MEM_CALLOC 1=0A-#define ACPI_MAX_MODULE_NAME = 16=0A-=0A-#define ACPI_COMMON_DEBUG_MEM_HEADER \=0A- struct acpi_debug_m= em_block *previous; \=0A- struct acpi_debug_mem_block *next; = \=0A- u32 size; \=0A- u32 = component; \=0A- u32 line; = \=0A- char module[ACPI_MAX_MODULE_NAME]; = \=0A- u8 alloc_type;=0A-=0A-struct = acpi_debug_mem_header {=0A-ACPI_COMMON_DEBUG_MEM_HEADER};=0A-=0A-struct = acpi_debug_mem_block {=0A- ACPI_COMMON_DEBUG_MEM_HEADER u64 user_space= ;=0A-};=0A-=0A-#define ACPI_MEM_LIST_GLOBAL 0=0A-#define = ACPI_MEM_LIST_NSNODE 1=0A-#define ACPI_MEM_LIST_MAX = 1=0A-#define ACPI_NUM_MEM_LISTS 2=0A-=0A-struct acpi_memory_= list {=0A- char *list_name;=0A- void *list_head;=0A- u16 = object_size;=0A- u16 max_depth;=0A- u16 current_depth;=0A- = u16 link_offset;=0A-=0A-#ifdef ACPI_DBG_TRACK_ALLOCATIONS=0A-=0A- /* = Statistics for debug memory tracking only */=0A-=0A- u32 total_allocated= ;=0A- u32 total_freed;=0A- u32 max_occupied;=0A- u32 total_size;=0A-= u32 current_total_size;=0A- u32 requests;=0A- u32 = hits;=0A-#endif=0A-};=0A-=0A #endif /* = __ACLOCAL_H__ */=0A--- 2011-02-10.orig/xen/include/acpi/acmacros.h=0A+++ = 2011-02-10/xen/include/acpi/acmacros.h=0A@@ -431,7 +431,6 @@=0A */=0A = #define ACPI_INFO(plist) acpi_ut_info plist=0A #define = ACPI_WARNING(plist) acpi_ut_warning plist=0A-#define ACPI_EXCEP= TION(plist) acpi_ut_exception plist=0A #define ACPI_ERROR(plist) = acpi_ut_error plist=0A #define ACPI_ERROR_NAMESPACE(s,e) = acpi_ns_report_error (AE_INFO, s, e);=0A #define ACPI_ERROR_METHOD(s,n,p,= e) acpi_ns_report_method_error (AE_INFO, s, n, p, e);=0A@@ -442,7 = +441,6 @@=0A =0A #define ACPI_INFO(plist)=0A #define ACPI_WARNING(plist)=0A= -#define ACPI_EXCEPTION(plist)=0A #define ACPI_ERROR(plist)=0A #define = ACPI_ERROR_NAMESPACE(s,e)=0A #define ACPI_ERROR_METHOD(s,n,p,e)=0A@@ = -595,16 +593,6 @@=0A #define ACPI_DEBUG_ONLY_MEMBERS(a) a;=0A #define = _VERBOSE_STRUCTURES=0A =0A-/* Stack and buffer dumping */=0A-=0A-#define = ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0)=0A-#define = ACPI_DUMP_OPERANDS(a,b,c,d,e) acpi_ex_dump_operands(a,b,c,d,e,_acpi_modul= e_name,__LINE__)=0A-=0A-#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dum= p_entry (a,b)=0A-#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathn= ame(a,b,c,d)=0A-#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resour= ce_list(a)=0A-#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((= u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)=0A-=0A /*=0A * Master debug print = macros=0A * Print iff:=0A@@ -633,13 +621,6 @@=0A #define ACPI_FUNCTION_STA= TUS_EXIT(s) do { } while(0)=0A #define ACPI_FUNCTION_VALUE_EXIT(s) do = { } while(0)=0A #define ACPI_FUNCTION_ENTRY() do { } while(0)=0A-= #define ACPI_DUMP_STACK_ENTRY(a) do { } while(0)=0A-#define = ACPI_DUMP_OPERANDS(a,b,c,d,e) do { } while(0)=0A-#define ACPI_DUMP_ENTRY(= a,b) do { } while(0)=0A-#define ACPI_DUMP_TABLES(a,b) = do { } while(0)=0A-#define ACPI_DUMP_PATHNAME(a,b,c,d) do { } while(0)=0A-= #define ACPI_DUMP_RESOURCE_LIST(a) do { } while(0)=0A-#define = ACPI_DUMP_BUFFER(a,b) do { } while(0)=0A #define ACPI_DEBUG_PRINT= (pl) do { } while(0)=0A #define ACPI_DEBUG_PRINT_RAW(pl) do = { } while(0)=0A =0A@@ -652,56 +633,4 @@=0A =0A #endif=0A =0A-/*=0A- * Some = code only gets executed when the debugger is built in.=0A- * Note that = this is entirely independent of whether the=0A- * DEBUG_PRINT stuff (set = by ACPI_DEBUG_OUTPUT) is on, or not.=0A- */=0A-#ifdef ACPI_DEBUGGER=0A-#def= ine ACPI_DEBUGGER_EXEC(a) a=0A-#else=0A-#define ACPI_DEBUGGER_EXE= C(a)=0A-#endif=0A-=0A-#ifdef ACPI_DEBUG_OUTPUT=0A-/*=0A- * 1) Set name to = blanks=0A- * 2) Copy the object name=0A- */=0A-#define ACPI_ADD_OBJECT_NAME= (a,b) ACPI_MEMSET (a->common.name, ' ', sizeof (a->common.name));\=0A= - = ACPI_STRNCPY (a->common.name, acpi_gbl_ns_type_names[b], sizeof (a->common.= name))=0A-#else=0A-=0A-#define ACPI_ADD_OBJECT_NAME(a,b)=0A-#endif=0A-=0A-/= *=0A- * Memory allocation tracking (DEBUG ONLY)=0A- */=0A-#ifndef = ACPI_DBG_TRACK_ALLOCATIONS=0A-=0A-/* Memory allocation */=0A-=0A-#ifndef = ACPI_ALLOCATE=0A-#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi= _size)(a),_COMPONENT,_acpi_module_name,__LINE__)=0A-#endif=0A-#ifndef = ACPI_ALLOCATE_ZEROED=0A-#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocat= e_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)=0A-#endif= =0A-#ifndef ACPI_FREE=0A-#define ACPI_FREE(a) acpio_os_free(= a)=0A-#endif=0A-#define ACPI_MEM_TRACKING(a)=0A-=0A-#else=0A-=0A-/* Memory = allocation */=0A-=0A-#define ACPI_ALLOCATE(a) acpi_ut_allocate_a= nd_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)=0A-#define = ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed_and_track((acpi_size)(a= ), _COMPONENT,_acpi_module_name,__LINE__)=0A-#define ACPI_FREE(a) = acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__)=0A-#d= efine ACPI_MEM_TRACKING(a) a=0A-=0A-#endif = /* ACPI_DBG_TRACK_ALLOCATIONS */=0A-=0A #endif /* = ACMACROS_H */=0A--- 2011-02-10.orig/xen/include/acpi/acnamesp.h=0A+++ = /dev/null=0A@@ -1,305 +0,0 @@=0A-/*****************************************= *************************************=0A- *=0A- * Name: acnamesp.h - = Namespace subcomponent prototypes and defines=0A- *=0A- *******************= **********************************************************/=0A-=0A-/*=0A- = * Copyright (C) 2000 - 2008, Intel Corp.=0A- * All rights reserved.=0A- = *=0A- * Redistribution and use in source and binary forms, with or = without=0A- * modification, are permitted provided that the following = conditions=0A- * are met:=0A- * 1. Redistributions of source code must = retain the above copyright=0A- * notice, this list of conditions, and = the following disclaimer,=0A- * without modification.=0A- * 2. = Redistributions in binary form must reproduce at minimum a disclaimer=0A- = * substantially similar to the "NO WARRANTY" disclaimer below=0A- * = ("Disclaimer") and any redistribution must be conditioned upon=0A- * = including a substantially similar Disclaimer requirement for further=0A- * = binary redistribution.=0A- * 3. Neither the names of the above-listed = copyright holders nor the names=0A- * of any contributors may be used = to endorse or promote products derived=0A- * from this software without = specific prior written permission.=0A- *=0A- * Alternatively, this = software may be distributed under the terms of the=0A- * GNU General = Public License ("GPL") version 2 as published by the Free=0A- * Software = Foundation.=0A- *=0A- * NO WARRANTY=0A- * THIS SOFTWARE IS PROVIDED BY THE = COPYRIGHT HOLDERS AND CONTRIBUTORS=0A- * "AS IS" AND ANY EXPRESS OR = IMPLIED WARRANTIES, INCLUDING, BUT NOT=0A- * LIMITED TO, THE IMPLIED = WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR=0A- * A PARTICULAR PURPOSE = ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT=0A- * HOLDERS OR CONTRIBUTO= RS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL=0A- * DAMAGES = (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS=0A- * OR = SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0A- * = HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,=0A- * = STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING=0A- = * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE=0A- * = POSSIBILITY OF SUCH DAMAGES.=0A- */=0A-=0A-#ifndef __ACNAMESP_H__=0A-#defin= e __ACNAMESP_H__=0A-=0A-/* To search the entire name space, pass this as = search_base */=0A-=0A-#define ACPI_NS_ALL ((acpi_handle)0)= =0A-=0A-/*=0A- * Elements of acpi_ns_properties are bit significant=0A- * = and should be one-to-one with values of acpi_object_type=0A- */=0A-#define = ACPI_NS_NORMAL 0=0A-#define ACPI_NS_NEWSCOPE 1 /* = a definition of this type opens a name scope */=0A-#define ACPI_NS_LOCAL = 2 /* suppress search of enclosing scopes */=0A-=0A-/* Flags = for acpi_ns_lookup, acpi_ns_search_and_enter */=0A-=0A-#define ACPI_NS_NO_U= PSEARCH 0=0A-#define ACPI_NS_SEARCH_PARENT 0x01=0A-#define = ACPI_NS_DONT_OPEN_SCOPE 0x02=0A-#define ACPI_NS_NO_PEER_SEARCH = 0x04=0A-#define ACPI_NS_ERROR_IF_FOUND 0x08=0A-#define ACPI_NS_PREFIX_= IS_SCOPE 0x10=0A-#define ACPI_NS_EXTERNAL 0x20=0A-#define = ACPI_NS_TEMPORARY 0x40=0A-=0A-/* Flags for acpi_ns_walk_namespace= */=0A-=0A-#define ACPI_NS_WALK_NO_UNLOCK 0=0A-#define ACPI_NS_WALK_UN= LOCK 0x01=0A-#define ACPI_NS_WALK_TEMP_NODES 0x02=0A-=0A-/*=0A-= * nsinit - Namespace initialization=0A- */=0A-acpi_status acpi_ns_initiali= ze_objects(void);=0A-=0A-acpi_status acpi_ns_initialize_devices(void);=0A-= =0A-/*=0A- * nsload - Namespace loading=0A- */=0A-acpi_status acpi_ns_load= _namespace(void);=0A-=0A-acpi_status=0A-acpi_ns_load_table(acpi_native_uint= table_index,=0A- struct acpi_namespace_node *node);=0A-= =0A-/*=0A- * nswalk - walk the namespace=0A- */=0A-acpi_status=0A-acpi_ns_w= alk_namespace(acpi_object_type type,=0A- acpi_handle = start_object,=0A- u32 max_depth,=0A- = u32 flags,=0A- acpi_walk_callback user_function,=0A= - void *context, void **return_value);=0A-=0A-struct = acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, struct = acpi_namespace_node=0A- *parent, = struct acpi_namespace_node=0A- = *child);=0A-=0A-/*=0A- * nsparse - table parsing=0A- */=0A-acpi_status=0A-a= cpi_ns_parse_table(acpi_native_uint table_index,=0A- struct = acpi_namespace_node *start_node);=0A-=0A-acpi_status=0A-acpi_ns_one_complet= e_parse(acpi_native_uint pass_number,=0A- = acpi_native_uint table_index,=0A- struct = acpi_namespace_node *start_node);=0A-=0A-/*=0A- * nsaccess - Top-level = namespace access=0A- */=0A-acpi_status acpi_ns_root_initialize(void);=0A-= =0A-acpi_status=0A-acpi_ns_lookup(union acpi_generic_state *scope_info,=0A-= char *name,=0A- acpi_object_type type,=0A- = acpi_interpreter_mode interpreter_mode,=0A- u32 flags,=0A- = struct acpi_walk_state *walk_state,=0A- struct acpi_namespac= e_node **ret_node);=0A-=0A-/*=0A- * nsalloc - Named object allocation/deall= ocation=0A- */=0A-struct acpi_namespace_node *acpi_ns_create_node(u32 = name);=0A-=0A-void acpi_ns_delete_node(struct acpi_namespace_node = *node);=0A-=0A-void=0A-acpi_ns_delete_namespace_subtree(struct acpi_namespa= ce_node *parent_handle);=0A-=0A-void acpi_ns_delete_namespace_by_owner(acpi= _owner_id owner_id);=0A-=0A-void acpi_ns_detach_object(struct acpi_namespac= e_node *node);=0A-=0A-void acpi_ns_delete_children(struct acpi_namespace_no= de *parent);=0A-=0A-int acpi_ns_compare_names(char *name1, char *name2);=0A= -=0A-/*=0A- * nsdump - Namespace dump/print utilities=0A- */=0A-#ifdef = ACPI_FUTURE_USAGE=0A-void acpi_ns_dump_tables(acpi_handle search_base, u32 = max_depth);=0A-#endif /* ACPI_FUTURE_USAGE = */=0A-=0A-void acpi_ns_dump_entry(acpi_handle handle, u32 debug_level);=0A-= =0A-void=0A-acpi_ns_dump_pathname(acpi_handle handle, char *msg, u32 = level, u32 component);=0A-=0A-void acpi_ns_print_pathname(u32 num_segments,= char *pathname);=0A-=0A-acpi_status=0A-acpi_ns_dump_one_object(acpi_handle= obj_handle,=0A- u32 level, void *context, void = **return_value);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-void=0A-acpi_ns_dump_o= bjects(acpi_object_type type,=0A- u8 display_type,=0A- = u32 max_depth,=0A- acpi_owner_id owner_id, = acpi_handle start_handle);=0A-#endif /* = ACPI_FUTURE_USAGE */=0A-=0A-/*=0A- * nseval - Namespace evaluation = functions=0A- */=0A-acpi_status acpi_ns_evaluate(struct acpi_evaluate_info = *info);=0A-=0A-/*=0A- * nsnames - Name and Scope manipulation=0A- = */=0A-u32 acpi_ns_opens_scope(acpi_object_type type);=0A-=0A-void=0A-acpi_n= s_build_external_path(struct acpi_namespace_node *node,=0A- = acpi_size size, char *name_buffer);=0A-=0A-char *acpi_ns_get_external_p= athname(struct acpi_namespace_node *node);=0A-=0A-char *acpi_ns_name_of_cur= rent_scope(struct acpi_walk_state *walk_state);=0A-=0A-acpi_status=0A-acpi_= ns_handle_to_pathname(acpi_handle target_handle,=0A- = struct acpi_buffer *buffer);=0A-=0A-u8=0A-acpi_ns_pattern_match(struct = acpi_namespace_node *obj_node, char *search_for);=0A-=0A-acpi_status=0A-acp= i_ns_get_node(struct acpi_namespace_node *prefix_node,=0A- = char *external_pathname,=0A- u32 flags, struct acpi_namespace_n= ode **out_node);=0A-=0A-acpi_size acpi_ns_get_pathname_length(struct = acpi_namespace_node *node);=0A-=0A-/*=0A- * nsobject - Object management = for namespace nodes=0A- */=0A-acpi_status=0A-acpi_ns_attach_object(struct = acpi_namespace_node *node,=0A- union acpi_operand_object = *object, acpi_object_type type);=0A-=0A-union acpi_operand_object = *acpi_ns_get_attached_object(struct=0A- = acpi_namespace_node=0A- = *node);=0A-=0A-union acpi_operand_object *acpi_ns_get_secondary_object(= union=0A- acpi_operan= d_object=0A- *obj_desc);= =0A-=0A-acpi_status=0A-acpi_ns_attach_data(struct acpi_namespace_node = *node,=0A- acpi_object_handler handler, void *data);=0A-= =0A-acpi_status=0A-acpi_ns_detach_data(struct acpi_namespace_node = *node,=0A- acpi_object_handler handler);=0A-=0A-acpi_statu= s=0A-acpi_ns_get_attached_data(struct acpi_namespace_node *node,=0A- = acpi_object_handler handler, void **data);=0A-=0A-/*=0A- * = nssearch - Namespace searching and entry=0A- */=0A-acpi_status=0A-acpi_ns_s= earch_and_enter(u32 entry_name,=0A- struct acpi_walk_s= tate *walk_state,=0A- struct acpi_namespace_node = *node,=0A- acpi_interpreter_mode interpreter_mode,=0A= - acpi_object_type type,=0A- = u32 flags, struct acpi_namespace_node **ret_node);=0A-=0A-acpi_status=0A-ac= pi_ns_search_one_scope(u32 entry_name,=0A- struct = acpi_namespace_node *node,=0A- acpi_object_type = type,=0A- struct acpi_namespace_node **ret_node);=0A= -=0A-void=0A-acpi_ns_install_node(struct acpi_walk_state *walk_state,=0A- = struct acpi_namespace_node *parent_node,=0A- = struct acpi_namespace_node *node, acpi_object_type type);=0A-=0A-/*=0A- = * nsutils - Utility functions=0A- */=0A-u8 acpi_ns_valid_root_prefix(char = prefix);=0A-=0A-acpi_object_type acpi_ns_get_type(struct acpi_namespace_nod= e *node);=0A-=0A-u32 acpi_ns_local(acpi_object_type type);=0A-=0A-void=0A-a= cpi_ns_report_error(char *module_name,=0A- u32 line_numbe= r,=0A- char *internal_name, acpi_status lookup_status);=0A-= =0A-void=0A-acpi_ns_report_method_error(char *module_name,=0A- = u32 line_number,=0A- char *message,=0A- = struct acpi_namespace_node *node,=0A- = char *path, acpi_status lookup_status);=0A-=0A-void acpi_ns_print_node_pat= hname(struct acpi_namespace_node *node, char *msg);=0A-=0A-acpi_status = acpi_ns_build_internal_name(struct acpi_namestring_info *info);=0A-=0A-void= acpi_ns_get_internal_name_length(struct acpi_namestring_info *info);=0A-= =0A-acpi_status acpi_ns_internalize_name(char *dotted_name, char **converte= d_name);=0A-=0A-acpi_status=0A-acpi_ns_externalize_name(u32 internal_name_l= ength,=0A- char *internal_name,=0A- = u32 * converted_name_length, char **converted_name);=0A-=0A-struct = acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle);=0A-=0A= -acpi_handle acpi_ns_convert_entry_to_handle(struct acpi_namespace_node = *node);=0A-=0A-void acpi_ns_terminate(void);=0A-=0A-struct acpi_namespace_n= ode *acpi_ns_get_parent_node(struct acpi_namespace_node=0A- = *node);=0A-=0A-struct acpi_namespace_node = *acpi_ns_get_next_valid_node(struct=0A- = acpi_namespace_node=0A- = *node);=0A-=0A-#endif /* __ACNAMESP_H__ */=0A--- = 2011-02-10.orig/xen/include/acpi/acobject.h=0A+++ /dev/null=0A@@ -1,422 = +0,0 @@=0A-=0A-/***********************************************************= *******************=0A- *=0A- * Name: acobject.h - Definition of union = acpi_operand_object (Internal object only)=0A- *=0A- *********************= ********************************************************/=0A-=0A-/*=0A- * = Copyright (C) 2000 - 2007, R. Byron Moore=0A- * All rights reserved.=0A- = *=0A- * Redistribution and use in source and binary forms, with or = without=0A- * modification, are permitted provided that the following = conditions=0A- * are met:=0A- * 1. Redistributions of source code must = retain the above copyright=0A- * notice, this list of conditions, and = the following disclaimer,=0A- * without modification.=0A- * 2. = Redistributions in binary form must reproduce at minimum a disclaimer=0A- = * substantially similar to the "NO WARRANTY" disclaimer below=0A- * = ("Disclaimer") and any redistribution must be conditioned upon=0A- * = including a substantially similar Disclaimer requirement for further=0A- * = binary redistribution.=0A- * 3. Neither the names of the above-listed = copyright holders nor the names=0A- * of any contributors may be used = to endorse or promote products derived=0A- * from this software without = specific prior written permission.=0A- *=0A- * Alternatively, this = software may be distributed under the terms of the=0A- * GNU General = Public License ("GPL") version 2 as published by the Free=0A- * Software = Foundation.=0A- *=0A- * NO WARRANTY=0A- * THIS SOFTWARE IS PROVIDED BY THE = COPYRIGHT HOLDERS AND CONTRIBUTORS=0A- * "AS IS" AND ANY EXPRESS OR = IMPLIED WARRANTIES, INCLUDING, BUT NOT=0A- * LIMITED TO, THE IMPLIED = WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR=0A- * A PARTICULAR PURPOSE = ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT=0A- * HOLDERS OR CONTRIBUTO= RS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL=0A- * DAMAGES = (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS=0A- * OR = SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0A- * = HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,=0A- * = STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING=0A- = * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE=0A- * = POSSIBILITY OF SUCH DAMAGES.=0A- */=0A-=0A-#ifndef _ACOBJECT_H=0A-#define = _ACOBJECT_H=0A-=0A-/* acpisrc:struct_defs -- for acpisrc conversion = */=0A-=0A-/*=0A- * The union acpi_operand_object is used to pass AML = operands from the dispatcher=0A- * to the interpreter, and to keep track = of the various handlers such as=0A- * address space handlers and notify = handlers. The object is a constant=0A- * size in order to allow it to be = cached and reused.=0A- *=0A- * Note: The object is optimized to be aligned = and will not work if it is=0A- * byte-packed.=0A- */=0A-#if ACPI_MACHINE_WI= DTH =3D=3D 64=0A-#pragma pack(8)=0A-#else=0A-#pragma pack(4)=0A-#endif=0A-= =0A-/**********************************************************************= *********=0A- *=0A- * Common Descriptors=0A- *=0A- ************************= ******************************************************/=0A-=0A-/*=0A- * = Common area for all objects.=0A- *=0A- * descriptor_type is used to = differentiate between internal descriptors, and=0A- * must be in the same = place across all descriptors=0A- *=0A- * Note: The descriptor_type and = Type fields must appear in the identical=0A- * position in both the struct = acpi_namespace_node and union acpi_operand_object=0A- * structures.=0A- = */=0A-#define ACPI_OBJECT_COMMON_HEADER \=0A- union acpi_operand_object = *next_object; /* Objects linked to parent NS node */\=0A- u8 = descriptor_type; /* To differentiate = various internal objs */\=0A- u8 type; = /* acpi_object_type */\=0A- u16 = reference_count; /* For object deletion management */\=0A- u8 = flags;=0A- /*=0A- * Note: There are 3 bytes = available here before the=0A- * next natural alignment boundary (for = both 32/64 cases)=0A- */=0A-=0A-/* Values for Flag byte above */=0A-=0A-= #define AOPOBJ_AML_CONSTANT 0x01=0A-#define AOPOBJ_STATIC_POINTER = 0x02=0A-#define AOPOBJ_DATA_VALID 0x04=0A-#define AOPOBJ_OBJ= ECT_INITIALIZED 0x08=0A-#define AOPOBJ_SETUP_COMPLETE 0x10=0A-#defi= ne AOPOBJ_SINGLE_DATUM 0x20=0A-#define AOPOBJ_INVALID = 0x40 /* Used if host OS won't allow an op_region address */=0A-=0A-/****= **************************************************************************= =0A- *=0A- * Basic data types=0A- *=0A- ***********************************= ******************************************/=0A-=0A-struct acpi_object_commo= n {=0A-ACPI_OBJECT_COMMON_HEADER};=0A-=0A-struct acpi_object_integer {=0A- = ACPI_OBJECT_COMMON_HEADER u8 fill[3]; /* Prevent warning on some = compilers */=0A- acpi_integer value;=0A-};=0A-=0A-/*=0A- * Note: = The String and Buffer object must be identical through the Pointer=0A- * = and length elements. There is code that depends on this.=0A- *=0A- * = Fields common to both Strings and Buffers=0A- */=0A-#define ACPI_COMMON_BUF= FER_INFO(_type) \=0A- _type *pointer; \=0A- = u32 length;=0A-=0A-struct acpi_object_string { = /* Null terminated, ASCII characters only */=0A- ACPI_OBJECT_COMMON_= HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or = allocated string */=0A-};=0A-=0A-struct acpi_object_buffer {=0A- = ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(u8) /* Buffer in AML = stream or allocated buffer */=0A- u32 aml_length;=0A- u8 = *aml_start;=0A- struct acpi_namespace_node *node; /* Link back to = parent node */=0A-};=0A-=0A-struct acpi_object_package {=0A- ACPI_OBJECT= _COMMON_HEADER struct acpi_namespace_node *node; /* Link back to = parent node */=0A- union acpi_operand_object **elements; /* Array = of pointers to acpi_objects */=0A- u8 *aml_start;=0A- u32 = aml_length;=0A- u32 count; /* # of elements in package = */=0A-};=0A-=0A-/**********************************************************= ********************=0A- *=0A- * Complex data types=0A- *=0A- *************= ****************************************************************/=0A-=0A-st= ruct acpi_object_event {=0A- ACPI_OBJECT_COMMON_HEADER acpi_semaphore = os_semaphore; /* Actual OS synchronization object */=0A-};=0A-=0A-struct = acpi_object_mutex {=0A- ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* = 0-15, specified in Mutex() call */=0A- u16 acquisition_depth; /* Allow = multiple Acquires, same thread */=0A- struct acpi_thread_state *owner_thr= ead; /* Current owner of the mutex */=0A- acpi_mutex os_mutex; /* = Actual OS synchronization object */=0A- union acpi_operand_object *prev; = /* Link for list of acquired mutexes */=0A- union acpi_operand_object = *next; /* Link for list of acquired mutexes */=0A- struct acpi_namespa= ce_node *node; /* Containing namespace node */=0A- u8 original_sync_le= vel; /* Owner's original sync level (0-15) */=0A-};=0A-=0A-struct = acpi_object_region {=0A- ACPI_OBJECT_COMMON_HEADER u8 space_id;=0A- = struct acpi_namespace_node *node; /* Containing namespace node = */=0A- union acpi_operand_object *handler; /* Handler for region = access */=0A- union acpi_operand_object *next;=0A- acpi_physical_addre= ss address;=0A- u32 length;=0A-};=0A-=0A-struct acpi_object_method {=0A- = ACPI_OBJECT_COMMON_HEADER u8 method_flags;=0A- u8 param_count;=0A- u8 = sync_level;=0A- union acpi_operand_object *mutex;=0A- u8 *aml_start;=0A- = ACPI_INTERNAL_METHOD implementation;=0A- u32 aml_length;=0A- u8 = thread_count;=0A- acpi_owner_id owner_id;=0A-};=0A-=0A-/*************= *****************************************************************=0A- = *=0A- * Objects that can be notified. All share a common notify_info = area.=0A- *=0A- ***********************************************************= ******************/=0A-=0A-/*=0A- * Common fields for objects that support = ASL notifications=0A- */=0A-#define ACPI_COMMON_NOTIFY_INFO \=0A- = union acpi_operand_object *system_notify; /* Handler for system = notifies */\=0A- union acpi_operand_object *device_notify; = /* Handler for driver notifies */\=0A- union acpi_operand_object = *handler; /* Handler for Address space */=0A-=0A-struct acpi_object_n= otify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL = */=0A-ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};=0A-=0A-struct = acpi_object_device {=0A- ACPI_OBJECT_COMMON_HEADER=0A- = ACPI_COMMON_NOTIFY_INFO struct acpi_gpe_block_info *gpe_block;=0A-};=0A-=0A= -struct acpi_object_power_resource {=0A- ACPI_OBJECT_COMMON_HEADER = ACPI_COMMON_NOTIFY_INFO u32 system_level;=0A- u32 resource_order;=0A-};= =0A-=0A-struct acpi_object_processor {=0A- ACPI_OBJECT_COMMON_HEADER= =0A- /* The next two fields take advantage of the 3-byte space = before NOTIFY_INFO */=0A- u8 proc_id;=0A- u8 length;=0A- ACPI_COMMON= _NOTIFY_INFO acpi_io_address address;=0A-};=0A-=0A-struct acpi_object_therm= al_zone {=0A-ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};=0A-=0A-/**= ***************************************************************************= *=0A- *=0A- * Fields. All share a common header/info field.=0A- *=0A- = ***************************************************************************= **/=0A-=0A-/*=0A- * Common bitfield for the field objects=0A- * "Field = Datum" -- a datum from the actual field object=0A- * "Buffer Datum" -- a = datum from a user buffer, read from or to be written to the field=0A- = */=0A-#define ACPI_COMMON_FIELD_INFO \=0A- u8 = field_flags; /* Access, update, and lock bits */\=0A- u8 = attribute; /* From access_as keyword = */\=0A- u8 access_byte_width; /* Read/Write = size in bytes */\=0A- struct acpi_namespace_node *node; = /* Link back to parent node */\=0A- u32 = bit_length; /* Length of field in bits */\=0A- u32 = base_byte_offset; /* Byte offset within containing object = */\=0A- u32 value; /* Value to = store into the Bank or Index register */\=0A- u8 = start_field_bit_offset;/* Bit offset within first field datum (0-63) = */\=0A- u8 access_bit_width; /* = Read/Write size in bits (8-64) */=0A-=0A-struct acpi_object_field_common { = /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */=0A- = ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object = *region_obj; /* Parent Operation Region object (REGION/BANK fields = only) */=0A-};=0A-=0A-struct acpi_object_region_field {=0A- ACPI_OBJECT= _COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj= ; /* Containing op_region object */=0A-};=0A-=0A-struct acpi_object_b= ank_field {=0A- ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union = acpi_operand_object *region_obj; /* Containing op_region object = */=0A- union acpi_operand_object *bank_obj; /* bank_select Register = object */=0A-};=0A-=0A-struct acpi_object_index_field {=0A- ACPI_OBJECT= _COMMON_HEADER ACPI_COMMON_FIELD_INFO=0A- /*=0A- * No = "RegionObj" pointer needed since the Index and Data registers=0A- = * are each field definitions unto themselves.=0A- */=0A- = union acpi_operand_object *index_obj; /* Index register */=0A- = union acpi_operand_object *data_obj; /* Data register */=0A-};=0A-=0A-/*= The buffer_field is different in that it is part of a Buffer, not an = op_region */=0A-=0A-struct acpi_object_buffer_field {=0A- ACPI_OBJECT= _COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *buffer_obj= ; /* Containing Buffer object */=0A-};=0A-=0A-/**********************= ********************************************************=0A- *=0A- * = Objects for handlers=0A- *=0A- ********************************************= *********************************/=0A-=0A-struct acpi_object_notify_handler= {=0A- ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* = Parent device */=0A- acpi_notify_handler handler;=0A- void = *context;=0A-};=0A-=0A-struct acpi_object_addr_handler {=0A- ACPI_OBJECT= _COMMON_HEADER u8 space_id;=0A- u8 handler_flags;=0A- acpi_adr_space_hand= ler handler;=0A- struct acpi_namespace_node *node; /* Parent = device */=0A- void *context;=0A- acpi_adr_space_setup setup;=0A- = union acpi_operand_object *region_list; /* regions using this handler = */=0A- union acpi_operand_object *next;=0A-};=0A-=0A-/* Flags for address = handler (handler_flags) */=0A-=0A-#define ACPI_ADDR_HANDLER_DEFAULT_INSTALL= ED 0x01=0A-=0A-/**********************************************************= ********************=0A- *=0A- * Special internal objects=0A- *=0A- = ***************************************************************************= **/=0A-=0A-/*=0A- * The Reference object type is used for these opcodes:=0A= - * Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, = debug_op=0A- */=0A-struct acpi_object_reference {=0A- ACPI_OBJECT_COMMON_= HEADER u8 target_type; /* Used for index_op */=0A- u16 opcode;=0A- = void *object; /* name_op=3D>HANDLE to obj, index_op=3D>union = acpi_operand_object */=0A- struct acpi_namespace_node *node;=0A- = union acpi_operand_object **where;=0A- u32 offset; /* Used = for arg_op, local_op, and index_op */=0A-};=0A-=0A-/*=0A- * Extra object = is used as additional storage for types that=0A- * have AML code in their = declarations (term_args) that must be=0A- * evaluated at run time.=0A- = *=0A- * Currently: Region and field_unit types=0A- */=0A-struct acpi_object= _extra {=0A- ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node = *method_REG; /* _REG method for this region (if any) */=0A- void = *region_context; /* Region-specific data */=0A- u8 *aml_start;=0A- = u32 aml_length;=0A-};=0A-=0A-/* Additional data that can be attached to = namespace nodes */=0A-=0A-struct acpi_object_data {=0A- ACPI_OBJECT_COMMON_= HEADER acpi_object_handler handler;=0A- void *pointer;=0A-};=0A-=0A-/* = Structure used when objects are cached for reuse */=0A-=0A-struct = acpi_object_cache_list {=0A- ACPI_OBJECT_COMMON_HEADER union acpi_operan= d_object *next; /* Link for object cache and internal lists */=0A-};=0A-=0A= -/*************************************************************************= *****=0A- *=0A- * union acpi_operand_object Descriptor - a giant union of = all of the above=0A- *=0A- ************************************************= *****************************/=0A-=0A-union acpi_operand_object {=0A- = struct acpi_object_common common;=0A- struct acpi_object_integer = integer;=0A- struct acpi_object_string string;=0A- struct acpi_object_= buffer buffer;=0A- struct acpi_object_package package;=0A- struct = acpi_object_event event;=0A- struct acpi_object_method method;=0A- = struct acpi_object_mutex mutex;=0A- struct acpi_object_region = region;=0A- struct acpi_object_notify_common common_notify;=0A- = struct acpi_object_device device;=0A- struct acpi_object_power_resource = power_resource;=0A- struct acpi_object_processor processor;=0A- = struct acpi_object_thermal_zone thermal_zone;=0A- struct acpi_object_= field_common common_field;=0A- struct acpi_object_region_field field;=0A- = struct acpi_object_buffer_field buffer_field;=0A- struct acpi_object_= bank_field bank_field;=0A- struct acpi_object_index_field index_field;= =0A- struct acpi_object_notify_handler notify;=0A- struct acpi_object_= addr_handler address_space;=0A- struct acpi_object_reference reference;=0A-= struct acpi_object_extra extra;=0A- struct acpi_object_data = data;=0A- struct acpi_object_cache_list cache;=0A-};=0A-=0A-/********= **********************************************************************=0A- = *=0A- * union acpi_descriptor - objects that share a common descriptor = identifier=0A- *=0A- ******************************************************= ***********************/=0A-=0A-/* Object descriptor types */=0A-=0A-#defin= e ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached = */=0A-#define ACPI_DESC_TYPE_STATE 0x02=0A-#define ACPI_DESC_TYP= E_STATE_UPDATE 0x03=0A-#define ACPI_DESC_TYPE_STATE_PACKAGE = 0x04=0A-#define ACPI_DESC_TYPE_STATE_CONTROL 0x05=0A-#define ACPI_DESC_T= YPE_STATE_RPSCOPE 0x06=0A-#define ACPI_DESC_TYPE_STATE_PSCOPE = 0x07=0A-#define ACPI_DESC_TYPE_STATE_WSCOPE 0x08=0A-#define ACPI_DESC_T= YPE_STATE_RESULT 0x09=0A-#define ACPI_DESC_TYPE_STATE_NOTIFY = 0x0A=0A-#define ACPI_DESC_TYPE_STATE_THREAD 0x0B=0A-#define ACPI_DESC_T= YPE_WALK 0x0C=0A-#define ACPI_DESC_TYPE_PARSER = 0x0D=0A-#define ACPI_DESC_TYPE_OPERAND 0x0E=0A-#define ACPI_DESC_T= YPE_NAMED 0x0F=0A-#define ACPI_DESC_TYPE_MAX = 0x0F=0A-=0A-struct acpi_common_descriptor {=0A- void *common_pointer;=0A- = u8 descriptor_type; /* To differentiate various internal objs = */=0A-};=0A-=0A-union acpi_descriptor {=0A- struct acpi_common_descript= or common;=0A- union acpi_operand_object object;=0A- struct acpi_namespa= ce_node node;=0A- union acpi_parse_object op;=0A-};=0A-=0A-#pragma = pack()=0A-=0A-#endif /* _ACOBJECT_H */=0A--- = 2011-02-10.orig/xen/include/acpi/acpi.h=0A+++ 2011-02-10/xen/include/acpi/a= cpi.h=0A@@ -44,6 +44,8 @@=0A #ifndef __ACPI_H__=0A #define __ACPI_H__=0A = =0A+#define PREFIX "ACPI: "=0A+=0A /*=0A * Common = includes for all ACPI driver files=0A * We put them here because we don't = want to duplicate them=0A@@ -60,8 +62,6 @@=0A #include "acoutput.h" = /* Error output and Debug macros */=0A #include "acpiosxf.h" /* = Interfaces to the ACPI-to-OS layer */=0A #include "acpixf.h" /* = ACPI core subsystem external interfaces */=0A-#include "acobject.h" = /* ACPI internal object */=0A-#include "acstruct.h" /* Common = structures */=0A #include "acglobal.h" /* All global variables = */=0A #include "achware.h" /* Hardware defines and interfaces = */=0A #include "acutils.h" /* Utility interfaces */=0A--- = 2011-02-10.orig/xen/include/acpi/acpi_bus.h=0A+++ /dev/null=0A@@ -1,389 = +0,0 @@=0A-/*=0A- * acpi_bus.h - ACPI Bus Driver ($Revision: 22 $)=0A- = *=0A- * Copyright (C) 2001, 2002 Andy Grover =0A-= * Copyright (C) 2001, 2002 Paul Diefenbaugh =0A- *=0A- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~=0A- *=0A- * This program is free software; you can = redistribute it and/or modify=0A- * it under the terms of the GNU General = Public License as published by=0A- * the Free Software Foundation; either = version 2 of the License, or (at=0A- * your option) any later version.=0A-= *=0A- * This program is distributed in the hope that it will be useful, = but=0A- * WITHOUT ANY WARRANTY; without even the implied warranty of=0A- = * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU=0A- * = General Public License for more details.=0A- *=0A- * You should have = received a copy of the GNU General Public License along=0A- * with this = program; if not, write to the Free Software Foundation, Inc.,=0A- * 59 = Temple Place, Suite 330, Boston, MA 02111-1307 USA.=0A- *=0A- * ~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=0A- = */=0A-=0A-#ifndef __ACPI_BUS_H__=0A-#define __ACPI_BUS_H__=0A-=0A-#include = =0A-=0A-#define PREFIX "ACPI: "=0A-=0A-/* = TBD: Make dynamic */=0A-#define ACPI_MAX_HANDLES 10=0A-struct = acpi_handle_list {=0A- u32 count;=0A- acpi_handle handles[ACPI_MAX_HANDLE= S];=0A-};=0A-=0A-/* acpi_utils.h */=0A-acpi_status=0A-acpi_extract_package(= union acpi_object *package,=0A- struct acpi_buffer *format, = struct acpi_buffer *buffer);=0A-acpi_status=0A-acpi_evaluate_integer(acpi_h= andle handle,=0A- acpi_string pathname,=0A- = struct acpi_object_list *arguments, unsigned long *data);=0A-acpi_status= =0A-acpi_evaluate_reference(acpi_handle handle,=0A- = acpi_string pathname,=0A- struct acpi_object_list = *arguments,=0A- struct acpi_handle_list *list);=0A-=0A-#if = 0//def CONFIG_ACPI=0A-=0A-#include =0A-=0A-#define = ACPI_BUS_FILE_ROOT "acpi"=0A-extern struct proc_dir_entry *acpi_root_d= ir;=0A-=0A-enum acpi_bus_removal_type {=0A- ACPI_BUS_REMOVAL_NORMAL = =3D 0,=0A- ACPI_BUS_REMOVAL_EJECT,=0A- ACPI_BUS_REMOVAL_SUPRISE,= =0A- ACPI_BUS_REMOVAL_TYPE_COUNT=0A-};=0A-=0A-enum acpi_bus_device_type = {=0A- ACPI_BUS_TYPE_DEVICE =3D 0,=0A- ACPI_BUS_TYPE_POWER,=0A- = ACPI_BUS_TYPE_PROCESSOR,=0A- ACPI_BUS_TYPE_THERMAL,=0A- ACPI_BUS_TY= PE_SYSTEM,=0A- ACPI_BUS_TYPE_POWER_BUTTON,=0A- ACPI_BUS_TYPE_SLEEP_BUTTON,= =0A- ACPI_BUS_DEVICE_TYPE_COUNT=0A-};=0A-=0A-struct acpi_driver;=0A-stru= ct acpi_device;=0A-=0A-/*=0A- * ACPI Driver=0A- * -----------=0A- = */=0A-=0A-typedef int (*acpi_op_add) (struct acpi_device * device);=0A-type= def int (*acpi_op_remove) (struct acpi_device * device, int type);=0A-typed= ef int (*acpi_op_lock) (struct acpi_device * device, int type);=0A-typedef = int (*acpi_op_start) (struct acpi_device * device);=0A-typedef int = (*acpi_op_stop) (struct acpi_device * device, int type);=0A-typedef int = (*acpi_op_suspend) (struct acpi_device * device,=0A- = pm_message_t state);=0A-typedef int (*acpi_op_resume) (struct acpi_device = * device);=0A-typedef int (*acpi_op_scan) (struct acpi_device * device);=0A= -typedef int (*acpi_op_bind) (struct acpi_device * device);=0A-typedef int = (*acpi_op_unbind) (struct acpi_device * device);=0A-typedef int (*acpi_op_s= hutdown) (struct acpi_device * device);=0A-=0A-struct acpi_bus_ops {=0A- = u32 acpi_op_add:1;=0A- u32 acpi_op_remove:1;=0A- u32 acpi_op_lock:1;= =0A- u32 acpi_op_start:1;=0A- u32 acpi_op_stop:1;=0A- u32 = acpi_op_suspend:1;=0A- u32 acpi_op_resume:1;=0A- u32 acpi_op_scan:1;= =0A- u32 acpi_op_bind:1;=0A- u32 acpi_op_unbind:1;=0A- u32 = acpi_op_shutdown:1;=0A- u32 reserved:21;=0A-};=0A-=0A-struct acpi_device_op= s {=0A- acpi_op_add add;=0A- acpi_op_remove remove;=0A- acpi_op_loc= k lock;=0A- acpi_op_start start;=0A- acpi_op_stop stop;=0A- = acpi_op_suspend suspend;=0A- acpi_op_resume resume;=0A- acpi_op_sca= n scan;=0A- acpi_op_bind bind;=0A- acpi_op_unbind unbind;=0A- = acpi_op_shutdown shutdown;=0A-};=0A-=0A-struct acpi_driver {=0A- = char name[80];=0A- char class[80];=0A- const struct acpi_device_id= *ids; /* Supported Hardware IDs */=0A- struct acpi_device_ops ops;=0A- = struct device_driver drv;=0A- struct module *owner;=0A-};=0A-=0A-/*=0A- = * ACPI Device=0A- * -----------=0A- */=0A-=0A-/* Status (_STA) */=0A-=0A-st= ruct acpi_device_status {=0A- u32 present:1;=0A- u32 enabled:1;=0A- = u32 show_in_ui:1;=0A- u32 functional:1;=0A- u32 battery_present:1;=0A- = u32 reserved:27;=0A-};=0A-=0A-/* Flags */=0A-=0A-struct acpi_device_flags = {=0A- u32 dynamic_status:1;=0A- u32 hardware_id:1;=0A- u32 = compatible_ids:1;=0A- u32 bus_address:1;=0A- u32 unique_id:1;=0A- = u32 removable:1;=0A- u32 ejectable:1;=0A- u32 lockable:1;=0A- = u32 suprise_removal_ok:1;=0A- u32 power_manageable:1;=0A- u32 = performance_manageable:1;=0A- u32 wake_capable:1; /* Wakeup(_PRW) = supported? */=0A- u32 force_power_state:1;=0A- u32 reserved:19;=0A= -};=0A-=0A-/* File System */=0A-=0A-struct acpi_device_dir {=0A- = struct proc_dir_entry *entry;=0A-};=0A-=0A-#define acpi_device_dir(d) = ((d)->dir.entry)=0A-=0A-/* Plug and Play */=0A-=0A-typedef char acpi_bus_id= [5];=0A-typedef unsigned long acpi_bus_address;=0A-typedef char acpi_hardwa= re_id[15];=0A-typedef char acpi_unique_id[9];=0A-typedef char acpi_device_n= ame[40];=0A-typedef char acpi_device_class[20];=0A-=0A-struct acpi_device_p= np {=0A- acpi_bus_id bus_id; /* Object name */=0A- acpi_bus_ad= dress bus_address; /* _ADR */=0A- acpi_hardware_id hardware_id; /* = _HID */=0A- struct acpi_compatible_id_list *cid_list; /* _CIDs = */=0A- acpi_unique_id unique_id; /* _UID */=0A- acpi_device_name = device_name; /* Driver-determined */=0A- acpi_device_class = device_class; /* " */=0A-};=0A-=0A-#define acpi_device_bi= d(d) ((d)->pnp.bus_id)=0A-#define acpi_device_adr(d) ((d)->pnp.bus_addre= ss)=0A-#define acpi_device_hid(d) ((d)->pnp.hardware_id)=0A-#define = acpi_device_uid(d) ((d)->pnp.unique_id)=0A-#define acpi_device_name(d)= ((d)->pnp.device_name)=0A-#define acpi_device_class(d) ((d)->pnp.d= evice_class)=0A-=0A-/* Power Management */=0A-=0A-struct acpi_device_power_= flags {=0A- u32 explicit_get:1; /* _PSC present? */=0A- u32 = power_resources:1; /* Power resources */=0A- u32 inrush_current:= 1; /* Serialize Dx->D0 */=0A- u32 power_removed:1; /* = Optimize Dx->D0 */=0A- u32 reserved:28;=0A-};=0A-=0A-struct acpi_device_po= wer_state {=0A- struct {=0A- u8 valid:1;=0A- u8 = explicit_set:1; /* _PSx present? */=0A- u8 reserved:6;=0A- } = flags;=0A- int power; /* % Power (compared to D0) */=0A- = int latency; /* Dx->D0 time (microseconds) */=0A- struct = acpi_handle_list resources; /* Power resources referenced */=0A-};=0A-= =0A-struct acpi_device_power {=0A- int state; /* Current = state */=0A- struct acpi_device_power_flags flags;=0A- struct = acpi_device_power_state states[4]; /* Power states (D0-D3) */=0A-};=0A= -=0A-/* Performance Management */=0A-=0A-struct acpi_device_perf_flags = {=0A- u8 reserved:8;=0A-};=0A-=0A-struct acpi_device_perf_state {=0A- = struct {=0A- u8 valid:1;=0A- u8 reserved:7;=0A- } = flags;=0A- u8 power; /* % Power (compared to P0) */=0A- = u8 performance; /* % Performance ( " ) */=0A- int = latency; /* Px->P0 time (microseconds) */=0A-};=0A-=0A-struc= t acpi_device_perf {=0A- int state;=0A- struct acpi_device_perf_fla= gs flags;=0A- int state_count;=0A- struct acpi_device_perf_state = *states;=0A-};=0A-=0A-/* Wakeup Management */=0A-struct acpi_device_wakeup_= flags {=0A- u8 valid:1; /* Can successfully enable wakeup? = */=0A- u8 run_wake:1; /* Run-Wake GPE devices */=0A-};=0A-=0A-str= uct acpi_device_wakeup_state {=0A- u8 enabled:1;=0A-};=0A-=0A-struct = acpi_device_wakeup {=0A- acpi_handle gpe_device;=0A- acpi_intege= r gpe_number;=0A- acpi_integer sleep_state;=0A- struct acpi_handle_= list resources;=0A- struct acpi_device_wakeup_state state;=0A- = struct acpi_device_wakeup_flags flags;=0A-};=0A-=0A-/* Device */=0A-=0A-str= uct acpi_device {=0A- acpi_handle handle;=0A- struct acpi_device = *parent;=0A- struct list_head children;=0A- struct list_head node;=0A- = struct list_head wakeup_list;=0A- struct list_head g_list;=0A- = struct acpi_device_status status;=0A- struct acpi_device_flags flags;=0A-= struct acpi_device_pnp pnp;=0A- struct acpi_device_power power;=0A-= struct acpi_device_wakeup wakeup;=0A- struct acpi_device_perf = performance;=0A- struct acpi_device_dir dir;=0A- struct acpi_device_= ops ops;=0A- struct acpi_driver *driver;=0A- void *driver_data;=0A- = struct device dev;=0A- struct acpi_bus_ops bus_ops; /* workaround for = different code path for hotplug */=0A- enum acpi_bus_removal_type = removal_type; /* indicate for different removal type */=0A-};=0A-=0A-#def= ine acpi_driver_data(d) ((d)->driver_data)=0A-#define to_acpi_device(d) = container_of(d, struct acpi_device, dev)=0A-#define to_acpi_driver(d) = container_of(d, struct acpi_driver, drv)=0A-=0A-/* acpi_device.dev.bus = =3D=3D &acpi_bus_type */=0A-extern struct bus_type acpi_bus_type;=0A-=0A-/*= =0A- * Events=0A- * ------=0A- */=0A-=0A-struct acpi_bus_event {=0A- = struct list_head node;=0A- acpi_device_class device_class;=0A- = acpi_bus_id bus_id;=0A- u32 type;=0A- u32 data;=0A-};=0A-=0A-extern = struct kobject *acpi_kobj;=0A-extern int acpi_bus_generate_netlink_event(co= nst char*, const char*, u8, int);=0A-void acpi_bus_private_data_handler(acp= i_handle, u32, void *);=0A-int acpi_bus_get_private_data(acpi_handle, void = **);=0A-extern int acpi_notifier_call_chain(struct acpi_device *, u32, = u32);=0A-extern int register_acpi_notifier(struct notifier_block *);=0A-ext= ern int unregister_acpi_notifier(struct notifier_block *);=0A-/*=0A- * = External Functions=0A- */=0A-=0A-int acpi_bus_get_device(acpi_handle = handle, struct acpi_device **device);=0A-void acpi_bus_data_handler(acpi_ha= ndle handle, u32 function, void *context);=0A-int acpi_bus_get_status(struc= t acpi_device *device);=0A-int acpi_bus_get_power(acpi_handle handle, int = *state);=0A-int acpi_bus_set_power(acpi_handle handle, int state);=0A-#ifde= f CONFIG_ACPI_PROC_EVENT=0A-int acpi_bus_generate_proc_event(struct = acpi_device *device, u8 type, int data);=0A-int acpi_bus_generate_proc_even= t4(const char *class, const char *bid, u8 type, int data);=0A-int = acpi_bus_receive_event(struct acpi_bus_event *event);=0A-#else=0A-static = inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 = type, int data)=0A- { return 0; }=0A-#endif=0A-int acpi_bus_register_dr= iver(struct acpi_driver *driver);=0A-void acpi_bus_unregister_driver(struct= acpi_driver *driver);=0A-int acpi_bus_add(struct acpi_device **child, = struct acpi_device *parent,=0A- acpi_handle handle, int type);=0A-= int acpi_bus_trim(struct acpi_device *start, int rmdevice);=0A-int = acpi_bus_start(struct acpi_device *device);=0A-acpi_status acpi_bus_get_ejd= (acpi_handle handle, acpi_handle * ejd);=0A-int acpi_match_device_ids(struc= t acpi_device *device,=0A- const struct acpi_device_= id *ids);=0A-int acpi_create_dir(struct acpi_device *);=0A-void acpi_remove= _dir(struct acpi_device *);=0A-=0A-/*=0A- * Bind physical devices with = ACPI devices=0A- */=0A-#include =0A-struct acpi_bus_type = {=0A- struct list_head list;=0A- struct bus_type *bus;=0A- /* = For general devices under the bus */=0A- int (*find_device) (struct = device *, acpi_handle *);=0A- /* For bridges, such as PCI root bridge, = IDE controller */=0A- int (*find_bridge) (struct device *, acpi_handle = *);=0A-};=0A-int register_acpi_bus_type(struct acpi_bus_type *);=0A-int = unregister_acpi_bus_type(struct acpi_bus_type *);=0A-struct device = *acpi_get_physical_device(acpi_handle);=0A-/* helper */=0A-acpi_handle = acpi_get_child(acpi_handle, acpi_integer);=0A-acpi_handle acpi_get_pci_root= bridge_handle(unsigned int, unsigned int);=0A-#define DEVICE_ACPI_HANDLE(de= v) ((acpi_handle)((dev)->archdata.acpi_handle))=0A-=0A-#ifdef CONFIG_PM_SLE= EP=0A-int acpi_pm_device_sleep_state(struct device *, int, int *);=0A-#else= /* !CONFIG_PM_SLEEP */=0A-static inline int acpi_pm_device_sleep_state(str= uct device *d, int w, int *p)=0A-{=0A- if (p)=0A- *p =3D = ACPI_STATE_D0;=0A- return ACPI_STATE_D3;=0A-}=0A-#endif /* !CONFIG_PM_= SLEEP */=0A-=0A-#endif /* CONFIG_ACPI */=0A-=0A-#e= ndif /*__ACPI_BUS_H__*/=0A--- 2011-02-10.orig/xen/include/acpi/acpi_drivers= .h=0A+++ /dev/null=0A@@ -1,111 +0,0 @@=0A-/*=0A- * acpi_drivers.h = ($Revision: 31 $)=0A- *=0A- * Copyright (C) 2001, 2002 Andy Grover = =0A- * Copyright (C) 2001, 2002 Paul Diefenbaugh = =0A- *=0A- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=0A- *=0A- * This program is = free software; you can redistribute it and/or modify=0A- * it under the = terms of the GNU General Public License as published by=0A- * the Free = Software Foundation; either version 2 of the License, or (at=0A- * your = option) any later version.=0A- *=0A- * This program is distributed in the = hope that it will be useful, but=0A- * WITHOUT ANY WARRANTY; without even = the implied warranty of=0A- * MERCHANTABILITY or FITNESS FOR A PARTICULAR = PURPOSE. See the GNU=0A- * General Public License for more details.=0A- = *=0A- * You should have received a copy of the GNU General Public License = along=0A- * with this program; if not, write to the Free Software = Foundation, Inc.,=0A- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 = USA.=0A- *=0A- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~=0A- */=0A-=0A-#ifndef __ACPI_DRIVERS_H__=0A-#define = __ACPI_DRIVERS_H__=0A-=0A-#include =0A-#include =0A-=0A-=0A-#define ACPI_MAX_STRING 80=0A-=0A-#define = ACPI_BUS_COMPONENT 0x00010000=0A-#define ACPI_SYSTEM_COMPONENT= 0x02000000=0A-=0A-/* _HID definitions */=0A-=0A-#define = ACPI_POWER_HID "ACPI_PWR"=0A-#define ACPI_PROCESSOR_HID = "ACPI_CPU"=0A-#define ACPI_SYSTEM_HID "ACPI_SYS"= =0A-#define ACPI_THERMAL_HID "ACPI_THM"=0A-#define ACPI_BUTTON_H= ID_POWERF "ACPI_FPB"=0A-#define ACPI_BUTTON_HID_SLEEPF = "ACPI_FSB"=0A-=0A-=0A-/* --------------------------------------------------= ------------------------=0A- PCI=0A- = -------------------------------------------------------------------------= - */=0A-=0A-#ifdef CONFIG_ACPI_PCI=0A-=0A-#define ACPI_PCI_COMPONENT = 0x00400000=0A-=0A-/* ACPI PCI Interrupt Link (pci_link.c) */=0A-=0A-int = acpi_irq_penalty_init (void);=0A-int acpi_pci_link_get_irq (acpi_handle = handle, int index, int* edge_level, int* active_high_low);=0A-=0A-/* ACPI = PCI Interrupt Routing (pci_irq.c) */=0A-=0A-int acpi_pci_irq_add_prt = (acpi_handle handle, int segment, int bus);=0A-void acpi_pci_irq_del_prt = (int segment, int bus);=0A-=0A-/* ACPI PCI Device Binding (pci_bind.c) = */=0A-=0A-struct pci_bus;=0A-=0A-int acpi_pci_bind (struct acpi_device = *device);=0A-int acpi_pci_unbind (struct acpi_device *device);=0A-int = acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, = struct pci_bus *bus);=0A-=0A-/* Arch-defined function to add a bus to the = system */=0A-=0A-struct pci_bus *pci_acpi_scan_root(struct acpi_device = *device, int domain, int bus);=0A-=0A-#endif /*CONFIG_ACPI_PCI*/=0A-=0A-=0A= -/* -----------------------------------------------------------------------= ---=0A- Power Resource=0A- -------------= ------------------------------------------------------------- */=0A-=0A-#if= def CONFIG_ACPI_POWER=0A-int acpi_enable_wakeup_device_power (struct = acpi_device *dev);=0A-int acpi_disable_wakeup_device_power (struct = acpi_device *dev);=0A-int acpi_power_get_inferred_state (struct acpi_device= *device);=0A-int acpi_power_transition (struct acpi_device *device, int = state);=0A-#endif=0A-=0A-=0A-/* -------------------------------------------= -------------------------------=0A- = Embedded Controller=0A- -------------------------------------------------= ------------------------- */=0A-#ifdef CONFIG_ACPI_EC=0A-int acpi_ec_ecdt_p= robe (void);=0A-#endif=0A-=0A-/* ------------------------------------------= --------------------------------=0A- = Processor=0A- -----------------------------------------------------------= --------------- */=0A-=0A-#define ACPI_PROCESSOR_LIMIT_NONE 0x00=0A-#de= fine ACPI_PROCESSOR_LIMIT_INCREMENT 0x01=0A-#define ACPI_PROCESSOR_LIMI= T_DECREMENT 0x02=0A-=0A-int acpi_processor_set_thermal_limit(acpi_handl= e handle, int type);=0A-=0A-=0A-#endif /*__ACPI_DRIVERS_H__*/=0A--- = 2011-02-10.orig/xen/include/acpi/acpiosxf.h=0A+++ 2011-02-10/xen/include/ac= pi/acpiosxf.h=0A@@ -50,155 +50,19 @@=0A #include "platform/acenv.h"=0A = #include "actypes.h"=0A =0A-/* Types for acpi_os_execute */=0A-=0A-typedef = enum {=0A- OSL_GLOBAL_LOCK_HANDLER,=0A- OSL_NOTIFY_HANDLER,=0A- = OSL_GPE_HANDLER,=0A- OSL_DEBUGGER_THREAD,=0A- OSL_EC_POLL_HANDLER= ,=0A- OSL_EC_BURST_HANDLER=0A-} acpi_execute_type;=0A-=0A-#define = ACPI_NO_UNIT_LIMIT ((u32) -1)=0A-#define ACPI_MUTEX_SEM = 1=0A-=0A-/* Functions for acpi_os_signal */=0A-=0A-#define ACPI_SIGNAL_F= ATAL 0=0A-#define ACPI_SIGNAL_BREAKPOINT 1=0A-=0A-struct = acpi_signal_fatal_info {=0A- u32 type;=0A- u32 code;=0A- u32 = argument;=0A-};=0A-=0A-/*=0A- * OSL Initialization and shutdown primitives= =0A- */=0A-acpi_status acpi_os_initialize(void);=0A-=0A-acpi_status = acpi_os_terminate(void);=0A-=0A /*=0A * ACPI Table interfaces=0A */=0A = acpi_physical_address acpi_os_get_root_pointer(void);=0A =0A-acpi_status=0A= -acpi_os_predefined_override(const struct acpi_predefined_names *init_val,= =0A- acpi_string * new_val);=0A-=0A-acpi_status=0A-a= cpi_os_table_override(struct acpi_table_header *existing_table,=0A- = struct acpi_table_header **new_table);=0A-=0A-/*=0A- * Spinlock = primitives=0A- */=0A-acpi_status acpi_os_create_lock(acpi_spinlock * = out_handle);=0A-=0A-void acpi_os_delete_lock(acpi_spinlock handle);=0A-=0A-= acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);=0A-=0A-void = acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags);=0A-=0A = /*=0A- * Semaphore primitives=0A+ * Memory mapping=0A */=0A-acpi_status=0A= -acpi_os_create_semaphore(u32 max_units,=0A- u32 = initial_units, acpi_semaphore * out_handle);=0A-=0A-acpi_status acpi_os_del= ete_semaphore(acpi_semaphore handle);=0A-=0A-acpi_status=0A-acpi_os_wait_se= maphore(acpi_semaphore handle, u32 units, u16 timeout);=0A-=0A-acpi_status = acpi_os_signal_semaphore(acpi_semaphore handle, u32 units);=0A-=0A-/*=0A- = * Mutex primitives=0A- */=0A-acpi_status acpi_os_create_mutex(acpi_mutex * = out_handle);=0A-=0A-void acpi_os_delete_mutex(acpi_mutex handle);=0A-=0A-ac= pi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout);=0A-=0A-voi= d acpi_os_release_mutex(acpi_mutex handle);=0A-=0A-/* Temporary macros for = Mutex* interfaces, map to existing semaphore xfaces */=0A-=0A-#define = acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, 1, = out_handle)=0A-#define acpi_os_delete_mutex(handle) (void) = acpi_os_delete_semaphore (handle)=0A-#define acpi_os_acquire_mutex(handle,t= ime) acpi_os_wait_semaphore (handle, 1, time)=0A-#define acpi_os_release_m= utex(handle) (void) acpi_os_signal_semaphore (handle, 1)=0A-=0A-/*=0A= - * Memory allocation and mapping=0A- */=0A-void *acpi_os_allocate(acpi_siz= e size);=0A-=0A void __iomem *acpi_os_map_memory(acpi_physical_address = where,=0A acpi_native_uint length);=0A =0A = void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size = size);=0A =0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_status=0A-acpi_os_get_physic= al_address(void *logical_address,=0A- acpi_physical_= address * physical_address);=0A-#endif=0A-=0A-/*=0A- * Memory/Object = Cache=0A- */=0A-acpi_status=0A-acpi_os_create_cache(char *cache_name,=0A- = u16 object_size,=0A- u16 max_depth, = acpi_cache_t ** return_cache);=0A-=0A-acpi_status acpi_os_delete_cache(acpi= _cache_t * cache);=0A-=0A-acpi_status acpi_os_purge_cache(acpi_cache_t * = cache);=0A-=0A-void *acpi_os_acquire_object(acpi_cache_t * cache);=0A-=0A-a= cpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);=0A-= =0A-/*=0A- * Interrupt handlers=0A- */=0A-acpi_status=0A-acpi_os_install_in= terrupt_handler(u32 gsi,=0A- acpi_osd_handler = service_routine,=0A- void *context);=0A-=0A-ac= pi_status=0A-acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler = service_routine);=0A-=0A-void acpi_os_gpe_count(u32 gpe_number);=0A-void = acpi_os_fixed_event_count(u32 fixed_event_number);=0A-=0A-/*=0A- * Threads = and Scheduling=0A- */=0A-acpi_thread_id acpi_os_get_thread_id(void);=0A-=0A= -acpi_status=0A-acpi_os_execute(acpi_execute_type type,=0A- = acpi_osd_exec_callback function, void *context);=0A-=0A-void acpi_os_wait_e= vents_complete(void *context);=0A-=0A-void acpi_os_sleep(acpi_integer = milliseconds);=0A-=0A-void acpi_os_stall(u32 microseconds);=0A-=0A /*=0A = * Platform and hardware-independent I/O interfaces=0A */=0A@@ -216,68 = +80,10 @@ acpi_status=0A acpi_os_write_memory(acpi_physical_address = address, u32 value, u32 width);=0A =0A /*=0A- * Platform and hardware-indep= endent PCI configuration space access=0A- * Note: Can't use "Register" as = a parameter, changed to "Reg" --=0A- * certain compilers complain.=0A- = */=0A-acpi_status=0A-acpi_os_read_pci_configuration(struct acpi_pci_id = *pci_id,=0A- u32 reg, u32 *value, u32 width);=0A-= =0A-acpi_status=0A-acpi_os_write_pci_configuration(struct acpi_pci_id = *pci_id,=0A- u32 reg, acpi_integer value, u32 = width);=0A-=0A-/*=0A- * Interim function needed for PCI IRQ routing=0A- = */=0A-void=0A-acpi_os_derive_pci_id(acpi_handle rhandle,=0A- = acpi_handle chandle, struct acpi_pci_id **pci_id);=0A-=0A-/*=0A- * = Miscellaneous=0A- */=0A-acpi_status acpi_os_validate_interface(char = *interface);=0A-acpi_status acpi_osi_invalidate(char* interface);=0A-=0A-ac= pi_status=0A-acpi_os_validate_address(u8 space_id, acpi_physical_address = address,=0A- acpi_size length, char *name);=0A-=0A-u64 = acpi_os_get_timer(void);=0A-=0A-acpi_status acpi_os_signal(u32 function, = void *info);=0A-=0A-/*=0A * Debug print routines=0A */=0A void ACPI_INTER= NAL_VAR_XFACE acpi_os_printf(const char *format, ...);=0A =0A void = acpi_os_vprintf(const char *format, va_list args);=0A =0A-void acpi_os_redi= rect_output(void *destination);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-/*=0A- = * Debug input=0A- */=0A-u32 acpi_os_get_line(char *buffer);=0A-#endif=0A-= =0A-/*=0A- * Directory manipulation=0A- */=0A-void *acpi_os_open_directory(= char *pathname,=0A- char *wildcard_spec, char = requested_file_type);=0A-=0A-/* requeste_file_type values */=0A-=0A-#define= REQUEST_FILE_ONLY 0=0A-#define REQUEST_DIR_ONLY = 1=0A-=0A-char *acpi_os_get_next_filename(void *dir_handle);=0A-= =0A-void acpi_os_close_directory(void *dir_handle);=0A-=0A #endif = /* __ACPIOSXF_H__ */=0A--- 2011-02-10.orig/xen/include/acpi= /acpixf.h=0A+++ 2011-02-10/xen/include/acpi/acpixf.h=0A@@ -55,44 +55,8 @@ = acpi_status=0A acpi_initialize_tables(struct acpi_table_desc *initial_stora= ge,=0A u32 initial_table_count, u8 allow_resize);=0A = =0A-acpi_status acpi_initialize_subsystem(void);=0A-=0A-acpi_status = acpi_enable_subsystem(u32 flags);=0A-=0A-acpi_status acpi_initialize_object= s(u32 flags);=0A-=0A-acpi_status acpi_terminate(void);=0A-=0A-#ifdef = ACPI_FUTURE_USAGE=0A-acpi_status acpi_subsystem_status(void);=0A-#endif=0A-= =0A-acpi_status acpi_enable(void);=0A-=0A-acpi_status acpi_disable(void);= =0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_status acpi_get_system_info(struct= acpi_buffer *ret_buffer);=0A-#endif=0A-=0A const char *acpi_format_excepti= on(acpi_status exception);=0A =0A-acpi_status acpi_purge_cached_objects(voi= d);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_status=0A-acpi_install_initiali= zation_handler(acpi_init_handler handler, u32 function);=0A-#endif=0A-=0A-/= *=0A- * ACPI Memory management=0A- */=0A-void *acpi_allocate(u32 size);=0A-= =0A-void *acpi_callocate(u32 size);=0A-=0A-void acpi_free(void *address);= =0A-=0A /*=0A * ACPI table manipulation interfaces=0A */=0A@@ -104,8 = +68,6 @@ acpi_status acpi_load_tables(void);=0A =0A acpi_status acpi_load_t= able(struct acpi_table_header *table_ptr);=0A =0A-acpi_status acpi_unload_t= able_id(acpi_owner_id id);=0A-=0A acpi_status=0A acpi_get_table_header(acpi= _string signature,=0A acpi_native_uint instance,=0A@@ = -115,207 +77,28 @@ acpi_status=0A acpi_get_table(acpi_string signature,=0A = acpi_native_uint instance, struct acpi_table_header = **out_table);=0A =0A-acpi_status=0A-acpi_get_table_by_index(acpi_native_uin= t table_index,=0A- struct acpi_table_header **out_tabl= e);=0A-=0A /*=0A * Namespace and name interfaces=0A */=0A acpi_status=0A-= acpi_walk_namespace(acpi_object_type type,=0A- acpi_handle = start_object,=0A- u32 max_depth,=0A- = acpi_walk_callback user_function,=0A- void *context, void = **return_value);=0A-=0A-acpi_status=0A-acpi_get_devices(const char = *HID,=0A- acpi_walk_callback user_function,=0A- = void *context, void **return_value);=0A-=0A-acpi_status=0A-acpi_get_name(ac= pi_handle handle,=0A- u32 name_type, struct acpi_buffer *ret_path_p= tr);=0A-=0A-acpi_status=0A acpi_get_handle(acpi_handle parent,=0A = acpi_string pathname, acpi_handle * ret_handle);=0A =0A acpi_status=0A-acpi= _attach_data(acpi_handle obj_handle,=0A- acpi_object_handle= r handler, void *data);=0A-=0A-acpi_status=0A-acpi_detach_data(acpi_handle = obj_handle, acpi_object_handler handler);=0A-=0A-acpi_status=0A-acpi_get_da= ta(acpi_handle obj_handle, acpi_object_handler handler, void **data);=0A-= =0A-acpi_status=0A acpi_debug_trace(char *name, u32 debug_level, u32 = debug_layer, u32 flags);=0A =0A-/*=0A- * Object manipulation and enumeratio= n=0A- */=0A-acpi_status=0A-acpi_evaluate_object(acpi_handle object,=0A- = acpi_string pathname,=0A- struct acpi_object_list = *parameter_objects,=0A- struct acpi_buffer *return_object_buff= er);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_status=0A-acpi_evaluate_object= _typed(acpi_handle object,=0A- acpi_string pathname,=0A= - struct acpi_object_list *external_params,=0A- = struct acpi_buffer *return_buffer,=0A- = acpi_object_type return_type);=0A-#endif=0A-=0A acpi_status=0A = acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer)= ;=0A =0A-acpi_status=0A-acpi_get_next_object(acpi_object_type type,=0A- = acpi_handle parent,=0A- acpi_handle child, acpi_handle= * out_handle);=0A-=0A acpi_status acpi_get_type(acpi_handle object, = acpi_object_type * out_type);=0A =0A-acpi_status acpi_get_id(acpi_handle = object, acpi_owner_id * out_type);=0A-=0A acpi_status acpi_get_parent(acpi_= handle object, acpi_handle * out_handle);=0A =0A /*=0A- * Event handler = interfaces=0A- */=0A-acpi_status=0A-acpi_install_fixed_event_handler(u32 = acpi_event,=0A- acpi_event_handler handler, void = *context);=0A-=0A-acpi_status=0A-acpi_remove_fixed_event_handler(u32 = acpi_event, acpi_event_handler handler);=0A-=0A-acpi_status=0A-acpi_install= _notify_handler(acpi_handle device,=0A- u32 handler_typ= e,=0A- acpi_notify_handler handler, void *context);=0A= -=0A-acpi_status=0A-acpi_remove_notify_handler(acpi_handle device,=0A- = u32 handler_type, acpi_notify_handler handler);=0A-=0A-acpi_stat= us=0A-acpi_install_address_space_handler(acpi_handle device,=0A- = acpi_adr_space_type space_id,=0A- = acpi_adr_space_handler handler,=0A- = acpi_adr_space_setup setup, void *context);=0A-=0A-acpi_status=0A-acpi_remo= ve_address_space_handler(acpi_handle device,=0A- = acpi_adr_space_type space_id,=0A- = acpi_adr_space_handler handler);=0A-=0A-acpi_status=0A-acpi_install_gpe_han= dler(acpi_handle gpe_device,=0A- u32 gpe_number,=0A= - u32 type, acpi_event_handler address, void = *context);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_status acpi_install_exce= ption_handler(acpi_exception_handler handler);=0A-#endif=0A-=0A-/*=0A- * = Event interfaces=0A- */=0A-acpi_status acpi_acquire_global_lock(u16 = timeout, u32 * handle);=0A-=0A-acpi_status acpi_release_global_lock(u32 = handle);=0A-=0A-acpi_status=0A-acpi_remove_gpe_handler(acpi_handle = gpe_device,=0A- u32 gpe_number, acpi_event_handler = address);=0A-=0A-acpi_status acpi_enable_event(u32 event, u32 flags);=0A-= =0A-acpi_status acpi_disable_event(u32 event, u32 flags);=0A-=0A-acpi_statu= s acpi_clear_event(u32 event);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_stat= us acpi_get_event_status(u32 event, acpi_event_status * event_status);=0A-#= endif /* ACPI_FUTURE_USAGE */=0A-=0A-acpi_statu= s acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type);=0A-= =0A-acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, = u32 flags);=0A-=0A-acpi_status acpi_disable_gpe(acpi_handle gpe_device, = u32 gpe_number, u32 flags);=0A-=0A-acpi_status acpi_clear_gpe(acpi_handle = gpe_device, u32 gpe_number, u32 flags);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-= acpi_status=0A-acpi_get_gpe_status(acpi_handle gpe_device,=0A- = u32 gpe_number,=0A- u32 flags, acpi_event_status * = event_status);=0A-#endif /* ACPI_FUTURE_USA= GE */=0A-=0A-acpi_status=0A-acpi_install_gpe_block(acpi_handle gpe_device,= =0A- struct acpi_generic_address *gpe_block_address,=0A- = u32 register_count, u32 interrupt_number);=0A-=0A-acpi_statu= s acpi_remove_gpe_block(acpi_handle gpe_device);=0A-=0A-/*=0A- * Resource = interfaces=0A- */=0A-typedef=0A-acpi_status(*acpi_walk_resource_callback) = (struct acpi_resource * resource,=0A- = void *context);=0A-=0A-acpi_status=0A-acpi_get_vendor_resource(acpi_handle = device_handle,=0A- char *name,=0A- = struct acpi_vendor_uuid *uuid,=0A- struct acpi_buffer= *ret_buffer);=0A-=0A-acpi_status=0A-acpi_get_current_resources(acpi_handle= device_handle,=0A- struct acpi_buffer *ret_buffer);= =0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_status=0A-acpi_get_possible_resour= ces(acpi_handle device_handle,=0A- struct = acpi_buffer *ret_buffer);=0A-#endif=0A-=0A-acpi_status=0A-acpi_walk_resourc= es(acpi_handle device_handle,=0A- char *name,=0A- = acpi_walk_resource_callback user_function, void *context);=0A-=0A-acpi_= status=0A-acpi_set_current_resources(acpi_handle device_handle,=0A- = struct acpi_buffer *in_buffer);=0A-=0A-acpi_status=0A-acpi_get_i= rq_routing_table(acpi_handle bus_device_handle,=0A- = struct acpi_buffer *ret_buffer);=0A-=0A-acpi_status=0A-acpi_resource_to_add= ress64(struct acpi_resource *resource,=0A- struct = acpi_resource_address64 *out);=0A-=0A-/*=0A * Hardware (ACPI device) = interfaces=0A */=0A acpi_status acpi_get_register(u32 register_id, u32 * = return_value);=0A =0A-acpi_status acpi_get_register_unlocked(u32 register_i= d, u32 *return_value);=0A-=0A acpi_status acpi_set_register(u32 register_id= , u32 value);=0A =0A acpi_status=0A--- 2011-02-10.orig/xen/include/acpi/acs= truct.h=0A+++ /dev/null=0A@@ -1,231 +0,0 @@=0A-/***************************= ***************************************************=0A- *=0A- * Name: = acstruct.h - Internal structs=0A- *=0A- ***********************************= ******************************************/=0A-=0A-/*=0A- * Copyright (C) = 2000 - 2007, R. Byron Moore=0A- * All rights reserved.=0A- *=0A- * = Redistribution and use in source and binary forms, with or without=0A- * = modification, are permitted provided that the following conditions=0A- * = are met:=0A- * 1. Redistributions of source code must retain the above = copyright=0A- * notice, this list of conditions, and the following = disclaimer,=0A- * without modification.=0A- * 2. Redistributions in = binary form must reproduce at minimum a disclaimer=0A- * substantially = similar to the "NO WARRANTY" disclaimer below=0A- * ("Disclaimer") and = any redistribution must be conditioned upon=0A- * including a substantia= lly similar Disclaimer requirement for further=0A- * binary redistributi= on.=0A- * 3. Neither the names of the above-listed copyright holders nor = the names=0A- * of any contributors may be used to endorse or promote = products derived=0A- * from this software without specific prior = written permission.=0A- *=0A- * Alternatively, this software may be = distributed under the terms of the=0A- * GNU General Public License = ("GPL") version 2 as published by the Free=0A- * Software Foundation.=0A- = *=0A- * NO WARRANTY=0A- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT = HOLDERS AND CONTRIBUTORS=0A- * "AS IS" AND ANY EXPRESS OR IMPLIED = WARRANTIES, INCLUDING, BUT NOT=0A- * LIMITED TO, THE IMPLIED WARRANTIES OF = MERCHANTIBILITY AND FITNESS FOR=0A- * A PARTICULAR PURPOSE ARE DISCLAIMED. = IN NO EVENT SHALL THE COPYRIGHT=0A- * HOLDERS OR CONTRIBUTORS BE LIABLE = FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL=0A- * DAMAGES (INCLUDING, BUT NOT = LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS=0A- * OR SERVICES; LOSS OF = USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0A- * HOWEVER CAUSED AND = ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,=0A- * STRICT LIABILITY, = OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING=0A- * IN ANY WAY OUT = OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE=0A- * POSSIBILITY OF = SUCH DAMAGES.=0A- */=0A-=0A-#ifndef __ACSTRUCT_H__=0A-#define __ACSTRUCT_H_= _=0A-=0A-/* acpisrc:struct_defs -- for acpisrc conversion */=0A-=0A-/******= ***********************************************************************=0A-= *=0A- * Tree walking typedefs and structs=0A- *=0A- **********************= ******************************************************/=0A-=0A-/*=0A- * = Walk state - current state of a parse tree walk. Used for both a = leisurely=0A- * stroll through the tree (for whatever reason), and for = control method=0A- * execution.=0A- */=0A-#define ACPI_NEXT_OP_DOWNWARD = 1=0A-#define ACPI_NEXT_OP_UPWARD 2=0A-=0A-/*=0A- * Groups of = definitions for walk_type used for different implementations of=0A- * = walkers (never simultaneously) - flags for interpreter:=0A- */=0A-#define = ACPI_WALK_NON_METHOD 0=0A-#define ACPI_WALK_METHOD = 0x01=0A-#define ACPI_WALK_METHOD_RESTART 0x02=0A-=0A-/* Flags for i_aSL = compiler only */=0A-=0A-#define ACPI_WALK_CONST_REQUIRED 0x10=0A-#define= ACPI_WALK_CONST_OPTIONAL 0x20=0A-=0A-struct acpi_walk_state {=0A- = struct acpi_walk_state *next; /* Next walk_state in list */=0A- u8 = descriptor_type; /* To differentiate various internal objs */=0A- = u8 walk_type;=0A- u16 opcode; /* Current AML opcode = */=0A- u8 next_op_info; /* Info about next_op */=0A- u8 = num_operands; /* Stack pointer for Operands[] array */=0A- acpi_owner_= id owner_id; /* Owner of objects created during the walk */=0A- u8 = last_predicate; /* Result of last predicate */=0A- u8 current_result;= =0A- u8 return_used;=0A- u8 scope_depth;=0A- u8 pass_number; = /* Parse pass during table load */=0A- u32 aml_offset;=0A- u32 = arg_types;=0A- u32 method_breakpoint; /* For single stepping */=0A- = u32 user_breakpoint; /* User AML breakpoint */=0A- u32 parse_flags;=0A= -=0A- struct acpi_parse_state parser_state; /* Current state of parser = */=0A- u32 prev_arg_types;=0A- u32 arg_count; /* push for fixed = or var args */=0A-=0A- struct acpi_namespace_node arguments[ACPI_METHOD_NU= M_ARGS]; /* Control method arguments */=0A- struct acpi_namespa= ce_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method = locals */=0A- union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS = + 1]; /* Operands passed to the interpreter (+1 for NULL terminator) = */=0A- union acpi_operand_object **params;=0A-=0A- u8 *aml_last_while;= =0A- union acpi_operand_object **caller_return_desc;=0A- union = acpi_generic_state *control_state; /* List of control states (nested = IFs) */=0A- struct acpi_namespace_node *deferred_node; /* Used = when executing deferred opcodes */=0A- struct acpi_gpe_event_info = *gpe_event_info; /* Info for GPE (_Lxx/_Exx methods only */=0A- = union acpi_operand_object *implicit_return_obj;=0A- struct acpi_namespa= ce_node *method_call_node; /* Called method Node */=0A- union = acpi_parse_object *method_call_op; /* method_call Op if running a = method */=0A- union acpi_operand_object *method_desc; /* Method = descriptor if running a method */=0A- struct acpi_namespace_node = *method_node; /* Method node if running a method. */=0A- union = acpi_parse_object *op; /* Current parser op */=0A- const struct = acpi_opcode_info *op_info; /* Info on current opcode */=0A- = union acpi_parse_object *origin; /* Start of walk [Obsolete] */=0A- = union acpi_operand_object *result_obj;=0A- union acpi_generic_state = *results; /* Stack of accumulated results */=0A- union acpi_operand_= object *return_desc; /* Return object, if any */=0A- union acpi_generic_= state *scope_info; /* Stack of nested scopes */=0A- union = acpi_parse_object *prev_op; /* Last op that was processed */=0A- = union acpi_parse_object *next_op; /* next op to be processed */=0A- = struct acpi_thread_state *thread;=0A- acpi_parse_downwards descending_cal= lback;=0A- acpi_parse_upwards ascending_callback;=0A-};=0A-=0A-/* = Info used by acpi_ps_init_objects */=0A-=0A-struct acpi_init_walk_info = {=0A- u16 method_count;=0A- u16 device_count;=0A- u16 op_region_count= ;=0A- u16 field_count;=0A- u16 buffer_count;=0A- u16 package_count;= =0A- u16 op_region_init;=0A- u16 field_init;=0A- u16 buffer_init;=0A= - u16 package_init;=0A- u16 object_count;=0A- acpi_owner_id = owner_id;=0A- acpi_native_uint table_index;=0A-};=0A-=0A-struct = acpi_get_devices_info {=0A- acpi_walk_callback user_function;=0A- = void *context;=0A- const char *hid;=0A-};=0A-=0A-union acpi_aml_operan= ds {=0A- union acpi_operand_object *operands[7];=0A-=0A- struct = {=0A- struct acpi_object_integer *type;=0A- struct = acpi_object_integer *code;=0A- struct acpi_object_integer = *argument;=0A-=0A- } fatal;=0A-=0A- struct {=0A- = union acpi_operand_object *source;=0A- struct acpi_object_integer = *index;=0A- union acpi_operand_object *target;=0A-=0A- } = index;=0A-=0A- struct {=0A- union acpi_operand_object = *source;=0A- struct acpi_object_integer *index;=0A- = struct acpi_object_integer *length;=0A- union acpi_operand_object = *target;=0A-=0A- } mid;=0A-};=0A-=0A-/*=0A- * Structure used to = pass object evaluation parameters.=0A- * Purpose is to reduce CPU stack = use.=0A- */=0A-struct acpi_evaluate_info {=0A- struct acpi_namespace_node = *prefix_node;=0A- char *pathname;=0A- union acpi_operand_object = *obj_desc;=0A- union acpi_operand_object **parameters;=0A- struct = acpi_namespace_node *resolved_node;=0A- union acpi_operand_object = *return_object;=0A- u8 pass_number;=0A- u8 parameter_type;=0A- u8 = return_object_type;=0A- u8 flags;=0A-};=0A-=0A-/* Types for parameter_type = above */=0A-=0A-#define ACPI_PARAM_ARGS 0=0A-#define = ACPI_PARAM_GPE 1=0A-=0A-/* Values for Flags above = */=0A-=0A-#define ACPI_IGNORE_RETURN_VALUE 1=0A-=0A-/* Info used by = acpi_ns_initialize_devices */=0A-=0A-struct acpi_device_walk_info {=0A- = u16 device_count;=0A- u16 num_STA;=0A- u16 num_INI;=0A- = struct acpi_table_desc *table_desc;=0A- struct acpi_evaluate_info = *evaluate_info;=0A-};=0A-=0A-/* TBD: [Restructure] Merge with struct above = */=0A-=0A-struct acpi_walk_info {=0A- u32 debug_level;=0A- u32 = count;=0A- acpi_owner_id owner_id;=0A- u8 display_type;=0A-};=0A-= =0A-/* Display Types */=0A-=0A-#define ACPI_DISPLAY_SUMMARY (u8) = 0=0A-#define ACPI_DISPLAY_OBJECTS (u8) 1=0A-#define ACPI_DISPLAY_MAS= K (u8) 1=0A-=0A-#define ACPI_DISPLAY_SHORT (u8) = 2=0A-=0A-#endif=0A--- 2011-02-10.orig/xen/include/acpi/actables.h=0A+++ = 2011-02-10/xen/include/acpi/actables.h=0A@@ -81,15 +81,6 @@ void acpi_tb_de= lete_table(struct acpi_ta=0A =0A void acpi_tb_terminate(void);=0A =0A-void = acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index);=0A-=0A-acp= i_status acpi_tb_allocate_owner_id(acpi_native_uint table_index);=0A-=0A-ac= pi_status acpi_tb_release_owner_id(acpi_native_uint table_index);=0A-=0A-ac= pi_status=0A-acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_= id * owner_id);=0A-=0A u8 acpi_tb_is_table_loaded(acpi_native_uint = table_index);=0A =0A void acpi_tb_set_table_loaded_flag(acpi_native_uint = table_index, u8 is_loaded);=0A@@ -97,8 +88,6 @@ void acpi_tb_set_table_load= ed_flag(acpi_=0A /*=0A * tbutils - table manager utilities=0A */=0A-u8 = acpi_tb_tables_loaded(void);=0A-=0A void=0A acpi_tb_print_table_header(acpi= _physical_address address,=0A struct acpi_table_header= *header);=0A--- 2011-02-10.orig/xen/include/acpi/actypes.h=0A+++ = 2011-02-10/xen/include/acpi/actypes.h=0A@@ -222,24 +222,6 @@ typedef = acpi_native_uint acpi_size;=0A #define acpi_thread_id = acpi_native_uint=0A #endif=0A =0A-/* Object returned from acpi_os_create_lo= ck */=0A-=0A-#ifndef acpi_spinlock=0A-#define acpi_spinlock = void *=0A-#endif=0A-=0A-/* Flags for acpi_os_acquire_lock/acpi_os_releas= e_lock */=0A-=0A-#ifndef acpi_cpu_flags=0A-#define acpi_cpu_flags = acpi_native_uint=0A-#endif=0A-=0A-/* Object returned from = acpi_os_create_cache */=0A-=0A-#ifndef acpi_cache_t=0A-#define acpi_cache_t= struct acpi_memory_list=0A-#endif=0A-=0A /* Use C99 = uintptr_t for pointer casting if available, "void *" otherwise */=0A =0A = #ifndef acpi_uintptr_t=0A@@ -539,62 +521,6 @@ typedef u32 acpi_event_status= ;=0A #define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02=0A = #define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04=0A = =0A-/*=0A- * General Purpose Events (GPE)=0A- */=0A-#define ACPI_GPE_INVALI= D 0xFF=0A-#define ACPI_GPE_MAX 0xFF=0A-#d= efine ACPI_NUM_GPE 256=0A-=0A-#define ACPI_GPE_ENABLE = 0=0A-#define ACPI_GPE_DISABLE 1=0A-=0A-/*=0A- = * GPE info flags - Per GPE=0A- * +-+-+-+---+---+-+=0A- * |7|6|5|4:3|2:1|0|= =0A- * +-+-+-+---+---+-+=0A- * | | | | | |=0A- * | | | | | +--- = Interrupt type: Edge or Level Triggered=0A- * | | | | +--- Type: = Wake-only, Runtime-only, or wake/runtime=0A- * | | | +--- Type of = dispatch -- to method, handler, or none=0A- * | | +--- Enabled for = runtime?=0A- * | +--- Enabled for wake?=0A- * +--- Unused=0A- */=0A-#defi= ne ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01=0A-#define ACPI_GPE_LEVEL_TRIG= GERED (u8) 0x01=0A-#define ACPI_GPE_EDGE_TRIGGERED (u8) = 0x00=0A-=0A-#define ACPI_GPE_TYPE_MASK (u8) 0x06=0A-#define = ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06=0A-#define ACPI_GPE_TYPE_WAKE = (u8) 0x02=0A-#define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 = /* Default */=0A-=0A-#define ACPI_GPE_DISPATCH_MASK (u8) = 0x18=0A-#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08=0A-#define = ACPI_GPE_DISPATCH_METHOD (u8) 0x10=0A-#define ACPI_GPE_DISPATCH_NOT_= USED (u8) 0x00 /* Default */=0A-=0A-#define ACPI_GPE_RUN_ENABLE_MA= SK (u8) 0x20=0A-#define ACPI_GPE_RUN_ENABLED (u8) = 0x20=0A-#define ACPI_GPE_RUN_DISABLED (u8) 0x00 /* Default = */=0A-=0A-#define ACPI_GPE_WAKE_ENABLE_MASK (u8) 0x40=0A-#define = ACPI_GPE_WAKE_ENABLED (u8) 0x40=0A-#define ACPI_GPE_WAKE_DISABLED= (u8) 0x00 /* Default */=0A-=0A-#define ACPI_GPE_ENABLE_MASK = (u8) 0x60 /* Both run/wake */=0A-=0A-/*=0A- * Flags for GPE = and Lock interfaces=0A- */=0A-#define ACPI_EVENT_WAKE_ENABLE 0x2 = /* acpi_gpe_enable */=0A-#define ACPI_EVENT_WAKE_DISABLE 0x2 /* = acpi_gpe_disable */=0A-=0A-#define ACPI_NOT_ISR = 0x1=0A-#define ACPI_ISR 0x0=0A-=0A /* Notify types = */=0A =0A #define ACPI_SYSTEM_NOTIFY 0x1=0A@@ -720,175 +646,6 = @@ struct acpi_buffer {=0A };=0A =0A /*=0A- * name_type for acpi_get_name= =0A- */=0A-#define ACPI_FULL_PATHNAME 0=0A-#define ACPI_SINGLE= _NAME 1=0A-#define ACPI_NAME_TYPE_MAX = 1=0A-=0A-/*=0A- * Structure and flags for acpi_get_system_info=0A- = */=0A-#define ACPI_SYS_MODE_UNKNOWN 0x0000=0A-#define ACPI_SYS_MO= DE_ACPI 0x0001=0A-#define ACPI_SYS_MODE_LEGACY = 0x0002=0A-#define ACPI_SYS_MODES_MASK 0x0003=0A-=0A-/*=0A- * = System info returned by acpi_get_system_info()=0A- */=0A-struct acpi_system= _info {=0A- u32 acpi_ca_version;=0A- u32 flags;=0A- u32 = timer_resolution;=0A- u32 reserved1;=0A- u32 reserved2;=0A- = u32 debug_level;=0A- u32 debug_layer;=0A-};=0A-=0A-/*=0A- * Types = specific to the OS service interfaces=0A- */=0A-typedef u32(ACPI_SYSTEM_XFA= CE * acpi_osd_handler) (void *context);=0A-=0A-typedef void=0A- (ACPI_SYSTE= M_XFACE * acpi_osd_exec_callback) (void *context);=0A-=0A-/*=0A- * Various = handlers and callback procedures=0A- */=0A-typedef u32(*acpi_event_handler)= (void *context);=0A-=0A-typedef=0A-void (*acpi_notify_handler) (acpi_handl= e device, u32 value, void *context);=0A-=0A-typedef=0A-void (*acpi_object_h= andler) (acpi_handle object, u32 function, void *data);=0A-=0A-typedef = acpi_status(*acpi_init_handler) (acpi_handle object, u32 function);=0A-=0A-= #define ACPI_INIT_DEVICE_INI 1=0A-=0A-typedef=0A-acpi_status(*acpi_e= xception_handler) (acpi_status aml_status,=0A- = acpi_name name,=0A- u16 opcode,=0A- = u32 aml_offset, void *context);=0A-=0A-/* Address = Spaces (For Operation Regions) */=0A-=0A-typedef=0A-acpi_status(*acpi_adr_s= pace_handler) (u32 function,=0A- = acpi_physical_address address,=0A- u32 = bit_width,=0A- acpi_integer * value,=0A- = void *handler_context,=0A- = void *region_context);=0A-=0A-#define ACPI_DEFAULT_HANDLER = NULL=0A-=0A-typedef=0A-acpi_status(*acpi_adr_space_setup) (acpi_handle = region_handle,=0A- u32 function,=0A- = void *handler_context,=0A- = void **region_context);=0A-=0A-#define ACPI_REGION_ACTIVATE 0=0A-#defin= e ACPI_REGION_DEACTIVATE 1=0A-=0A-typedef=0A-acpi_status(*acpi_walk_callba= ck) (acpi_handle obj_handle,=0A- u32 = nesting_level,=0A- void *context, void = **return_value);=0A-=0A-/* Interrupt handler return values */=0A-=0A-#defin= e ACPI_INTERRUPT_NOT_HANDLED 0x00=0A-#define ACPI_INTERRUPT_HANDLED = 0x01=0A-=0A-/* Common string version of device HIDs and UIDs = */=0A-=0A-struct acpica_device_id {=0A- char value[ACPI_DEVICE_ID_LENGTH];= =0A-};=0A-=0A-/* Common string version of device CIDs */=0A-=0A-struct = acpi_compatible_id {=0A- char value[ACPI_MAX_CID_LENGTH];=0A-};=0A-= =0A-struct acpi_compatible_id_list {=0A- u32 count;=0A- u32 = size;=0A- struct acpi_compatible_id id[1];=0A-};=0A-=0A-/* Structure = and flags for acpi_get_object_info */=0A-=0A-#define ACPI_VALID_STA = 0x0001=0A-#define ACPI_VALID_ADR 0x0002=0A-#defi= ne ACPI_VALID_HID 0x0004=0A-#define ACPI_VALID_UID = 0x0008=0A-#define ACPI_VALID_CID 0x0010=0A-#defi= ne ACPI_VALID_SXDS 0x0020=0A-=0A-/* Flags for _STA method = */=0A-=0A-#define ACPI_STA_DEVICE_PRESENT 0x01=0A-#define = ACPI_STA_DEVICE_ENABLED 0x02=0A-#define ACPI_STA_DEVICE_UI = 0x04=0A-#define ACPI_STA_DEVICE_FUNCTIONING 0x08=0A-#define = ACPI_STA_DEVICE_OK 0x08 /* Synonym */=0A-#define ACPI_STA_B= ATTERY_PRESENT 0x10=0A-=0A-#define ACPI_COMMON_OBJ_INFO \=0A- = acpi_object_type type; /* ACPI object type */ = \=0A- acpi_name name /* ACPI object Name = */=0A-=0A-struct acpi_obj_info_header {=0A- ACPI_COMMON_OBJ_INFO;=0A-};= =0A-=0A-/* Structure returned from Get Object Info */=0A-=0A-struct = acpi_device_info {=0A- ACPI_COMMON_OBJ_INFO;=0A-=0A- u32 valid; = /* Indicates which fields below are valid */=0A- u32 current_status;= /* _STA value */=0A- acpi_integer address; /* _ADR value if = any */=0A- struct acpica_device_id hardware_id; /* _HID value if = any */=0A- struct acpica_device_id unique_id; /* _UID value if = any */=0A- u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates = not valid */=0A- struct acpi_compatible_id_list compatibility_id; = /* List of _CIDs if any */=0A-};=0A-=0A-/* Context structs for address = space handlers */=0A-=0A-struct acpi_pci_id {=0A- u16 segment;=0A- = u16 bus;=0A- u16 device;=0A- u16 function;=0A-};=0A-=0A-struct = acpi_mem_space_context {=0A- u32 length;=0A- acpi_physical_address = address;=0A- acpi_physical_address mapped_physical_address;=0A- u8 = *mapped_logical_address;=0A- acpi_size mapped_length;=0A-};=0A-=0A-/*=0A= - * Definitions for Resource Attributes=0A- */=0A-typedef u16 acpi_rs_lengt= h; /* Resource Length field is fixed at 16 bits */=0A-typedef u32 = acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) =3D = (64_k-1)+3 */=0A-=0A-/*=0A * Memory Attributes=0A */=0A #define = ACPI_READ_ONLY_MEMORY (u8) 0x00=0A@@ -968,270 +725,4 @@ typedef = u32 acpi_rsdesc_size; /* Max Res=0A #define ACPI_PRODUCER = (u8) 0x00=0A #define ACPI_CONSUMER (u8) 0x01=0A = =0A-/*=0A- * If possible, pack the following structures to byte = alignment=0A- */=0A-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED=0A-#pragma = pack(1)=0A-#endif=0A-=0A-/* UUID data structures for use in vendor-defined = resource descriptors */=0A-=0A-struct acpi_uuid {=0A- u8 data[ACPI_UUID_L= ENGTH];=0A-};=0A-=0A-struct acpi_vendor_uuid {=0A- u8 subtype;=0A- u8 = data[ACPI_UUID_LENGTH];=0A-};=0A-=0A-/*=0A- * Structures used to describe = device resources=0A- */=0A-struct acpi_resource_irq {=0A- u8 = triggering;=0A- u8 polarity;=0A- u8 sharable;=0A- u8 = interrupt_count;=0A- u8 interrupts[1];=0A-};=0A-=0A-struct acpi_resource= _dma {=0A- u8 type;=0A- u8 bus_master;=0A- u8 transfer;=0A- = u8 channel_count;=0A- u8 channels[1];=0A-};=0A-=0A-struct acpi_resource_s= tart_dependent {=0A- u8 compatibility_priority;=0A- u8 performance_robu= stness;=0A-};=0A-=0A-/*=0A- * END_DEPENDENT_FUNCTIONS_RESOURCE struct is = not=0A- * needed because it has no fields=0A- */=0A-=0A-struct acpi_resourc= e_io {=0A- u8 io_decode;=0A- u8 alignment;=0A- u8 = address_length;=0A- u16 minimum;=0A- u16 maximum;=0A-};=0A-=0A-s= truct acpi_resource_fixed_io {=0A- u16 address;=0A- u8 = address_length;=0A-};=0A-=0A-struct acpi_resource_vendor {=0A- u16 = byte_length;=0A- u8 byte_data[1];=0A-};=0A-=0A-/* Vendor resource = with UUID info (introduced in ACPI 3.0) */=0A-=0A-struct acpi_resource_vend= or_typed {=0A- u16 byte_length;=0A- u8 uuid_subtype;=0A- u8 = uuid[ACPI_UUID_LENGTH];=0A- u8 byte_data[1];=0A-};=0A-=0A-struct = acpi_resource_end_tag {=0A- u8 checksum;=0A-};=0A-=0A-struct acpi_resou= rce_memory24 {=0A- u8 write_protect;=0A- u16 minimum;=0A- = u16 maximum;=0A- u16 alignment;=0A- u16 address_length;=0A-};= =0A-=0A-struct acpi_resource_memory32 {=0A- u8 write_protect;=0A- = u32 minimum;=0A- u32 maximum;=0A- u32 alignment;=0A- = u32 address_length;=0A-};=0A-=0A-struct acpi_resource_fixed_memory32 {=0A- = u8 write_protect;=0A- u32 address;=0A- u32 address_length;=0A-};= =0A-=0A-struct acpi_memory_attribute {=0A- u8 write_protect;=0A- u8 = caching;=0A- u8 range_type;=0A- u8 translation;=0A-};=0A-=0A-struct= acpi_io_attribute {=0A- u8 range_type;=0A- u8 translation;=0A-= u8 translation_type;=0A- u8 reserved1;=0A-};=0A-=0A-union = acpi_resource_attribute {=0A- struct acpi_memory_attribute mem;=0A- = struct acpi_io_attribute io;=0A-=0A- /* Used for the *word_space macros = */=0A-=0A- u8 type_specific;=0A-};=0A-=0A-struct acpi_resource_source = {=0A- u8 index;=0A- u16 string_length;=0A- char *string_ptr;=0A-};=0A-= =0A-/* Fields common to all address descriptors, 16/32/64 bit */=0A-=0A-#de= fine ACPI_RESOURCE_ADDRESS_COMMON \=0A- u8 = resource_type; \=0A- u8 producer_consumer; = \=0A- u8 decode; \=0A- u8 = min_address_fixed; \=0A- u8 = max_address_fixed; \=0A- union acpi_resource_attribute = info;=0A-=0A-struct acpi_resource_address {=0A-ACPI_RESOURCE_ADDRESS_COMMON= };=0A-=0A-struct acpi_resource_address16 {=0A- ACPI_RESOURCE_ADDRESS_COMMO= N u16 granularity;=0A- u16 minimum;=0A- u16 maximum;=0A- = u16 translation_offset;=0A- u16 address_length;=0A- struct acpi_resourc= e_source resource_source;=0A-};=0A-=0A-struct acpi_resource_address32 = {=0A- ACPI_RESOURCE_ADDRESS_COMMON u32 granularity;=0A- u32 = minimum;=0A- u32 maximum;=0A- u32 translation_offset;=0A- = u32 address_length;=0A- struct acpi_resource_source resource_source;=0A-};= =0A-=0A-struct acpi_resource_address64 {=0A- ACPI_RESOURCE_ADDRESS_COMMO= N u64 granularity;=0A- u64 minimum;=0A- u64 maximum;=0A- = u64 translation_offset;=0A- u64 address_length;=0A- struct acpi_resourc= e_source resource_source;=0A-};=0A-=0A-struct acpi_resource_extended_addres= s64 {=0A- ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD;=0A- = u64 granularity;=0A- u64 minimum;=0A- u64 maximum;=0A- = u64 translation_offset;=0A- u64 address_length;=0A- u64 type_specific;= =0A-};=0A-=0A-struct acpi_resource_extended_irq {=0A- u8 producer_consume= r;=0A- u8 triggering;=0A- u8 polarity;=0A- u8 sharable;=0A- = u8 interrupt_count;=0A- struct acpi_resource_source resource_source;=0A- = u32 interrupts[1];=0A-};=0A-=0A-struct acpi_resource_generic_register = {=0A- u8 space_id;=0A- u8 bit_width;=0A- u8 bit_offset;=0A- = u8 access_size;=0A- u64 address;=0A-};=0A-=0A-/* ACPI_RESOURCE_TYPEs = */=0A-=0A-#define ACPI_RESOURCE_TYPE_IRQ 0=0A-#define = ACPI_RESOURCE_TYPE_DMA 1=0A-#define ACPI_RESOURCE_TYPE_STA= RT_DEPENDENT 2=0A-#define ACPI_RESOURCE_TYPE_END_DEPENDENT = 3=0A-#define ACPI_RESOURCE_TYPE_IO 4=0A-#define = ACPI_RESOURCE_TYPE_FIXED_IO 5=0A-#define ACPI_RESOURCE_TYPE_VEN= DOR 6=0A-#define ACPI_RESOURCE_TYPE_END_TAG = 7=0A-#define ACPI_RESOURCE_TYPE_MEMORY24 8=0A-#define = ACPI_RESOURCE_TYPE_MEMORY32 9=0A-#define ACPI_RESOURCE_TYPE_FIX= ED_MEMORY32 10=0A-#define ACPI_RESOURCE_TYPE_ADDRESS16 = 11=0A-#define ACPI_RESOURCE_TYPE_ADDRESS32 12=0A-#define = ACPI_RESOURCE_TYPE_ADDRESS64 13=0A-#define ACPI_RESOURCE_TYPE_EX= TENDED_ADDRESS64 14 /* ACPI 3.0 */=0A-#define ACPI_RESOURCE_TYPE_EXTEND= ED_IRQ 15=0A-#define ACPI_RESOURCE_TYPE_GENERIC_REGISTER = 16=0A-#define ACPI_RESOURCE_TYPE_MAX 16=0A-=0A-union = acpi_resource_data {=0A- struct acpi_resource_irq irq;=0A- = struct acpi_resource_dma dma;=0A- struct acpi_resource_start_dependen= t start_dpf;=0A- struct acpi_resource_io io;=0A- struct acpi_resourc= e_fixed_io fixed_io;=0A- struct acpi_resource_vendor vendor;=0A- = struct acpi_resource_vendor_typed vendor_typed;=0A- struct acpi_resourc= e_end_tag end_tag;=0A- struct acpi_resource_memory24 memory24;=0A- = struct acpi_resource_memory32 memory32;=0A- struct acpi_resource_fixed_= memory32 fixed_memory32;=0A- struct acpi_resource_address16 address16;= =0A- struct acpi_resource_address32 address32;=0A- struct acpi_resourc= e_address64 address64;=0A- struct acpi_resource_extended_address64 = ext_address64;=0A- struct acpi_resource_extended_irq extended_irq;=0A-= struct acpi_resource_generic_register generic_reg;=0A-=0A- /* = Common fields */=0A-=0A- struct acpi_resource_address address; /* = Common 16/32/64 address fields */=0A-};=0A-=0A-struct acpi_resource {=0A- = u32 type;=0A- u32 length;=0A- union acpi_resource_data data;=0A-};=0A-=0A= -/* restore default alignment */=0A-=0A-#pragma pack()=0A-=0A-#define = ACPI_RS_SIZE_MIN 12=0A-#define ACPI_RS_SIZE_NO_DATA = 8 /* Id + Length fields */=0A-#define ACPI_RS_SIZE(type) = (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))=0A-=0A-#define = ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + = res->length)=0A-=0A-struct acpi_pci_routing_table {=0A- u32 length;=0A- = u32 pin;=0A- acpi_integer address; /* here for 64-bit alignment = */=0A- u32 source_index;=0A- char source[4]; /* pad to 64 bits = so sizeof() works in all cases */=0A-};=0A-=0A #endif = /* __ACTYPES_H__ */=0A--- 2011-02-10.orig/xen/include/acpi/acutils.h=0A+++ = 2011-02-10/xen/include/acpi/acutils.h=0A@@ -44,32 +44,6 @@=0A #ifndef = _ACUTILS_H=0A #define _ACUTILS_H=0A =0A-extern const u8 acpi_gbl_resource_a= ml_sizes[];=0A-=0A-/* Strings used by the disassembler and debugger = resource dump routines */=0A-=0A-#if defined(ACPI_DISASSEMBLER) || defined = (ACPI_DEBUGGER)=0A-=0A-extern const char *acpi_gbl_bm_decode[];=0A-extern = const char *acpi_gbl_config_decode[];=0A-extern const char *acpi_gbl_consum= e_decode[];=0A-extern const char *acpi_gbl_dec_decode[];=0A-extern const = char *acpi_gbl_he_decode[];=0A-extern const char *acpi_gbl_io_decode[];=0A-= extern const char *acpi_gbl_ll_decode[];=0A-extern const char *acpi_gbl_max= _decode[];=0A-extern const char *acpi_gbl_mem_decode[];=0A-extern const = char *acpi_gbl_min_decode[];=0A-extern const char *acpi_gbl_mtp_decode[];= =0A-extern const char *acpi_gbl_rng_decode[];=0A-extern const char = *acpi_gbl_rw_decode[];=0A-extern const char *acpi_gbl_shr_decode[];=0A-exte= rn const char *acpi_gbl_siz_decode[];=0A-extern const char *acpi_gbl_trs_de= code[];=0A-extern const char *acpi_gbl_ttp_decode[];=0A-extern const char = *acpi_gbl_typ_decode[];=0A-#endif=0A-=0A /* Types for Resource descriptor = entries */=0A =0A #define ACPI_INVALID_RESOURCE 0=0A@@ -77,69 = +51,10 @@ extern const char *acpi_gbl_typ_decode[]=0A #define ACPI_VARIABLE= _LENGTH 2=0A #define ACPI_SMALL_VARIABLE_LENGTH 3=0A = =0A-typedef=0A-acpi_status(*acpi_walk_aml_callback) (u8 * aml,=0A- = u32 length,=0A- u32 = offset,=0A- u8 resource_index, void = **context);=0A-=0A-typedef=0A-acpi_status(*acpi_pkg_callback) (u8 = object_type,=0A- union acpi_operand_object = * source_object,=0A- union acpi_generic_state = * state,=0A- void *context);=0A-=0A-struct = acpi_pkg_info {=0A- u8 *free_space;=0A- acpi_size length;=0A- = u32 object_space;=0A- u32 num_packages;=0A-};=0A-=0A-#define REF_INCREMEN= T (u16) 0=0A-#define REF_DECREMENT (u16) 1=0A-#define = REF_FORCE_DELETE (u16) 2=0A-=0A-/* acpi_ut_dump_buffer */=0A-=0A-#define= DB_BYTE_DISPLAY 1=0A-#define DB_WORD_DISPLAY 2=0A-#define = DB_DWORD_DISPLAY 4=0A-#define DB_QWORD_DISPLAY 8=0A-=0A /*=0A * = utglobal - Global data structures and procedures=0A */=0A-void acpi_ut_ini= t_globals(void);=0A-=0A-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBU= GGER)=0A-=0A-char *acpi_ut_get_mutex_name(u32 mutex_id);=0A-=0A-#endif=0A-= =0A-char *acpi_ut_get_type_name(acpi_object_type type);=0A-=0A-char = *acpi_ut_get_node_name(void *object);=0A-=0A-char *acpi_ut_get_descriptor_n= ame(void *object);=0A-=0A-char *acpi_ut_get_object_type_name(union = acpi_operand_object *obj_desc);=0A-=0A-char *acpi_ut_get_region_name(u8 = space_id);=0A-=0A-char *acpi_ut_get_event_name(u32 event_id);=0A-=0A-char = acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position);=0A-=0A-u8 = acpi_ut_valid_object_type(acpi_object_type type);=0A-=0A-/*=0A- * utinit - = miscellaneous initialization and shutdown=0A- */=0A-acpi_status acpi_ut_har= dware_initialize(void);=0A-=0A-void acpi_ut_subsystem_shutdown(void);=0A+co= nst char *acpi_ut_get_region_name(u8 space_id);=0A =0A /*=0A * utclib - = Local implementations of C library functions=0A@@ -200,45 +115,8 @@ extern = const u8 _acpi_ctype[];=0A #endif /* = ACPI_USE_SYSTEM_CLIBRARY */=0A =0A /*=0A- * utcopy - Object construction = and conversion interfaces=0A- */=0A-acpi_status=0A-acpi_ut_build_simple_obj= ect(union acpi_operand_object *obj,=0A- union = acpi_object *user_obj,=0A- u8 * data_space, u32 * = buffer_space_used);=0A-=0A-acpi_status=0A-acpi_ut_build_package_object(unio= n acpi_operand_object *obj,=0A- u8 * buffer, u32 * = space_used);=0A-=0A-acpi_status=0A-acpi_ut_copy_iobject_to_eobject(union = acpi_operand_object *obj,=0A- struct acpi_buffer = *ret_buffer);=0A-=0A-acpi_status=0A-acpi_ut_copy_eobject_to_iobject(union = acpi_object *obj,=0A- union acpi_operand_object = **internal_obj);=0A-=0A-acpi_status=0A-acpi_ut_copy_isimple_to_isimple(unio= n acpi_operand_object *source_obj,=0A- union = acpi_operand_object *dest_obj);=0A-=0A-acpi_status=0A-acpi_ut_copy_iobject_= to_iobject(union acpi_operand_object *source_desc,=0A- = union acpi_operand_object **dest_desc,=0A- = struct acpi_walk_state *walk_state);=0A-=0A-/*=0A- * utcreate - Object = creation=0A- */=0A-acpi_status=0A-acpi_ut_update_object_reference(union = acpi_operand_object *object, u16 action);=0A-=0A-/*=0A * utdebug - Debug = interfaces=0A */=0A-void acpi_ut_init_stack_ptr_trace(void);=0A-=0A void = acpi_ut_track_stack_ptr(void);=0A =0A void=0A@@ -279,16 +157,6 @@ = acpi_ut_ptr_exit(u32 line_number,=0A const char *function_name,= =0A char *module_name, u32 component_id, u8 * ptr);=0A = =0A-void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 = component_id);=0A-=0A-void acpi_ut_dump_buffer2(u8 * buffer, u32 count, = u32 display);=0A-=0A-void acpi_ut_report_error(char *module_name, u32 = line_number);=0A-=0A-void acpi_ut_report_info(char *module_name, u32 = line_number);=0A-=0A-void acpi_ut_report_warning(char *module_name, u32 = line_number);=0A-=0A /* Error and message reporting interfaces */=0A =0A = void ACPI_INTERNAL_VAR_XFACE=0A@@ -324,248 +192,8 @@ acpi_ut_info(char = *module_name,=0A u32 line_number, char *format, ...) ACPI_PRINT= F_LIKE(3);=0A =0A /*=0A- * utdelete - Object deletion and reference = counts=0A- */=0A-void acpi_ut_add_reference(union acpi_operand_object = *object);=0A-=0A-void acpi_ut_remove_reference(union acpi_operand_object = *object);=0A-=0A-void acpi_ut_delete_internal_package_object(union = acpi_operand_object *object);=0A-=0A-void acpi_ut_delete_internal_simple_ob= ject(union acpi_operand_object *object);=0A-=0A-void acpi_ut_delete_interna= l_object_list(union acpi_operand_object **obj_list);=0A-=0A-/*=0A- * = uteval - object evaluation=0A- */=0A-acpi_status acpi_ut_osi_implementation= (struct acpi_walk_state *walk_state);=0A-=0A-acpi_status=0A-acpi_ut_evaluat= e_object(struct acpi_namespace_node *prefix_node,=0A- = char *path,=0A- u32 expected_return_btypes,=0A- = union acpi_operand_object **return_desc);=0A-=0A-acpi_status=0A-acpi_ut_eva= luate_numeric_object(char *object_name,=0A- = struct acpi_namespace_node *device_node,=0A- = acpi_integer * address);=0A-=0A-acpi_status=0A-acpi_ut_execute_HID(struct = acpi_namespace_node *device_node,=0A- struct acpica_device_id= *hid);=0A-=0A-acpi_status=0A-acpi_ut_execute_CID(struct acpi_namespace_nod= e *device_node,=0A- struct acpi_compatible_id_list = **return_cid_list);=0A-=0A-acpi_status=0A-acpi_ut_execute_STA(struct = acpi_namespace_node *device_node,=0A- u32 * status_flags);=0A= -=0A-acpi_status=0A-acpi_ut_execute_UID(struct acpi_namespace_node = *device_node,=0A- struct acpica_device_id *uid);=0A-=0A-a= cpi_status=0A-acpi_ut_execute_sxds(struct acpi_namespace_node *device_node,= u8 * highest);=0A-=0A-/*=0A- * utobject - internal object create/delete/ca= che routines=0A- */=0A-union acpi_operand_object *acpi_ut_create_internal_o= bject_dbg(char *module_name,=0A- = u32 line_number,=0A- = u32 component_id,=0A- = acpi_object_type=0A- = type);=0A-=0A-void *acpi_ut_allocate_object_desc_dbg(char = *module_name,=0A- u32 line_number, = u32 component_id);=0A-=0A-#define acpi_ut_create_internal_object(t) = acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t= )=0A-#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_d= bg (_acpi_module_name,__LINE__,_COMPONENT)=0A-=0A-void acpi_ut_delete_objec= t_desc(union acpi_operand_object *object);=0A-=0A-u8 acpi_ut_valid_internal= _object(void *object);=0A-=0A-union acpi_operand_object *acpi_ut_create_pac= kage_object(u32 count);=0A-=0A-union acpi_operand_object *acpi_ut_create_bu= ffer_object(acpi_size buffer_size);=0A-=0A-union acpi_operand_object = *acpi_ut_create_string_object(acpi_size string_size);=0A-=0A-acpi_status=0A= -acpi_ut_get_object_size(union acpi_operand_object *obj, acpi_size * = obj_length);=0A-=0A-/*=0A- * utstate - Generic state creation/cache = routines=0A- */=0A-void=0A-acpi_ut_push_generic_state(union acpi_generic_st= ate **list_head,=0A- union acpi_generic_state = *state);=0A-=0A-union acpi_generic_state *acpi_ut_pop_generic_state(union = acpi_generic_state=0A- = **list_head);=0A-=0A-union acpi_generic_state *acpi_ut_create_generic_state= (void);=0A-=0A-struct acpi_thread_state *acpi_ut_create_thread_state(void);= =0A-=0A-union acpi_generic_state *acpi_ut_create_update_state(union = acpi_operand_object=0A- = *object, u16 action);=0A-=0A-union acpi_generic_state *acpi_ut_create_pkg_s= tate(void *internal_object,=0A- = void *external_object,=0A- = u16 index);=0A-=0A-acpi_status=0A-acpi_ut_create_update_state_and_push(unio= n acpi_operand_object *object,=0A- u16 = action,=0A- union acpi_generic_state = **state_list);=0A-=0A-#ifdef ACPI_FUTURE_USAGE=0A-acpi_status=0A-acpi_ut= _create_pkg_state_and_push(void *internal_object,=0A- = void *external_object,=0A- u16 index,=0A- = union acpi_generic_state **state_list);=0A-#endif= /* ACPI_FUTURE_USAGE */=0A-=0A-union = acpi_generic_state *acpi_ut_create_control_state(void);=0A-=0A-void = acpi_ut_delete_generic_state(union acpi_generic_state *state);=0A-=0A-/*=0A= - * utmath=0A- */=0A-acpi_status=0A-acpi_ut_divide(acpi_integer in_dividend= ,=0A- acpi_integer in_divisor,=0A- acpi_integer * = out_quotient, acpi_integer * out_remainder);=0A-=0A-acpi_status=0A-acpi_ut_= short_divide(acpi_integer in_dividend,=0A- u32 = divisor,=0A- acpi_integer * out_quotient, u32 * out_remaind= er);=0A-=0A-/*=0A * utmisc=0A */=0A const char *acpi_ut_validate_exceptio= n(acpi_status status);=0A =0A-u8 acpi_ut_is_aml_table(struct acpi_table_hea= der *table);=0A-=0A-acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * = owner_id);=0A-=0A-void acpi_ut_release_owner_id(acpi_owner_id * owner_id);= =0A-=0A-acpi_status=0A-acpi_ut_walk_package_tree(union acpi_operand_object = *source_object,=0A- void *target_object,=0A- = acpi_pkg_callback walk_callback, void *context);=0A-=0A-void = acpi_ut_strupr(char *src_string);=0A-=0A-void acpi_ut_print_string(char = *string, u8 max_length);=0A-=0A-u8 acpi_ut_valid_acpi_name(u32 name);=0A-= =0A-acpi_name acpi_ut_repair_name(char *name);=0A-=0A-u8 acpi_ut_valid_acpi= _char(char character, acpi_native_uint position);=0A-=0A-acpi_status=0A-acp= i_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);=0A-=0A-= /* Values for Base above (16=3DHex, 10=3DDecimal) */=0A-=0A-#define = ACPI_ANY_BASE 0=0A-=0A-u32 acpi_ut_dword_byte_swap(u32 value);=0A-= =0A-void acpi_ut_set_integer_width(u8 revision);=0A-=0A-#ifdef ACPI_DEBUG_O= UTPUT=0A-void=0A-acpi_ut_display_init_pathname(u8 type,=0A- = struct acpi_namespace_node *obj_handle,=0A- = char *path);=0A-#endif=0A-=0A-/*=0A- * utresrc=0A- */=0A-acpi_status=0A-= acpi_ut_walk_aml_resources(u8 * aml,=0A- = acpi_size aml_length,=0A- acpi_walk_aml_callback = user_function,=0A- void **context);=0A-=0A-acpi_sta= tus acpi_ut_validate_resource(void *aml, u8 * return_index);=0A-=0A-u32 = acpi_ut_get_descriptor_length(void *aml);=0A-=0A-u16 acpi_ut_get_resource_l= ength(void *aml);=0A-=0A-u8 acpi_ut_get_resource_header_length(void = *aml);=0A-=0A-u8 acpi_ut_get_resource_type(void *aml);=0A-=0A-acpi_status= =0A-acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc,=0A- = u8 ** end_tag);=0A-=0A-/*=0A- * utmutex - mutex = support=0A- */=0A-acpi_status acpi_ut_mutex_initialize(void);=0A-=0A-void = acpi_ut_mutex_terminate(void);=0A-=0A-acpi_status acpi_ut_acquire_mutex(acp= i_mutex_handle mutex_id);=0A-=0A-acpi_status acpi_ut_release_mutex(acpi_mut= ex_handle mutex_id);=0A-=0A-/*=0A- * utalloc - memory allocation and = object caching=0A- */=0A-acpi_status acpi_ut_create_caches(void);=0A-=0A-ac= pi_status acpi_ut_delete_caches(void);=0A-=0A-acpi_status acpi_ut_validate_= buffer(struct acpi_buffer *buffer);=0A-=0A-acpi_status=0A-acpi_ut_initializ= e_buffer(struct acpi_buffer *buffer,=0A- = acpi_size required_length);=0A-=0A-void *acpi_ut_allocate(acpi_size size, = u32 component, char *module, u32 line);=0A-=0A-void *acpi_ut_allocate_zeroe= d(acpi_size size,=0A- u32 component, char *module, = u32 line);=0A-=0A-#ifdef ACPI_DBG_TRACK_ALLOCATIONS=0A-void *acpi_ut_alloca= te_and_track(acpi_size size,=0A- u32 = component, char *module, u32 line);=0A-=0A-void *acpi_ut_allocate_zeroed_an= d_track(acpi_size size,=0A- u32 = component, char *module, u32 line);=0A-=0A-void=0A-acpi_ut_free_and_track(v= oid *address, u32 component, char *module, u32 line);=0A-=0A-#ifdef = ACPI_FUTURE_USAGE=0A-void acpi_ut_dump_allocation_info(void);=0A-#endif = /* ACPI_FUTURE_USAGE */=0A-=0A-void acpi_ut_dump_allocation= s(u32 component, char *module);=0A-=0A-acpi_status=0A-acpi_ut_create_list(c= har *list_name,=0A- u16 object_size, struct acpi_memory_lis= t **return_cache);=0A-=0A-#endif=0A-=0A #endif /* = _ACUTILS_H */=0A--- 2011-02-10.orig/xen/include/asm-x86/acpi.h=0A+++ = 2011-02-10/xen/include/asm-x86/acpi.h=0A@@ -84,8 +84,6 @@ extern bool_t = acpi_disabled, acpi_pci_di=0A extern bool_t acpi_skip_timer_override;=0A = extern u32 acpi_smi_cmd;=0A extern u8 acpi_enable_value, acpi_disable_value= ;=0A-extern u8 acpi_sci_flags;=0A-extern int acpi_sci_override_gsi;=0A = void acpi_pic_sci_set_trigger(unsigned int, u16);=0A =0A static inline = void disable_acpi(void)=0A--- 2011-02-10.orig/xen/include/asm-x86/system.h= =0A+++ 2011-02-10/xen/include/asm-x86/system.h=0A@@ -132,8 +132,6 @@ = static always_inline unsigned long __cmp=0A return old;=0A }=0A = =0A-#define __HAVE_ARCH_CMPXCHG=0A-=0A #define cmpxchgptr(ptr,o,n) ({ = \=0A const __typeof__(**(ptr)) = *__o =3D (o); \=0A __typeof__(**(ptr)) = *__n =3D (n); \=0A--- 2011-02-10.orig/x= en/include/xen/acpi.h=0A+++ 2011-02-10/xen/include/xen/acpi.h=0A@@ -32,21 = +32,10 @@=0A #include =0A =0A #include =0A-#includ= e =0A-#include =0A #include = =0A =0A #ifdef CONFIG_ACPI_BOOT=0A =0A-enum acpi_irq_model_id = {=0A- ACPI_IRQ_MODEL_PIC =3D 0,=0A- ACPI_IRQ_MODEL_IOAPIC,=0A- = ACPI_IRQ_MODEL_IOSAPIC,=0A- ACPI_IRQ_MODEL_COUNT=0A-};=0A-=0A-extern = enum acpi_irq_model_id acpi_irq_model;=0A-=0A enum acpi_madt_entry_id = {=0A ACPI_MADT_LAPIC =3D 0,=0A ACPI_MADT_IOAPIC,=0A@@ -316,8 = +305,6 @@ extern int acpi_mp_config;=0A =0A extern u32 pci_mmcfg_base_addr;= =0A =0A-extern int sbf_port ;=0A-=0A #else /*!CONFIG_ACPI_BOOT*/=0A = =0A #define acpi_mp_config 0=0A@@ -346,67 +333,6 @@ int acpi_gsi_to_ir= q (u32 gsi, unsigned i=0A void acpi_unregister_gsi (u32 gsi);=0A #endif=0A = =0A-#ifdef CONFIG_ACPI_PCI=0A-=0A-struct acpi_prt_entry {=0A- struct = list_head node;=0A- struct acpi_pci_id id;=0A- u8 = pin;=0A- struct {=0A- acpi_handle = handle;=0A- u32 index;=0A- } = link;=0A- u32 irq;=0A-};=0A-=0A-struct = acpi_prt_list {=0A- int count;=0A- struct = list_head entries;=0A-};=0A-=0A-extern struct acpi_prt_list = acpi_prt;=0A-=0A-struct pci_dev;=0A-=0A-int acpi_pci_irq_enable (struct = pci_dev *dev);=0A-void acpi_penalize_isa_irq(int irq);=0A-=0A-#ifdef = CONFIG_ACPI_DEALLOCATE_IRQ=0A-void acpi_pci_irq_disable (struct pci_dev = *dev);=0A-#endif=0A-=0A-struct acpi_pci_driver {=0A- struct acpi_pci_dri= ver *next;=0A- int (*add)(acpi_handle handle);=0A- void (*remove)(acpi= _handle handle);=0A-};=0A-=0A-int acpi_pci_register_driver(struct = acpi_pci_driver *driver);=0A-void acpi_pci_unregister_driver(struct = acpi_pci_driver *driver);=0A-=0A-#endif /*CONFIG_ACPI_PCI*/=0A-=0A-#ifdef = CONFIG_ACPI_EC=0A-=0A-extern int ec_read(u8 addr, u8 *val);=0A-extern int = ec_write(u8 addr, u8 val);=0A-=0A-#endif /*CONFIG_ACPI_EC*/=0A-=0A-#ifdef = CONFIG_ACPI_INTERPRETER=0A-=0A-extern int acpi_blacklisted(void);=0A-extern= void acpi_bios_year(char *s);=0A-=0A-#else /*!CONFIG_ACPI_INTERPRETER*/=0A= -=0A-static inline int acpi_blacklisted(void)=0A-{=0A- return 0;=0A-}=0A-= =0A-#endif /*!CONFIG_ACPI_INTERPRETER*/=0A-=0A #ifdef CONFIG_ACPI_CSTATE= =0A /*=0A * Set highest legal C-state=0A --=__Part2D011A0D.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part2D011A0D.0__=--