aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acmacros.h
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-08-05 00:44:28 -0400
committerLen Brown <len.brown@intel.com>2005-08-05 00:45:14 -0400
commit4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch)
tree5b5b7d296ea58786f53b95e5eac9565ff66890b0 /include/acpi/acmacros.h
parentc65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff)
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acmacros.h')
-rw-r--r--include/acpi/acmacros.h43
1 files changed, 14 insertions, 29 deletions
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index fcdef0a4b01b..702cc4e57f5f 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -44,7 +44,6 @@
44#ifndef __ACMACROS_H__ 44#ifndef __ACMACROS_H__
45#define __ACMACROS_H__ 45#define __ACMACROS_H__
46 46
47
48/* 47/*
49 * Data manipulation macros 48 * Data manipulation macros
50 */ 49 */
@@ -57,7 +56,6 @@
57#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit)) 56#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit))
58#define ACPI_MIN(a,b) (((a)<(b))?(a):(b)) 57#define ACPI_MIN(a,b) (((a)<(b))?(a):(b))
59 58
60
61#if ACPI_MACHINE_WIDTH == 16 59#if ACPI_MACHINE_WIDTH == 16
62 60
63/* 61/*
@@ -168,7 +166,7 @@
168 166
169/* 32-bit source, 16/32/64 destination */ 167/* 32-bit source, 16/32/64 destination */
170 168
171#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 169#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
172 170
173#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\ 171#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[3];\
174 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\ 172 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[2];\
@@ -183,9 +181,9 @@
183 181
184/* 64-bit source, 16/32/64 destination */ 182/* 64-bit source, 16/32/64 destination */
185 183
186#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 184#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
187 185
188#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 186#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
189 187
190#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\ 188#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[7];\
191 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\ 189 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[6];\
@@ -219,14 +217,14 @@
219 217
220/* 32-bit source, 16/32/64 destination */ 218/* 32-bit source, 16/32/64 destination */
221 219
222#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 220#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
223#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s) 221#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
224#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s) 222#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
225 223
226/* 64-bit source, 16/32/64 destination */ 224/* 64-bit source, 16/32/64 destination */
227 225
228#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 226#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
229#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 227#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
230#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s) 228#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
231 229
232#else 230#else
@@ -238,14 +236,14 @@
238 236
239/* 32-bit source, 16/32/64 destination */ 237/* 32-bit source, 16/32/64 destination */
240 238
241#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 239#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
242#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s) 240#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
243#define ACPI_MOVE_32_TO_64(d,s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s) 241#define ACPI_MOVE_32_TO_64(d,s) *(u64 *)(void *)(d) = *(u32 *)(void *)(s)
244 242
245/* 64-bit source, 16/32/64 destination */ 243/* 64-bit source, 16/32/64 destination */
246 244
247#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 245#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
248#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 246#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
249#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s) 247#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
250#endif 248#endif
251 249
@@ -266,7 +264,7 @@
266 264
267/* 32-bit source, 16/32/64 destination */ 265/* 32-bit source, 16/32/64 destination */
268 266
269#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 267#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
270 268
271#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ 269#define ACPI_MOVE_32_TO_32(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
272 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ 270 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
@@ -277,8 +275,8 @@
277 275
278/* 64-bit source, 16/32/64 destination */ 276/* 64-bit source, 16/32/64 destination */
279 277
280#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 278#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
281#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 279#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
282#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\ 280#define ACPI_MOVE_64_TO_64(d,s) {(( u8 *)(void *)(d))[0] = ((u8 *)(void *)(s))[0];\
283 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\ 281 (( u8 *)(void *)(d))[1] = ((u8 *)(void *)(s))[1];\
284 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\ 282 (( u8 *)(void *)(d))[2] = ((u8 *)(void *)(s))[2];\
@@ -305,7 +303,6 @@
305#error unknown ACPI_MACHINE_WIDTH 303#error unknown ACPI_MACHINE_WIDTH
306#endif 304#endif
307 305
308
309/* 306/*
310 * Fast power-of-two math macros for non-optimized compilers 307 * Fast power-of-two math macros for non-optimized compilers
311 */ 308 */
@@ -329,7 +326,6 @@
329#define ACPI_MUL_16(a) _ACPI_MUL(a,4) 326#define ACPI_MUL_16(a) _ACPI_MUL(a,4)
330#define ACPI_MOD_16(a) _ACPI_MOD(a,16) 327#define ACPI_MOD_16(a) _ACPI_MOD(a,16)
331 328
332
333/* 329/*
334 * Rounding macros (Power of two boundaries only) 330 * Rounding macros (Power of two boundaries only)
335 */ 331 */
@@ -344,7 +340,6 @@
344#define ACPI_ROUND_UP_to_64_bITS(a) ACPI_ROUND_UP(a,8) 340#define ACPI_ROUND_UP_to_64_bITS(a) ACPI_ROUND_UP(a,8)
345#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,ALIGNED_ADDRESS_BOUNDARY) 341#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,ALIGNED_ADDRESS_BOUNDARY)
346 342
347
348#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) 343#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
349#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a)) 344#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
350 345
@@ -365,7 +360,6 @@
365 360
366#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) 361#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
367 362
368
369/* Bitfields within ACPI registers */ 363/* Bitfields within ACPI registers */
370 364
371#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) 365#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask)
@@ -381,7 +375,6 @@
381#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->descriptor_id) 375#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->descriptor_id)
382#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->descriptor_id = t) 376#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->descriptor_id = t)
383 377
384
385/* Macro to test the object type */ 378/* Macro to test the object type */
386 379
387#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type) 380#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type)
@@ -430,7 +423,6 @@
430#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) 423#define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F))
431#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) 424#define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH))
432 425
433
434/* 426/*
435 * Reporting macros that are never compiled out 427 * Reporting macros that are never compiled out
436 */ 428 */
@@ -554,20 +546,17 @@
554#define ACPI_DEBUG_ONLY_MEMBERS(a) a; 546#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
555#define _VERBOSE_STRUCTURES 547#define _VERBOSE_STRUCTURES
556 548
557
558/* Stack and buffer dumping */ 549/* Stack and buffer dumping */
559 550
560#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0) 551#define ACPI_DUMP_STACK_ENTRY(a) acpi_ex_dump_operand((a),0)
561#define ACPI_DUMP_OPERANDS(a,b,c,d,e) acpi_ex_dump_operands(a,b,c,d,e,_acpi_module_name,__LINE__) 552#define ACPI_DUMP_OPERANDS(a,b,c,d,e) acpi_ex_dump_operands(a,b,c,d,e,_acpi_module_name,__LINE__)
562 553
563
564#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b) 554#define ACPI_DUMP_ENTRY(a,b) acpi_ns_dump_entry (a,b)
565#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) 555#define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d)
566#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) 556#define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a)
567#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) 557#define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
568#define ACPI_BREAK_MSG(a) acpi_os_signal (ACPI_SIGNAL_BREAKPOINT,(a)) 558#define ACPI_BREAK_MSG(a) acpi_os_signal (ACPI_SIGNAL_BREAKPOINT,(a))
569 559
570
571/* 560/*
572 * Generate INT3 on ACPI_ERROR (Debug only!) 561 * Generate INT3 on ACPI_ERROR (Debug only!)
573 */ 562 */
@@ -588,7 +577,6 @@
588#define ACPI_DEBUG_PRINT(pl) acpi_ut_debug_print ACPI_PARAM_LIST(pl) 577#define ACPI_DEBUG_PRINT(pl) acpi_ut_debug_print ACPI_PARAM_LIST(pl)
589#define ACPI_DEBUG_PRINT_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl) 578#define ACPI_DEBUG_PRINT_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl)
590 579
591
592#else 580#else
593/* 581/*
594 * This is the non-debug case -- make everything go away, 582 * This is the non-debug case -- make everything go away,
@@ -639,7 +627,6 @@
639#define ACPI_DEBUGGER_EXEC(a) 627#define ACPI_DEBUGGER_EXEC(a)
640#endif 628#endif
641 629
642
643/* 630/*
644 * For 16-bit code, we want to shrink some things even though 631 * For 16-bit code, we want to shrink some things even though
645 * we are using ACPI_DEBUG_OUTPUT to get the debug output 632 * we are using ACPI_DEBUG_OUTPUT to get the debug output
@@ -650,7 +637,6 @@
650#define ACPI_DEBUG_ONLY_MEMBERS(a) 637#define ACPI_DEBUG_ONLY_MEMBERS(a)
651#endif 638#endif
652 639
653
654#ifdef ACPI_DEBUG_OUTPUT 640#ifdef ACPI_DEBUG_OUTPUT
655/* 641/*
656 * 1) Set name to blanks 642 * 1) Set name to blanks
@@ -663,7 +649,6 @@
663#define ACPI_ADD_OBJECT_NAME(a,b) 649#define ACPI_ADD_OBJECT_NAME(a,b)
664#endif 650#endif
665 651
666
667/* 652/*
668 * Memory allocation tracking (DEBUG ONLY) 653 * Memory allocation tracking (DEBUG ONLY)
669 */ 654 */
@@ -685,6 +670,6 @@
685#define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) 670#define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__)
686#define ACPI_MEM_TRACKING(a) a 671#define ACPI_MEM_TRACKING(a) a
687 672
688#endif /* ACPI_DBG_TRACK_ALLOCATIONS */ 673#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
689 674
690#endif /* ACMACROS_H */ 675#endif /* ACMACROS_H */