···138138--------139139140140procfs: /proc/acpi/ibm/hotkey141141-sysfs device attribute: hotkey/*141141+sysfs device attribute: hotkey_*142142143143Without this driver, only the Fn-F4 key (sleep button) generates an144144ACPI event. With the driver loaded, the hotkey feature enabled and the···196196197197sysfs notes:198198199199- The hot keys attributes are in a hotkey/ subdirectory off the200200- thinkpad device.201201-202202- bios_enabled:199199+ hotkey_bios_enabled:203200 Returns the status of the hot keys feature when204201 thinkpad-acpi was loaded. Upon module unload, the hot205202 key feature status will be restored to this value.···204207 0: hot keys were disabled205208 1: hot keys were enabled206209207207- bios_mask:210210+ hotkey_bios_mask:208211 Returns the hot keys mask when thinkpad-acpi was loaded.209212 Upon module unload, the hot keys mask will be restored210213 to this value.211214212212- enable:215215+ hotkey_enable:213216 Enables/disables the hot keys feature, and reports214217 current status of the hot keys feature.215218216219 0: disables the hot keys feature / feature disabled217220 1: enables the hot keys feature / feature enabled218221219219- mask:222222+ hotkey_mask:220223 bit mask to enable ACPI event generation for each hot221224 key (see above). Returns the current status of the hot222225 keys mask, and allows one to modify it.···226229---------227230228231procfs: /proc/acpi/ibm/bluetooth229229-sysfs device attribute: bluetooth/enable232232+sysfs device attribute: bluetooth_enable230233231234This feature shows the presence and current state of a ThinkPad232235Bluetooth device in the internal ThinkPad CDC slot.···241244Sysfs notes:242245243246 If the Bluetooth CDC card is installed, it can be enabled /244244- disabled through the "bluetooth/enable" thinkpad-acpi device247247+ disabled through the "bluetooth_enable" thinkpad-acpi device245248 attribute, and its current status can also be queried.246249247250 enable:···249252 1: enables Bluetooth / Bluetooth is enabled.250253251254 Note: this interface will be probably be superseeded by the252252- generic rfkill class.255255+ generic rfkill class, so it is NOT to be considered stable yet.253256254257Video output control -- /proc/acpi/ibm/video255258--------------------------------------------···895898-----------------896899897900procfs: /proc/acpi/ibm/wan898898-sysfs device attribute: wwan/enable901901+sysfs device attribute: wwan_enable899902900903This feature is marked EXPERIMENTAL because the implementation901904directly accesses hardware registers and may not work as expected. USE···918921Sysfs notes:919922920923 If the W-WAN card is installed, it can be enabled /921921- disabled through the "wwan/enable" thinkpad-acpi device924924+ disabled through the "wwan_enable" thinkpad-acpi device922925 attribute, and its current status can also be queried.923926924927 enable:···926929 1: enables WWAN card / WWAN card is enabled.927930928931 Note: this interface will be probably be superseeded by the929929- generic rfkill class.932932+ generic rfkill class, so it is NOT to be considered stable yet.930933931934Multiple Commands, Module Parameters932935------------------------------------
···123123 }124124 }125125126126- /* The table must be either an SSDT or a PSDT */126126+ /* The table must be either an SSDT or a PSDT or an OEMx */127127128128 if ((!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT))129129 &&130130- (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)))131131- {130130+ (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT))131131+ && (strncmp(table_desc->pointer->signature, "OEM", 3))) {132132 ACPI_ERROR((AE_INFO,133133- "Table has invalid signature [%4.4s], must be SSDT or PSDT",133133+ "Table has invalid signature [%4.4s], must be SSDT, PSDT or OEMx",134134 table_desc->pointer->signature));135135 return_ACPI_STATUS(AE_BAD_SIGNATURE);136136 }
···6868 union acpi_operand_object **return_obj);69697070static acpi_status7171+acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,7272+ union acpi_operand_object **internal_object);7373+7474+static acpi_status7175acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,7276 union acpi_operand_object *dest_desc);7377···522518 return_ACPI_STATUS(AE_NO_MEMORY);523519}524520525525-#ifdef ACPI_FUTURE_IMPLEMENTATION526526-/* Code to convert packages that are parameters to control methods */527527-528521/*******************************************************************************529522 *530523 * FUNCTION: acpi_ut_copy_epackage_to_ipackage531524 *532532- * PARAMETERS: *internal_object - Pointer to the object we are returning533533- * *Buffer - Where the object is returned534534- * *space_used - Where the length of the object is returned525525+ * PARAMETERS: external_object - The external object to be converted526526+ * internal_object - Where the internal object is returned535527 *536528 * RETURN: Status537529 *538538- * DESCRIPTION: This function is called to place a package object in a user539539- * buffer. A package object by definition contains other objects.540540- *541541- * The buffer is assumed to have sufficient space for the object.542542- * The caller must have verified the buffer length needed using the543543- * acpi_ut_get_object_size function before calling this function.530530+ * DESCRIPTION: Copy an external package object to an internal package.531531+ * Handles nested packages.544532 *545533 ******************************************************************************/546534547535static acpi_status548548-acpi_ut_copy_epackage_to_ipackage(union acpi_operand_object *internal_object,549549- u8 * buffer, u32 * space_used)536536+acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,537537+ union acpi_operand_object **internal_object)550538{551551- u8 *free_space;552552- union acpi_object *external_object;553553- u32 length = 0;554554- u32 this_index;555555- u32 object_space = 0;556556- union acpi_operand_object *this_internal_obj;557557- union acpi_object *this_external_obj;539539+ acpi_status status = AE_OK;540540+ union acpi_operand_object *package_object;541541+ union acpi_operand_object **package_elements;542542+ acpi_native_uint i;558543559544 ACPI_FUNCTION_TRACE(ut_copy_epackage_to_ipackage);560545561561- /*562562- * First package at head of the buffer563563- */564564- external_object = (union acpi_object *)buffer;546546+ /* Create the package object */547547+548548+ package_object =549549+ acpi_ut_create_package_object(external_object->package.count);550550+ if (!package_object) {551551+ return_ACPI_STATUS(AE_NO_MEMORY);552552+ }553553+554554+ package_elements = package_object->package.elements;565555566556 /*567567- * Free space begins right after the first package557557+ * Recursive implementation. Probably ok, since nested external packages558558+ * as parameters should be very rare.568559 */569569- free_space = buffer + sizeof(union acpi_object);560560+ for (i = 0; i < external_object->package.count; i++) {561561+ status =562562+ acpi_ut_copy_eobject_to_iobject(&external_object->package.563563+ elements[i],564564+ &package_elements[i]);565565+ if (ACPI_FAILURE(status)) {570566571571- external_object->type = ACPI_GET_OBJECT_TYPE(internal_object);572572- external_object->package.count = internal_object->package.count;573573- external_object->package.elements = (union acpi_object *)free_space;567567+ /* Truncate package and delete it */574568575575- /*576576- * Build an array of ACPI_OBJECTS in the buffer577577- * and move the free space past it578578- */579579- free_space +=580580- external_object->package.count * sizeof(union acpi_object);569569+ package_object->package.count = i;570570+ package_elements[i] = NULL;571571+ acpi_ut_remove_reference(package_object);572572+ return_ACPI_STATUS(status);573573+ }574574+ }581575582582- /* Call walk_package */583583-576576+ *internal_object = package_object;577577+ return_ACPI_STATUS(status);584578}585585-586586-#endif /* Future implementation */587579588580/*******************************************************************************589581 *590582 * FUNCTION: acpi_ut_copy_eobject_to_iobject591583 *592592- * PARAMETERS: *internal_object - The external object to be converted593593- * *buffer_ptr - Where the internal object is returned584584+ * PARAMETERS: external_object - The external object to be converted585585+ * internal_object - Where the internal object is returned594586 *595595- * RETURN: Status - the status of the call587587+ * RETURN: Status - the status of the call596588 *597589 * DESCRIPTION: Converts an external object to an internal object.598590 *···603603 ACPI_FUNCTION_TRACE(ut_copy_eobject_to_iobject);604604605605 if (external_object->type == ACPI_TYPE_PACKAGE) {606606- /*607607- * Packages as external input to control methods are not supported,608608- */609609- ACPI_ERROR((AE_INFO,610610- "Packages as parameters not implemented!"));611611-612612- return_ACPI_STATUS(AE_NOT_IMPLEMENTED);613613- }614614-615615- else {606606+ status =607607+ acpi_ut_copy_epackage_to_ipackage(external_object,608608+ internal_object);609609+ } else {616610 /*617611 * Build a simple object (no nested objects)618612 */···797803 * Create and build the package object798804 */799805 target_object =800800- acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE);806806+ acpi_ut_create_package_object(source_object->package.count);801807 if (!target_object) {802808 return (AE_NO_MEMORY);803809 }804810805805- target_object->package.count = source_object->package.count;806811 target_object->common.flags = source_object->common.flags;807812808808- /*809809- * Create the object array810810- */811811- target_object->package.elements =812812- ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package.813813- count + 1) * sizeof(void *));814814- if (!target_object->package.elements) {815815- status = AE_NO_MEMORY;816816- goto error_exit;817817- }813813+ /* Pass the new package object back to the package walk routine */818814819819- /*820820- * Pass the new package object back to the package walk routine821821- */822815 state->pkg.this_target_obj = target_object;823816824824- /*825825- * Store the object pointer in the parent package object826826- */817817+ /* Store the object pointer in the parent package object */818818+827819 *this_target_ptr = target_object;828820 break;829821
+42
drivers/acpi/utilities/utobject.c
···146146147147/*******************************************************************************148148 *149149+ * FUNCTION: acpi_ut_create_package_object150150+ *151151+ * PARAMETERS: Count - Number of package elements152152+ *153153+ * RETURN: Pointer to a new Package object, null on failure154154+ *155155+ * DESCRIPTION: Create a fully initialized package object156156+ *157157+ ******************************************************************************/158158+159159+union acpi_operand_object *acpi_ut_create_package_object(u32 count)160160+{161161+ union acpi_operand_object *package_desc;162162+ union acpi_operand_object **package_elements;163163+164164+ ACPI_FUNCTION_TRACE_U32(ut_create_package_object, count);165165+166166+ /* Create a new Package object */167167+168168+ package_desc = acpi_ut_create_internal_object(ACPI_TYPE_PACKAGE);169169+ if (!package_desc) {170170+ return_PTR(NULL);171171+ }172172+173173+ /*174174+ * Create the element array. Count+1 allows the array to be null175175+ * terminated.176176+ */177177+ package_elements = ACPI_ALLOCATE_ZEROED((acpi_size)178178+ (count + 1) * sizeof(void *));179179+ if (!package_elements) {180180+ ACPI_FREE(package_desc);181181+ return_PTR(NULL);182182+ }183183+184184+ package_desc->package.count = count;185185+ package_desc->package.elements = package_elements;186186+ return_PTR(package_desc);187187+}188188+189189+/*******************************************************************************190190+ *149191 * FUNCTION: acpi_ut_create_buffer_object150192 *151193 * PARAMETERS: buffer_size - Size of buffer to be created
···278278 * Bluetooth subdriver279279 */280280281281-#define TPACPI_BLUETH_SYSFS_GROUP "bluetooth"282282-283281enum {284282 /* ACPI GBDC/SBDC bits */285283 TP_ACPI_BLUETOOTH_HWPRESENT = 0x01, /* Bluetooth hw available */···414416 * Hotkey subdriver415417 */416418417417-#define TPACPI_HOTKEY_SYSFS_GROUP "hotkey"418418-419419static int hotkey_orig_status;420420static int hotkey_orig_mask;421421···548552/*549553 * Wan subdriver550554 */551551-552552-#define TPACPI_WAN_SYSFS_GROUP "wwan"553555554556enum {555557 /* ACPI GWAN/SWAN bits */
+1-1
include/acpi/acpi_numa.h
···13131414extern int pxm_to_node(int);1515extern int node_to_pxm(int);1616-extern int __cpuinit acpi_map_pxm_to_node(int);1616+extern int acpi_map_pxm_to_node(int);1717extern void __cpuinit acpi_unmap_pxm_to_node(int);18181919#endif /* CONFIG_ACPI_NUMA */