Commit 035fc90a authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

x86/apic: Remove unused phys_pkg_id() callback



Now that the core code does not use this monstrosity anymore, it's time to
put it to rest.

The only real purpose was to read the APIC ID on UV and VSMP systems for
the actual evaluation. That's what the core code does now.

For doing the actual shift operation there is truly no APIC callback
required.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Tested-by: default avatarJuergen Gross <jgross@suse.com>
Tested-by: default avatarSohil Mehta <sohil.mehta@intel.com>
Tested-by: default avatarMichael Kelley <mhklinux@outlook.com>
Tested-by: default avatarZhang Rui <rui.zhang@intel.com>
Tested-by: default avatarWang Wendy <wendy.wang@intel.com>
Tested-by: default avatarK Prateek Nayak <kprateek.nayak@amd.com>
Link: https://lore.kernel.org/r/20240212153625.516536121@linutronix.de


parent fab75e79
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -295,7 +295,6 @@ struct apic {
	void	(*init_apic_ldr)(void);
	void	(*ioapic_phys_id_map)(physid_mask_t *phys_map, physid_mask_t *retmap);
	u32	(*cpu_present_to_apicid)(int mps_cpu);
	u32	(*phys_pkg_id)(u32 cpuid_apic, int index_msb);

	u32	(*get_apic_id)(u32 id);
	u32	(*set_apic_id)(u32 apicid);
+0 −7
Original line number Diff line number Diff line
@@ -66,11 +66,6 @@ static u32 set_apic_id(u32 id)
	return (id & 0xFF) << 24;
}

static u32 flat_phys_pkg_id(u32 initial_apic_id, int index_msb)
{
	return initial_apic_id >> index_msb;
}

static int flat_probe(void)
{
	return 1;
@@ -88,7 +83,6 @@ static struct apic apic_flat __ro_after_init = {

	.init_apic_ldr			= default_init_apic_ldr,
	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
	.phys_pkg_id			= flat_phys_pkg_id,

	.max_apic_id			= 0xFE,
	.get_apic_id			= flat_get_apic_id,
@@ -158,7 +152,6 @@ static struct apic apic_physflat __ro_after_init = {
	.disable_esr			= 0,

	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
	.phys_pkg_id			= flat_phys_pkg_id,

	.max_apic_id			= 0xFE,
	.get_apic_id			= flat_get_apic_id,
+0 −3
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ static void noop_send_IPI_self(int vector) { }
static void noop_apic_icr_write(u32 low, u32 id) { }
static int noop_wakeup_secondary_cpu(u32 apicid, unsigned long start_eip) { return -1; }
static u64 noop_apic_icr_read(void) { return 0; }
static u32 noop_phys_pkg_id(u32 cpuid_apic, int index_msb) { return 0; }
static u32 noop_get_apic_id(u32 apicid) { return 0; }
static void noop_apic_eoi(void) { }

@@ -55,8 +54,6 @@ struct apic apic_noop __ro_after_init = {
	.ioapic_phys_id_map		= default_ioapic_phys_id_map,
	.cpu_present_to_apicid		= default_cpu_present_to_apicid,

	.phys_pkg_id			= noop_phys_pkg_id,

	.max_apic_id			= 0xFE,
	.get_apic_id			= noop_get_apic_id,

+0 −7
Original line number Diff line number Diff line
@@ -56,11 +56,6 @@ static u32 numachip2_set_apic_id(u32 id)
	return id << 24;
}

static u32 numachip_phys_pkg_id(u32 initial_apic_id, int index_msb)
{
	return initial_apic_id >> index_msb;
}

static void numachip1_apic_icr_write(int apicid, unsigned int val)
{
	write_lcsr(CSR_G3_EXT_IRQ_GEN, (apicid << 16) | val);
@@ -227,7 +222,6 @@ static const struct apic apic_numachip1 __refconst = {
	.disable_esr			= 0,

	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
	.phys_pkg_id			= numachip_phys_pkg_id,

	.max_apic_id			= UINT_MAX,
	.get_apic_id			= numachip1_get_apic_id,
@@ -263,7 +257,6 @@ static const struct apic apic_numachip2 __refconst = {
	.disable_esr			= 0,

	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
	.phys_pkg_id			= numachip_phys_pkg_id,

	.max_apic_id			= UINT_MAX,
	.get_apic_id			= numachip2_get_apic_id,
+0 −6
Original line number Diff line number Diff line
@@ -29,11 +29,6 @@ static void bigsmp_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *re
	physids_promote(0xFFL, retmap);
}

static u32 bigsmp_phys_pkg_id(u32 cpuid_apic, int index_msb)
{
	return cpuid_apic >> index_msb;
}

static void bigsmp_send_IPI_allbutself(int vector)
{
	default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector);
@@ -87,7 +82,6 @@ static struct apic apic_bigsmp __ro_after_init = {
	.check_apicid_used		= bigsmp_check_apicid_used,
	.ioapic_phys_id_map		= bigsmp_ioapic_phys_id_map,
	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
	.phys_pkg_id			= bigsmp_phys_pkg_id,

	.max_apic_id			= 0xFE,
	.get_apic_id			= bigsmp_get_apic_id,
Loading