4 #include <linux/config.h>
5 #include <asm/apicdef.h>
9 #ifdef CONFIG_X86_LOCAL_APIC
12 #define Dprintk(x...) printk(##x)
18 * Basic functions accessing APICs.
21 extern __inline
void apic_write(unsigned long reg
, unsigned long v
)
23 *((volatile unsigned long *)(APIC_BASE
+reg
))=v
;
26 extern __inline
unsigned long apic_read(unsigned long reg
)
28 return *((volatile unsigned long *)(APIC_BASE
+reg
));
31 extern unsigned int apic_timer_irqs
[NR_CPUS
];
33 #ifdef CONFIG_X86_GOOD_APIC
34 # define FORCE_READ_AROUND_WRITE 0
35 # define apic_readaround(x)
37 # define FORCE_READ_AROUND_WRITE 1
38 # define apic_readaround(x) apic_read(x)
41 #define apic_write_around(x,y) \
42 do { apic_readaround(x); apic_write(x,y); } while (0)
44 extern inline void ack_APIC_irq(void)
48 apic_readaround(APIC_EOI
);
50 * on P6+ cores (CONFIG_X86_GOOD_APIC) ack_APIC_irq() actually
51 * gets compiled as a single instruction ... yummie.
53 apic_write(APIC_EOI
, 0); /* Docs say use 0 for future compatibility */
56 extern int get_maxlvt(void);
57 extern void disable_local_APIC (void);
58 extern void cache_APIC_registers (void);
59 extern void setup_local_APIC (void);
60 extern void init_apic_mappings(void);
61 extern void smp_local_timer_interrupt(struct pt_regs
* regs
);
62 extern void setup_APIC_clocks(void);