diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-01-30 07:30:36 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:36 -0500 |
commit | 8a999410135602d98bd007e835dc21c0c279ad72 (patch) | |
tree | 3b60748665f416646abc818aff577ac18dab6b28 | |
parent | ae9d983be1eefac4b5efad69a188e7ac89a75797 (diff) |
x86: cleanup acpi_32/64.h
Fix coding style to get a readable diff
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/asm-x86/acpi_32.h | 35 | ||||
-rw-r--r-- | include/asm-x86/acpi_64.h | 41 |
2 files changed, 31 insertions, 45 deletions
diff --git a/include/asm-x86/acpi_32.h b/include/asm-x86/acpi_32.h index c8afeea0b80b..03612bcf6422 100644 --- a/include/asm-x86/acpi_32.h +++ b/include/asm-x86/acpi_32.h | |||
@@ -24,11 +24,8 @@ | |||
24 | #ifndef _ASM_ACPI_H | 24 | #ifndef _ASM_ACPI_H |
25 | #define _ASM_ACPI_H | 25 | #define _ASM_ACPI_H |
26 | 26 | ||
27 | #ifdef __KERNEL__ | ||
28 | |||
29 | #include <acpi/pdc_intel.h> | 27 | #include <acpi/pdc_intel.h> |
30 | 28 | #include <asm/numa.h> | |
31 | #include <asm/system.h> /* defines cmpxchg */ | ||
32 | 29 | ||
33 | #define COMPILER_DEPENDENT_INT64 long long | 30 | #define COMPILER_DEPENDENT_INT64 long long |
34 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | 31 | #define COMPILER_DEPENDENT_UINT64 unsigned long long |
@@ -67,17 +64,17 @@ int __acpi_release_global_lock(unsigned int *lock); | |||
67 | * Math helper asm macros | 64 | * Math helper asm macros |
68 | */ | 65 | */ |
69 | #define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ | 66 | #define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ |
70 | asm("divl %2;" \ | 67 | asm("divl %2;" \ |
71 | :"=a"(q32), "=d"(r32) \ | 68 | :"=a"(q32), "=d"(r32) \ |
72 | :"r"(d32), \ | 69 | :"r"(d32), \ |
73 | "0"(n_lo), "1"(n_hi)) | 70 | "0"(n_lo), "1"(n_hi)) |
74 | 71 | ||
75 | 72 | ||
76 | #define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ | 73 | #define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ |
77 | asm("shrl $1,%2;" \ | 74 | asm("shrl $1,%2 ;" \ |
78 | "rcrl $1,%3;" \ | 75 | "rcrl $1,%3;" \ |
79 | :"=r"(n_hi), "=r"(n_lo) \ | 76 | :"=r"(n_hi), "=r"(n_lo) \ |
80 | :"0"(n_hi), "1"(n_lo)) | 77 | :"0"(n_hi), "1"(n_lo)) |
81 | 78 | ||
82 | #ifdef CONFIG_ACPI | 79 | #ifdef CONFIG_ACPI |
83 | extern int acpi_lapic; | 80 | extern int acpi_lapic; |
@@ -87,6 +84,9 @@ extern int acpi_strict; | |||
87 | extern int acpi_disabled; | 84 | extern int acpi_disabled; |
88 | extern int acpi_ht; | 85 | extern int acpi_ht; |
89 | extern int acpi_pci_disabled; | 86 | extern int acpi_pci_disabled; |
87 | extern int acpi_skip_timer_override; | ||
88 | extern int acpi_use_timer_override; | ||
89 | |||
90 | static inline void disable_acpi(void) | 90 | static inline void disable_acpi(void) |
91 | { | 91 | { |
92 | acpi_disabled = 1; | 92 | acpi_disabled = 1; |
@@ -100,11 +100,6 @@ static inline void disable_acpi(void) | |||
100 | 100 | ||
101 | extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); | 101 | extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); |
102 | 102 | ||
103 | #ifdef CONFIG_X86_IO_APIC | ||
104 | extern int acpi_skip_timer_override; | ||
105 | extern int acpi_use_timer_override; | ||
106 | #endif | ||
107 | |||
108 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } | 103 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } |
109 | static inline void acpi_disable_pci(void) | 104 | static inline void acpi_disable_pci(void) |
110 | { | 105 | { |
@@ -122,7 +117,7 @@ extern unsigned long acpi_wakeup_address; | |||
122 | /* early initialization routine */ | 117 | /* early initialization routine */ |
123 | extern void acpi_reserve_bootmem(void); | 118 | extern void acpi_reserve_bootmem(void); |
124 | 119 | ||
125 | #else /* !CONFIG_ACPI */ | 120 | #else /* !CONFIG_ACPI */ |
126 | 121 | ||
127 | #define acpi_lapic 0 | 122 | #define acpi_lapic 0 |
128 | #define acpi_ioapic 0 | 123 | #define acpi_ioapic 0 |
@@ -130,10 +125,8 @@ static inline void acpi_noirq_set(void) { } | |||
130 | static inline void acpi_disable_pci(void) { } | 125 | static inline void acpi_disable_pci(void) { } |
131 | static inline void disable_acpi(void) { } | 126 | static inline void disable_acpi(void) { } |
132 | 127 | ||
133 | #endif /* !CONFIG_ACPI */ | 128 | #endif /* !CONFIG_ACPI */ |
134 | 129 | ||
135 | #define ARCH_HAS_POWER_INIT 1 | 130 | #define ARCH_HAS_POWER_INIT 1 |
136 | 131 | ||
137 | #endif /*__KERNEL__*/ | ||
138 | |||
139 | #endif /*_ASM_ACPI_H*/ | 132 | #endif /*_ASM_ACPI_H*/ |
diff --git a/include/asm-x86/acpi_64.h b/include/asm-x86/acpi_64.h index 58114ed08024..b2670c6db8ec 100644 --- a/include/asm-x86/acpi_64.h +++ b/include/asm-x86/acpi_64.h | |||
@@ -24,8 +24,6 @@ | |||
24 | #ifndef _ASM_ACPI_H | 24 | #ifndef _ASM_ACPI_H |
25 | #define _ASM_ACPI_H | 25 | #define _ASM_ACPI_H |
26 | 26 | ||
27 | #ifdef __KERNEL__ | ||
28 | |||
29 | #include <acpi/pdc_intel.h> | 27 | #include <acpi/pdc_intel.h> |
30 | #include <asm/numa.h> | 28 | #include <asm/numa.h> |
31 | 29 | ||
@@ -66,17 +64,17 @@ int __acpi_release_global_lock(unsigned int *lock); | |||
66 | * Math helper asm macros | 64 | * Math helper asm macros |
67 | */ | 65 | */ |
68 | #define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ | 66 | #define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ |
69 | asm("divl %2;" \ | 67 | asm("divl %2;" \ |
70 | :"=a"(q32), "=d"(r32) \ | 68 | :"=a"(q32), "=d"(r32) \ |
71 | :"r"(d32), \ | 69 | :"r"(d32), \ |
72 | "0"(n_lo), "1"(n_hi)) | 70 | "0"(n_lo), "1"(n_hi)) |
73 | 71 | ||
74 | 72 | ||
75 | #define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ | 73 | #define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ |
76 | asm("shrl $1,%2;" \ | 74 | asm("shrl $1,%2 ;" \ |
77 | "rcrl $1,%3;" \ | 75 | "rcrl $1,%3;" \ |
78 | :"=r"(n_hi), "=r"(n_lo) \ | 76 | :"=r"(n_hi), "=r"(n_lo) \ |
79 | :"0"(n_hi), "1"(n_lo)) | 77 | :"0"(n_hi), "1"(n_lo)) |
80 | 78 | ||
81 | #ifdef CONFIG_ACPI | 79 | #ifdef CONFIG_ACPI |
82 | extern int acpi_lapic; | 80 | extern int acpi_lapic; |
@@ -84,8 +82,11 @@ extern int acpi_ioapic; | |||
84 | extern int acpi_noirq; | 82 | extern int acpi_noirq; |
85 | extern int acpi_strict; | 83 | extern int acpi_strict; |
86 | extern int acpi_disabled; | 84 | extern int acpi_disabled; |
87 | extern int acpi_pci_disabled; | ||
88 | extern int acpi_ht; | 85 | extern int acpi_ht; |
86 | extern int acpi_pci_disabled; | ||
87 | extern int acpi_skip_timer_override; | ||
88 | extern int acpi_use_timer_override; | ||
89 | |||
89 | static inline void disable_acpi(void) | 90 | static inline void disable_acpi(void) |
90 | { | 91 | { |
91 | acpi_disabled = 1; | 92 | acpi_disabled = 1; |
@@ -98,6 +99,7 @@ static inline void disable_acpi(void) | |||
98 | #define FIX_ACPI_PAGES 4 | 99 | #define FIX_ACPI_PAGES 4 |
99 | 100 | ||
100 | extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); | 101 | extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); |
102 | |||
101 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } | 103 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } |
102 | static inline void acpi_disable_pci(void) | 104 | static inline void acpi_disable_pci(void) |
103 | { | 105 | { |
@@ -115,7 +117,7 @@ extern unsigned long acpi_wakeup_address; | |||
115 | /* early initialization routine */ | 117 | /* early initialization routine */ |
116 | extern void acpi_reserve_bootmem(void); | 118 | extern void acpi_reserve_bootmem(void); |
117 | 119 | ||
118 | #else /* !CONFIG_ACPI */ | 120 | #else /* !CONFIG_ACPI */ |
119 | 121 | ||
120 | #define acpi_lapic 0 | 122 | #define acpi_lapic 0 |
121 | #define acpi_ioapic 0 | 123 | #define acpi_ioapic 0 |
@@ -124,19 +126,12 @@ static inline void acpi_disable_pci(void) { } | |||
124 | 126 | ||
125 | #endif /* !CONFIG_ACPI */ | 127 | #endif /* !CONFIG_ACPI */ |
126 | 128 | ||
129 | #define ARCH_HAS_POWER_INIT 1 | ||
130 | |||
131 | #ifdef CONFIG_ACPI_NUMA | ||
127 | extern int acpi_numa; | 132 | extern int acpi_numa; |
128 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); | 133 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); |
129 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) | 134 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) |
130 | |||
131 | extern int acpi_disabled; | ||
132 | extern int acpi_pci_disabled; | ||
133 | |||
134 | #define ARCH_HAS_POWER_INIT 1 | ||
135 | |||
136 | extern int acpi_skip_timer_override; | ||
137 | extern int acpi_use_timer_override; | ||
138 | |||
139 | #ifdef CONFIG_ACPI_NUMA | ||
140 | extern void __init acpi_fake_nodes(const struct bootnode *fake_nodes, | 135 | extern void __init acpi_fake_nodes(const struct bootnode *fake_nodes, |
141 | int num_nodes); | 136 | int num_nodes); |
142 | #else | 137 | #else |
@@ -146,6 +141,4 @@ static inline void acpi_fake_nodes(const struct bootnode *fake_nodes, | |||
146 | } | 141 | } |
147 | #endif | 142 | #endif |
148 | 143 | ||
149 | #endif /*__KERNEL__*/ | ||
150 | |||
151 | #endif /*_ASM_ACPI_H*/ | 144 | #endif /*_ASM_ACPI_H*/ |