diff options
Diffstat (limited to 'drivers/acpi/acpica/acmacros.h')
-rw-r--r-- | drivers/acpi/acpica/acmacros.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h index 2a86c65d873b..4bceb11c7380 100644 --- a/drivers/acpi/acpica/acmacros.h +++ b/drivers/acpi/acpica/acmacros.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2013, Intel Corp. | 8 | * Copyright (C) 2000 - 2014, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -63,17 +63,21 @@ | |||
63 | #define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val)) | 63 | #define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val)) |
64 | 64 | ||
65 | /* | 65 | /* |
66 | * printf() format helpers | 66 | * printf() format helpers. These macros are workarounds for the difficulties |
67 | * with emitting 64-bit integers and 64-bit pointers with the same code | ||
68 | * for both 32-bit and 64-bit hosts. | ||
67 | */ | 69 | */ |
68 | |||
69 | /* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */ | ||
70 | |||
71 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i) | 70 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i) |
72 | 71 | ||
73 | #if ACPI_MACHINE_WIDTH == 64 | 72 | #if ACPI_MACHINE_WIDTH == 64 |
74 | #define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i) | 73 | #define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i) |
74 | #define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i) | ||
75 | #define ACPI_PRINTF_UINT "0x%8.8X%8.8X" | ||
76 | |||
75 | #else | 77 | #else |
76 | #define ACPI_FORMAT_NATIVE_UINT(i) 0, (i) | 78 | #define ACPI_FORMAT_NATIVE_UINT(i) 0, (u32) (i) |
79 | #define ACPI_FORMAT_TO_UINT(i) (u32) (i) | ||
80 | #define ACPI_PRINTF_UINT "0x%8.8X" | ||
77 | #endif | 81 | #endif |
78 | 82 | ||
79 | /* | 83 | /* |