[PATCH] i386: move apic init in init_IRQs
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>
This commit is contained in:
committed by
Linus Torvalds
parent
29b70081f7
commit
f2b36db692
@@ -118,7 +118,8 @@ extern void release_lapic_nmi(void);
|
||||
extern void disable_timer_nmi_watchdog(void);
|
||||
extern void enable_timer_nmi_watchdog(void);
|
||||
extern void nmi_watchdog_tick (struct pt_regs * regs);
|
||||
extern int APIC_init_uniprocessor (void);
|
||||
extern int APIC_init(void);
|
||||
extern void APIC_late_time_init(void);
|
||||
extern void disable_APIC_timer(void);
|
||||
extern void enable_APIC_timer(void);
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ void init_8259A(int aeoi);
|
||||
void FASTCALL(send_IPI_self(int vector));
|
||||
void init_VISWS_APIC_irqs(void);
|
||||
void setup_IO_APIC(void);
|
||||
void IO_APIC_late_time_init(void);
|
||||
void disable_IO_APIC(void);
|
||||
void print_IO_APIC(void);
|
||||
int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn);
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/* two abstractions specific to kernel/smpboot.c, mainly to cater to visws
|
||||
* which needs to alter them. */
|
||||
|
||||
static inline void smpboot_clear_io_apic_irqs(void)
|
||||
{
|
||||
io_apic_irqs = 0;
|
||||
}
|
||||
|
||||
static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
|
||||
{
|
||||
CMOS_WRITE(0xa, 0xf);
|
||||
@@ -32,13 +27,3 @@ static inline void smpboot_restore_warm_reset_vector(void)
|
||||
|
||||
*((volatile long *) phys_to_virt(0x467)) = 0;
|
||||
}
|
||||
|
||||
static inline void smpboot_setup_io_apic(void)
|
||||
{
|
||||
/*
|
||||
* Here we can be sure that there is an IO-APIC in the system. Let's
|
||||
* go and set it up:
|
||||
*/
|
||||
if (!skip_ioapic_setup && nr_ioapics)
|
||||
setup_IO_APIC();
|
||||
}
|
||||
|
||||
@@ -11,14 +11,7 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
|
||||
|
||||
/* for visws do nothing for any of these */
|
||||
|
||||
static inline void smpboot_clear_io_apic_irqs(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void smpboot_restore_warm_reset_vector(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void smpboot_setup_io_apic(void)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user