]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
x86, apic: clean up ->vector_allocation_domain()
authorIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 05:50:47 +0000 (06:50 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 22:20:20 +0000 (23:20 +0100)
- separate the namespace

 - remove macros

 - move the default vector-allocation-domain to mach-generic

 - fix whitespace damage

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/mach-default/mach_apic.h
arch/x86/include/asm/mach-generic/mach_apic.h
arch/x86/kernel/io_apic.c
arch/x86/mach-generic/bigsmp.c
arch/x86/mach-generic/default.c
arch/x86/mach-generic/es7000.c
arch/x86/mach-generic/numaq.c
arch/x86/mach-generic/summit.c

index 8adccf8ee473715ec9655b98ffb254f8ef228032..9c56542644ca44acf62156e58e11b2dccaa62148 100644 (file)
@@ -23,7 +23,6 @@ static inline const struct cpumask *default_target_cpus(void)
 #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
 #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
 #define phys_pkg_id    (apic->phys_pkg_id)
-#define vector_allocation_domain    (apic->vector_allocation_domain)
 #define read_apic_id()  (GET_APIC_ID(apic_read(APIC_ID)))
 #define send_IPI_self (apic->send_IPI_self)
 #define wakeup_secondary_cpu (apic->wakeup_cpu)
@@ -89,18 +88,6 @@ static inline int apicid_to_node(int logical_apicid)
 #endif
 }
 
-static inline void vector_allocation_domain(int cpu, struct cpumask *retmask)
-{
-        /* Careful. Some cpus do not strictly honor the set of cpus
-         * specified in the interrupt destination when using lowest
-         * priority interrupt delivery mode.
-         *
-         * In particular there was a hyperthreading cpu observed to
-         * deliver interrupts to the wrong hyperthread when only one
-         * hyperthread was specified in the interrupt desitination.
-         */
-       *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } };
-}
 #endif
 
 static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid)
index 4cb9e2b99e3767a86c4ad5787ecbf25581aff8ea..e94881af9625ae5ae8acace0ff65c958ea137fd0 100644 (file)
@@ -15,7 +15,6 @@
 #define check_phys_apicid_present (apic->check_phys_apicid_present)
 #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
 #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
-#define vector_allocation_domain (apic->vector_allocation_domain)
 #define enable_apic_mode (apic->enable_apic_mode)
 #define phys_pkg_id (apic->phys_pkg_id)
 #define wakeup_secondary_cpu (apic->wakeup_cpu)
index 733ecf17272430a0331b662619fcde471e1f2ea4..49899e066247fbd8963cbbed26aaa99bbd054eb7 100644 (file)
@@ -1316,7 +1316,7 @@ __assign_irq_vector(int irq, struct irq_cfg *cfg, const struct cpumask *mask)
                int new_cpu;
                int vector, offset;
 
-               vector_allocation_domain(cpu, tmp_mask);
+               apic->vector_allocation_domain(cpu, tmp_mask);
 
                vector = current_vector;
                offset = current_offset;
index 6da251aa9f4eeb897efd42e14ff2004bcbb09942..391cc99cd21c63a30968133f9bd2b2100263124b 100644 (file)
@@ -42,7 +42,7 @@ static const struct dmi_system_id bigsmp_dmi_table[] = {
         { }
 };
 
-static void vector_allocation_domain(int cpu, cpumask_t *retmask)
+static void bigsmp_vector_allocation_domain(int cpu, cpumask_t *retmask)
 {
        cpus_clear(*retmask);
        cpu_set(cpu, *retmask);
@@ -74,7 +74,7 @@ struct genapic apic_bigsmp = {
        .check_apicid_used              = bigsmp_check_apicid_used,
        .check_apicid_present           = bigsmp_check_apicid_present,
 
-       .vector_allocation_domain       = vector_allocation_domain,
+       .vector_allocation_domain       = bigsmp_vector_allocation_domain,
        .init_apic_ldr                  = init_apic_ldr,
 
        .ioapic_phys_id_map             = ioapic_phys_id_map,
index e89e8c9dd68deba2af0bee05b70ea820b7637ca8..6adc3c69a3c9522b3946918be2681a4922ddac3c 100644 (file)
 #include <asm/mach-default/mach_mpparse.h>
 #include <asm/mach-default/mach_wakecpu.h>
 
+static void default_vector_allocation_domain(int cpu, struct cpumask *retmask)
+{
+       /*
+        * Careful. Some cpus do not strictly honor the set of cpus
+        * specified in the interrupt destination when using lowest
+        * priority interrupt delivery mode.
+        *
+        * In particular there was a hyperthreading cpu observed to
+        * deliver interrupts to the wrong hyperthread when only one
+        * hyperthread was specified in the interrupt desitination.
+        */
+       *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } };
+}
+
 /* should be called last. */
 static int probe_default(void)
 {
@@ -41,7 +55,7 @@ struct genapic apic_default = {
        .check_apicid_used              = default_check_apicid_used,
        .check_apicid_present           = default_check_apicid_present,
 
-       .vector_allocation_domain       = vector_allocation_domain,
+       .vector_allocation_domain       = default_vector_allocation_domain,
        .init_apic_ldr                  = init_apic_ldr,
 
        .ioapic_phys_id_map             = ioapic_phys_id_map,
index 8e9eeecf7e2431ef111d9742ed4705f380302b71..bc1f21cd6a4dcb1c2eb3dcbbcfa43054d27f3cf7 100644 (file)
@@ -86,7 +86,7 @@ static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 }
 #endif
 
-static void vector_allocation_domain(int cpu, cpumask_t *retmask)
+static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask)
 {
        /* Careful. Some cpus do not strictly honor the set of cpus
         * specified in the interrupt destination when using lowest
@@ -116,7 +116,7 @@ struct genapic apic_es7000 = {
        .check_apicid_used              = es7000_check_apicid_used,
        .check_apicid_present           = es7000_check_apicid_present,
 
-       .vector_allocation_domain       = vector_allocation_domain,
+       .vector_allocation_domain       = es7000_vector_allocation_domain,
        .init_apic_ldr                  = init_apic_ldr,
 
        .ioapic_phys_id_map             = ioapic_phys_id_map,
index f909189fee3ecd51c3c19a4ea68c9d189d65a909..712882f48c4ebb5b0b5414de48576d040e826e79 100644 (file)
@@ -31,7 +31,7 @@ static int probe_numaq(void)
        return found_numaq;
 }
 
-static void vector_allocation_domain(int cpu, cpumask_t *retmask)
+static void numaq_vector_allocation_domain(int cpu, cpumask_t *retmask)
 {
        /* Careful. Some cpus do not strictly honor the set of cpus
         * specified in the interrupt destination when using lowest
@@ -61,7 +61,7 @@ struct genapic apic_numaq = {
        .check_apicid_used              = numaq_check_apicid_used,
        .check_apicid_present           = numaq_check_apicid_present,
 
-       .vector_allocation_domain       = vector_allocation_domain,
+       .vector_allocation_domain       = numaq_vector_allocation_domain,
        .init_apic_ldr                  = init_apic_ldr,
 
        .ioapic_phys_id_map             = ioapic_phys_id_map,
index 99a9bea8d1418b54d4fc7fd979a8323ec2528729..1834887b94a3071d55d08c7d6fa55c35a14b54b9 100644 (file)
@@ -24,7 +24,7 @@ static int probe_summit(void)
        return 0;
 }
 
-static void vector_allocation_domain(int cpu, cpumask_t *retmask)
+static void summit_vector_allocation_domain(int cpu, cpumask_t *retmask)
 {
        /* Careful. Some cpus do not strictly honor the set of cpus
         * specified in the interrupt destination when using lowest
@@ -54,7 +54,7 @@ struct genapic apic_summit = {
        .check_apicid_used              = summit_check_apicid_used,
        .check_apicid_present           = summit_check_apicid_present,
 
-       .vector_allocation_domain       = vector_allocation_domain,
+       .vector_allocation_domain       = summit_vector_allocation_domain,
        .init_apic_ldr                  = init_apic_ldr,
 
        .ioapic_phys_id_map             = ioapic_phys_id_map,