aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-01-30 07:30:36 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:36 -0500
commit8a999410135602d98bd007e835dc21c0c279ad72 (patch)
tree3b60748665f416646abc818aff577ac18dab6b28 /include
parentae9d983be1eefac4b5efad69a188e7ac89a75797 (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>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/acpi_32.h35
-rw-r--r--include/asm-x86/acpi_64.h41
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
83extern int acpi_lapic; 80extern int acpi_lapic;
@@ -87,6 +84,9 @@ extern int acpi_strict;
87extern int acpi_disabled; 84extern int acpi_disabled;
88extern int acpi_ht; 85extern int acpi_ht;
89extern int acpi_pci_disabled; 86extern int acpi_pci_disabled;
87extern int acpi_skip_timer_override;
88extern int acpi_use_timer_override;
89
90static inline void disable_acpi(void) 90static 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
101extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); 101extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
102 102
103#ifdef CONFIG_X86_IO_APIC
104extern int acpi_skip_timer_override;
105extern int acpi_use_timer_override;
106#endif
107
108static inline void acpi_noirq_set(void) { acpi_noirq = 1; } 103static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
109static inline void acpi_disable_pci(void) 104static 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 */
123extern void acpi_reserve_bootmem(void); 118extern 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) { }
130static inline void acpi_disable_pci(void) { } 125static inline void acpi_disable_pci(void) { }
131static inline void disable_acpi(void) { } 126static 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
82extern int acpi_lapic; 80extern int acpi_lapic;
@@ -84,8 +82,11 @@ extern int acpi_ioapic;
84extern int acpi_noirq; 82extern int acpi_noirq;
85extern int acpi_strict; 83extern int acpi_strict;
86extern int acpi_disabled; 84extern int acpi_disabled;
87extern int acpi_pci_disabled;
88extern int acpi_ht; 85extern int acpi_ht;
86extern int acpi_pci_disabled;
87extern int acpi_skip_timer_override;
88extern int acpi_use_timer_override;
89
89static inline void disable_acpi(void) 90static 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
100extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); 101extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
102
101static inline void acpi_noirq_set(void) { acpi_noirq = 1; } 103static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
102static inline void acpi_disable_pci(void) 104static 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 */
116extern void acpi_reserve_bootmem(void); 118extern 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
127extern int acpi_numa; 132extern int acpi_numa;
128extern int acpi_scan_nodes(unsigned long start, unsigned long end); 133extern 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
131extern int acpi_disabled;
132extern int acpi_pci_disabled;
133
134#define ARCH_HAS_POWER_INIT 1
135
136extern int acpi_skip_timer_override;
137extern int acpi_use_timer_override;
138
139#ifdef CONFIG_ACPI_NUMA
140extern void __init acpi_fake_nodes(const struct bootnode *fake_nodes, 135extern 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*/