summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/apic/apic_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apic/apic_common.c')
-rw-r--r--arch/x86/kernel/apic/apic_common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/apic_common.c b/arch/x86/kernel/apic/apic_common.c
index 4791654cdeb2..ddc6a4301588 100644
--- a/arch/x86/kernel/apic/apic_common.c
+++ b/arch/x86/kernel/apic/apic_common.c
@@ -6,6 +6,11 @@
#include <linux/irq.h>
#include <asm/apic.h>
+u32 apic_default_calc_apicid(unsigned int cpu)
+{
+ return per_cpu(x86_cpu_to_apicid, cpu);
+}
+
int default_cpu_mask_to_apicid(const struct cpumask *msk, struct irq_data *irqd,
unsigned int *apicid)
{
@@ -18,6 +23,11 @@ int default_cpu_mask_to_apicid(const struct cpumask *msk, struct irq_data *irqd,
return 0;
}
+u32 apic_flat_calc_apicid(unsigned int cpu)
+{
+ return 1U << cpu;
+}
+
int flat_cpu_mask_to_apicid(const struct cpumask *mask, struct irq_data *irqd,
unsigned int *apicid)