aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rsxface.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/resources/rsxface.c
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/resources/rsxface.c')
-rw-r--r--drivers/acpi/resources/rsxface.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c
index a9cdcbeb343..83c944b8b09 100644
--- a/drivers/acpi/resources/rsxface.c
+++ b/drivers/acpi/resources/rsxface.c
@@ -49,6 +49,23 @@
49#define _COMPONENT ACPI_RESOURCES 49#define _COMPONENT ACPI_RESOURCES
50 ACPI_MODULE_NAME ("rsxface") 50 ACPI_MODULE_NAME ("rsxface")
51 51
52/* Local macros for 16,32-bit to 64-bit conversion */
53
54#define ACPI_COPY_FIELD(out, in, field) ((out)->field = (in)->field)
55#define ACPI_COPY_ADDRESS(out, in) \
56 ACPI_COPY_FIELD(out, in, resource_type); \
57 ACPI_COPY_FIELD(out, in, producer_consumer); \
58 ACPI_COPY_FIELD(out, in, decode); \
59 ACPI_COPY_FIELD(out, in, min_address_fixed); \
60 ACPI_COPY_FIELD(out, in, max_address_fixed); \
61 ACPI_COPY_FIELD(out, in, attribute); \
62 ACPI_COPY_FIELD(out, in, granularity); \
63 ACPI_COPY_FIELD(out, in, min_address_range); \
64 ACPI_COPY_FIELD(out, in, max_address_range); \
65 ACPI_COPY_FIELD(out, in, address_translation_offset); \
66 ACPI_COPY_FIELD(out, in, address_length); \
67 ACPI_COPY_FIELD(out, in, resource_source);
68
52 69
53/******************************************************************************* 70/*******************************************************************************
54 * 71 *
@@ -180,6 +197,7 @@ EXPORT_SYMBOL(acpi_get_current_resources);
180 * and the value of ret_buffer is undefined. 197 * and the value of ret_buffer is undefined.
181 * 198 *
182 ******************************************************************************/ 199 ******************************************************************************/
200
183#ifdef ACPI_FUTURE_USAGE 201#ifdef ACPI_FUTURE_USAGE
184acpi_status 202acpi_status
185acpi_get_possible_resources ( 203acpi_get_possible_resources (
@@ -346,9 +364,8 @@ acpi_set_current_resources (
346 ACPI_FUNCTION_TRACE ("acpi_set_current_resources"); 364 ACPI_FUNCTION_TRACE ("acpi_set_current_resources");
347 365
348 366
349 /* 367 /* Must have a valid handle and buffer */
350 * Must have a valid handle and buffer 368
351 */
352 if ((!device_handle) || 369 if ((!device_handle) ||
353 (!in_buffer) || 370 (!in_buffer) ||
354 (!in_buffer->pointer) || 371 (!in_buffer->pointer) ||
@@ -362,21 +379,6 @@ acpi_set_current_resources (
362EXPORT_SYMBOL(acpi_set_current_resources); 379EXPORT_SYMBOL(acpi_set_current_resources);
363 380
364 381
365#define ACPI_COPY_FIELD(out, in, field) ((out)->field = (in)->field)
366#define ACPI_COPY_ADDRESS(out, in) \
367 ACPI_COPY_FIELD(out, in, resource_type); \
368 ACPI_COPY_FIELD(out, in, producer_consumer); \
369 ACPI_COPY_FIELD(out, in, decode); \
370 ACPI_COPY_FIELD(out, in, min_address_fixed); \
371 ACPI_COPY_FIELD(out, in, max_address_fixed); \
372 ACPI_COPY_FIELD(out, in, attribute); \
373 ACPI_COPY_FIELD(out, in, granularity); \
374 ACPI_COPY_FIELD(out, in, min_address_range); \
375 ACPI_COPY_FIELD(out, in, max_address_range); \
376 ACPI_COPY_FIELD(out, in, address_translation_offset); \
377 ACPI_COPY_FIELD(out, in, address_length); \
378 ACPI_COPY_FIELD(out, in, resource_source);
379
380/****************************************************************************** 382/******************************************************************************
381 * 383 *
382 * FUNCTION: acpi_resource_to_address64 384 * FUNCTION: acpi_resource_to_address64
@@ -408,14 +410,14 @@ acpi_resource_to_address64 (
408 case ACPI_RSTYPE_ADDRESS16: 410 case ACPI_RSTYPE_ADDRESS16:
409 411
410 address16 = (struct acpi_resource_address16 *) &resource->data; 412 address16 = (struct acpi_resource_address16 *) &resource->data;
411 ACPI_COPY_ADDRESS(out, address16); 413 ACPI_COPY_ADDRESS (out, address16);
412 break; 414 break;
413 415
414 416
415 case ACPI_RSTYPE_ADDRESS32: 417 case ACPI_RSTYPE_ADDRESS32:
416 418
417 address32 = (struct acpi_resource_address32 *) &resource->data; 419 address32 = (struct acpi_resource_address32 *) &resource->data;
418 ACPI_COPY_ADDRESS(out, address32); 420 ACPI_COPY_ADDRESS (out, address32);
419 break; 421 break;
420 422
421 423
@@ -434,4 +436,3 @@ acpi_resource_to_address64 (
434 return (AE_OK); 436 return (AE_OK);
435} 437}
436EXPORT_SYMBOL(acpi_resource_to_address64); 438EXPORT_SYMBOL(acpi_resource_to_address64);
437