Merge branch 'next' into for-linus
[deliverable/linux.git] / arch / x86 / include / asm / smpboot_hooks.h
CommitLineData
1da177e4
LT
1/* two abstractions specific to kernel/smpboot.c, mainly to cater to visws
2 * which needs to alter them. */
3
4static inline void smpboot_clear_io_apic_irqs(void)
5{
6a64b5da 6#ifdef CONFIG_X86_IO_APIC
1da177e4 7 io_apic_irqs = 0;
6a64b5da 8#endif
1da177e4
LT
9}
10
11static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
12{
13 CMOS_WRITE(0xa, 0xf);
14 local_flush_tlb();
cfc1b9a6 15 pr_debug("1.\n");
6f177c01 16 *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_high)) =
569712b2 17 start_eip >> 4;
cfc1b9a6 18 pr_debug("2.\n");
6f177c01 19 *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_low)) =
569712b2 20 start_eip & 0xf;
cfc1b9a6 21 pr_debug("3.\n");
1da177e4
LT
22}
23
24static inline void smpboot_restore_warm_reset_vector(void)
25{
26 /*
27 * Install writable page 0 entry to set BIOS data area.
28 */
29 local_flush_tlb();
30
31 /*
32 * Paranoid: Set warm reset code and vector here back
33 * to default values.
34 */
35 CMOS_WRITE(0, 0xf);
36
6f177c01 37 *((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0;
1da177e4
LT
38}
39
b6dbf334 40static inline void __init smpboot_setup_io_apic(void)
1da177e4 41{
6a64b5da 42#ifdef CONFIG_X86_IO_APIC
1da177e4
LT
43 /*
44 * Here we can be sure that there is an IO-APIC in the system. Let's
45 * go and set it up:
46 */
47 if (!skip_ioapic_setup && nr_ioapics)
48 setup_IO_APIC();
d788bada 49 else {
3fa7b348 50 nr_ioapics = 0;
d788bada 51 }
6a64b5da 52#endif
1da177e4 53}
9f3734f6
GOC
54
55static inline void smpboot_clear_io_apic(void)
56{
6a64b5da 57#ifdef CONFIG_X86_IO_APIC
9f3734f6 58 nr_ioapics = 0;
6a64b5da 59#endif
9f3734f6 60}
This page took 0.556935 seconds and 5 git commands to generate.