From: Rusty Russell Date: Wed, 31 Dec 2008 12:35:57 +0000 (+1030) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 X-Git-Tag: v2.6.29-rc1~521^2~11^2~33 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2ca1a615835d9f4990f42102ab1f2ef434e7e89c;p=linux-2.6-omap-h63xx.git Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: arch/x86/kernel/io_apic.c --- 2ca1a615835d9f4990f42102ab1f2ef434e7e89c diff --cc arch/x86/kernel/io_apic.c index 6dbf427175f,f6ea94b74da..e7745961ed3 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/io_apic.c @@@ -384,12 -544,20 +544,21 @@@ static void set_ioapic_affinity_irq_des */ dest = SET_APIC_LOGICAL_ID(dest); - desc = irq_to_desc(irq); spin_lock_irqsave(&ioapic_lock, flags); - __target_IO_APIC_irq(irq, dest, cfg->vector); - cpumask_copy(&desc->affinity, mask); + __target_IO_APIC_irq(irq, dest, cfg); + desc->affinity = mask; spin_unlock_irqrestore(&ioapic_lock, flags); } + -static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask) ++static void set_ioapic_affinity_irq(unsigned int irq, ++ const struct cpumask *mask) + { + struct irq_desc *desc; + + desc = irq_to_desc(irq); + - set_ioapic_affinity_irq_desc(desc, mask); ++ set_ioapic_affinity_irq_desc(desc, *mask); + } #endif /* CONFIG_SMP */ /* @@@ -2210,7 -2410,13 +2411,14 @@@ static void set_ir_ioapic_affinity_irq_ return; } - migrate_ioapic_irq(irq, *mask); + migrate_ioapic_irq_desc(desc, mask); + } -static void set_ir_ioapic_affinity_irq(unsigned int irq, cpumask_t mask) ++static void set_ir_ioapic_affinity_irq(unsigned int irq, ++ const struct cpumask *mask) + { + struct irq_desc *desc = irq_to_desc(irq); + - set_ir_ioapic_affinity_irq_desc(desc, mask); ++ set_ir_ioapic_affinity_irq_desc(desc, *mask); } #endif @@@ -3027,61 -3285,64 +3287,63 @@@ static int msi_compose_msg(struct pci_d } #ifdef CONFIG_SMP -static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask) +static void set_msi_irq_affinity(unsigned int irq, const struct cpumask *mask) { + struct irq_desc *desc = irq_to_desc(irq); struct irq_cfg *cfg; struct msi_msg msg; unsigned int dest; cpumask_t tmp; - struct irq_desc *desc; - cpus_and(tmp, mask, cpu_online_map); - if (cpus_empty(tmp)) + if (!cpumask_intersects(mask, cpu_online_mask)) return; - if (assign_irq_vector(irq, *mask)) + cfg = desc->chip_data; - if (assign_irq_vector(irq, cfg, mask)) ++ if (assign_irq_vector(irq, cfg, *mask)) return; - cfg = irq_cfg(irq); - set_extra_move_desc(desc, mask); ++ set_extra_move_desc(desc, *mask); + - cpus_and(tmp, cfg->domain, mask); + cpumask_and(&tmp, &cfg->domain, mask); dest = cpu_mask_to_apicid(tmp); - read_msi_msg(irq, &msg); + read_msi_msg_desc(desc, &msg); msg.data &= ~MSI_DATA_VECTOR_MASK; msg.data |= MSI_DATA_VECTOR(cfg->vector); msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK; msg.address_lo |= MSI_ADDR_DEST_ID(dest); - write_msi_msg(irq, &msg); - desc = irq_to_desc(irq); + write_msi_msg_desc(desc, &msg); - desc->affinity = mask; + cpumask_copy(&desc->affinity, mask); } - #ifdef CONFIG_INTR_REMAP /* * Migrate the MSI irq to another cpumask. This migration is * done in the process context using interrupt-remapping hardware. */ -static void ir_set_msi_irq_affinity(unsigned int irq, cpumask_t mask) +static void ir_set_msi_irq_affinity(unsigned int irq, + const struct cpumask *mask) { + struct irq_desc *desc = irq_to_desc(irq); struct irq_cfg *cfg; unsigned int dest; cpumask_t tmp, cleanup_mask; struct irte irte; - struct irq_desc *desc; - cpus_and(tmp, mask, cpu_online_map); - if (cpus_empty(tmp)) + if (!cpumask_intersects(mask, cpu_online_mask)) return; if (get_irte(irq, &irte)) return; - if (assign_irq_vector(irq, *mask)) + cfg = desc->chip_data; - if (assign_irq_vector(irq, cfg, mask)) ++ if (assign_irq_vector(irq, cfg, *mask)) return; - cfg = irq_cfg(irq); - set_extra_move_desc(desc, mask); ++ set_extra_move_desc(desc, *mask); + - cpus_and(tmp, cfg->domain, mask); + cpumask_and(&tmp, &cfg->domain, mask); dest = cpu_mask_to_apicid(tmp); irte.vector = cfg->vector; @@@ -3104,9 -3365,9 +3366,9 @@@ cfg->move_in_progress = 0; } - desc = irq_to_desc(irq); - desc->affinity = mask; + cpumask_copy(&desc->affinity, mask); } + #endif #endif /* CONFIG_SMP */ @@@ -3307,22 -3556,25 +3557,24 @@@ void arch_teardown_msi_irq(unsigned in #ifdef CONFIG_DMAR #ifdef CONFIG_SMP -static void dmar_msi_set_affinity(unsigned int irq, cpumask_t mask) +static void dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) { + struct irq_desc *desc = irq_to_desc(irq); struct irq_cfg *cfg; struct msi_msg msg; unsigned int dest; cpumask_t tmp; - struct irq_desc *desc; - cpus_and(tmp, mask, cpu_online_map); - if (cpus_empty(tmp)) + if (!cpumask_intersects(mask, cpu_online_mask)) return; - if (assign_irq_vector(irq, *mask)) + cfg = desc->chip_data; - if (assign_irq_vector(irq, cfg, mask)) ++ if (assign_irq_vector(irq, cfg, *mask)) return; - cfg = irq_cfg(irq); - set_extra_move_desc(desc, mask); ++ set_extra_move_desc(desc, *mask); + - cpus_and(tmp, cfg->domain, mask); + cpumask_and(&tmp, &cfg->domain, mask); dest = cpu_mask_to_apicid(tmp); dmar_msi_read(irq, &msg); @@@ -3333,9 -3585,9 +3585,9 @@@ msg.address_lo |= MSI_ADDR_DEST_ID(dest); dmar_msi_write(irq, &msg); - desc = irq_to_desc(irq); - desc->affinity = mask; + cpumask_copy(&desc->affinity, mask); } + #endif /* CONFIG_SMP */ struct irq_chip dmar_msi_type = { @@@ -3367,22 -3619,25 +3619,24 @@@ int arch_setup_dmar_msi(unsigned int ir #ifdef CONFIG_HPET_TIMER #ifdef CONFIG_SMP -static void hpet_msi_set_affinity(unsigned int irq, cpumask_t mask) +static void hpet_msi_set_affinity(unsigned int irq, const struct cpumask *mask) { + struct irq_desc *desc = irq_to_desc(irq); struct irq_cfg *cfg; - struct irq_desc *desc; struct msi_msg msg; unsigned int dest; cpumask_t tmp; - cpus_and(tmp, mask, cpu_online_map); - if (cpus_empty(tmp)) + if (!cpumask_intersects(mask, cpu_online_mask)) return; - if (assign_irq_vector(irq, *mask)) + cfg = desc->chip_data; - if (assign_irq_vector(irq, cfg, mask)) ++ if (assign_irq_vector(irq, cfg, *mask)) return; - cfg = irq_cfg(irq); - set_extra_move_desc(desc, mask); ++ set_extra_move_desc(desc, *mask); + - cpus_and(tmp, cfg->domain, mask); + cpumask_and(&tmp, &cfg->domain, mask); dest = cpu_mask_to_apicid(tmp); hpet_msi_read(irq, &msg); @@@ -3393,9 -3648,9 +3647,9 @@@ msg.address_lo |= MSI_ADDR_DEST_ID(dest); hpet_msi_write(irq, &msg); - desc = irq_to_desc(irq); - desc->affinity = mask; + cpumask_copy(&desc->affinity, mask); } + #endif /* CONFIG_SMP */ struct irq_chip hpet_msi_type = { @@@ -3448,27 -3703,30 +3702,29 @@@ static void target_ht_irq(unsigned int write_ht_irq_msg(irq, &msg); } -static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask) +static void set_ht_irq_affinity(unsigned int irq, const struct cpumask *mask) { + struct irq_desc *desc = irq_to_desc(irq); struct irq_cfg *cfg; unsigned int dest; cpumask_t tmp; - struct irq_desc *desc; - cpus_and(tmp, mask, cpu_online_map); - if (cpus_empty(tmp)) + if (!cpumask_intersects(mask, cpu_online_mask)) return; - if (assign_irq_vector(irq, *mask)) + cfg = desc->chip_data; - if (assign_irq_vector(irq, cfg, mask)) ++ if (assign_irq_vector(irq, cfg, *mask)) return; - cfg = irq_cfg(irq); - set_extra_move_desc(desc, mask); ++ set_extra_move_desc(desc, *mask); + - cpus_and(tmp, cfg->domain, mask); + cpumask_and(&tmp, &cfg->domain, mask); dest = cpu_mask_to_apicid(tmp); target_ht_irq(irq, dest, cfg->vector); - desc = irq_to_desc(irq); - desc->affinity = mask; + cpumask_copy(&desc->affinity, mask); } + #endif static struct irq_chip ht_irq_chip = {