mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
![Eric W. Biederman](/assets/img/avatar_default.png)
All kinds of ugliness exists because we don't initialize the apics during init_IRQs. - We calibrate jiffies in non apic mode even when we are using apics. - We have to have special code to initialize the apics when non-smp. - The legacy i8259 must exist and be setup correctly, even when we won't use it past initialization. - The kexec on panic code must restore the state of the io_apics. - init/main.c needs a special case for !smp smp_init on x86 In addition to pure code movement I needed a couple of non-obvious changes: - Move setup_boot_APIC_clock into APIC_late_time_init for simplicity. - Use cpu_khz to generate a better approximation of loops_per_jiffies so I can verify the timer interrupt is working. - Call setup_apic_nmi_watchdog again after cpu_khz is initialized on the boot cpu. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
29 lines
726 B
C
29 lines
726 B
C
/* two abstractions specific to kernel/smpboot.c, mainly to cater to visws
|
|
* which needs to alter them. */
|
|
|
|
static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
|
|
{
|
|
CMOS_WRITE(0xa, 0xf);
|
|
local_flush_tlb();
|
|
Dprintk("1.\n");
|
|
*((volatile unsigned short *) TRAMPOLINE_HIGH) = start_eip >> 4;
|
|
Dprintk("2.\n");
|
|
*((volatile unsigned short *) TRAMPOLINE_LOW) = start_eip & 0xf;
|
|
Dprintk("3.\n");
|
|
}
|
|
|
|
static inline void smpboot_restore_warm_reset_vector(void)
|
|
{
|
|
/*
|
|
* Install writable page 0 entry to set BIOS data area.
|
|
*/
|
|
local_flush_tlb();
|
|
|
|
/*
|
|
* Paranoid: Set warm reset code and vector here back
|
|
* to default values.
|
|
*/
|
|
CMOS_WRITE(0, 0xf);
|
|
|
|
*((volatile long *) phys_to_virt(0x467)) = 0;
|
|
}
|