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>
This commit is contained in:
parent
ae9d983be1
commit
8a99941013
2 changed files with 31 additions and 45 deletions
|
@ -24,11 +24,8 @@
|
||||||
#ifndef _ASM_ACPI_H
|
#ifndef _ASM_ACPI_H
|
||||||
#define _ASM_ACPI_H
|
#define _ASM_ACPI_H
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
|
||||||
|
|
||||||
#include <acpi/pdc_intel.h>
|
#include <acpi/pdc_intel.h>
|
||||||
|
#include <asm/numa.h>
|
||||||
#include <asm/system.h> /* defines cmpxchg */
|
|
||||||
|
|
||||||
#define COMPILER_DEPENDENT_INT64 long long
|
#define COMPILER_DEPENDENT_INT64 long long
|
||||||
#define COMPILER_DEPENDENT_UINT64 unsigned long long
|
#define COMPILER_DEPENDENT_UINT64 unsigned long long
|
||||||
|
@ -67,17 +64,17 @@ int __acpi_release_global_lock(unsigned int *lock);
|
||||||
* Math helper asm macros
|
* Math helper asm macros
|
||||||
*/
|
*/
|
||||||
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
|
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
|
||||||
asm("divl %2;" \
|
asm("divl %2;" \
|
||||||
:"=a"(q32), "=d"(r32) \
|
:"=a"(q32), "=d"(r32) \
|
||||||
:"r"(d32), \
|
:"r"(d32), \
|
||||||
"0"(n_lo), "1"(n_hi))
|
"0"(n_lo), "1"(n_hi))
|
||||||
|
|
||||||
|
|
||||||
#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
|
#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
|
||||||
asm("shrl $1,%2;" \
|
asm("shrl $1,%2 ;" \
|
||||||
"rcrl $1,%3;" \
|
"rcrl $1,%3;" \
|
||||||
:"=r"(n_hi), "=r"(n_lo) \
|
:"=r"(n_hi), "=r"(n_lo) \
|
||||||
:"0"(n_hi), "1"(n_lo))
|
:"0"(n_hi), "1"(n_lo))
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI
|
#ifdef CONFIG_ACPI
|
||||||
extern int acpi_lapic;
|
extern int acpi_lapic;
|
||||||
|
@ -87,6 +84,9 @@ extern int acpi_strict;
|
||||||
extern int acpi_disabled;
|
extern int acpi_disabled;
|
||||||
extern int acpi_ht;
|
extern int acpi_ht;
|
||||||
extern int acpi_pci_disabled;
|
extern int acpi_pci_disabled;
|
||||||
|
extern int acpi_skip_timer_override;
|
||||||
|
extern int acpi_use_timer_override;
|
||||||
|
|
||||||
static inline void disable_acpi(void)
|
static inline void disable_acpi(void)
|
||||||
{
|
{
|
||||||
acpi_disabled = 1;
|
acpi_disabled = 1;
|
||||||
|
@ -100,11 +100,6 @@ static inline void disable_acpi(void)
|
||||||
|
|
||||||
extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
|
extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
|
||||||
|
|
||||||
#ifdef CONFIG_X86_IO_APIC
|
|
||||||
extern int acpi_skip_timer_override;
|
|
||||||
extern int acpi_use_timer_override;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
|
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
|
||||||
static inline void acpi_disable_pci(void)
|
static inline void acpi_disable_pci(void)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +117,7 @@ extern unsigned long acpi_wakeup_address;
|
||||||
/* early initialization routine */
|
/* early initialization routine */
|
||||||
extern void acpi_reserve_bootmem(void);
|
extern void acpi_reserve_bootmem(void);
|
||||||
|
|
||||||
#else /* !CONFIG_ACPI */
|
#else /* !CONFIG_ACPI */
|
||||||
|
|
||||||
#define acpi_lapic 0
|
#define acpi_lapic 0
|
||||||
#define acpi_ioapic 0
|
#define acpi_ioapic 0
|
||||||
|
@ -130,10 +125,8 @@ static inline void acpi_noirq_set(void) { }
|
||||||
static inline void acpi_disable_pci(void) { }
|
static inline void acpi_disable_pci(void) { }
|
||||||
static inline void disable_acpi(void) { }
|
static inline void disable_acpi(void) { }
|
||||||
|
|
||||||
#endif /* !CONFIG_ACPI */
|
#endif /* !CONFIG_ACPI */
|
||||||
|
|
||||||
#define ARCH_HAS_POWER_INIT 1
|
#define ARCH_HAS_POWER_INIT 1
|
||||||
|
|
||||||
#endif /*__KERNEL__*/
|
|
||||||
|
|
||||||
#endif /*_ASM_ACPI_H*/
|
#endif /*_ASM_ACPI_H*/
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
#ifndef _ASM_ACPI_H
|
#ifndef _ASM_ACPI_H
|
||||||
#define _ASM_ACPI_H
|
#define _ASM_ACPI_H
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
|
||||||
|
|
||||||
#include <acpi/pdc_intel.h>
|
#include <acpi/pdc_intel.h>
|
||||||
#include <asm/numa.h>
|
#include <asm/numa.h>
|
||||||
|
|
||||||
|
@ -66,17 +64,17 @@ int __acpi_release_global_lock(unsigned int *lock);
|
||||||
* Math helper asm macros
|
* Math helper asm macros
|
||||||
*/
|
*/
|
||||||
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
|
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
|
||||||
asm("divl %2;" \
|
asm("divl %2;" \
|
||||||
:"=a"(q32), "=d"(r32) \
|
:"=a"(q32), "=d"(r32) \
|
||||||
:"r"(d32), \
|
:"r"(d32), \
|
||||||
"0"(n_lo), "1"(n_hi))
|
"0"(n_lo), "1"(n_hi))
|
||||||
|
|
||||||
|
|
||||||
#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
|
#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
|
||||||
asm("shrl $1,%2;" \
|
asm("shrl $1,%2 ;" \
|
||||||
"rcrl $1,%3;" \
|
"rcrl $1,%3;" \
|
||||||
:"=r"(n_hi), "=r"(n_lo) \
|
:"=r"(n_hi), "=r"(n_lo) \
|
||||||
:"0"(n_hi), "1"(n_lo))
|
:"0"(n_hi), "1"(n_lo))
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI
|
#ifdef CONFIG_ACPI
|
||||||
extern int acpi_lapic;
|
extern int acpi_lapic;
|
||||||
|
@ -84,8 +82,11 @@ extern int acpi_ioapic;
|
||||||
extern int acpi_noirq;
|
extern int acpi_noirq;
|
||||||
extern int acpi_strict;
|
extern int acpi_strict;
|
||||||
extern int acpi_disabled;
|
extern int acpi_disabled;
|
||||||
extern int acpi_pci_disabled;
|
|
||||||
extern int acpi_ht;
|
extern int acpi_ht;
|
||||||
|
extern int acpi_pci_disabled;
|
||||||
|
extern int acpi_skip_timer_override;
|
||||||
|
extern int acpi_use_timer_override;
|
||||||
|
|
||||||
static inline void disable_acpi(void)
|
static inline void disable_acpi(void)
|
||||||
{
|
{
|
||||||
acpi_disabled = 1;
|
acpi_disabled = 1;
|
||||||
|
@ -98,6 +99,7 @@ static inline void disable_acpi(void)
|
||||||
#define FIX_ACPI_PAGES 4
|
#define FIX_ACPI_PAGES 4
|
||||||
|
|
||||||
extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
|
extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
|
||||||
|
|
||||||
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
|
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
|
||||||
static inline void acpi_disable_pci(void)
|
static inline void acpi_disable_pci(void)
|
||||||
{
|
{
|
||||||
|
@ -115,7 +117,7 @@ extern unsigned long acpi_wakeup_address;
|
||||||
/* early initialization routine */
|
/* early initialization routine */
|
||||||
extern void acpi_reserve_bootmem(void);
|
extern void acpi_reserve_bootmem(void);
|
||||||
|
|
||||||
#else /* !CONFIG_ACPI */
|
#else /* !CONFIG_ACPI */
|
||||||
|
|
||||||
#define acpi_lapic 0
|
#define acpi_lapic 0
|
||||||
#define acpi_ioapic 0
|
#define acpi_ioapic 0
|
||||||
|
@ -124,19 +126,12 @@ static inline void acpi_disable_pci(void) { }
|
||||||
|
|
||||||
#endif /* !CONFIG_ACPI */
|
#endif /* !CONFIG_ACPI */
|
||||||
|
|
||||||
|
#define ARCH_HAS_POWER_INIT 1
|
||||||
|
|
||||||
|
#ifdef CONFIG_ACPI_NUMA
|
||||||
extern int acpi_numa;
|
extern int acpi_numa;
|
||||||
extern int acpi_scan_nodes(unsigned long start, unsigned long end);
|
extern int acpi_scan_nodes(unsigned long start, unsigned long end);
|
||||||
#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
|
#define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
|
||||||
|
|
||||||
extern int acpi_disabled;
|
|
||||||
extern int acpi_pci_disabled;
|
|
||||||
|
|
||||||
#define ARCH_HAS_POWER_INIT 1
|
|
||||||
|
|
||||||
extern int acpi_skip_timer_override;
|
|
||||||
extern int acpi_use_timer_override;
|
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI_NUMA
|
|
||||||
extern void __init acpi_fake_nodes(const struct bootnode *fake_nodes,
|
extern void __init acpi_fake_nodes(const struct bootnode *fake_nodes,
|
||||||
int num_nodes);
|
int num_nodes);
|
||||||
#else
|
#else
|
||||||
|
@ -146,6 +141,4 @@ static inline void acpi_fake_nodes(const struct bootnode *fake_nodes,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*__KERNEL__*/
|
|
||||||
|
|
||||||
#endif /*_ASM_ACPI_H*/
|
#endif /*_ASM_ACPI_H*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue