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

Commit 2b6163bf authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

x86: remove update_apic from x86_quirks



Impact: cleanup

x86_quirks->update_apic() calling looks crazy. so try to remove it:

 1. every apic take wakeup_cpu member directly
 2. separate es7000_apic to es7000_apic_cluster
 3. use uv_wakeup_cpu directly

Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ecc25fbd
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -325,6 +325,9 @@ struct apic {
};

extern struct apic *apic;
extern atomic_t init_deasserted;
extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);

static inline u32 apic_read(u32 reg)
{
@@ -384,9 +387,7 @@ static inline unsigned default_get_apic_id(unsigned long x)
#define DEFAULT_TRAMPOLINE_PHYS_LOW		0x467
#define DEFAULT_TRAMPOLINE_PHYS_HIGH		0x469

#ifdef CONFIG_X86_32
extern void es7000_update_apic_to_cluster(void);
#else
#ifdef CONFIG_X86_64
extern struct apic apic_flat;
extern struct apic apic_physflat;
extern struct apic apic_x2apic_cluster;
+0 −3
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ struct x86_quirks {
	void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable,
				unsigned short oemsize);
	int (*setup_ioapic_ids)(void);
	int (*update_apic)(void);
};

extern void x86_quirk_pre_intr_init(void);
@@ -77,8 +76,6 @@ static inline void visws_early_detect(void) { }
static inline int is_visws_box(void) { return 0; }
#endif

extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
extern struct x86_quirks *x86_quirks;
extern unsigned long saved_video_mode;

+0 −3
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ extern enum uv_system_type get_uv_system_type(void);
extern int is_uv_system(void);
extern void uv_cpu_init(void);
extern void uv_system_init(void);
extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
extern const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
						 struct mm_struct *mm,
						 unsigned long va,
@@ -24,8 +23,6 @@ static inline enum uv_system_type get_uv_system_type(void) { return UV_NONE; }
static inline int is_uv_system(void)	{ return 0; }
static inline void uv_cpu_init(void)	{ }
static inline void uv_system_init(void)	{ }
static inline int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip)
{ return 1; }
static inline const struct cpumask *
uv_flush_tlb_others(const struct cpumask *cpumask, struct mm_struct *mm,
		    unsigned long va, unsigned int cpu)
+2 −2
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ struct apic apic_flat = {
	.send_IPI_all			= flat_send_IPI_all,
	.send_IPI_self			= apic_send_IPI_self,

	.wakeup_cpu			= NULL,
	.wakeup_cpu			= wakeup_secondary_cpu_via_init,
	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
	.wait_for_init_deassert		= NULL,
@@ -373,7 +373,7 @@ struct apic apic_physflat = {
	.send_IPI_all			= physflat_send_IPI_all,
	.send_IPI_self			= apic_send_IPI_self,

	.wakeup_cpu			= NULL,
	.wakeup_cpu			= wakeup_secondary_cpu_via_init,
	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,
	.wait_for_init_deassert		= NULL,
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ struct apic apic_bigsmp = {
	.send_IPI_all			= bigsmp_send_IPI_all,
	.send_IPI_self			= default_send_IPI_self,

	.wakeup_cpu			= NULL,
	.wakeup_cpu			= wakeup_secondary_cpu_via_init,
	.trampoline_phys_low		= DEFAULT_TRAMPOLINE_PHYS_LOW,
	.trampoline_phys_high		= DEFAULT_TRAMPOLINE_PHYS_HIGH,

Loading