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

Commit 54ac14a8 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

x86: fix wakeup_cpu with numaq/es7000, v2, fix



Impact: fix wakeup_secondary_cpu with hotplug

We can not put that into x86_quirks, because that is __initdata.
So try to move that to genapic, and add update_genapic in x86_quirks.

later we even could use that stub to:

 1. autodetect CONFIG_ES7000_CLUSTERED_APIC
 2. more correct inquire_remote_apic with apic_verbosity setting.

Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 569712b2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ struct genapic {
	void (*send_IPI_allbutself)(int vector);
	void (*send_IPI_all)(int vector);
#endif
	int (*wakeup_cpu)(int apicid, unsigned long start_eip);
	int trampoline_phys_low;
	int trampoline_phys_high;
	void (*wait_for_init_deassert)(atomic_t *deassert);
+2 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ struct genapic {
	unsigned int (*get_apic_id)(unsigned long x);
	unsigned long (*set_apic_id)(unsigned int id);
	unsigned long apic_id_mask;
	/* wakeup_secondary_cpu */
	int (*wakeup_cpu)(int apicid, unsigned long start_eip);
};

extern struct genapic *genapic;
+2 −0
Original line number Diff line number Diff line
@@ -32,11 +32,13 @@ static inline cpumask_t target_cpus(void)
#define vector_allocation_domain    (genapic->vector_allocation_domain)
#define read_apic_id()  (GET_APIC_ID(apic_read(APIC_ID)))
#define send_IPI_self (genapic->send_IPI_self)
#define wakeup_secondary_cpu (genapic->wakeup_cpu)
extern void setup_apic_routing(void);
#else
#define INT_DELIVERY_MODE dest_LowestPrio
#define INT_DEST_MODE 1     /* logical delivery broadcast to all procs */
#define TARGET_CPUS (target_cpus())
#define wakeup_secondary_cpu wakeup_secondary_cpu_via_init
/*
 * Set up the logical destination ID.
 *
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#define vector_allocation_domain (genapic->vector_allocation_domain)
#define enable_apic_mode (genapic->enable_apic_mode)
#define phys_pkg_id (genapic->phys_pkg_id)
#define wakeup_secondary_cpu (genapic->wakeup_cpu)

extern void generic_bigsmp_probe(void);

+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ 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);
/*
 * Any setup quirks to be performed?
 */
@@ -40,7 +41,7 @@ struct x86_quirks {
	void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
                                    unsigned short oemsize);
	int (*setup_ioapic_ids)(void);
	int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);
	int (*update_genapic)(void);
};

extern struct x86_quirks *x86_quirks;
Loading