Commit d92e5e7c authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Dave Hansen
Browse files

x86/apic: Add max_apic_id member



There is really no point to have a callback which compares numbers.

Add a field which allows each APIC to store the maximum APIC ID supported
and fill it in for all APIC incarnations.

The next step will remove the callback.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarMichael Kelley <mikelley@microsoft.com>
Tested-by: default avatarSohil Mehta <sohil.mehta@intel.com>
Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
parent 9132d720
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -277,6 +277,9 @@ struct apic {
	u64	(*icr_read)(void);
	void	(*icr_write)(u32 low, u32 high);

	/* The limit of the APIC ID space. */
	u32	max_apic_id;

	/* Probe, setup and smpboot functions */
	int	(*probe)(void);
	int	(*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
+2 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ static struct apic apic_flat __ro_after_init = {
	.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,
	.set_apic_id			= set_apic_id,

@@ -170,6 +171,7 @@ static struct apic apic_physflat __ro_after_init = {
	.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,
	.set_apic_id			= set_apic_id,

+1 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ struct apic apic_noop __ro_after_init = {

	.phys_pkg_id			= noop_phys_pkg_id,

	.max_apic_id			= 0xFE,
	.get_apic_id			= noop_get_apic_id,
	.set_apic_id			= NULL,

+2 −0
Original line number Diff line number Diff line
@@ -239,6 +239,7 @@ static const struct apic apic_numachip1 __refconst = {
	.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,
	.set_apic_id			= numachip1_set_apic_id,

@@ -278,6 +279,7 @@ static const struct apic apic_numachip2 __refconst = {
	.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,
	.set_apic_id			= numachip2_set_apic_id,

+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ static struct apic apic_bigsmp __ro_after_init = {
	.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,
	.set_apic_id			= NULL,

Loading