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

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

x86, apic: rename 'genapic' to 'apic'



Impact: cleanup

Now that all APIC code is consolidated there's nothing 'gen' about
apics anymore - so rename 'struct genapic' to 'struct apic'.

This shortens the code and is nicer to read as well.

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ab6fb7c0
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ static inline void disable_local_APIC(void) { }
 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
 * James Cleverdon.
 */
struct genapic {
struct apic {
	char *name;

	int (*probe)(void);
@@ -283,7 +283,7 @@ struct genapic {
	int (*phys_pkg_id)(int cpuid_apic, int index_msb);

	/*
	 * When one of the next two hooks returns 1 the genapic
	 * When one of the next two hooks returns 1 the apic
	 * is switched to this. Essentially they are additional
	 * probe functions:
	 */
@@ -324,7 +324,7 @@ struct genapic {
	u32 (*safe_wait_icr_idle)(void);
};

extern struct genapic *apic;
extern struct apic *apic;

static inline u32 apic_read(u32 reg)
{
@@ -385,17 +385,17 @@ static inline unsigned default_get_apic_id(unsigned long x)
#define DEFAULT_TRAMPOLINE_PHYS_HIGH		0x469

#ifdef CONFIG_X86_32
extern void es7000_update_genapic_to_cluster(void);
extern void es7000_update_apic_to_cluster(void);
#else
extern struct genapic apic_flat;
extern struct genapic apic_physflat;
extern struct genapic apic_x2apic_cluster;
extern struct genapic apic_x2apic_phys;
extern struct apic apic_flat;
extern struct apic apic_physflat;
extern struct apic apic_x2apic_cluster;
extern struct apic apic_x2apic_phys;
extern int default_acpi_madt_oem_check(char *, char *);

extern void apic_send_IPI_self(int vector);

extern struct genapic apic_x2apic_uv_x;
extern struct apic apic_x2apic_uv_x;
DECLARE_PER_CPU(int, x2apic_extra_bits);

extern int default_cpu_present_to_apicid(int mps_cpu);
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ struct x86_quirks {
	void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable,
				unsigned short oemsize);
	int (*setup_ioapic_ids)(void);
	int (*update_genapic)(void);
	int (*update_apic)(void);
};

#endif /* __ASSEMBLY__ */
+1 −1
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ static int probe_bigsmp(void)
	return dmi_bigsmp;
}

struct genapic apic_bigsmp = {
struct apic apic_bigsmp = {

	.name				= "bigsmp",
	.probe				= probe_bigsmp,
+5 −5
Original line number Diff line number Diff line
@@ -163,14 +163,14 @@ static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip)
	return 0;
}

static int __init es7000_update_genapic(void)
static int __init es7000_update_apic(void)
{
	apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;

	/* MPENTIUMIII */
	if (boot_cpu_data.x86 == 6 &&
	    (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) {
		es7000_update_genapic_to_cluster();
		es7000_update_apic_to_cluster();
		apic->wait_for_init_deassert = NULL;
		apic->wakeup_cpu = wakeup_secondary_cpu_via_mip;
	}
@@ -193,7 +193,7 @@ static void __init setup_unisys(void)
		es7000_plat = ES7000_CLASSIC;
	ioapic_renumber_irq = es7000_rename_gsi;

	x86_quirks->update_genapic = es7000_update_genapic;
	x86_quirks->update_apic = es7000_update_apic;
}

/*
@@ -659,7 +659,7 @@ static int es7000_phys_pkg_id(int cpuid_apic, int index_msb)
	return cpuid_apic >> index_msb;
}

void __init es7000_update_genapic_to_cluster(void)
void __init es7000_update_apic_to_cluster(void)
{
	apic->target_cpus = target_cpus_cluster;
	apic->irq_delivery_mode = dest_LowestPrio;
@@ -691,7 +691,7 @@ es7000_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
}


struct genapic apic_es7000 = {
struct apic apic_es7000 = {

	.name				= "es7000",
	.probe				= probe_es7000,
+9 −9
Original line number Diff line number Diff line
@@ -23,16 +23,16 @@
#include <asm/ipi.h>
#include <asm/setup.h>

extern struct genapic apic_flat;
extern struct genapic apic_physflat;
extern struct genapic apic_x2xpic_uv_x;
extern struct genapic apic_x2apic_phys;
extern struct genapic apic_x2apic_cluster;
extern struct apic apic_flat;
extern struct apic apic_physflat;
extern struct apic apic_x2xpic_uv_x;
extern struct apic apic_x2apic_phys;
extern struct apic apic_x2apic_cluster;

struct genapic __read_mostly *apic = &apic_flat;
struct apic __read_mostly *apic = &apic_flat;
EXPORT_SYMBOL_GPL(apic);

static struct genapic *apic_probe[] __initdata = {
static struct apic *apic_probe[] __initdata = {
#ifdef CONFIG_X86_UV
	&apic_x2apic_uv_x,
#endif
@@ -62,8 +62,8 @@ void __init default_setup_apic_routing(void)
		printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
	}

	if (x86_quirks->update_genapic)
		x86_quirks->update_genapic();
	if (x86_quirks->update_apic)
		x86_quirks->update_apic();
}

/* Same for both flat and physical. */
Loading