Commit 7f268f43 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branches 'cpus4096', 'x86/cleanups' and 'x86/urgent' into x86/percpu

Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -18,11 +18,11 @@ For an architecture to support this feature, it must define some of
these macros in include/asm-XXX/topology.h:
#define topology_physical_package_id(cpu)
#define topology_core_id(cpu)
#define topology_thread_siblings(cpu)
#define topology_core_siblings(cpu)
#define topology_thread_cpumask(cpu)
#define topology_core_cpumask(cpu)

The type of **_id is int.
The type of siblings is cpumask_t.
The type of siblings is (const) struct cpumask *.

To be consistent on all architectures, include/linux/topology.h
provides default definitions for any of the above macros that are
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ int irq_select_affinity(unsigned int irq)
		cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
	last_cpu = cpu;

	irq_desc[irq].affinity = cpumask_of_cpu(cpu);
	cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
	irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu));
	return 0;
}
+12 −6
Original line number Diff line number Diff line
@@ -104,6 +104,11 @@ static struct irq_desc bad_irq_desc = {
	.lock = SPIN_LOCK_UNLOCKED
};

#ifdef CONFIG_CPUMASK_OFFSTACK
/* We are not allocating bad_irq_desc.affinity or .pending_mask */
#error "ARM architecture does not support CONFIG_CPUMASK_OFFSTACK."
#endif

/*
 * do_IRQ handles all hardware IRQ's.  Decoded IRQs should not
 * come via this function.  Instead, they should provide their
@@ -161,7 +166,7 @@ void __init init_IRQ(void)
		irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE;

#ifdef CONFIG_SMP
	bad_irq_desc.affinity = CPU_MASK_ALL;
	cpumask_setall(bad_irq_desc.affinity);
	bad_irq_desc.cpu = smp_processor_id();
#endif
	init_arch_irq();
@@ -191,15 +196,16 @@ void migrate_irqs(void)
		struct irq_desc *desc = irq_desc + i;

		if (desc->cpu == cpu) {
			unsigned int newcpu = any_online_cpu(desc->affinity);

			if (newcpu == NR_CPUS) {
			unsigned int newcpu = cpumask_any_and(desc->affinity,
							      cpu_online_mask);
			if (newcpu >= nr_cpu_ids) {
				if (printk_ratelimit())
					printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n",
					       i, cpu);

				cpus_setall(desc->affinity);
				newcpu = any_online_cpu(desc->affinity);
				cpumask_setall(desc->affinity);
				newcpu = cpumask_any_and(desc->affinity,
							 cpu_online_mask);
			}

			route_irq(desc, i, newcpu);
+1 −1
Original line number Diff line number Diff line
@@ -263,7 +263,7 @@ static void em_route_irq(int irq, unsigned int cpu)
	const struct cpumask *mask = cpumask_of(cpu);

	spin_lock_irq(&desc->lock);
	desc->affinity = *mask;
	cpumask_copy(desc->affinity, mask);
	desc->chip->set_affinity(irq, mask);
	spin_unlock_irq(&desc->lock);
}
+5 −0
Original line number Diff line number Diff line
@@ -69,6 +69,11 @@ static struct irq_desc bad_irq_desc = {
#endif
};

#ifdef CONFIG_CPUMASK_OFFSTACK
/* We are not allocating a variable-sized bad_irq_desc.affinity */
#error "Blackfin architecture does not support CONFIG_CPUMASK_OFFSTACK."
#endif

int show_interrupts(struct seq_file *p, void *v)
{
	int i = *(loff_t *) v, j;
Loading