x86, apic: refactor ->cpu_mask_to_apicid*()
authorIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 14:20:18 +0000 (15:20 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 22:20:30 +0000 (23:20 +0100)
- spread out the namespace on a per driver basis

 - clean up the functions

 - get rid of macros

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 files changed:
arch/x86/include/asm/bigsmp/apic.h
arch/x86/include/asm/es7000/apic.h
arch/x86/include/asm/mach-default/mach_apic.h
arch/x86/include/asm/mach-generic/mach_apic.h
arch/x86/include/asm/numaq/apic.h
arch/x86/include/asm/summit/apic.h
arch/x86/kernel/genapic_flat_64.c
arch/x86/kernel/genx2apic_cluster.c
arch/x86/kernel/genx2apic_phys.c
arch/x86/kernel/genx2apic_uv_x.c
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 1230f5d7a38e6322510f145d152d04cfa28b9914..ee29d66cd3022b516357d189e12a14b2422ee500 100644 (file)
@@ -105,18 +105,14 @@ static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid)
 }
 
 /* As we are using single CPU as destination, pick only one CPU here */
-static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
+static inline unsigned int bigsmp_cpu_mask_to_apicid(const cpumask_t *cpumask)
 {
-       int cpu;
-       int apicid;     
-
-       cpu = first_cpu(*cpumask);
-       apicid = bigsmp_cpu_to_logical_apicid(cpu);
-       return apicid;
+       return bigsmp_cpu_to_logical_apicid(first_cpu(*cpumask));
 }
 
-static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
-                                                 const struct cpumask *andmask)
+static inline unsigned int
+bigsmp_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                             const struct cpumask *andmask)
 {
        int cpu;
 
@@ -124,9 +120,10 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
-       for_each_cpu_and(cpu, cpumask, andmask)
+       for_each_cpu_and(cpu, cpumask, andmask) {
                if (cpumask_test_cpu(cpu, cpu_online_mask))
                        break;
+       }
        if (cpu < nr_cpu_ids)
                return bigsmp_cpu_to_logical_apicid(cpu);
 
index f183dfb4de4a99910cf81e201b1ab58002f0f620..b89b45db735dcec6484e8c32fa7b3642964a50da 100644 (file)
@@ -137,12 +137,12 @@ static inline int es7000_check_phys_apicid_present(int cpu_physical_apicid)
 }
 
 static inline unsigned int
-cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
+es7000_cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
 {
-       int num_bits_set;
        int cpus_found = 0;
-       int cpu;
+       int num_bits_set;
        int apicid;
+       int cpu;
 
        num_bits_set = cpumask_weight(cpumask);
        /* Return id to all */
@@ -154,12 +154,15 @@ cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
         */
        cpu = cpumask_first(cpumask);
        apicid = es7000_cpu_to_logical_apicid(cpu);
+
        while (cpus_found < num_bits_set) {
                if (cpumask_test_cpu(cpu, cpumask)) {
                        int new_apicid = es7000_cpu_to_logical_apicid(cpu);
+
                        if (apicid_cluster(apicid) !=
-                                       apicid_cluster(new_apicid)){
+                                       apicid_cluster(new_apicid)) {
                                printk ("%s: Not a valid mask!\n", __func__);
+
                                return 0xFF;
                        }
                        apicid = new_apicid;
@@ -170,12 +173,12 @@ cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
        return apicid;
 }
 
-static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
+static inline unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask)
 {
-       int num_bits_set;
        int cpus_found = 0;
-       int cpu;
+       int num_bits_set;
        int apicid;
+       int cpu;
 
        num_bits_set = cpus_weight(*cpumask);
        /* Return id to all */
@@ -190,9 +193,11 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
        while (cpus_found < num_bits_set) {
                if (cpu_isset(cpu, *cpumask)) {
                        int new_apicid = es7000_cpu_to_logical_apicid(cpu);
+
                        if (apicid_cluster(apicid) !=
-                                       apicid_cluster(new_apicid)){
+                                       apicid_cluster(new_apicid)) {
                                printk ("%s: Not a valid mask!\n", __func__);
+
                                return es7000_cpu_to_logical_apicid(0);
                        }
                        apicid = new_apicid;
@@ -204,8 +209,9 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
 }
 
 
-static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask,
-                                                 const struct cpumask *andmask)
+static inline unsigned int
+es7000_cpu_mask_to_apicid_and(const struct cpumask *inmask,
+                             const struct cpumask *andmask)
 {
        int apicid = es7000_cpu_to_logical_apicid(0);
        cpumask_var_t cpumask;
@@ -215,9 +221,10 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask,
 
        cpumask_and(cpumask, inmask, andmask);
        cpumask_and(cpumask, cpumask, cpu_online_mask);
-       apicid = cpu_mask_to_apicid(cpumask);
+       apicid = es7000_cpu_mask_to_apicid(cpumask);
 
        free_cpumask_var(cpumask);
+
        return apicid;
 }
 
index 8719208f27354fa47fd3280b6f2fb6108763a919..8972f843414547d087817f6b2c799c5b4e2d5a97 100644 (file)
@@ -19,8 +19,6 @@ static inline const struct cpumask *default_target_cpus(void)
 
 #ifdef CONFIG_X86_64
 #include <asm/genapic.h>
-#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
-#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
 #define read_apic_id()  (apic->get_apic_id(apic_read(APIC_ID)))
 #define send_IPI_self (apic->send_IPI_self)
 #define wakeup_secondary_cpu (apic->wakeup_cpu)
@@ -49,13 +47,15 @@ static inline int default_apic_id_registered(void)
        return physid_isset(read_apic_id(), phys_cpu_present_map);
 }
 
-static inline unsigned int cpu_mask_to_apicid(const struct cpumask *cpumask)
+static inline unsigned int
+default_cpu_mask_to_apicid(const struct cpumask *cpumask)
 {
        return cpumask_bits(cpumask)[0];
 }
 
-static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
-                                                 const struct cpumask *andmask)
+static inline unsigned int
+default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                              const struct cpumask *andmask)
 {
        unsigned long mask1 = cpumask_bits(cpumask)[0];
        unsigned long mask2 = cpumask_bits(andmask)[0];
index 1eeb5b61e488b2b7b74d80b5669fcdbfcb12d4c7..ca460e459913b01d52d3af9010b83f0c9810ea1d 100644 (file)
@@ -3,8 +3,6 @@
 
 #include <asm/genapic.h>
 
-#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
-#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
 #define wakeup_secondary_cpu (apic->wakeup_cpu)
 
 extern void generic_bigsmp_probe(void);
index 765c4d5124cbb9ed59c6bf3f93bd2cd2c85c2b84..ce95e79f72338ca07253511f2f944afe84967a72 100644 (file)
@@ -101,15 +101,16 @@ static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid)
  * We use physical apicids here, not logical, so just return the default
  * physical broadcast to stop people from breaking us
  */
-static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
+static inline unsigned int numaq_cpu_mask_to_apicid(const cpumask_t *cpumask)
 {
-       return (int) 0xF;
+       return 0x0F;
 }
 
-static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
-                                                 const struct cpumask *andmask)
+static inline unsigned int
+numaq_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                            const struct cpumask *andmask)
 {
-       return (int) 0xF;
+       return 0x0F;
 }
 
 /* No NUMA-Q box has a HT CPU, but it can't hurt to use the default code. */
index fa6b3b45290dfc16728f02e169f9127e27cd1645..15b8dbd19e1a9c886315e71fda295e8fc3c46ae5 100644 (file)
@@ -125,29 +125,32 @@ static inline int summit_check_phys_apicid_present(int boot_cpu_physical_apicid)
        return 1;
 }
 
-static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
+static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
 {
-       int num_bits_set;
        int cpus_found = 0;
-       int cpu;
+       int num_bits_set;
        int apicid;
+       int cpu;
 
        num_bits_set = cpus_weight(*cpumask);
        /* Return id to all */
        if (num_bits_set >= nr_cpu_ids)
-               return (int) 0xFF;
+               return 0xFF;
        /*
         * The cpus in the mask must all be on the apic cluster.  If are not
         * on the same apicid cluster return default value of target_cpus():
         */
        cpu = first_cpu(*cpumask);
        apicid = summit_cpu_to_logical_apicid(cpu);
+
        while (cpus_found < num_bits_set) {
                if (cpu_isset(cpu, *cpumask)) {
                        int new_apicid = summit_cpu_to_logical_apicid(cpu);
+
                        if (apicid_cluster(apicid) !=
-                                       apicid_cluster(new_apicid)){
+                                       apicid_cluster(new_apicid)) {
                                printk ("%s: Not a valid mask!\n", __func__);
+
                                return 0xFF;
                        }
                        apicid = apicid | new_apicid;
@@ -158,8 +161,9 @@ static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
        return apicid;
 }
 
-static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask,
-                                                 const struct cpumask *andmask)
+static inline unsigned int
+summit_cpu_mask_to_apicid_and(const struct cpumask *inmask,
+                             const struct cpumask *andmask)
 {
        int apicid = summit_cpu_to_logical_apicid(0);
        cpumask_var_t cpumask;
@@ -169,9 +173,10 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask,
 
        cpumask_and(cpumask, inmask, andmask);
        cpumask_and(cpumask, cpumask, cpu_online_mask);
-       apicid = cpu_mask_to_apicid(cpumask);
+       apicid = summit_cpu_mask_to_apicid(cpumask);
 
        free_cpumask_var(cpumask);
+
        return apicid;
 }
 
index 78baa55cd0e9a4d8128a1f69580dc2b3eafcd548..b941b112cafb2982ff97c56a58db684ee9cd6803 100644 (file)
@@ -309,11 +309,13 @@ physflat_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
-       for_each_cpu_and(cpu, cpumask, andmask)
+       for_each_cpu_and(cpu, cpumask, andmask) {
                if (cpumask_test_cpu(cpu, cpu_online_mask))
                        break;
+       }
        if (cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_apicid, cpu);
+
        return BAD_APICID;
 }
 
index c7557e0518486a114938777a689c373dfd747d05..62f9fccf01ddf96916b8998373d54f4f3efe0e6e 100644 (file)
@@ -111,21 +111,21 @@ static int x2apic_apic_id_registered(void)
 
 static unsigned int x2apic_cpu_mask_to_apicid(const struct cpumask *cpumask)
 {
-       int cpu;
-
        /*
         * We're using fixed IRQ delivery, can only return one logical APIC ID.
         * May as well be the first.
         */
-       cpu = cpumask_first(cpumask);
+       int cpu = cpumask_first(cpumask);
+
        if ((unsigned)cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_logical_apicid, cpu);
        else
                return BAD_APICID;
 }
 
-static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
-                                                 const struct cpumask *andmask)
+static unsigned int
+x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                             const struct cpumask *andmask)
 {
        int cpu;
 
@@ -133,11 +133,14 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
         * We're using fixed IRQ delivery, can only return one logical APIC ID.
         * May as well be the first.
         */
-       for_each_cpu_and(cpu, cpumask, andmask)
+       for_each_cpu_and(cpu, cpumask, andmask) {
                if (cpumask_test_cpu(cpu, cpu_online_mask))
                        break;
+       }
+
        if (cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_logical_apicid, cpu);
+
        return BAD_APICID;
 }
 
index 80cba49cfd89bea6155d2e813914d993a8c6a3e6..3da1675b260463a0964bf9b329b51075824902cf 100644 (file)
@@ -110,21 +110,21 @@ static int x2apic_apic_id_registered(void)
 
 static unsigned int x2apic_cpu_mask_to_apicid(const struct cpumask *cpumask)
 {
-       int cpu;
-
        /*
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
-       cpu = cpumask_first(cpumask);
+       int cpu = cpumask_first(cpumask);
+
        if ((unsigned)cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_apicid, cpu);
        else
                return BAD_APICID;
 }
 
-static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
-                                                 const struct cpumask *andmask)
+static unsigned int
+x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                             const struct cpumask *andmask)
 {
        int cpu;
 
@@ -132,11 +132,14 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
-       for_each_cpu_and(cpu, cpumask, andmask)
+       for_each_cpu_and(cpu, cpumask, andmask) {
                if (cpumask_test_cpu(cpu, cpu_online_mask))
                        break;
+       }
+
        if (cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_apicid, cpu);
+
        return BAD_APICID;
 }
 
index 50310b96adc3eb45fb13cf2bda74e915c17a9f08..f957878c21e94272058dd2fe043176031dbfd1d7 100644 (file)
@@ -171,21 +171,21 @@ static void uv_init_apic_ldr(void)
 
 static unsigned int uv_cpu_mask_to_apicid(const struct cpumask *cpumask)
 {
-       int cpu;
-
        /*
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
-       cpu = cpumask_first(cpumask);
+       int cpu = cpumask_first(cpumask);
+
        if ((unsigned)cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_apicid, cpu);
        else
                return BAD_APICID;
 }
 
-static unsigned int uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
-                                             const struct cpumask *andmask)
+static unsigned int
+uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+                         const struct cpumask *andmask)
 {
        int cpu;
 
@@ -193,11 +193,13 @@ static unsigned int uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
         * We're using fixed IRQ delivery, can only return one phys APIC ID.
         * May as well be the first.
         */
-       for_each_cpu_and(cpu, cpumask, andmask)
+       for_each_cpu_and(cpu, cpumask, andmask) {
                if (cpumask_test_cpu(cpu, cpu_online_mask))
                        break;
+       }
        if (cpu < nr_cpu_ids)
                return per_cpu(x86_cpu_to_apicid, cpu);
+
        return BAD_APICID;
 }
 
index 3d85d3d810b2e7b5e37cb1474c0a0074828670a9..01a2505d72751e3eb3134dba2e42f1f678f8b408 100644 (file)
@@ -563,8 +563,9 @@ static int
 assign_irq_vector(int irq, struct irq_cfg *cfg, const struct cpumask *mask);
 
 /*
- * Either sets desc->affinity to a valid value, and returns cpu_mask_to_apicid
- * of that, or returns BAD_APICID and leaves desc->affinity untouched.
+ * Either sets desc->affinity to a valid value, and returns
+ * ->cpu_mask_to_apicid of that, or returns BAD_APICID and
+ * leaves desc->affinity untouched.
  */
 static unsigned int
 set_desc_affinity(struct irq_desc *desc, const struct cpumask *mask)
@@ -582,7 +583,8 @@ set_desc_affinity(struct irq_desc *desc, const struct cpumask *mask)
 
        cpumask_and(desc->affinity, cfg->domain, mask);
        set_extra_move_desc(desc, mask);
-       return cpu_mask_to_apicid_and(desc->affinity, cpu_online_mask);
+
+       return apic->cpu_mask_to_apicid_and(desc->affinity, cpu_online_mask);
 }
 
 static void
@@ -1562,7 +1564,7 @@ static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq
        if (assign_irq_vector(irq, cfg, apic->target_cpus()))
                return;
 
-       dest = cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus());
+       dest = apic->cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus());
 
        apic_printk(APIC_VERBOSE,KERN_DEBUG
                    "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> "
@@ -1666,7 +1668,7 @@ static void __init setup_timer_IRQ0_pin(unsigned int apic_id, unsigned int pin,
         */
        entry.dest_mode = apic->irq_dest_mode;
        entry.mask = 1;                                 /* mask IRQ now */
-       entry.dest = cpu_mask_to_apicid(apic->target_cpus());
+       entry.dest = apic->cpu_mask_to_apicid(apic->target_cpus());
        entry.delivery_mode = apic->irq_delivery_mode;
        entry.polarity = 0;
        entry.trigger = 0;
@@ -2367,7 +2369,7 @@ migrate_ioapic_irq_desc(struct irq_desc *desc, const struct cpumask *mask)
 
        set_extra_move_desc(desc, mask);
 
-       dest = cpu_mask_to_apicid_and(cfg->domain, mask);
+       dest = apic->cpu_mask_to_apicid_and(cfg->domain, mask);
 
        modify_ioapic_rte = desc->status & IRQ_LEVEL;
        if (modify_ioapic_rte) {
@@ -3270,7 +3272,7 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms
        if (err)
                return err;
 
-       dest = cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus());
+       dest = apic->cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus());
 
 #ifdef CONFIG_INTR_REMAP
        if (irq_remapped(irq)) {
@@ -3708,7 +3710,8 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
                struct ht_irq_msg msg;
                unsigned dest;
 
-               dest = cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus());
+               dest = apic->cpu_mask_to_apicid_and(cfg->domain,
+                                                   apic->target_cpus());
 
                msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest);
 
@@ -3773,7 +3776,7 @@ int arch_enable_uv_irq(char *irq_name, unsigned int irq, int cpu, int mmr_blade,
        entry->polarity = 0;
        entry->trigger = 0;
        entry->mask = 0;
-       entry->dest = cpu_mask_to_apicid(eligible_cpu);
+       entry->dest = apic->cpu_mask_to_apicid(eligible_cpu);
 
        mmr_pnode = uv_blade_to_pnode(mmr_blade);
        uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value);
index ee52c59aa3a4b31d385127bd935b7275e64736b5..22c2c7b8e4ab3e7ccb496c28c5e77c68ab282a5f 100644 (file)
@@ -94,8 +94,8 @@ struct genapic apic_bigsmp = {
        .set_apic_id                    = NULL,
        .apic_id_mask                   = 0xFF << 24,
 
-       .cpu_mask_to_apicid             = cpu_mask_to_apicid,
-       .cpu_mask_to_apicid_and         = cpu_mask_to_apicid_and,
+       .cpu_mask_to_apicid             = bigsmp_cpu_mask_to_apicid,
+       .cpu_mask_to_apicid_and         = bigsmp_cpu_mask_to_apicid_and,
 
        .send_IPI_mask                  = send_IPI_mask,
        .send_IPI_mask_allbutself       = NULL,
index e4ed7e6d62634085929040755a0a347dcf0418b4..477ebec1674981745e9da55ae71f1f6bae5b15de 100644 (file)
@@ -75,8 +75,8 @@ struct genapic apic_default = {
        .set_apic_id                    = NULL,
        .apic_id_mask                   = 0x0F << 24,
 
-       .cpu_mask_to_apicid             = cpu_mask_to_apicid,
-       .cpu_mask_to_apicid_and         = cpu_mask_to_apicid_and,
+       .cpu_mask_to_apicid             = default_cpu_mask_to_apicid,
+       .cpu_mask_to_apicid_and         = default_cpu_mask_to_apicid_and,
 
        .send_IPI_mask                  = send_IPI_mask,
        .send_IPI_mask_allbutself       = NULL,
index 3d046dec0c9a5ecbcb20f58d7f13558d233523f2..d758cf65d7366d87426d9b1c7a9193b07dd9c3c0 100644 (file)
@@ -26,7 +26,7 @@ void __init es7000_update_genapic_to_cluster(void)
 
        apic->init_apic_ldr = es7000_init_apic_ldr_cluster;
 
-       apic->cpu_mask_to_apicid = cpu_mask_to_apicid_cluster;
+       apic->cpu_mask_to_apicid = es7000_cpu_mask_to_apicid_cluster;
 }
 
 static int probe_es7000(void)
@@ -130,8 +130,8 @@ struct genapic apic_es7000 = {
        .set_apic_id                    = NULL,
        .apic_id_mask                   = 0xFF << 24,
 
-       .cpu_mask_to_apicid             = cpu_mask_to_apicid,
-       .cpu_mask_to_apicid_and         = cpu_mask_to_apicid_and,
+       .cpu_mask_to_apicid             = es7000_cpu_mask_to_apicid,
+       .cpu_mask_to_apicid_and         = es7000_cpu_mask_to_apicid_and,
 
        .send_IPI_mask                  = send_IPI_mask,
        .send_IPI_mask_allbutself       = NULL,
index a7bf1aa02e1a6705f868529e26ab0238554f63a8..eb7d56a521d4e17ca6d3a3f3243f653160e0164a 100644 (file)
@@ -94,8 +94,8 @@ struct genapic apic_numaq = {
        .set_apic_id                    = NULL,
        .apic_id_mask                   = 0x0F << 24,
 
-       .cpu_mask_to_apicid             = cpu_mask_to_apicid,
-       .cpu_mask_to_apicid_and         = cpu_mask_to_apicid_and,
+       .cpu_mask_to_apicid             = numaq_cpu_mask_to_apicid,
+       .cpu_mask_to_apicid_and         = numaq_cpu_mask_to_apicid_and,
 
        .send_IPI_mask                  = send_IPI_mask,
        .send_IPI_mask_allbutself       = NULL,
index a0ae6b910488de42f79b32a961c4e52dd208c8d5..8c293055bdf0c739cc2ef49282a8286c9483c3b4 100644 (file)
@@ -74,8 +74,8 @@ struct genapic apic_summit = {
        .set_apic_id                    = NULL,
        .apic_id_mask                   = 0xFF << 24,
 
-       .cpu_mask_to_apicid             = cpu_mask_to_apicid,
-       .cpu_mask_to_apicid_and         = cpu_mask_to_apicid_and,
+       .cpu_mask_to_apicid             = summit_cpu_mask_to_apicid,
+       .cpu_mask_to_apicid_and         = summit_cpu_mask_to_apicid_and,
 
        .send_IPI_mask                  = send_IPI_mask,
        .send_IPI_mask_allbutself       = NULL,