x86/vector: Compile SMP only code conditionally
No point in compiling this for UP. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Juergen Gross <jgross@suse.com> Tested-by: Yu Chen <yu.c.chen@intel.com> Acked-by: Juergen Gross <jgross@suse.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Alok Kataria <akataria@vmware.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Rui Zhang <rui.zhang@intel.com> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Len Brown <lenb@kernel.org> Link: https://lkml.kernel.org/r/20170913213155.603191841@linutronix.de
This commit is contained in:
parent
baab1e84b1
commit
ba801640b1
@ -450,6 +450,7 @@ int __init arch_early_irq_init(void)
|
||||
return arch_early_ioapic_init();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Temporary hack to keep things working */
|
||||
static void vector_update_shutdown_irqs(void)
|
||||
{
|
||||
@ -517,6 +518,25 @@ void lapic_offline(void)
|
||||
unlock_vector_lock();
|
||||
}
|
||||
|
||||
static int apic_set_affinity(struct irq_data *irqd,
|
||||
const struct cpumask *dest, bool force)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SMP))
|
||||
return -EPERM;
|
||||
|
||||
if (!cpumask_intersects(dest, cpu_online_mask))
|
||||
return -EINVAL;
|
||||
|
||||
err = assign_irq_vector(irqd, dest);
|
||||
return err ? err : IRQ_SET_MASK_OK;
|
||||
}
|
||||
|
||||
#else
|
||||
# define apic_set_affinity NULL
|
||||
#endif
|
||||
|
||||
static int apic_retrigger_irq(struct irq_data *irqd)
|
||||
{
|
||||
struct apic_chip_data *apicd = apic_chip_data(irqd);
|
||||
@ -536,21 +556,6 @@ void apic_ack_edge(struct irq_data *irqd)
|
||||
ack_APIC_irq();
|
||||
}
|
||||
|
||||
static int apic_set_affinity(struct irq_data *irqd,
|
||||
const struct cpumask *dest, bool force)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SMP))
|
||||
return -EPERM;
|
||||
|
||||
if (!cpumask_intersects(dest, cpu_online_mask))
|
||||
return -EINVAL;
|
||||
|
||||
err = assign_irq_vector(irqd, dest);
|
||||
return err ? err : IRQ_SET_MASK_OK;
|
||||
}
|
||||
|
||||
static struct irq_chip lapic_controller = {
|
||||
.name = "APIC",
|
||||
.irq_ack = apic_ack_edge,
|
||||
|
Loading…
Reference in New Issue
Block a user