mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86: APIC cleanup
Remove unused and pointless bits from APIC handling code. Move some data items into .data.read_mostly. Adjust some types. Signed-off-by: Jan Beulich <jbeulich@novell.com>
This commit is contained in:
1 parent
601d06e2fb
commit
490a08a9f7
4 files changed
+10
-25
No files matched your search
+5
-14
@@ -64,12 +64,12 @@ static struct {
|
||||
/*
|
||||
* Knob to control our willingness to enable the local APIC.
|
||||
*/
|
||||
static int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */
|
||||
static s8 __initdata enable_local_apic; /* -1=force-disable, +1=force-enable */
|
||||
|
||||
/*
|
||||
* Debug level
|
||||
*/
|
||||
int apic_verbosity;
|
||||
u8 __read_mostly apic_verbosity;
|
||||
|
||||
static bool_t __initdata opt_x2apic = 1;
|
||||
boolean_param("x2apic", opt_x2apic);
|
||||
@@ -442,8 +442,6 @@ void __init sync_Arb_IDs(void)
|
||||
| APIC_DM_INIT);
|
||||
}
|
||||
|
||||
extern void __error_in_apic_c (void);
|
||||
|
||||
/*
|
||||
* An initial setup of the virtual wire mode.
|
||||
*/
|
||||
@@ -558,8 +556,7 @@ void __devinit setup_local_APIC(void)
|
||||
value = apic_read(APIC_LVR);
|
||||
ver = GET_APIC_VERSION(value);
|
||||
|
||||
if ((SPURIOUS_APIC_VECTOR & 0x0f) != 0x0f)
|
||||
__error_in_apic_c();
|
||||
BUILD_BUG_ON((SPURIOUS_APIC_VECTOR & 0x0f) != 0x0f);
|
||||
|
||||
/*
|
||||
* Double-check whether this APIC is really registered.
|
||||
@@ -1116,12 +1113,6 @@ static void __init wait_8254_wraparound(void)
|
||||
} while (prev_count >= curr_count);
|
||||
}
|
||||
|
||||
/*
|
||||
* Default initialization for 8254 timers. If we use other timers like HPET,
|
||||
* we override this later
|
||||
*/
|
||||
void (*wait_timer_tick)(void) __initdata = wait_8254_wraparound;
|
||||
|
||||
/*
|
||||
* This function sets up the local APIC timer, with a timeout of
|
||||
* 'clocks' APIC bus clock. During calibration we actually call
|
||||
@@ -1204,7 +1195,7 @@ static int __init calibrate_APIC_clock(void)
|
||||
* for a wraparound to start exact measurement:
|
||||
* (the current tick might have been already half done)
|
||||
*/
|
||||
wait_timer_tick();
|
||||
wait_8254_wraparound();
|
||||
|
||||
/*
|
||||
* We wrapped around just now. Let's start:
|
||||
@@ -1217,7 +1208,7 @@ static int __init calibrate_APIC_clock(void)
|
||||
* Let's wait LOOPS wraprounds:
|
||||
*/
|
||||
for (i = 0; i < LOOPS; i++)
|
||||
wait_timer_tick();
|
||||
wait_8254_wraparound();
|
||||
|
||||
tt2 = apic_read(APIC_TMCCT);
|
||||
if (cpu_has_tsc)
|
||||
|
||||
@@ -12,12 +12,10 @@
|
||||
#include <asm/mach-default/mach_mpparse.h>
|
||||
#include <asm/io_apic.h>
|
||||
|
||||
static int dmi_bigsmp; /* can be set by dmi scanners */
|
||||
|
||||
static __init int force_bigsmp(struct dmi_system_id *d)
|
||||
{
|
||||
printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident);
|
||||
dmi_bigsmp = 1;
|
||||
def_to_bigsmp = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -42,11 +40,9 @@ static struct dmi_system_id __initdata bigsmp_dmi_table[] = {
|
||||
|
||||
static __init int probe_bigsmp(void)
|
||||
{
|
||||
if (def_to_bigsmp)
|
||||
dmi_bigsmp = 1;
|
||||
else
|
||||
if (!def_to_bigsmp)
|
||||
dmi_check_system(bigsmp_dmi_table);
|
||||
return dmi_bigsmp;
|
||||
return def_to_bigsmp;
|
||||
}
|
||||
|
||||
const struct genapic apic_bigsmp = {
|
||||
|
||||
@@ -28,7 +28,7 @@ const struct genapic *apic_probe[] __initdata = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int cmdline_apic;
|
||||
static bool_t __initdata cmdline_apic;
|
||||
|
||||
void __init generic_bigsmp_probe(void)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define IO_APIC_REDIR_DEST_LOGICAL 0x00800
|
||||
#define IO_APIC_REDIR_DEST_PHYSICAL 0x00000
|
||||
|
||||
extern int apic_verbosity;
|
||||
extern u8 apic_verbosity;
|
||||
extern bool_t x2apic_enabled;
|
||||
extern bool_t directed_eoi_enabled;
|
||||
|
||||
@@ -177,8 +177,6 @@ static inline void ack_APIC_irq(void)
|
||||
apic_write_around(APIC_EOI, 0);
|
||||
}
|
||||
|
||||
extern void (*wait_timer_tick)(void);
|
||||
|
||||
extern int get_maxlvt(void);
|
||||
extern void clear_local_APIC(void);
|
||||
extern void connect_bsp_APIC (void);
|
||||
|
||||