public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Don't write io_apic ID if it is not changed
@ 2010-08-14 20:38 Yinghai Lu
  2010-08-15  8:24 ` Cyrill Gorcunov
  2010-08-15 15:55 ` Eric W. Biederman
  0 siblings, 2 replies; 6+ messages in thread
From: Yinghai Lu @ 2010-08-14 20:38 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Andrew Morton,
	linux-kernel
  Cc: Suresh Siddha, Eric W. Biederman


For 32bit mptable path, setup_ids_from_mpc() always write io apic id
register, even there is no change needed.

So try to do that when they are different bewteen reading out and mptable

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/kernel/apic/io_apic.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -2125,7 +2125,6 @@ void __init setup_ioapic_ids_from_mpc(vo
 			physids_or(phys_id_present_map, phys_id_present_map, tmp);
 		}
 
-
 		/*
 		 * We need to adjust the IRQ routing table
 		 * if the ID changed.
@@ -2137,9 +2136,12 @@ void __init setup_ioapic_ids_from_mpc(vo
 						= mp_ioapics[apic_id].apicid;
 
 		/*
-		 * Read the right value from the MPC table and
-		 * write it into the ID register.
+		 * Update the ID register according to the right value from
+		 *  the MPC table if they are different.
 		 */
+		if (mp_ioapics[apic_id].apicid == reg_00.bits.ID)
+			continue;
+
 		apic_printk(APIC_VERBOSE, KERN_INFO
 			"...changing IO-APIC physical APIC ID to %d ...",
 			mp_ioapics[apic_id].apicid);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-16  9:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-14 20:38 [PATCH] x86: Don't write io_apic ID if it is not changed Yinghai Lu
2010-08-15  8:24 ` Cyrill Gorcunov
2010-08-15  8:30   ` Cyrill Gorcunov
2010-08-16  9:06     ` Cyrill Gorcunov
2010-08-15 15:55 ` Eric W. Biederman
2010-08-16  7:28   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox