ACPICA release 20110413 linuxized patches
Subsystems (2)
Hi, Len
ACPICA release 20110413 linuxized patches attached. Build and tested on my notebook without problem.
[PATCH 1/6] ACPICA: Split all internal Global Lock functions to new file - evglock [PATCH 2/6] ACPICA: Add more methods eligible for NULL package element removal [PATCH 3/6] ACPICA: Update internal address SpaceID for DataTable regions [PATCH 4/6] ACPICA: Move ACPI_NUM_PREDEFINED_REGIONS to a more appropriate place [PATCH 5/6] ACPICA: Execute an orphan _REG method under the EC device [PATCH 6/6] ACPICA: Update to version 20110413
Lin Ming
Quoted 1 line
From
c30d8e8305839ae0f36bc643374383cbf6cf2797Mon Sep 17 00:00:00 2001
From: Bob Moore <[email protected]>
Date: Wed, 13 Apr 2011 11:33:17 +0800
Subject: [PATCH 1/6] ACPICA: Split all internal Global Lock functions to new file - evglock
These functions were moved from evmisc.c
--- drivers/acpi/acpica/Makefile | 2 +- drivers/acpi/acpica/acevents.h | 17 ++- drivers/acpi/acpica/evglock.c | 335 ++++++++++++++++++++++++++++++++++++++++ drivers/acpi/acpica/evmisc.c | 309 ------------------------------------ 4 files changed, 347 insertions(+), 316 deletions(-)
drivers/acpi/acpica/Makefile +1 -1
@@ -14,7 +14,7 @@ acpi-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \ acpi-y += evevent.o evregion.o evsci.o evxfevnt.o \ evmisc.o evrgnini.o evxface.o evxfregn.o \ - evgpe.o evgpeblk.o evgpeinit.o evgpeutil.o evxfgpe.o + evgpe.o evgpeblk.o evgpeinit.o evgpeutil.o evxfgpe.o evglock.o acpi-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\ exconvrt.o exfldio.o exoparg1.o exprep.o exresop.o exsystem.o\
drivers/acpi/acpica/acevents.h +11 -6
@@ -58,12 +58,6 @@ u32 acpi_ev_fixed_event_detect(void);*/ u8 acpi_ev_is_notify_object (struct acpi_namespace_node *node); -acpi_status acpi_ev_acquire_global_lock (u16 timeout); - -acpi_status acpi_ev_release_global_lock (void ); - -acpi_status acpi_ev_init_global_lock_handler (void ); -u32 acpi_ev_get_gpe_number_index (u32 gpe_number); acpi_status
@@ -71,6 +65,17 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node *node, u32 notify_value);/* +* evglock - Global Lock support +*/ +acpi_status acpi_ev_init_global_lock_handler (void ); + +acpi_status acpi_ev_acquire_global_lock (u16 timeout); + +acpi_status acpi_ev_release_global_lock (void ); + +acpi_status acpi_ev_remove_global_lock_handler (void ); + +/* * evgpe - Low-level GPE support */ u32 acpi_ev_gpe_detect (struct acpi_gpe_xrupt_info *gpe_xrupt_list);
drivers/acpi/acpica/evglock.c new file +335 -0
335 lines not on this page · raw message
drivers/acpi/acpica/evmisc.c +0 -309
327 lines not on this page · raw message
Quoted 1 line
From
7ee434325a84a262910780292dfef01617a6dbf9Mon Sep 17 00:00:00 2001
From: Bob Moore <[email protected]>
Date: Wed, 13 Apr 2011 13:15:58 +0800
Subject: [PATCH 2/6] ACPICA: Add more methods eligible for NULL package element removal
This change adds another group of predefined names to the list of names eligible to have NULL package elements dynamically removed. This group is the names that return a single variable-length package containing simple data types such as integers, buffers, strings. This includes: _ALx,_BCL,_CID, _DOD,_EDL,_FIX,_PCL,_PLD,_PMD,_PRx,_PSL,_Sx, and _TZD.
http://www.acpica.org/bugzilla/show_bug.cgi?id=914
--- drivers/acpi/acpica/nsrepair.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-)
drivers/acpi/acpica/nsrepair.c +5 -8
@@ -74,7 +74,6 @@ ACPI_MODULE_NAME("nsrepair")* * Additional possible repairs: * -* Optional/unnecessary NULL package elements removed * Required package elements that are NULL replaced by Integer/String/Buffer * Incorrect standalone package wrapped with required outer package *
@@ -623,16 +622,12 @@ acpi_ns_remove_null_elements(struct acpi_predefined_data *data,ACPI_FUNCTION_NAME (ns_remove_null_elements);/* -* PTYPE1 packages contain no subpackages. -* PTYPE2 packages contain a variable number of sub-packages. We can -* safely remove all NULL elements from the PTYPE2 packages. +* We can safely remove all NULL elements from these package types: +* PTYPE1_VAR packages contain a variable number of simple data types. +* PTYPE2 packages contain a variable number of sub-packages. */ switch (package_type) { -case ACPI_PTYPE1_FIXED :case ACPI_PTYPE1_VAR : -case ACPI_PTYPE1_OPTION : -return ; -case ACPI_PTYPE2 :case ACPI_PTYPE2_COUNT :case ACPI_PTYPE2_PKG_COUNT :
@@ -642,6 +637,8 @@ acpi_ns_remove_null_elements(struct acpi_predefined_data *data,break ;default : +case ACPI_PTYPE1_FIXED : +case ACPI_PTYPE1_OPTION :return ; }
Quoted 1 line
From
f7e204fbaacb0a2b4f913e80edeeeb14a37ffcf1Mon Sep 17 00:00:00 2001
From: Bob Moore <[email protected]>
Date: Wed, 13 Apr 2011 13:19:35 +0800
Subject: [PATCH 3/6] ACPICA: Update internal address SpaceID for DataTable regions
Moved this internal space id in preparation for ACPI 5.0 changes that will include some new space IDs.
--- drivers/acpi/acpica/acconfig.h | 2 +- drivers/acpi/acpica/amlcode.h | 15 --------------- drivers/acpi/acpica/dswload.c | 2 +- drivers/acpi/acpica/dswload2.c | 2 +- drivers/acpi/acpica/excreate.c | 3 ++- drivers/acpi/acpica/utdecode.c | 5 +++-- include/acpi/actypes.h | 13 +++++++++++-- 7 files changed, 19 insertions(+), 23 deletions(-)
drivers/acpi/acpica/acconfig.h +1 -1
@@ -187,7 +187,7 @@/* Operation regions */ -#define ACPI_NUM_PREDEFINED_REGIONS 9 +#define ACPI_NUM_PREDEFINED_REGIONS 8#define ACPI_USER_REGION_BEGIN 0x80/* Maximum space_ids for Operation Regions */
drivers/acpi/acpica/amlcode.h +0 -15
@@ -394,21 +394,6 @@#define AML_CLASS_METHOD_CALL 0x09#define AML_CLASS_UNKNOWN 0x0A -/* Predefined Operation Region space_iDs */ - -typedef enum { -REGION_MEMORY =0 , -REGION_IO , -REGION_PCI_CONFIG , -REGION_EC , -REGION_SMBUS , -REGION_CMOS , -REGION_PCI_BAR , -REGION_IPMI , -REGION_DATA_TABLE ,/* Internal use only */ -REGION_FIXED_HW =0x7F -}AML_REGION_TYPES ; -/* Comparison operation codes for match_op operator */ typedef enum {
drivers/acpi/acpica/dswload.c +1 -1
@@ -450,7 +450,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state) status =acpi_ex_create_region (op->named.data, op->named.length, -REGION_DATA_TABLE , +ACPI_ADR_SPACE_DATA_TABLE , walk_state);if (ACPI_FAILURE (status)) {return_ACPI_STATUS (status);
drivers/acpi/acpica/dswload2.c +1 -1
@@ -562,7 +562,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) ((op->common.value.arg)->common.value. integer); }else { - region_space =REGION_DATA_TABLE ; + region_space =ACPI_ADR_SPACE_DATA_TABLE ; }/*
drivers/acpi/acpica/excreate.c +2 -1
@@ -305,7 +305,8 @@ acpi_ex_create_region(u8 * aml_start,* range */ if ((region_space >=ACPI_NUM_PREDEFINED_REGIONS ) && - (region_space <ACPI_USER_REGION_BEGIN )) { + (region_space <ACPI_USER_REGION_BEGIN ) && + (region_space !=ACPI_ADR_SPACE_DATA_TABLE )) {ACPI_ERROR ((AE_INFO ,"Invalid AddressSpace type 0x%X" , region_space));return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID );
drivers/acpi/acpica/utdecode.c +3 -2
@@ -170,8 +170,7 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = {"SMBus" ,"SystemCMOS" ,"PCIBARTarget" , -"IPMI" , - "DataTable" + "IPMI" };char *acpi_ut_get_region_name (u8 space_id)
@@ -179,6 +178,8 @@ char *acpi_ut_get_region_name(u8 space_id)if (space_id >=ACPI_USER_REGION_BEGIN ) {return ("UserDefinedRegion" ); + }else if (space_id ==ACPI_ADR_SPACE_DATA_TABLE ) { +return ("DataTable" ); }else if (space_id ==ACPI_ADR_SPACE_FIXED_HARDWARE ) {return ("FunctionalFixedHW" ); }else if (space_id >=ACPI_NUM_PREDEFINED_REGIONS ) {
include/acpi/actypes.h +11 -2
@@ -712,8 +712,17 @@ typedef u8 acpi_adr_space_type;#define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5#define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6#define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7 -#define ACPI_ADR_SPACE_DATA_TABLE (acpi_adr_space_type) 8 -#define ACPI_ADR_SPACE_FIXED_HARDWARE (acpi_adr_space_type) 127 + +/* +* Special region types +* +* Note: A Data Table region is a special type of operation region +* that has its own AML opcode. However, internally, the AML +* interpreter simply creates an operation region with an an address +* space type of ACPI_ADR_SPACE_DATA_TABLE. +*/ +#define ACPI_ADR_SPACE_DATA_TABLE (acpi_adr_space_type) 0x7E/* Internal to ACPICA only */ +#define ACPI_ADR_SPACE_FIXED_HARDWARE (acpi_adr_space_type) 0x7F/* * bit_register IDs
Quoted 1 line
From
f6152269c625640891c5060bd0fa935dacb688b8Mon Sep 17 00:00:00 2001
From: Bob Moore <[email protected]>
Date: Wed, 13 Apr 2011 13:20:49 +0800
Subject: [PATCH 4/6] ACPICA: Move ACPI_NUM_PREDEFINED_REGIONS to a more appropriate place
Moved to where the predefined regions are actually defined.
--- drivers/acpi/acpica/acconfig.h | 1 - include/acpi/actypes.h | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/acpi/acpica/acconfig.h +0 -1
@@ -187,7 +187,6 @@/* Operation regions */ -#define ACPI_NUM_PREDEFINED_REGIONS 8#define ACPI_USER_REGION_BEGIN 0x80/* Maximum space_ids for Operation Regions */
include/acpi/actypes.h +3 -1
@@ -713,8 +713,10 @@ typedef u8 acpi_adr_space_type;#define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6#define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7 +#define ACPI_NUM_PREDEFINED_REGIONS 8 +/* -* Special region types +* Special Address Spaces * * Note: A Data Table region is a special type of operation region * that has its own AML opcode. However, internally, the AML
Quoted 1 line
From
fca77dafeb7c484628a8c9f427ea9d225fd3070dMon Sep 17 00:00:00 2001
From: Bob Moore <[email protected]>
Date: Wed, 13 Apr 2011 13:22:04 +0800
Subject: [PATCH 5/6] ACPICA: Execute an orphan _REG method under the EC device
This change will force the execution of a _REG method underneath the EC device even if there is no corresponding operation region of type EmbeddedControl. Fixes a problem seen on some machines and apparently is compatible with Windows behavior.
http://www.acpica.org/bugzilla/show_bug.cgi?id=875
--- drivers/acpi/acpica/evregion.c | 121 +++++++++++++++++++++++++++++++++++++++- drivers/acpi/acpica/evrgnini.c | 2 +- drivers/acpi/acpica/evxfregn.c | 13 ++-- include/acpi/actypes.h | 5 ++ 4 files changed, 132 insertions(+), 9 deletions(-)
drivers/acpi/acpica/evregion.c +119 -2
144 lines not on this page · raw message
drivers/acpi/acpica/evrgnini.c +1 -1
@@ -637,7 +637,7 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, status =acpi_ev_execute_reg_method - (region_obj,1 ); + (region_obj,ACPI_REG_CONNECT );if (acpi_ns_locked) { status =
drivers/acpi/acpica/evxfregn.c +7 -6
@@ -130,20 +130,21 @@ acpi_install_address_space_handler(acpi_handle device,case ACPI_ADR_SPACE_PCI_CONFIG :case ACPI_ADR_SPACE_DATA_TABLE : -if (acpi_gbl_reg_methods_executed) { +if (!acpi_gbl_reg_methods_executed) { -/* Run all _REG methods for this address space */ - - status =acpi_ev_execute_reg_methods (node, space_id); +/* We will defer execution of the _REG methods for this space */ + goto unlock_and_exit; }break ;default : - - status =acpi_ev_execute_reg_methods (node, space_id);break ; } +/* Run all _REG methods for this address space */ + + status =acpi_ev_execute_reg_methods (node, space_id); + unlock_and_exit: (void )acpi_ut_release_mutex (ACPI_MTX_NAMESPACE );return_ACPI_STATUS (status);
include/acpi/actypes.h +5 -0
@@ -726,6 +726,11 @@ typedef u8 acpi_adr_space_type;#define ACPI_ADR_SPACE_DATA_TABLE (acpi_adr_space_type) 0x7E/* Internal to ACPICA only */ #define ACPI_ADR_SPACE_FIXED_HARDWARE (acpi_adr_space_type) 0x7F +/* Values for _REG connection code */ + +#define ACPI_REG_DISCONNECT 0 +#define ACPI_REG_CONNECT 1 +/* * bit_register IDs *
Quoted 1 line
From
de0023085b126b337b0849949b8b0663906dc65fMon Sep 17 00:00:00 2001
From: Bob Moore <[email protected]>
Date: Fri, 15 Apr 2011 09:12:47 +0800
Subject: [PATCH 6/6] ACPICA: Update to version 20110413
Version 20110413
--- include/acpi/acpixf.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acpixf.h +1 -1
@@ -47,7 +47,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20110316 +#define ACPI_CA_VERSION 0x20110413#include "actypes.h" #include "actbl.h"
Quoted 11 lines · Lin Ming
Hi, Len
ACPICA release 20110413 linuxized patches attached. Build and tested on my notebook without problem.
[PATCH 1/6] ACPICA: Split all internal Global Lock functions to new file - evglock [PATCH 2/6] ACPICA: Add more methods eligible for NULL package element removal [PATCH 3/6] ACPICA: Update internal address SpaceID for DataTable regions [PATCH 4/6] ACPICA: Move
ACPI_NUM_PREDEFINED_REGIONSto a more appropriate place [PATCH 5/6] ACPICA: Execute an orphan_REGmethod under the EC device [PATCH 6/6] ACPICA: Update to version 20110413
Hi, Len
Have you applied this?
Quoted 3 lines
Lin Ming
Len Brown
reviewerQuoted 13 lines · Lin Ming
Quoted 11 lines · Lin Ming
Hi, Len
ACPICA release 20110413 linuxized patches attached. Build and tested on my notebook without problem.
[PATCH 1/6] ACPICA: Split all internal Global Lock functions to new file - evglock [PATCH 2/6] ACPICA: Add more methods eligible for NULL package element removal [PATCH 3/6] ACPICA: Update internal address SpaceID for DataTable regions [PATCH 4/6] ACPICA: Move
ACPI_NUM_PREDEFINED_REGIONSto a more appropriate place [PATCH 5/6] ACPICA: Execute an orphan_REGmethod under the EC device [PATCH 6/6] ACPICA: Update to version 20110413
Quoted 3 lines
Hi, Len
Have you applied this?
No, I've been out of town since the 15th when you sent it (I'm back now).
The acpica branch currently has this:
Lin Ming (3):
ACPI: osl, add acpi_os_create_lock interface
ACPICA: Use acpi_os_create_lock interface
ACPICA: Fix code divergence of global lock handling
cheers,
-Len