···138--------139140procfs: /proc/acpi/ibm/hotkey141-sysfs device attribute: hotkey/*142143Without this driver, only the Fn-F4 key (sleep button) generates an144ACPI event. With the driver loaded, the hotkey feature enabled and the···196197sysfs notes:198199- The hot keys attributes are in a hotkey/ subdirectory off the200- thinkpad device.201-202- bios_enabled:203 Returns the status of the hot keys feature when204 thinkpad-acpi was loaded. Upon module unload, the hot205 key feature status will be restored to this value.···204 0: hot keys were disabled205 1: hot keys were enabled206207- bios_mask:208 Returns the hot keys mask when thinkpad-acpi was loaded.209 Upon module unload, the hot keys mask will be restored210 to this value.211212- enable:213 Enables/disables the hot keys feature, and reports214 current status of the hot keys feature.215216 0: disables the hot keys feature / feature disabled217 1: enables the hot keys feature / feature enabled218219- mask:220 bit mask to enable ACPI event generation for each hot221 key (see above). Returns the current status of the hot222 keys mask, and allows one to modify it.···226---------227228procfs: /proc/acpi/ibm/bluetooth229-sysfs device attribute: bluetooth/enable230231This feature shows the presence and current state of a ThinkPad232Bluetooth device in the internal ThinkPad CDC slot.···241Sysfs notes:242243 If the Bluetooth CDC card is installed, it can be enabled /244- disabled through the "bluetooth/enable" thinkpad-acpi device245 attribute, and its current status can also be queried.246247 enable:···249 1: enables Bluetooth / Bluetooth is enabled.250251 Note: this interface will be probably be superseeded by the252- generic rfkill class.253254Video output control -- /proc/acpi/ibm/video255--------------------------------------------···895-----------------896897procfs: /proc/acpi/ibm/wan898-sysfs device attribute: wwan/enable899900This feature is marked EXPERIMENTAL because the implementation901directly accesses hardware registers and may not work as expected. USE···918Sysfs notes:919920 If the W-WAN card is installed, it can be enabled /921- disabled through the "wwan/enable" thinkpad-acpi device922 attribute, and its current status can also be queried.923924 enable:···926 1: enables WWAN card / WWAN card is enabled.927928 Note: this interface will be probably be superseeded by the929- generic rfkill class.930931Multiple Commands, Module Parameters932------------------------------------
···138--------139140procfs: /proc/acpi/ibm/hotkey141+sysfs device attribute: hotkey_*142143Without this driver, only the Fn-F4 key (sleep button) generates an144ACPI event. With the driver loaded, the hotkey feature enabled and the···196197sysfs notes:198199+ hotkey_bios_enabled:000200 Returns the status of the hot keys feature when201 thinkpad-acpi was loaded. Upon module unload, the hot202 key feature status will be restored to this value.···207 0: hot keys were disabled208 1: hot keys were enabled209210+ hotkey_bios_mask:211 Returns the hot keys mask when thinkpad-acpi was loaded.212 Upon module unload, the hot keys mask will be restored213 to this value.214215+ hotkey_enable:216 Enables/disables the hot keys feature, and reports217 current status of the hot keys feature.218219 0: disables the hot keys feature / feature disabled220 1: enables the hot keys feature / feature enabled221222+ hotkey_mask:223 bit mask to enable ACPI event generation for each hot224 key (see above). Returns the current status of the hot225 keys mask, and allows one to modify it.···229---------230231procfs: /proc/acpi/ibm/bluetooth232+sysfs device attribute: bluetooth_enable233234This feature shows the presence and current state of a ThinkPad235Bluetooth device in the internal ThinkPad CDC slot.···244Sysfs notes:245246 If the Bluetooth CDC card is installed, it can be enabled /247+ disabled through the "bluetooth_enable" thinkpad-acpi device248 attribute, and its current status can also be queried.249250 enable:···252 1: enables Bluetooth / Bluetooth is enabled.253254 Note: this interface will be probably be superseeded by the255+ generic rfkill class, so it is NOT to be considered stable yet.256257Video output control -- /proc/acpi/ibm/video258--------------------------------------------···898-----------------899900procfs: /proc/acpi/ibm/wan901+sysfs device attribute: wwan_enable902903This feature is marked EXPERIMENTAL because the implementation904directly accesses hardware registers and may not work as expected. USE···921Sysfs notes:922923 If the W-WAN card is installed, it can be enabled /924+ disabled through the "wwan_enable" thinkpad-acpi device925 attribute, and its current status can also be queried.926927 enable:···929 1: enables WWAN card / WWAN card is enabled.930931 Note: this interface will be probably be superseeded by the932+ generic rfkill class, so it is NOT to be considered stable yet.933934Multiple Commands, Module Parameters935------------------------------------
+1-1
drivers/acpi/numa.c
···59 return node_to_pxm_map[node];60}6162-int __cpuinit acpi_map_pxm_to_node(int pxm)63{64 int node = pxm_to_node_map[pxm];65
···59 return node_to_pxm_map[node];60}6162+int acpi_map_pxm_to_node(int pxm)63{64 int node = pxm_to_node_map[pxm];65
+4-4
drivers/acpi/tables/tbinstal.c
···123 }124 }125126- /* The table must be either an SSDT or a PSDT */127128 if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT))129 &&130- (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)))131- {132 ACPI_ERROR((AE_INFO,133- "Table has invalid signature [%4.4s], must be SSDT or PSDT",134 table_desc->pointer->signature));135 return_ACPI_STATUS(AE_BAD_SIGNATURE);136 }
···123 }124 }125126+ /* The table must be either an SSDT or a PSDT or an OEMx */127128 if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT))129 &&130+ (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))131+ && (strncmp(table_desc->pointer->signature, "OEM", 3))) {132 ACPI_ERROR((AE_INFO,133+ "Table has invalid signature [%4.4s], must be SSDT, PSDT or OEMx",134 table_desc->pointer->signature));135 return_ACPI_STATUS(AE_BAD_SIGNATURE);136 }
···68 union acpi_operand_object **return_obj);6970static acpi_status000071acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,72 union acpi_operand_object *dest_desc);73···522 return_ACPI_STATUS(AE_NO_MEMORY);523}524525-#ifdef ACPI_FUTURE_IMPLEMENTATION526-/* Code to convert packages that are parameters to control methods */527-528/*******************************************************************************529 *530 * FUNCTION: acpi_ut_copy_epackage_to_ipackage531 *532- * PARAMETERS: *internal_object - Pointer to the object we are returning533- * *Buffer - Where the object is returned534- * *space_used - Where the length of the object is returned535 *536 * RETURN: Status537 *538- * DESCRIPTION: This function is called to place a package object in a user539- * buffer. A package object by definition contains other objects.540- *541- * The buffer is assumed to have sufficient space for the object.542- * The caller must have verified the buffer length needed using the543- * acpi_ut_get_object_size function before calling this function.544 *545 ******************************************************************************/546547static acpi_status548-acpi_ut_copy_epackage_to_ipackage(union acpi_operand_object *internal_object,549- u8 * buffer, u32 * space_used)550{551- u8 *free_space;552- union acpi_object *external_object;553- u32 length = 0;554- u32 this_index;555- u32 object_space = 0;556- union acpi_operand_object *this_internal_obj;557- union acpi_object *this_external_obj;558559 ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage);560561- /*562- * First package at head of the buffer563- */564- external_object = (union acpi_object *)buffer;00000565566 /*567- * Free space begins right after the first package0568 */569- free_space = buffer + sizeof(union acpi_object);00000570571- external_object->type = ACPI_GET_OBJECT_TYPE(internal_object);572- external_object->package.count = internal_object->package.count;573- external_object->package.elements = (union acpi_object *)free_space;574575- /*576- * Build an array of ACPI_OBJECTS in the buffer577- * and move the free space past it578- */579- free_space +=580- external_object->package.count * sizeof(union acpi_object);581582- /* Call walk_package */583-584}585-586-#endif /* Future implementation */587588/*******************************************************************************589 *590 * FUNCTION: acpi_ut_copy_eobject_to_iobject591 *592- * PARAMETERS: *internal_object - The external object to be converted593- * *buffer_ptr - Where the internal object is returned594 *595- * RETURN: Status - the status of the call596 *597 * DESCRIPTION: Converts an external object to an internal object.598 *···603 ACPI_FUNCTION_TRACE(ut_copy_eobject_to_iobject);604605 if (external_object->type == ACPI_TYPE_PACKAGE) {606- /*607- * Packages as external input to control methods are not supported,608- */609- ACPI_ERROR((AE_INFO,610- "Packages as parameters not implemented!"));611-612- return_ACPI_STATUS(AE_NOT_IMPLEMENTED);613- }614-615- else {616 /*617 * Build a simple object (no nested objects)618 */···797 * Create and build the package object798 */799 target_object =800- acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE);801 if (!target_object) {802 return (AE_NO_MEMORY);803 }804805- target_object->package.count = source_object->package.count;806 target_object->common.flags = source_object->common.flags;807808- /*809- * Create the object array810- */811- target_object->package.elements =812- ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package.813- count + 1) * sizeof(void *));814- if (!target_object->package.elements) {815- status = AE_NO_MEMORY;816- goto error_exit;817- }818819- /*820- * Pass the new package object back to the package walk routine821- */822 state->pkg.this_target_obj = target_object;823824- /*825- * Store the object pointer in the parent package object826- */827 *this_target_ptr = target_object;828 break;829
···68 union acpi_operand_object **return_obj);6970static acpi_status71+acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,72+ union acpi_operand_object **internal_object);73+74+static acpi_status75acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,76 union acpi_operand_object *dest_desc);77···518 return_ACPI_STATUS(AE_NO_MEMORY);519}520000521/*******************************************************************************522 *523 * FUNCTION: acpi_ut_copy_epackage_to_ipackage524 *525+ * PARAMETERS: external_object - The external object to be converted526+ * internal_object - Where the internal object is returned0527 *528 * RETURN: Status529 *530+ * DESCRIPTION: Copy an external package object to an internal package.531+ * Handles nested packages.0000532 *533 ******************************************************************************/534535static acpi_status536+acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,537+ union acpi_operand_object **internal_object)538{539+ acpi_status status = AE_OK;540+ union acpi_operand_object *package_object;541+ union acpi_operand_object **package_elements;542+ acpi_native_uint i;000543544 ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage);545546+ /* Create the package object */547+548+ package_object =549+ acpi_ut_create_package_object(external_object->package.count);550+ if (!package_object) {551+ return_ACPI_STATUS(AE_NO_MEMORY);552+ }553+554+ package_elements = package_object->package.elements;555556 /*557+ * Recursive implementation. Probably ok, since nested external packages558+ * as parameters should be very rare.559 */560+ for (i = 0; i < external_object->package.count; i++) {561+ status =562+ acpi_ut_copy_eobject_to_iobject(&external_object->package.563+ elements[i],564+ &package_elements[i]);565+ if (ACPI_FAILURE(status)) {566567+ /* Truncate package and delete it */00568569+ package_object->package.count = i;570+ package_elements[i] = NULL;571+ acpi_ut_remove_reference(package_object);572+ return_ACPI_STATUS(status);573+ }574+ }575576+ *internal_object = package_object;577+ return_ACPI_STATUS(status);578}00579580/*******************************************************************************581 *582 * FUNCTION: acpi_ut_copy_eobject_to_iobject583 *584+ * PARAMETERS: external_object - The external object to be converted585+ * internal_object - Where the internal object is returned586 *587+ * RETURN: Status - the status of the call588 *589 * DESCRIPTION: Converts an external object to an internal object.590 *···603 ACPI_FUNCTION_TRACE(ut_copy_eobject_to_iobject);604605 if (external_object->type == ACPI_TYPE_PACKAGE) {606+ status =607+ acpi_ut_copy_epackage_to_ipackage(external_object,608+ internal_object);609+ } else {000000610 /*611 * Build a simple object (no nested objects)612 */···803 * Create and build the package object804 */805 target_object =806+ acpi_ut_create_package_object(source_object->package.count);807 if (!target_object) {808 return (AE_NO_MEMORY);809 }8100811 target_object->common.flags = source_object->common.flags;812813+ /* Pass the new package object back to the package walk routine */000000000814000815 state->pkg.this_target_obj = target_object;816817+ /* Store the object pointer in the parent package object */818+0819 *this_target_ptr = target_object;820 break;821
+42
drivers/acpi/utilities/utobject.c
···146147/*******************************************************************************148 *000000000000000000000000000000000000000000149 * FUNCTION: acpi_ut_create_buffer_object150 *151 * PARAMETERS: buffer_size - Size of buffer to be created
···146147/*******************************************************************************148 *149+ * FUNCTION: acpi_ut_create_package_object150+ *151+ * PARAMETERS: Count - Number of package elements152+ *153+ * RETURN: Pointer to a new Package object, null on failure154+ *155+ * DESCRIPTION: Create a fully initialized package object156+ *157+ ******************************************************************************/158+159+union acpi_operand_object *acpi_ut_create_package_object(u32 count)160+{161+ union acpi_operand_object *package_desc;162+ union acpi_operand_object **package_elements;163+164+ ACPI_FUNCTION_TRACE_U32(ut_create_package_object, count);165+166+ /* Create a new Package object */167+168+ package_desc = acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE);169+ if (!package_desc) {170+ return_PTR(NULL);171+ }172+173+ /*174+ * Create the element array. Count+1 allows the array to be null175+ * terminated.176+ */177+ package_elements = ACPI_ALLOCATE_ZEROED((acpi_size)178+ (count + 1) * sizeof(void *));179+ if (!package_elements) {180+ ACPI_FREE(package_desc);181+ return_PTR(NULL);182+ }183+184+ package_desc->package.count = count;185+ package_desc->package.elements = package_elements;186+ return_PTR(package_desc);187+}188+189+/*******************************************************************************190+ *191 * FUNCTION: acpi_ut_create_buffer_object192 *193 * PARAMETERS: buffer_size - Size of buffer to be created
···278 * Bluetooth subdriver279 */280281-#define TPACPI_BLUETH_SYSFS_GROUP "bluetooth"282-283enum {284 /* ACPI GBDC/SBDC bits */285 TP_ACPI_BLUETOOTH_HWPRESENT = 0x01, /* Bluetooth hw available */···414 * Hotkey subdriver415 */416417-#define TPACPI_HOTKEY_SYSFS_GROUP "hotkey"418-419static int hotkey_orig_status;420static int hotkey_orig_mask;421···548/*549 * Wan subdriver550 */551-552-#define TPACPI_WAN_SYSFS_GROUP "wwan"553554enum {555 /* ACPI GWAN/SWAN bits */
···278 * Bluetooth subdriver279 */28000281enum {282 /* ACPI GBDC/SBDC bits */283 TP_ACPI_BLUETOOTH_HWPRESENT = 0x01, /* Bluetooth hw available */···416 * Hotkey subdriver417 */41800419static int hotkey_orig_status;420static int hotkey_orig_mask;421···552/*553 * Wan subdriver554 */00555556enum {557 /* ACPI GWAN/SWAN bits */
+1-1
include/acpi/acpi_numa.h
···1314extern int pxm_to_node(int);15extern int node_to_pxm(int);16-extern int __cpuinit acpi_map_pxm_to_node(int);17extern void __cpuinit acpi_unmap_pxm_to_node(int);1819#endif /* CONFIG_ACPI_NUMA */
···1314extern int pxm_to_node(int);15extern int node_to_pxm(int);16+extern int acpi_map_pxm_to_node(int);17extern void __cpuinit acpi_unmap_pxm_to_node(int);1819#endif /* CONFIG_ACPI_NUMA */