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

Commit bf721d3a authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Ingo Molnar
Browse files

x86/apic: Factor out default target_cpus() operation



Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/20120605112324.GA11449@dhcp-26-207.brq.redhat.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 49d0c7a0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -537,6 +537,11 @@ static inline const struct cpumask *default_target_cpus(void)
#endif
}

static inline const struct cpumask *online_target_cpus(void)
{
	return cpu_online_mask;
}

DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);


+0 −9
Original line number Diff line number Diff line
@@ -9,15 +9,6 @@
#include <asm/ipi.h>
#include <linux/cpumask.h>

/*
 * Need to use more than cpu 0, because we need more vectors
 * when MSI-X are used.
 */
static const struct cpumask *x2apic_target_cpus(void)
{
	return cpu_online_mask;
}

static int x2apic_apic_id_valid(int apicid)
{
	return 1;
+2 −12
Original line number Diff line number Diff line
@@ -36,11 +36,6 @@ static int flat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
	return 1;
}

static const struct cpumask *flat_target_cpus(void)
{
	return cpu_online_mask;
}

static void flat_vector_allocation_domain(int cpu, struct cpumask *retmask)
{
	/* Careful. Some cpus do not strictly honor the set of cpus
@@ -186,7 +181,7 @@ static struct apic apic_flat = {
	.irq_delivery_mode		= dest_LowestPrio,
	.irq_dest_mode			= 1, /* logical */

	.target_cpus			= flat_target_cpus,
	.target_cpus			= online_target_cpus,
	.disable_esr			= 0,
	.dest_logical			= APIC_DEST_LOGICAL,
	.check_apicid_used		= NULL,
@@ -262,11 +257,6 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
	return 0;
}

static const struct cpumask *physflat_target_cpus(void)
{
	return cpu_online_mask;
}

static void physflat_vector_allocation_domain(int cpu, struct cpumask *retmask)
{
	cpumask_clear(retmask);
@@ -345,7 +335,7 @@ static struct apic apic_physflat = {
	.irq_delivery_mode		= dest_Fixed,
	.irq_dest_mode			= 0, /* physical */

	.target_cpus			= physflat_target_cpus,
	.target_cpus			= online_target_cpus,
	.disable_esr			= 0,
	.dest_logical			= 0,
	.check_apicid_used		= NULL,
+1 −6
Original line number Diff line number Diff line
@@ -72,11 +72,6 @@ static int numachip_phys_pkg_id(int initial_apic_id, int index_msb)
	return initial_apic_id >> index_msb;
}

static const struct cpumask *numachip_target_cpus(void)
{
	return cpu_online_mask;
}

static void numachip_vector_allocation_domain(int cpu, struct cpumask *retmask)
{
	cpumask_clear(retmask);
@@ -253,7 +248,7 @@ static struct apic apic_numachip __refconst = {
	.irq_delivery_mode		= dest_Fixed,
	.irq_dest_mode			= 0, /* physical */

	.target_cpus			= numachip_target_cpus,
	.target_cpus			= online_target_cpus,
	.disable_esr			= 0,
	.dest_logical			= 0,
	.check_apicid_used		= NULL,
+1 −10
Original line number Diff line number Diff line
@@ -26,15 +26,6 @@ static int bigsmp_apic_id_registered(void)
	return 1;
}

static const struct cpumask *bigsmp_target_cpus(void)
{
#ifdef CONFIG_SMP
	return cpu_online_mask;
#else
	return cpumask_of(0);
#endif
}

static unsigned long bigsmp_check_apicid_used(physid_mask_t *map, int apicid)
{
	return 0;
@@ -205,7 +196,7 @@ static struct apic apic_bigsmp = {
	/* phys delivery to target CPU: */
	.irq_dest_mode			= 0,

	.target_cpus			= bigsmp_target_cpus,
	.target_cpus			= default_target_cpus,
	.disable_esr			= 1,
	.dest_logical			= 0,
	.check_apicid_used		= bigsmp_check_apicid_used,
Loading