|
@@ -99,6 +99,8 @@ static DEFINE_PER_CPU(struct clock_event_device, lapic_events);
|
|
|
/* Local APIC was disabled by the BIOS and enabled by the kernel */
|
|
|
static int enabled_via_apicbase;
|
|
|
|
|
|
+static unsigned long apic_phys;
|
|
|
+
|
|
|
/*
|
|
|
* Get the LAPIC version
|
|
|
*/
|
|
@@ -631,9 +633,14 @@ int setup_profiling_timer(unsigned int multiplier)
|
|
|
*/
|
|
|
void clear_local_APIC(void)
|
|
|
{
|
|
|
- int maxlvt = lapic_get_maxlvt();
|
|
|
+ int maxlvt;
|
|
|
u32 v;
|
|
|
|
|
|
+ /* APIC hasn't been mapped yet */
|
|
|
+ if (!apic_phys)
|
|
|
+ return;
|
|
|
+
|
|
|
+ maxlvt = lapic_get_maxlvt();
|
|
|
/*
|
|
|
* Masking an LVT entry can trigger a local APIC error
|
|
|
* if the vector is zero. Mask LVTERR first to prevent this.
|
|
@@ -1120,8 +1127,6 @@ no_apic:
|
|
|
*/
|
|
|
void __init init_apic_mappings(void)
|
|
|
{
|
|
|
- unsigned long apic_phys;
|
|
|
-
|
|
|
/*
|
|
|
* If no local APIC can be found then set up a fake all
|
|
|
* zeroes page to simulate the local APIC and another
|