By doing so we are able to not duplicate code in io_apic.c at least in one case. Signed-off-by: Cyrill Gorcunov --- Index: linux-2.6.git/arch/x86/kernel/apic.c =================================================================== --- linux-2.6.git.orig/arch/x86/kernel/apic.c 2008-09-24 16:57:54.000000000 +0400 +++ linux-2.6.git/arch/x86/kernel/apic.c 2008-09-24 19:17:20.000000000 +0400 @@ -163,14 +163,6 @@ static DEFINE_PER_CPU(struct clock_event static unsigned long apic_phys; /* - * Get the LAPIC version - */ -static inline int lapic_get_version(void) -{ - return GET_APIC_VERSION(apic_read(APIC_LVR)); -} - -/* * Check, if the APIC is integrated or a separate chip */ static inline int lapic_is_integrated(void) Index: linux-2.6.git/arch/x86/kernel/io_apic.c =================================================================== --- linux-2.6.git.orig/arch/x86/kernel/io_apic.c 2008-09-24 19:08:14.000000000 +0400 +++ linux-2.6.git/arch/x86/kernel/io_apic.c 2008-09-24 19:19:03.000000000 +0400 @@ -2759,8 +2759,7 @@ static inline void __init check_timer(vo local_irq_save(flags); - ver = apic_read(APIC_LVR); - ver = GET_APIC_VERSION(ver); + ver = lapic_get_version(); /* * get/set the timer IRQ vector: Index: linux-2.6.git/include/asm-x86/apic.h =================================================================== --- linux-2.6.git.orig/include/asm-x86/apic.h 2008-09-22 17:42:35.000000000 +0400 +++ linux-2.6.git/include/asm-x86/apic.h 2008-09-24 19:16:58.000000000 +0400 @@ -132,6 +132,12 @@ extern struct apic_ops *apic_ops; #define apic_wait_icr_idle (apic_ops->wait_icr_idle) #define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle) +/* Get the LAPIC version */ +static inline int lapic_get_version(void) +{ + return GET_APIC_VERSION(apic_read(APIC_LVR)); +} + extern int get_physical_broadcast(void); #ifdef CONFIG_X86_64 -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/