Skip to content

Commit

Permalink
x86, apic: Remove mps_oem_check callback
Browse files Browse the repository at this point in the history
Since commit b5660ba ("x86, platforms: Remove NUMAQ") removed NUMAQ,
the mps_oem_check() apic callback has been obsolete.  Remove it.

This allows generic_mps_oem_check() to be removed as well.

Signed-off-by: David Rientjes <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: H. Peter Anvin <[email protected]>
  • Loading branch information
rientjes authored and H. Peter Anvin committed Jul 31, 2014
1 parent 300eddf commit c460b5d
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 45 deletions.
7 changes: 0 additions & 7 deletions arch/x86/include/asm/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,6 @@ struct apic {
void (*enable_apic_mode)(void);
int (*phys_pkg_id)(int cpuid_apic, int index_msb);

/*
* When one of the next two hooks returns 1 the apic
* is switched to this. Essentially they are additional
* probe functions:
*/
int (*mps_oem_check)(struct mpc_table *mpc, char *oem, char *productid);

unsigned int (*get_apic_id)(unsigned long x);
unsigned long (*set_apic_id)(unsigned int id);
unsigned long apic_id_mask;
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/include/asm/mpspec.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,4 @@ static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map)

extern physid_mask_t phys_cpu_present_map;

extern int generic_mps_oem_check(struct mpc_table *, char *, char *);

#endif /* _ASM_X86_MPSPEC_H */
2 changes: 0 additions & 2 deletions arch/x86/kernel/apic/apic_flat_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ static struct apic apic_flat = {
.check_phys_apicid_present = default_check_phys_apicid_present,
.enable_apic_mode = NULL,
.phys_pkg_id = flat_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = flat_get_apic_id,
.set_apic_id = set_apic_id,
Expand Down Expand Up @@ -295,7 +294,6 @@ static struct apic apic_physflat = {
.check_phys_apicid_present = default_check_phys_apicid_present,
.enable_apic_mode = NULL,
.phys_pkg_id = flat_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = flat_get_apic_id,
.set_apic_id = set_apic_id,
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/kernel/apic/apic_noop.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ struct apic apic_noop = {

.phys_pkg_id = noop_phys_pkg_id,

.mps_oem_check = NULL,

.get_apic_id = noop_get_apic_id,
.set_apic_id = NULL,
.apic_id_mask = 0x0F << 24,
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/apic/apic_numachip.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ static const struct apic apic_numachip __refconst = {
.check_phys_apicid_present = default_check_phys_apicid_present,
.enable_apic_mode = NULL,
.phys_pkg_id = numachip_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = get_apic_id,
.set_apic_id = set_apic_id,
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/apic/bigsmp_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ static struct apic apic_bigsmp = {
.check_phys_apicid_present = bigsmp_check_phys_apicid_present,
.enable_apic_mode = NULL,
.phys_pkg_id = bigsmp_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = bigsmp_get_apic_id,
.set_apic_id = NULL,
Expand Down
25 changes: 1 addition & 24 deletions arch/x86/kernel/apic/probe_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ static struct apic apic_default = {
.check_phys_apicid_present = default_check_phys_apicid_present,
.enable_apic_mode = NULL,
.phys_pkg_id = default_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = default_get_apic_id,
.set_apic_id = NULL,
Expand Down Expand Up @@ -210,29 +209,7 @@ void __init generic_apic_probe(void)
printk(KERN_INFO "Using APIC driver %s\n", apic->name);
}

/* These functions can switch the APIC even after the initial ->probe() */

int __init
generic_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
{
struct apic **drv;

for (drv = __apicdrivers; drv < __apicdrivers_end; drv++) {
if (!((*drv)->mps_oem_check))
continue;
if (!(*drv)->mps_oem_check(mpc, oem, productid))
continue;

if (!cmdline_apic) {
apic = *drv;
printk(KERN_INFO "Switched to APIC driver `%s'.\n",
apic->name);
}
return 1;
}
return 0;
}

/* This function can switch the APIC even after the initial ->probe() */
int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{
struct apic **drv;
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/apic/x2apic_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ static struct apic apic_x2apic_cluster = {
.check_phys_apicid_present = default_check_phys_apicid_present,
.enable_apic_mode = NULL,
.phys_pkg_id = x2apic_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = x2apic_get_apic_id,
.set_apic_id = x2apic_set_apic_id,
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/apic/x2apic_phys.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ static struct apic apic_x2apic_phys = {
.check_phys_apicid_present = default_check_phys_apicid_present,
.enable_apic_mode = NULL,
.phys_pkg_id = x2apic_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = x2apic_get_apic_id,
.set_apic_id = x2apic_set_apic_id,
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/apic/x2apic_uv_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ static struct apic __refdata apic_x2apic_uv_x = {
.check_phys_apicid_present = default_check_phys_apicid_present,
.enable_apic_mode = NULL,
.phys_pkg_id = uv_phys_pkg_id,
.mps_oem_check = NULL,

.get_apic_id = x2apic_get_apic_id,
.set_apic_id = set_apic_id,
Expand Down
3 changes: 0 additions & 3 deletions arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
if (!smp_check_mpc(mpc, oem, str))
return 0;

#ifdef CONFIG_X86_32
generic_mps_oem_check(mpc, oem, str);
#endif
/* Initialize the lapic mapping */
if (!acpi_lapic)
register_lapic_address(mpc->lapic);
Expand Down

0 comments on commit c460b5d

Please sign in to comment.