x86, ioapic: Avoid writing io_apic id if already correct

For 32bit mptable path, setup_ids_from_mpc() always writes the io_apic
id register, even there is no change needed.

Skip the write, when readout and mptable match.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
LKML-Reference: <4CFDF785.7010401@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by Yinghai Lu and committed by Thomas Gleixner 60d79fd9 0450193b

+5 -2
+5 -2
arch/x86/kernel/apic/io_apic.c
··· 2007 2007 = mp_ioapics[apic_id].apicid; 2008 2008 2009 2009 /* 2010 - * Read the right value from the MPC table and 2011 - * write it into the ID register. 2010 + * Update the ID register according to the right value 2011 + * from the MPC table if they are different. 2012 2012 */ 2013 + if (mp_ioapics[apic_id].apicid == reg_00.bits.ID) 2014 + continue; 2015 + 2013 2016 apic_printk(APIC_VERBOSE, KERN_INFO 2014 2017 "...changing IO-APIC physical APIC ID to %d ...", 2015 2018 mp_ioapics[apic_id].apicid);