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

Commit cb8cc442 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

x86, apic: refactor ->phys_pkg_id()



Refactor the ->phys_pkg_id() methods:

 - namespace separation

 - macro wrapper removal

 - open-coded calls to the methods in the generic code

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent d4c9a9f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
	return BAD_APICID;
}

static inline int phys_pkg_id(int cpuid_apic, int index_msb)
static inline int bigsmp_phys_pkg_id(int cpuid_apic, int index_msb)
{
	return cpuid_apic >> index_msb;
}
+1 −1
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask,
	return apicid;
}

static inline int phys_pkg_id(int cpuid_apic, int index_msb)
static inline int es7000_phys_pkg_id(int cpuid_apic, int index_msb)
{
	return cpuid_apic >> index_msb;
}
+1 −2
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ static inline const struct cpumask *default_target_cpus(void)
#include <asm/genapic.h>
#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
#define phys_pkg_id	(apic->phys_pkg_id)
#define read_apic_id()  (GET_APIC_ID(apic_read(APIC_ID)))
#define send_IPI_self (apic->send_IPI_self)
#define wakeup_secondary_cpu (apic->wakeup_cpu)
@@ -65,7 +64,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
	return (unsigned int)(mask1 & mask2 & mask3);
}

static inline int phys_pkg_id(int cpuid_apic, int index_msb)
static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
{
	return cpuid_apic >> index_msb;
}
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@

#define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
#define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
#define phys_pkg_id (apic->phys_pkg_id)
#define wakeup_secondary_cpu (apic->wakeup_cpu)

extern void generic_bigsmp_probe(void);
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
}

/* No NUMA-Q box has a HT CPU, but it can't hurt to use the default code. */
static inline int phys_pkg_id(int cpuid_apic, int index_msb)
static inline int numaq_phys_pkg_id(int cpuid_apic, int index_msb)
{
	return cpuid_apic >> index_msb;
}
Loading