Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e46d5178 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'master' of...

parents a4a0acf8 4a046d17
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -55,7 +55,7 @@ int irq_select_affinity(unsigned int irq)
		cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
		cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
	last_cpu = cpu;
	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));
	irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu));
	return 0;
	return 0;
}
}
+12 −6
Original line number Original line Diff line number Diff line
@@ -104,6 +104,11 @@ static struct irq_desc bad_irq_desc = {
	.lock = SPIN_LOCK_UNLOCKED
	.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
 * do_IRQ handles all hardware IRQ's.  Decoded IRQs should not
 * come via this function.  Instead, they should provide their
 * 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;
		irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE;


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


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

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


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


			route_irq(desc, i, newcpu);
			route_irq(desc, i, newcpu);
+1 −1
Original line number Original line 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);
	const struct cpumask *mask = cpumask_of(cpu);


	spin_lock_irq(&desc->lock);
	spin_lock_irq(&desc->lock);
	desc->affinity = *mask;
	cpumask_copy(desc->affinity, mask);
	desc->chip->set_affinity(irq, mask);
	desc->chip->set_affinity(irq, mask);
	spin_unlock_irq(&desc->lock);
	spin_unlock_irq(&desc->lock);
}
}
+5 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,11 @@ static struct irq_desc bad_irq_desc = {
#endif
#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 show_interrupts(struct seq_file *p, void *v)
{
{
	int i = *(loff_t *) v, j;
	int i = *(loff_t *) v, j;
+1 −1
Original line number Original line Diff line number Diff line
@@ -880,7 +880,7 @@ iosapic_unregister_intr (unsigned int gsi)
	if (iosapic_intr_info[irq].count == 0) {
	if (iosapic_intr_info[irq].count == 0) {
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
		/* Clear affinity */
		/* Clear affinity */
		cpus_setall(idesc->affinity);
		cpumask_setall(idesc->affinity);
#endif
#endif
		/* Clear the interrupt information */
		/* Clear the interrupt information */
		iosapic_intr_info[irq].dest = 0;
		iosapic_intr_info[irq].dest = 0;
Loading