[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: APIC cleanup
# HG changeset patch # User Jan Beulich <jbeulich@xxxxxxxxxx> # Date 1299687821 0 # Node ID cf165e83b8e3abe3a44bfd7e67825cc3e3d98111 # Parent 807854244c279f8cec816d69dec9221734bf5af0 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@xxxxxxxxxx> --- diff -r 807854244c27 -r cf165e83b8e3 xen/arch/x86/apic.c --- a/xen/arch/x86/apic.c Wed Mar 09 16:23:09 2011 +0000 +++ b/xen/arch/x86/apic.c Wed Mar 09 16:23:41 2011 +0000 @@ -64,12 +64,12 @@ /* * 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 @@ | APIC_DM_INIT); } -extern void __error_in_apic_c (void); - /* * An initial setup of the virtual wire mode. */ @@ -558,8 +556,7 @@ 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. @@ -1117,12 +1114,6 @@ } /* - * 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 * this function twice on the boot CPU, once with a bogus timeout @@ -1204,7 +1195,7 @@ * 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 @@ * 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) diff -r 807854244c27 -r cf165e83b8e3 xen/arch/x86/genapic/bigsmp.c --- a/xen/arch/x86/genapic/bigsmp.c Wed Mar 09 16:23:09 2011 +0000 +++ b/xen/arch/x86/genapic/bigsmp.c Wed Mar 09 16:23:41 2011 +0000 @@ -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 __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 = { diff -r 807854244c27 -r cf165e83b8e3 xen/arch/x86/genapic/probe.c --- a/xen/arch/x86/genapic/probe.c Wed Mar 09 16:23:09 2011 +0000 +++ b/xen/arch/x86/genapic/probe.c Wed Mar 09 16:23:41 2011 +0000 @@ -28,7 +28,7 @@ NULL, }; -static int cmdline_apic; +static bool_t __initdata cmdline_apic; void __init generic_bigsmp_probe(void) { diff -r 807854244c27 -r cf165e83b8e3 xen/include/asm-x86/apic.h --- a/xen/include/asm-x86/apic.h Wed Mar 09 16:23:09 2011 +0000 +++ b/xen/include/asm-x86/apic.h Wed Mar 09 16:23:41 2011 +0000 @@ -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 @@ 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); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |