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

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

x86, apic: unify phys_pkg_id()



- unify the call signature of 64-bit to that of 32-bit

 - clean up the types all around

 - clean up namespace contamination

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent b0b20e5a
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 u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
static inline int 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 u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
static inline int phys_pkg_id(int cpuid_apic, int index_msb)
{
	return cpuid_apic >> index_msb;
}
+1 −5
Original line number Diff line number Diff line
@@ -48,11 +48,7 @@ struct genapic {
	void (*setup_portio_remap)(void);
	int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
	void (*enable_apic_mode)(void);
#ifdef CONFIG_X86_32
	u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
#else
	unsigned int (*phys_pkg_id)(int index_msb);
#endif
	int (*phys_pkg_id)(int cpuid_apic, int index_msb);

	/*
	 * When one of the next two hooks returns 1 the genapic
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
	return (unsigned int)(mask1 & mask2 & mask3);
}

static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
static inline int phys_pkg_id(int cpuid_apic, int index_msb)
{
	return cpuid_apic >> index_msb;
}
+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 u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
static inline int phys_pkg_id(int cpuid_apic, int index_msb)
{
	return cpuid_apic >> index_msb;
}
Loading