Commit 8c44963b authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

x86/apic: Cleanup destination mode



apic::irq_dest_mode is actually a boolean, but defined as u32 and named in
a way which does not explain what it means.

Make it a boolean and rename it to 'dest_mode_logical'

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201024213535.443185-9-dwmw2@infradead.org
parent e57d04e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ struct apic {
	u32	disable_esr;

	enum apic_delivery_modes delivery_mode;
	u32	irq_dest_mode;
	bool	dest_mode_logical;

	u32	(*calc_dest_apicid)(unsigned int cpu);

+1 −1
Original line number Diff line number Diff line
@@ -1591,7 +1591,7 @@ static void setup_local_APIC(void)
	apic->init_apic_ldr();

#ifdef CONFIG_X86_32
	if (apic->irq_dest_mode == 1) {
	if (apic->dest_mode_logical) {
		int logical_apicid, ldr_apicid;

		/*
+2 −2
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ static struct apic apic_flat __ro_after_init = {
	.apic_id_registered		= flat_apic_id_registered,

	.delivery_mode			= APIC_DELIVERY_MODE_FIXED,
	.irq_dest_mode			= 1, /* logical */
	.dest_mode_logical		= true,

	.disable_esr			= 0,

@@ -205,7 +205,7 @@ static struct apic apic_physflat __ro_after_init = {
	.apic_id_registered		= flat_apic_id_registered,

	.delivery_mode			= APIC_DELIVERY_MODE_FIXED,
	.irq_dest_mode			= 0, /* physical */
	.dest_mode_logical		= false,

	.disable_esr			= 0,

+1 −3
Original line number Diff line number Diff line
@@ -96,8 +96,7 @@ struct apic apic_noop __ro_after_init = {
	.apic_id_registered		= noop_apic_id_registered,

	.delivery_mode			= APIC_DELIVERY_MODE_FIXED,
	/* logical delivery broadcast to all CPUs: */
	.irq_dest_mode			= 1,
	.dest_mode_logical		= true,

	.disable_esr			= 0,

@@ -105,7 +104,6 @@ struct apic apic_noop __ro_after_init = {
	.init_apic_ldr			= noop_init_apic_ldr,
	.ioapic_phys_id_map		= default_ioapic_phys_id_map,
	.setup_apic_routing		= NULL,

	.cpu_present_to_apicid		= default_cpu_present_to_apicid,
	.apicid_to_cpu_present		= physid_set_mask_of_physid,

+2 −2
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ static const struct apic apic_numachip1 __refconst = {
	.apic_id_registered		= numachip_apic_id_registered,

	.delivery_mode			= APIC_DELIVERY_MODE_FIXED,
	.irq_dest_mode			= 0, /* physical */
	.dest_mode_logical		= false,

	.disable_esr			= 0,

@@ -294,7 +294,7 @@ static const struct apic apic_numachip2 __refconst = {
	.apic_id_registered		= numachip_apic_id_registered,

	.delivery_mode			= APIC_DELIVERY_MODE_FIXED,
	.irq_dest_mode			= 0, /* physical */
	.dest_mode_logical		= false,

	.disable_esr			= 0,

Loading