Patches contributed by Eötvös Lorand University


commit 7ed248daa56156f2fd7175f90b62fc6397b0c7b7
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 03:43:47 2009 +0100

    x86: clean up apic->apic_id_registered() methods
    
    Impact: cleanup
    
    x86 subarchitectures each defined a "apic_id_registered()" method,
    which could be an inline function depending on which subarch we build
    for, and which was also the name of a genapic field.
    
    Untangle this namespace spaghetti by giving each of the instances
    a separate name.
    
    Also remove wrapper macro obfuscation.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index d8dd9f537911..42c56df3ff32 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -4,9 +4,9 @@
 #define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu))
 #define esr_disable (1)
 
-static inline int apic_id_registered(void)
+static inline int bigsmp_apic_id_registered(void)
 {
-	return (1);
+	return 1;
 }
 
 static inline const cpumask_t *target_cpus(void)
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h
index c58b9cc74465..a1819b510de3 100644
--- a/arch/x86/include/asm/es7000/apic.h
+++ b/arch/x86/include/asm/es7000/apic.h
@@ -6,9 +6,9 @@
 #define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu)
 #define esr_disable (1)
 
-static inline int apic_id_registered(void)
+static inline int es7000_apic_id_registered(void)
 {
-	        return (1);
+	        return 1;
 }
 
 static inline const cpumask_t *target_cpus_cluster(void)
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h
index 2448b927b644..6a454fa0b433 100644
--- a/arch/x86/include/asm/mach-default/mach_apic.h
+++ b/arch/x86/include/asm/mach-default/mach_apic.h
@@ -25,7 +25,6 @@ static inline const struct cpumask *target_cpus(void)
 #define INT_DELIVERY_MODE (apic->int_delivery_mode)
 #define INT_DEST_MODE (apic->int_dest_mode)
 #define TARGET_CPUS	  (apic->target_cpus())
-#define apic_id_registered (apic->apic_id_registered)
 #define init_apic_ldr (apic->init_apic_ldr)
 #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
 #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
@@ -57,7 +56,7 @@ static inline void init_apic_ldr(void)
 	apic_write(APIC_LDR, val);
 }
 
-static inline int apic_id_registered(void)
+static inline int default_apic_id_registered(void)
 {
 	return physid_isset(read_apic_id(), phys_cpu_present_map);
 }
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h
index 59972d94ff18..cc6e9d70f06e 100644
--- a/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -10,7 +10,6 @@
 #undef APIC_DEST_LOGICAL
 #define APIC_DEST_LOGICAL (apic->apic_destination_logical)
 #define TARGET_CPUS	  (apic->target_cpus())
-#define apic_id_registered (apic->apic_id_registered)
 #define init_apic_ldr (apic->init_apic_ldr)
 #define ioapic_phys_id_map (apic->ioapic_phys_id_map)
 #define setup_apic_routing (apic->setup_apic_routing)
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h
index bf37bc49bd8e..59b62b19d02c 100644
--- a/arch/x86/include/asm/numaq/apic.h
+++ b/arch/x86/include/asm/numaq/apic.h
@@ -28,7 +28,7 @@ static inline unsigned long check_apicid_present(int bit)
 }
 #define apicid_cluster(apicid) (apicid & 0xF0)
 
-static inline int apic_id_registered(void)
+static inline int numaq_apic_id_registered(void)
 {
 	return 1;
 }
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h
index 93d2c8667cfe..a36ef6e4b1ff 100644
--- a/arch/x86/include/asm/summit/apic.h
+++ b/arch/x86/include/asm/summit/apic.h
@@ -74,7 +74,7 @@ static inline int multi_timer_check(int apic, int irq)
 	return 0;
 }
 
-static inline int apic_id_registered(void)
+static inline int summit_apic_id_registered(void)
 {
 	return 1;
 }
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index c6f15647eba9..b6740de18fbb 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -1171,7 +1171,7 @@ void __cpuinit setup_local_APIC(void)
 	 * Double-check whether this APIC is really registered.
 	 * This is meaningless in clustered apic mode, so we skip it.
 	 */
-	if (!apic_id_registered())
+	if (!apic->apic_id_registered())
 		BUG();
 
 	/*
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 22c3608b80dd..17abf5c62429 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -62,7 +62,7 @@ struct genapic apic_bigsmp = {
 	.name				= "bigsmp",
 	.probe				= probe_bigsmp,
 	.acpi_madt_oem_check		= NULL,
-	.apic_id_registered		= apic_id_registered,
+	.apic_id_registered		= bigsmp_apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
 	.int_dest_mode			= INT_DEST_MODE,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index cfec3494a967..1f30559e9d8d 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -29,7 +29,7 @@ struct genapic apic_default = {
 	.name				= "default",
 	.probe				= probe_default,
 	.acpi_madt_oem_check		= NULL,
-	.apic_id_registered		= apic_id_registered,
+	.apic_id_registered		= default_apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
 	.int_dest_mode			= INT_DEST_MODE,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 23fe6f1c9691..d68ca0bce675 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -105,7 +105,7 @@ struct genapic apic_es7000 = {
 	.name				= "es7000",
 	.probe				= probe_es7000,
 	.acpi_madt_oem_check		= es7000_acpi_madt_oem_check,
-	.apic_id_registered		= apic_id_registered,
+	.apic_id_registered		= es7000_apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
 	.int_dest_mode			= INT_DEST_MODE,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index 9691b4e1654d..b22a79b15b19 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -49,7 +49,7 @@ struct genapic apic_numaq = {
 	.name				= "NUMAQ",
 	.probe				= probe_numaq,
 	.acpi_madt_oem_check		= NULL,
-	.apic_id_registered		= apic_id_registered,
+	.apic_id_registered		= numaq_apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
 	.int_dest_mode			= INT_DEST_MODE,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 0eea9fbb2a50..744fa1b86ef4 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -42,7 +42,7 @@ struct genapic apic_summit = {
 	.name				= "summit",
 	.probe				= probe_summit,
 	.acpi_madt_oem_check		= summit_acpi_madt_oem_check,
-	.apic_id_registered		= apic_id_registered,
+	.apic_id_registered		= summit_apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
 	.int_dest_mode			= INT_DEST_MODE,

commit 306db03b0d71bf9c94155c0c4771a79fc70b4b27
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 03:43:47 2009 +0100

    x86: clean up apic->acpi_madt_oem_check methods
    
    Impact: refactor code
    
    x86 subarchitectures each defined a "acpi_madt_oem_check()" method,
    which could be an inline function, or an extern, or a static function,
    and which was also the name of a genapic field.
    
    Untangle this namespace spaghetti by setting ->acpi_madt_oem_check()
    to NULL on those subarchitectures that have no detection quirks,
    and rename the other ones (summit, es7000) that do.
    
    Also change default_acpi_madt_oem_check() to handle NULL entries,
    and clean its control flow up as well.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/include/asm/es7000/mpparse.h b/arch/x86/include/asm/es7000/mpparse.h
index c1629b090ec2..30692c4ae859 100644
--- a/arch/x86/include/asm/es7000/mpparse.h
+++ b/arch/x86/include/asm/es7000/mpparse.h
@@ -9,7 +9,7 @@ extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
 extern void setup_unisys(void);
 
 #ifndef CONFIG_X86_GENERICARCH
-extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id);
+extern int default_acpi_madt_oem_check(char *oem_id, char *oem_table_id);
 extern int mps_oem_check(struct mpc_table *mpc, char *oem, char *productid);
 #endif
 
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 26c5e824a717..108abdf6953b 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -103,7 +103,7 @@ extern struct genapic apic_flat;
 extern struct genapic apic_physflat;
 extern struct genapic apic_x2apic_cluster;
 extern struct genapic apic_x2apic_phys;
-extern int acpi_madt_oem_check(char *, char *);
+extern int default_acpi_madt_oem_check(char *, char *);
 
 extern void apic_send_IPI_self(int vector);
 
diff --git a/arch/x86/include/asm/mach-default/mach_mpparse.h b/arch/x86/include/asm/mach-default/mach_mpparse.h
index c70a263d68cd..8fa01770ba62 100644
--- a/arch/x86/include/asm/mach-default/mach_mpparse.h
+++ b/arch/x86/include/asm/mach-default/mach_mpparse.h
@@ -8,7 +8,7 @@ mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
 }
 
 /* Hook from generic ACPI tables.c */
-static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+static inline int default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
 	return 0;
 }
diff --git a/arch/x86/include/asm/mach-generic/mach_mpparse.h b/arch/x86/include/asm/mach-generic/mach_mpparse.h
index 9444ab8dca94..f497d96c76bb 100644
--- a/arch/x86/include/asm/mach-generic/mach_mpparse.h
+++ b/arch/x86/include/asm/mach-generic/mach_mpparse.h
@@ -4,6 +4,6 @@
 
 extern int mps_oem_check(struct mpc_table *, char *, char *);
 
-extern int acpi_madt_oem_check(char *, char *);
+extern int default_acpi_madt_oem_check(char *, char *);
 
 #endif /* _ASM_X86_MACH_GENERIC_MACH_MPPARSE_H */
diff --git a/arch/x86/include/asm/summit/mpparse.h b/arch/x86/include/asm/summit/mpparse.h
index 380e86c02363..555ed8238e94 100644
--- a/arch/x86/include/asm/summit/mpparse.h
+++ b/arch/x86/include/asm/summit/mpparse.h
@@ -27,7 +27,7 @@ static inline int mps_oem_check(struct mpc_table *mpc, char *oem,
 }
 
 /* Hook from generic ACPI tables.c */
-static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+static inline int summit_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
 	if (!strncmp(oem_id, "IBM", 3) &&
 	    (!strncmp(oem_table_id, "SERVIGIL", 8)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 4cb5964f1499..314fe0dddef4 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -239,7 +239,8 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
 		       madt->address);
 	}
 
-	acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id);
+	default_acpi_madt_oem_check(madt->header.oem_id,
+				    madt->header.oem_table_id);
 
 	return 0;
 }
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c
index 2b986389a24f..060945b8eec4 100644
--- a/arch/x86/kernel/genapic_64.c
+++ b/arch/x86/kernel/genapic_64.c
@@ -68,7 +68,7 @@ void apic_send_IPI_self(int vector)
 	__send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL);
 }
 
-int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
 	int i;
 
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 13e82bc4dae6..22c3608b80dd 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -61,7 +61,7 @@ struct genapic apic_bigsmp = {
 
 	.name				= "bigsmp",
 	.probe				= probe_bigsmp,
-	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.acpi_madt_oem_check		= NULL,
 	.apic_id_registered		= apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index d5fec764fb40..cfec3494a967 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -28,7 +28,7 @@ struct genapic apic_default = {
 
 	.name				= "default",
 	.probe				= probe_default,
-	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.acpi_madt_oem_check		= NULL,
 	.apic_id_registered		= apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 4a404ea5f928..23fe6f1c9691 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -57,7 +57,7 @@ mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
 
 #ifdef CONFIG_ACPI
 /* Hook from generic ACPI tables.c */
-static int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
 	unsigned long oem_addr = 0;
 	int check_dsdt;
@@ -81,7 +81,7 @@ static int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 	return ret;
 }
 #else
-static int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
 	return 0;
 }
@@ -104,7 +104,7 @@ struct genapic apic_es7000 = {
 
 	.name				= "es7000",
 	.probe				= probe_es7000,
-	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.acpi_madt_oem_check		= es7000_acpi_madt_oem_check,
 	.apic_id_registered		= apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index fa486ca49c0a..9691b4e1654d 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -31,12 +31,6 @@ static int probe_numaq(void)
 	return found_numaq;
 }
 
-/* Hook from generic ACPI tables.c */
-static int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
-{
-	return 0;
-}
-
 static void vector_allocation_domain(int cpu, cpumask_t *retmask)
 {
 	/* Careful. Some cpus do not strictly honor the set of cpus
@@ -54,7 +48,7 @@ struct genapic apic_numaq = {
 
 	.name				= "NUMAQ",
 	.probe				= probe_numaq,
-	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.acpi_madt_oem_check		= NULL,
 	.apic_id_registered		= apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c
index 82bf0f520fb6..a21e2b1a7011 100644
--- a/arch/x86/mach-generic/probe.c
+++ b/arch/x86/mach-generic/probe.c
@@ -128,20 +128,24 @@ int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
 	return 0;
 }
 
-int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
 	int i;
+
 	for (i = 0; apic_probe[i]; ++i) {
-		if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) {
-			if (!cmdline_apic) {
-				apic = apic_probe[i];
-				if (x86_quirks->update_genapic)
-					x86_quirks->update_genapic();
-				printk(KERN_INFO "Switched to APIC driver `%s'.\n",
-				       apic->name);
-			}
-			return 1;
+		if (!apic_probe[i]->acpi_madt_oem_check)
+			continue;
+		if (!apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id))
+			continue;
+
+		if (!cmdline_apic) {
+			apic = apic_probe[i];
+			if (x86_quirks->update_genapic)
+				x86_quirks->update_genapic();
+			printk(KERN_INFO "Switched to APIC driver `%s'.\n",
+			       apic->name);
 		}
+		return 1;
 	}
 	return 0;
 }
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 479c1d409779..0eea9fbb2a50 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -41,7 +41,7 @@ struct genapic apic_summit = {
 
 	.name				= "summit",
 	.probe				= probe_summit,
-	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.acpi_madt_oem_check		= summit_acpi_madt_oem_check,
 	.apic_id_registered		= apic_id_registered,
 
 	.int_delivery_mode		= INT_DELIVERY_MODE,

commit 9a6801da55e4a4492e8f666ac272efe8186682c8
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 03:18:13 2009 +0100

    x86: remove APIC_INIT / APICFUNC / IPIFUNC
    
    The APIC_INIT() / APICFUNC / IPIFUNC macros were ugly and obfuscated
    the true identity of various APIC driver methods.
    
    Now that they are not used anymore, remove them.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h
index 3970da3245c8..26c5e824a717 100644
--- a/arch/x86/include/asm/genapic.h
+++ b/arch/x86/include/asm/genapic.h
@@ -97,66 +97,8 @@ struct genapic {
 extern struct genapic *apic;
 
 #ifdef CONFIG_X86_32
-
-#define APICFUNC(x) .x = x,
-
-/* More functions could be probably marked IPIFUNC and save some space
-   in UP GENERICARCH kernels, but I don't have the nerve right now
-   to untangle this mess. -AK  */
-#ifdef CONFIG_SMP
-#define IPIFUNC(x) APICFUNC(x)
-#else
-#define IPIFUNC(x)
-#endif
-
-#define APIC_INIT(aname, aprobe)			\
-{							\
-	.name = aname,					\
-	.probe = aprobe,				\
-	.int_delivery_mode = INT_DELIVERY_MODE,		\
-	.int_dest_mode = INT_DEST_MODE,			\
-	.no_balance_irq = NO_BALANCE_IRQ,		\
-	.ESR_DISABLE = esr_disable,			\
-	.apic_destination_logical = APIC_DEST_LOGICAL,	\
-	APICFUNC(apic_id_registered)			\
-	APICFUNC(target_cpus)				\
-	APICFUNC(check_apicid_used)			\
-	APICFUNC(check_apicid_present)			\
-	APICFUNC(init_apic_ldr)				\
-	APICFUNC(ioapic_phys_id_map)			\
-	APICFUNC(setup_apic_routing)			\
-	APICFUNC(multi_timer_check)			\
-	APICFUNC(apicid_to_node)			\
-	APICFUNC(cpu_to_logical_apicid)			\
-	APICFUNC(cpu_present_to_apicid)			\
-	APICFUNC(apicid_to_cpu_present)			\
-	APICFUNC(setup_portio_remap)			\
-	APICFUNC(check_phys_apicid_present)		\
-	APICFUNC(mps_oem_check)				\
-	APICFUNC(get_apic_id)				\
-	.apic_id_mask = APIC_ID_MASK,			\
-	APICFUNC(cpu_mask_to_apicid)			\
-	APICFUNC(cpu_mask_to_apicid_and)		\
-	APICFUNC(vector_allocation_domain)		\
-	APICFUNC(acpi_madt_oem_check)			\
-	IPIFUNC(send_IPI_mask)				\
-	IPIFUNC(send_IPI_allbutself)			\
-	IPIFUNC(send_IPI_all)				\
-	APICFUNC(enable_apic_mode)			\
-	APICFUNC(phys_pkg_id)				\
-	.trampoline_phys_low = TRAMPOLINE_PHYS_LOW,	\
-	.trampoline_phys_high = TRAMPOLINE_PHYS_HIGH,	\
-	APICFUNC(wait_for_init_deassert)		\
-	APICFUNC(smp_callin_clear_local_apic)		\
-	APICFUNC(store_NMI_vector)			\
-	APICFUNC(restore_NMI_vector)			\
-	APICFUNC(inquire_remote_apic)			\
-}
-
 extern void es7000_update_genapic_to_cluster(void);
-
-#else /* CONFIG_X86_64: */
-
+#else
 extern struct genapic apic_flat;
 extern struct genapic apic_physflat;
 extern struct genapic apic_x2apic_cluster;
@@ -169,7 +111,6 @@ extern struct genapic apic_x2apic_uv_x;
 DECLARE_PER_CPU(int, x2apic_extra_bits);
 
 extern void setup_apic_routing(void);
-
-#endif /* CONFIG_X86_64 */
+#endif
 
 #endif /* _ASM_X86_GENAPIC_64_H */

commit 491a50c4fbcf6cc39a702a16a2dfaf42f0eb8058
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 03:32:03 2009 +0100

    x86, genapic: cleanup 32-bit apic_summit template
    
    Clean up the APIC driver template:
    
     - order fields properly
     - use the macro names explicitly (so that they can be renamed later)
     - fill in NULL entries as well
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index 2821ffc188b5..479c1d409779 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -37,4 +37,60 @@ static void vector_allocation_domain(int cpu, cpumask_t *retmask)
 	*retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
 }
 
-struct genapic apic_summit = APIC_INIT("summit", probe_summit);
+struct genapic apic_summit = {
+
+	.name				= "summit",
+	.probe				= probe_summit,
+	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.apic_id_registered		= apic_id_registered,
+
+	.int_delivery_mode		= INT_DELIVERY_MODE,
+	.int_dest_mode			= INT_DEST_MODE,
+
+	.target_cpus			= target_cpus,
+	.ESR_DISABLE			= esr_disable,
+	.apic_destination_logical	= APIC_DEST_LOGICAL,
+	.check_apicid_used		= check_apicid_used,
+	.check_apicid_present		= check_apicid_present,
+
+	.no_balance_irq			= NO_BALANCE_IRQ,
+	.no_ioapic_check		= 0,
+
+	.vector_allocation_domain	= vector_allocation_domain,
+	.init_apic_ldr			= init_apic_ldr,
+
+	.ioapic_phys_id_map		= ioapic_phys_id_map,
+	.setup_apic_routing		= setup_apic_routing,
+	.multi_timer_check		= multi_timer_check,
+	.apicid_to_node			= apicid_to_node,
+	.cpu_to_logical_apicid		= cpu_to_logical_apicid,
+	.cpu_present_to_apicid		= cpu_present_to_apicid,
+	.apicid_to_cpu_present		= apicid_to_cpu_present,
+	.setup_portio_remap		= setup_portio_remap,
+	.check_phys_apicid_present	= check_phys_apicid_present,
+	.enable_apic_mode		= enable_apic_mode,
+	.phys_pkg_id			= phys_pkg_id,
+	.mps_oem_check			= mps_oem_check,
+
+	.get_apic_id			= get_apic_id,
+	.set_apic_id			= NULL,
+	.apic_id_mask			= APIC_ID_MASK,
+
+	.cpu_mask_to_apicid		= cpu_mask_to_apicid,
+	.cpu_mask_to_apicid_and		= cpu_mask_to_apicid_and,
+
+	.send_IPI_mask			= send_IPI_mask,
+	.send_IPI_mask_allbutself	= NULL,
+	.send_IPI_allbutself		= send_IPI_allbutself,
+	.send_IPI_all			= send_IPI_all,
+	.send_IPI_self			= NULL,
+
+	.wakeup_cpu			= NULL,
+	.trampoline_phys_low		= TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= TRAMPOLINE_PHYS_HIGH,
+	.wait_for_init_deassert		= wait_for_init_deassert,
+	.smp_callin_clear_local_apic	= smp_callin_clear_local_apic,
+	.store_NMI_vector		= store_NMI_vector,
+	.restore_NMI_vector		= restore_NMI_vector,
+	.inquire_remote_apic		= inquire_remote_apic,
+};

commit fed53ebf3c4e233e085c453a27ae287ccbf149fb
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 03:32:03 2009 +0100

    x86, genapic: cleanup 32-bit apic_es7000 template
    
    Clean up the APIC driver template:
    
     - order fields properly
     - use the macro names explicitly (so that they can be renamed later)
     - fill in NULL entries as well
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 2f4f4a6e39b3..4a404ea5f928 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -100,4 +100,60 @@ static void vector_allocation_domain(int cpu, cpumask_t *retmask)
 	*retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
 }
 
-struct genapic __initdata_refok apic_es7000 = APIC_INIT("es7000", probe_es7000);
+struct genapic apic_es7000 = {
+
+	.name				= "es7000",
+	.probe				= probe_es7000,
+	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.apic_id_registered		= apic_id_registered,
+
+	.int_delivery_mode		= INT_DELIVERY_MODE,
+	.int_dest_mode			= INT_DEST_MODE,
+
+	.target_cpus			= target_cpus,
+	.ESR_DISABLE			= esr_disable,
+	.apic_destination_logical	= APIC_DEST_LOGICAL,
+	.check_apicid_used		= check_apicid_used,
+	.check_apicid_present		= check_apicid_present,
+
+	.no_balance_irq			= NO_BALANCE_IRQ,
+	.no_ioapic_check		= 0,
+
+	.vector_allocation_domain	= vector_allocation_domain,
+	.init_apic_ldr			= init_apic_ldr,
+
+	.ioapic_phys_id_map		= ioapic_phys_id_map,
+	.setup_apic_routing		= setup_apic_routing,
+	.multi_timer_check		= multi_timer_check,
+	.apicid_to_node			= apicid_to_node,
+	.cpu_to_logical_apicid		= cpu_to_logical_apicid,
+	.cpu_present_to_apicid		= cpu_present_to_apicid,
+	.apicid_to_cpu_present		= apicid_to_cpu_present,
+	.setup_portio_remap		= setup_portio_remap,
+	.check_phys_apicid_present	= check_phys_apicid_present,
+	.enable_apic_mode		= enable_apic_mode,
+	.phys_pkg_id			= phys_pkg_id,
+	.mps_oem_check			= mps_oem_check,
+
+	.get_apic_id			= get_apic_id,
+	.set_apic_id			= NULL,
+	.apic_id_mask			= APIC_ID_MASK,
+
+	.cpu_mask_to_apicid		= cpu_mask_to_apicid,
+	.cpu_mask_to_apicid_and		= cpu_mask_to_apicid_and,
+
+	.send_IPI_mask			= send_IPI_mask,
+	.send_IPI_mask_allbutself	= NULL,
+	.send_IPI_allbutself		= send_IPI_allbutself,
+	.send_IPI_all			= send_IPI_all,
+	.send_IPI_self			= NULL,
+
+	.wakeup_cpu			= NULL,
+	.trampoline_phys_low		= TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= TRAMPOLINE_PHYS_HIGH,
+	.wait_for_init_deassert		= wait_for_init_deassert,
+	.smp_callin_clear_local_apic	= smp_callin_clear_local_apic,
+	.store_NMI_vector		= store_NMI_vector,
+	.restore_NMI_vector		= restore_NMI_vector,
+	.inquire_remote_apic		= inquire_remote_apic,
+};

commit fea3437adf778cfe69b7f8cff0afb8060d84b647
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 03:32:03 2009 +0100

    x86, genapic: cleanup 32-bit apic_numaq template
    
    Clean up the APIC driver template:
    
     - order fields properly
     - use the macro names explicitly (so that they can be renamed later)
     - fill in NULL entries as well
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index 3679e2255645..fa486ca49c0a 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -50,4 +50,60 @@ static void vector_allocation_domain(int cpu, cpumask_t *retmask)
 	*retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } };
 }
 
-struct genapic apic_numaq = APIC_INIT("NUMAQ", probe_numaq);
+struct genapic apic_numaq = {
+
+	.name				= "NUMAQ",
+	.probe				= probe_numaq,
+	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.apic_id_registered		= apic_id_registered,
+
+	.int_delivery_mode		= INT_DELIVERY_MODE,
+	.int_dest_mode			= INT_DEST_MODE,
+
+	.target_cpus			= target_cpus,
+	.ESR_DISABLE			= esr_disable,
+	.apic_destination_logical	= APIC_DEST_LOGICAL,
+	.check_apicid_used		= check_apicid_used,
+	.check_apicid_present		= check_apicid_present,
+
+	.no_balance_irq			= NO_BALANCE_IRQ,
+	.no_ioapic_check		= 0,
+
+	.vector_allocation_domain	= vector_allocation_domain,
+	.init_apic_ldr			= init_apic_ldr,
+
+	.ioapic_phys_id_map		= ioapic_phys_id_map,
+	.setup_apic_routing		= setup_apic_routing,
+	.multi_timer_check		= multi_timer_check,
+	.apicid_to_node			= apicid_to_node,
+	.cpu_to_logical_apicid		= cpu_to_logical_apicid,
+	.cpu_present_to_apicid		= cpu_present_to_apicid,
+	.apicid_to_cpu_present		= apicid_to_cpu_present,
+	.setup_portio_remap		= setup_portio_remap,
+	.check_phys_apicid_present	= check_phys_apicid_present,
+	.enable_apic_mode		= enable_apic_mode,
+	.phys_pkg_id			= phys_pkg_id,
+	.mps_oem_check			= mps_oem_check,
+
+	.get_apic_id			= get_apic_id,
+	.set_apic_id			= NULL,
+	.apic_id_mask			= APIC_ID_MASK,
+
+	.cpu_mask_to_apicid		= cpu_mask_to_apicid,
+	.cpu_mask_to_apicid_and		= cpu_mask_to_apicid_and,
+
+	.send_IPI_mask			= send_IPI_mask,
+	.send_IPI_mask_allbutself	= NULL,
+	.send_IPI_allbutself		= send_IPI_allbutself,
+	.send_IPI_all			= send_IPI_all,
+	.send_IPI_self			= NULL,
+
+	.wakeup_cpu			= NULL,
+	.trampoline_phys_low		= TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= TRAMPOLINE_PHYS_HIGH,
+	.wait_for_init_deassert		= wait_for_init_deassert,
+	.smp_callin_clear_local_apic	= smp_callin_clear_local_apic,
+	.store_NMI_vector		= store_NMI_vector,
+	.restore_NMI_vector		= restore_NMI_vector,
+	.inquire_remote_apic		= inquire_remote_apic,
+};

commit d26b6d6660d704ffa59f22ad57c9103e3fba289f
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 03:32:03 2009 +0100

    x86, genapic: cleanup 32-bit apic_bigsmp template
    
    Clean up the APIC driver template:
    
     - order fields properly
     - use the macro names explicitly (so that they can be renamed later)
     - fill in NULL entries as well
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index bc4c7840b2a8..13e82bc4dae6 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -57,4 +57,60 @@ static int probe_bigsmp(void)
 	return dmi_bigsmp;
 }
 
-struct genapic apic_bigsmp = APIC_INIT("bigsmp", probe_bigsmp);
+struct genapic apic_bigsmp = {
+
+	.name				= "bigsmp",
+	.probe				= probe_bigsmp,
+	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.apic_id_registered		= apic_id_registered,
+
+	.int_delivery_mode		= INT_DELIVERY_MODE,
+	.int_dest_mode			= INT_DEST_MODE,
+
+	.target_cpus			= target_cpus,
+	.ESR_DISABLE			= esr_disable,
+	.apic_destination_logical	= APIC_DEST_LOGICAL,
+	.check_apicid_used		= check_apicid_used,
+	.check_apicid_present		= check_apicid_present,
+
+	.no_balance_irq			= NO_BALANCE_IRQ,
+	.no_ioapic_check		= 0,
+
+	.vector_allocation_domain	= vector_allocation_domain,
+	.init_apic_ldr			= init_apic_ldr,
+
+	.ioapic_phys_id_map		= ioapic_phys_id_map,
+	.setup_apic_routing		= setup_apic_routing,
+	.multi_timer_check		= multi_timer_check,
+	.apicid_to_node			= apicid_to_node,
+	.cpu_to_logical_apicid		= cpu_to_logical_apicid,
+	.cpu_present_to_apicid		= cpu_present_to_apicid,
+	.apicid_to_cpu_present		= apicid_to_cpu_present,
+	.setup_portio_remap		= setup_portio_remap,
+	.check_phys_apicid_present	= check_phys_apicid_present,
+	.enable_apic_mode		= enable_apic_mode,
+	.phys_pkg_id			= phys_pkg_id,
+	.mps_oem_check			= mps_oem_check,
+
+	.get_apic_id			= get_apic_id,
+	.set_apic_id			= NULL,
+	.apic_id_mask			= APIC_ID_MASK,
+
+	.cpu_mask_to_apicid		= cpu_mask_to_apicid,
+	.cpu_mask_to_apicid_and		= cpu_mask_to_apicid_and,
+
+	.send_IPI_mask			= send_IPI_mask,
+	.send_IPI_mask_allbutself	= NULL,
+	.send_IPI_allbutself		= send_IPI_allbutself,
+	.send_IPI_all			= send_IPI_all,
+	.send_IPI_self			= NULL,
+
+	.wakeup_cpu			= NULL,
+	.trampoline_phys_low		= TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= TRAMPOLINE_PHYS_HIGH,
+	.wait_for_init_deassert		= wait_for_init_deassert,
+	.smp_callin_clear_local_apic	= smp_callin_clear_local_apic,
+	.store_NMI_vector		= store_NMI_vector,
+	.restore_NMI_vector		= restore_NMI_vector,
+	.inquire_remote_apic		= inquire_remote_apic,
+};

commit 0a7e8c64142b2ae5aacdc509ed112b8e362ac8a4
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 03:32:03 2009 +0100

    x86, genapic: cleanup 32-bit apic_default template
    
    Clean up the APIC driver template:
    
     - order fields properly
     - use the macro names explicitly (so that they can be renamed later)
     - fill in NULL entries as well
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index e63a4a76d8cd..d5fec764fb40 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -24,4 +24,60 @@ static int probe_default(void)
 	return 1;
 }
 
-struct genapic apic_default = APIC_INIT("default", probe_default);
+struct genapic apic_default = {
+
+	.name				= "default",
+	.probe				= probe_default,
+	.acpi_madt_oem_check		= acpi_madt_oem_check,
+	.apic_id_registered		= apic_id_registered,
+
+	.int_delivery_mode		= INT_DELIVERY_MODE,
+	.int_dest_mode			= INT_DEST_MODE,
+
+	.target_cpus			= target_cpus,
+	.ESR_DISABLE			= esr_disable,
+	.apic_destination_logical	= APIC_DEST_LOGICAL,
+	.check_apicid_used		= check_apicid_used,
+	.check_apicid_present		= check_apicid_present,
+
+	.no_balance_irq			= NO_BALANCE_IRQ,
+	.no_ioapic_check		= 0,
+
+	.vector_allocation_domain	= vector_allocation_domain,
+	.init_apic_ldr			= init_apic_ldr,
+
+	.ioapic_phys_id_map		= ioapic_phys_id_map,
+	.setup_apic_routing		= setup_apic_routing,
+	.multi_timer_check		= multi_timer_check,
+	.apicid_to_node			= apicid_to_node,
+	.cpu_to_logical_apicid		= cpu_to_logical_apicid,
+	.cpu_present_to_apicid		= cpu_present_to_apicid,
+	.apicid_to_cpu_present		= apicid_to_cpu_present,
+	.setup_portio_remap		= setup_portio_remap,
+	.check_phys_apicid_present	= check_phys_apicid_present,
+	.enable_apic_mode		= enable_apic_mode,
+	.phys_pkg_id			= phys_pkg_id,
+	.mps_oem_check			= mps_oem_check,
+
+	.get_apic_id			= get_apic_id,
+	.set_apic_id			= NULL,
+	.apic_id_mask			= APIC_ID_MASK,
+
+	.cpu_mask_to_apicid		= cpu_mask_to_apicid,
+	.cpu_mask_to_apicid_and		= cpu_mask_to_apicid_and,
+
+	.send_IPI_mask			= send_IPI_mask,
+	.send_IPI_mask_allbutself	= NULL,
+	.send_IPI_allbutself		= send_IPI_allbutself,
+	.send_IPI_all			= send_IPI_all,
+	.send_IPI_self			= NULL,
+
+	.wakeup_cpu			= NULL,
+	.trampoline_phys_low		= TRAMPOLINE_PHYS_LOW,
+	.trampoline_phys_high		= TRAMPOLINE_PHYS_HIGH,
+	.wait_for_init_deassert		= wait_for_init_deassert,
+	.smp_callin_clear_local_apic	= smp_callin_clear_local_apic,
+	.store_NMI_vector		= store_NMI_vector,
+	.restore_NMI_vector		= restore_NMI_vector,
+	.inquire_remote_apic		= inquire_remote_apic,
+};

commit 504a3c3ad45d200a6ac8be5aa019c8fa05e26dc8
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 02:37:01 2009 +0100

    x86: clean up apic_x2apic_cluster
    
    - reorder fields so that they appear in struct genapic field ordering
    
    - add zero-initialized fields too so that it's apparent which functionality
      is default / missing.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index 6ce497cc372d..fc855e503ac4 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -176,23 +176,59 @@ static void init_x2apic_ldr(void)
 }
 
 struct genapic apic_x2apic_cluster = {
-	.name = "cluster x2apic",
-	.acpi_madt_oem_check = x2apic_acpi_madt_oem_check,
-	.int_delivery_mode = dest_LowestPrio,
-	.int_dest_mode = (APIC_DEST_LOGICAL != 0),
-	.target_cpus = x2apic_target_cpus,
-	.vector_allocation_domain = x2apic_vector_allocation_domain,
-	.apic_id_registered = x2apic_apic_id_registered,
-	.init_apic_ldr = init_x2apic_ldr,
-	.send_IPI_all = x2apic_send_IPI_all,
-	.send_IPI_allbutself = x2apic_send_IPI_allbutself,
-	.send_IPI_mask = x2apic_send_IPI_mask,
-	.send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself,
-	.send_IPI_self = x2apic_send_IPI_self,
-	.cpu_mask_to_apicid = x2apic_cpu_mask_to_apicid,
-	.cpu_mask_to_apicid_and = x2apic_cpu_mask_to_apicid_and,
-	.phys_pkg_id = phys_pkg_id,
-	.get_apic_id = get_apic_id,
-	.set_apic_id = set_apic_id,
-	.apic_id_mask = (0xFFFFFFFFu),
+
+	.name				= "cluster x2apic",
+	.probe				= NULL,
+	.acpi_madt_oem_check		= x2apic_acpi_madt_oem_check,
+	.apic_id_registered		= x2apic_apic_id_registered,
+
+	.int_delivery_mode		= dest_LowestPrio,
+	.int_dest_mode			= (APIC_DEST_LOGICAL != 0),
+
+	.target_cpus			= x2apic_target_cpus,
+	.ESR_DISABLE			= 0,
+	.apic_destination_logical	= 0,
+	.check_apicid_used		= NULL,
+	.check_apicid_present		= NULL,
+
+	.no_balance_irq			= 0,
+	.no_ioapic_check		= 0,
+
+	.vector_allocation_domain	= x2apic_vector_allocation_domain,
+	.init_apic_ldr			= init_x2apic_ldr,
+
+	.ioapic_phys_id_map		= NULL,
+	.setup_apic_routing		= NULL,
+	.multi_timer_check		= NULL,
+	.apicid_to_node			= NULL,
+	.cpu_to_logical_apicid		= NULL,
+	.cpu_present_to_apicid		= NULL,
+	.apicid_to_cpu_present		= NULL,
+	.setup_portio_remap		= NULL,
+	.check_phys_apicid_present	= NULL,
+	.enable_apic_mode		= NULL,
+	.phys_pkg_id			= phys_pkg_id,
+	.mps_oem_check			= NULL,
+
+	.get_apic_id			= get_apic_id,
+	.set_apic_id			= set_apic_id,
+	.apic_id_mask			= 0xFFFFFFFFu,
+
+	.cpu_mask_to_apicid		= x2apic_cpu_mask_to_apicid,
+	.cpu_mask_to_apicid_and		= x2apic_cpu_mask_to_apicid_and,
+
+	.send_IPI_mask			= x2apic_send_IPI_mask,
+	.send_IPI_mask_allbutself	= x2apic_send_IPI_mask_allbutself,
+	.send_IPI_allbutself		= x2apic_send_IPI_allbutself,
+	.send_IPI_all			= x2apic_send_IPI_all,
+	.send_IPI_self			= x2apic_send_IPI_self,
+
+	.wakeup_cpu			= NULL,
+	.trampoline_phys_low		= 0,
+	.trampoline_phys_high		= 0,
+	.wait_for_init_deassert		= NULL,
+	.smp_callin_clear_local_apic	= NULL,
+	.store_NMI_vector		= NULL,
+	.restore_NMI_vector		= NULL,
+	.inquire_remote_apic		= NULL,
 };

commit 05c155c235c757329ec89ad591516538ed8352c0
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 02:37:01 2009 +0100

    x86: clean up apic_x2apic_phys
    
    - reorder fields so that they appear in struct genapic field ordering
    
    - add zero-initialized fields too so that it's apparent which functionality
      is default / missing.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 21bcc0e098ba..c98361fb7ee1 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -172,23 +172,59 @@ static void init_x2apic_ldr(void)
 }
 
 struct genapic apic_x2apic_phys = {
-	.name = "physical x2apic",
-	.acpi_madt_oem_check = x2apic_acpi_madt_oem_check,
-	.int_delivery_mode = dest_Fixed,
-	.int_dest_mode = (APIC_DEST_PHYSICAL != 0),
-	.target_cpus = x2apic_target_cpus,
-	.vector_allocation_domain = x2apic_vector_allocation_domain,
-	.apic_id_registered = x2apic_apic_id_registered,
-	.init_apic_ldr = init_x2apic_ldr,
-	.send_IPI_all = x2apic_send_IPI_all,
-	.send_IPI_allbutself = x2apic_send_IPI_allbutself,
-	.send_IPI_mask = x2apic_send_IPI_mask,
-	.send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself,
-	.send_IPI_self = x2apic_send_IPI_self,
-	.cpu_mask_to_apicid = x2apic_cpu_mask_to_apicid,
-	.cpu_mask_to_apicid_and = x2apic_cpu_mask_to_apicid_and,
-	.phys_pkg_id = phys_pkg_id,
-	.get_apic_id = get_apic_id,
-	.set_apic_id = set_apic_id,
-	.apic_id_mask = (0xFFFFFFFFu),
+
+	.name				= "physical x2apic",
+	.probe				= NULL,
+	.acpi_madt_oem_check		= x2apic_acpi_madt_oem_check,
+	.apic_id_registered		= x2apic_apic_id_registered,
+
+	.int_delivery_mode		= dest_Fixed,
+	.int_dest_mode			= (APIC_DEST_PHYSICAL != 0),
+
+	.target_cpus			= x2apic_target_cpus,
+	.ESR_DISABLE			= 0,
+	.apic_destination_logical	= 0,
+	.check_apicid_used		= NULL,
+	.check_apicid_present		= NULL,
+
+	.no_balance_irq			= 0,
+	.no_ioapic_check		= 0,
+
+	.vector_allocation_domain	= x2apic_vector_allocation_domain,
+	.init_apic_ldr			= init_x2apic_ldr,
+
+	.ioapic_phys_id_map		= NULL,
+	.setup_apic_routing		= NULL,
+	.multi_timer_check		= NULL,
+	.apicid_to_node			= NULL,
+	.cpu_to_logical_apicid		= NULL,
+	.cpu_present_to_apicid		= NULL,
+	.apicid_to_cpu_present		= NULL,
+	.setup_portio_remap		= NULL,
+	.check_phys_apicid_present	= NULL,
+	.enable_apic_mode		= NULL,
+	.phys_pkg_id			= phys_pkg_id,
+	.mps_oem_check			= NULL,
+
+	.get_apic_id			= get_apic_id,
+	.set_apic_id			= set_apic_id,
+	.apic_id_mask			= 0xFFFFFFFFu,
+
+	.cpu_mask_to_apicid		= x2apic_cpu_mask_to_apicid,
+	.cpu_mask_to_apicid_and		= x2apic_cpu_mask_to_apicid_and,
+
+	.send_IPI_mask			= x2apic_send_IPI_mask,
+	.send_IPI_mask_allbutself	= x2apic_send_IPI_mask_allbutself,
+	.send_IPI_allbutself		= x2apic_send_IPI_allbutself,
+	.send_IPI_all			= x2apic_send_IPI_all,
+	.send_IPI_self			= x2apic_send_IPI_self,
+
+	.wakeup_cpu			= NULL,
+	.trampoline_phys_low		= 0,
+	.trampoline_phys_high		= 0,
+	.wait_for_init_deassert		= NULL,
+	.smp_callin_clear_local_apic	= NULL,
+	.store_NMI_vector		= NULL,
+	.restore_NMI_vector		= NULL,
+	.inquire_remote_apic		= NULL,
 };