1 /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws
2  * which needs to alter them. */
3 
smpboot_setup_warm_reset_vector(unsigned long start_eip)4 static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
5 {
6 	unsigned long flags;
7 
8 	spin_lock_irqsave(&rtc_lock, flags);
9 	CMOS_WRITE(0xa, 0xf);
10 	spin_unlock_irqrestore(&rtc_lock, flags);
11 	flush_tlb_local();
12 	Dprintk("1.\n");
13 	*((volatile unsigned short *) TRAMPOLINE_HIGH) = start_eip >> 4;
14 	Dprintk("2.\n");
15 	*((volatile unsigned short *) TRAMPOLINE_LOW) = start_eip & 0xf;
16 	Dprintk("3.\n");
17 }
18 
smpboot_restore_warm_reset_vector(void)19 static inline void smpboot_restore_warm_reset_vector(void)
20 {
21 	unsigned long flags;
22 
23 	/*
24 	 * Install writable page 0 entry to set BIOS data area.
25 	 */
26 	flush_tlb_local();
27 
28 	/*
29 	 * Paranoid:  Set warm reset code and vector here back
30 	 * to default values.
31 	 */
32 	spin_lock_irqsave(&rtc_lock, flags);
33 	CMOS_WRITE(0, 0xf);
34 	spin_unlock_irqrestore(&rtc_lock, flags);
35 
36 	*((volatile int *) maddr_to_virt(0x467)) = 0;
37 }
38 
smpboot_setup_io_apic(void)39 static inline void smpboot_setup_io_apic(void)
40 {
41 	/*
42 	 * Here we can be sure that there is an IO-APIC in the system. Let's
43 	 * go and set it up:
44 	 */
45 	if (!skip_ioapic_setup && nr_ioapics)
46 		setup_IO_APIC();
47 }
48