mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
x86: change __setup_vector_irq with setup_vector_irq
We create a version of it for i386, and then take the CONFIG_X86_64 ifdef out of the game. We could create a __setup_vector_irq for i386, but it would incur in an unnecessary lock taking. Moreover, it is better practice to only export setup_vector_irq anyway. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
86e430edf4
commit
3fde690011
4 changed files with 16 additions and 11 deletions
|
@ -1207,6 +1207,11 @@ static int assign_irq_vector(int irq)
|
||||||
|
|
||||||
return vector;
|
return vector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setup_vector_irq(int cpu)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static struct irq_chip ioapic_chip;
|
static struct irq_chip ioapic_chip;
|
||||||
|
|
||||||
#define IOAPIC_AUTO -1
|
#define IOAPIC_AUTO -1
|
||||||
|
|
|
@ -801,7 +801,7 @@ static void __clear_irq_vector(int irq)
|
||||||
cpus_clear(cfg->domain);
|
cpus_clear(cfg->domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __setup_vector_irq(int cpu)
|
static void __setup_vector_irq(int cpu)
|
||||||
{
|
{
|
||||||
/* Initialize vector_irq on a new cpu */
|
/* Initialize vector_irq on a new cpu */
|
||||||
/* This function must be called with vector_lock held */
|
/* This function must be called with vector_lock held */
|
||||||
|
@ -824,6 +824,13 @@ void __setup_vector_irq(int cpu)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setup_vector_irq(int cpu)
|
||||||
|
{
|
||||||
|
spin_lock(&vector_lock);
|
||||||
|
__setup_vector_irq(smp_processor_id());
|
||||||
|
spin_unlock(&vector_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct irq_chip ioapic_chip;
|
static struct irq_chip ioapic_chip;
|
||||||
|
|
||||||
|
|
|
@ -329,15 +329,8 @@ static void __cpuinit start_secondary(void *unused)
|
||||||
* smp_call_function().
|
* smp_call_function().
|
||||||
*/
|
*/
|
||||||
lock_ipi_call_lock();
|
lock_ipi_call_lock();
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_IO_APIC
|
||||||
spin_lock(&vector_lock);
|
setup_vector_irq(smp_processor_id());
|
||||||
|
|
||||||
/* Setup the per cpu irq handling data structures */
|
|
||||||
__setup_vector_irq(smp_processor_id());
|
|
||||||
/*
|
|
||||||
* Allow the master to continue.
|
|
||||||
*/
|
|
||||||
spin_unlock(&vector_lock);
|
|
||||||
#endif
|
#endif
|
||||||
cpu_set(smp_processor_id(), cpu_online_map);
|
cpu_set(smp_processor_id(), cpu_online_map);
|
||||||
unlock_ipi_call_lock();
|
unlock_ipi_call_lock();
|
||||||
|
|
|
@ -97,9 +97,9 @@ extern void (*const interrupt[NR_IRQS])(void);
|
||||||
#else
|
#else
|
||||||
typedef int vector_irq_t[NR_VECTORS];
|
typedef int vector_irq_t[NR_VECTORS];
|
||||||
DECLARE_PER_CPU(vector_irq_t, vector_irq);
|
DECLARE_PER_CPU(vector_irq_t, vector_irq);
|
||||||
extern void __setup_vector_irq(int cpu);
|
|
||||||
extern spinlock_t vector_lock;
|
extern spinlock_t vector_lock;
|
||||||
#endif
|
#endif
|
||||||
|
extern void setup_vector_irq(int cpu);
|
||||||
|
|
||||||
#endif /* !ASSEMBLY_ */
|
#endif /* !ASSEMBLY_ */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue