diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-09-13 23:29:37 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-09-25 20:51:56 +0200 |
commit | 9f9e3bb1cf2ecba7697bfb5e350ad2648e69dbdf (patch) | |
tree | 15cd5de24aef1fa44498aee33fe4ae76c5c751eb /arch/x86/include/asm | |
parent | 99a1482d8aa105922dc4a3360ab11600f0bc9d80 (diff) | |
download | linux-9f9e3bb1cf2ecba7697bfb5e350ad2648e69dbdf.tar.gz linux-9f9e3bb1cf2ecba7697bfb5e350ad2648e69dbdf.tar.bz2 linux-9f9e3bb1cf2ecba7697bfb5e350ad2648e69dbdf.zip |
x86/apic: Add replacement for cpu_mask_to_apicid()
As preparation for replacing the vector allocator, provide a new function
which takes a cpu number instead of a cpu mask to calculate/lookup the
resulting APIC destination id.
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>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/apic.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index ff0bddabaa04..01bcaa8b62b3 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -303,6 +303,7 @@ struct apic { int (*cpu_mask_to_apicid)(const struct cpumask *cpumask, struct irq_data *irqdata, unsigned int *apicid); + u32 (*calc_dest_apicid)(unsigned int cpu); /* ICR related functions */ u64 (*icr_read)(void); @@ -486,6 +487,10 @@ static inline unsigned int read_apic_id(void) extern int default_apic_id_valid(int apicid); extern int default_acpi_madt_oem_check(char *, char *); extern void default_setup_apic_routing(void); + +extern u32 apic_default_calc_apicid(unsigned int cpu); +extern u32 apic_flat_calc_apicid(unsigned int cpu); + extern int flat_cpu_mask_to_apicid(const struct cpumask *cpumask, struct irq_data *irqdata, unsigned int *apicid); |