All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai.lu@oracle.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/5] x86, ioapic: Seperate print_IO_APIC() to only print one io apic
Date: Wed, 12 Oct 2011 00:33:39 -0700	[thread overview]
Message-ID: <4E9542D3.5000008@oracle.com> (raw)
In-Reply-To: <4E33334D.1030007@kernel.org>

It is getting too big after interrupt remaping entries debug print out
was added.

Original print_IO_APIC become print_IO_APICs.
New print_IO_APIC will only print one ioapic registers

It will make checpatch.pl happy with removing indent warning..

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

---
 arch/x86/kernel/apic/io_apic.c |   46 +++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 22 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
@@ -1512,30 +1512,14 @@ static void __init setup_timer_IRQ0_pin(
 	ioapic_write_entry(apic_id, pin, entry);
 }
 
-
-__apicdebuginit(void) print_IO_APIC(void)
+__apicdebuginit(void) print_IO_APIC(int apic)
 {
-	int apic, i;
+	int i;
 	union IO_APIC_reg_00 reg_00;
 	union IO_APIC_reg_01 reg_01;
 	union IO_APIC_reg_02 reg_02;
 	union IO_APIC_reg_03 reg_03;
 	unsigned long flags;
-	struct irq_cfg *cfg;
-	unsigned int irq;
-
-	printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
-	for (i = 0; i < nr_ioapics; i++)
-		printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n",
-		       mpc_ioapic_id(i), ioapics[i].nr_registers);
-
-	/*
-	 * We are a bit conservative about what we expect.  We have to
-	 * know about every hardware change ASAP.
-	 */
-	printk(KERN_INFO "testing the IO APIC.......................\n");
-
-	for (apic = 0; apic < nr_ioapics; apic++) {
 
 	raw_spin_lock_irqsave(&ioapic_lock, flags);
 	reg_00.raw = io_apic_read(apic, 0);
@@ -1636,7 +1620,27 @@ __apicdebuginit(void) print_IO_APIC(void
 			);
 		}
 	}
-	}
+}
+
+__apicdebuginit(void) print_IO_APICs(void)
+{
+	int apic, i;
+	struct irq_cfg *cfg;
+	unsigned int irq;
+
+	printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
+	for (i = 0; i < nr_ioapics; i++)
+		printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n",
+		       mpc_ioapic_id(i), ioapics[i].nr_registers);
+
+	/*
+	 * We are a bit conservative about what we expect.  We have to
+	 * know about every hardware change ASAP.
+	 */
+	printk(KERN_INFO "testing the IO APIC.......................\n");
+
+	for (apic = 0; apic < nr_ioapics; apic++)
+		print_IO_APIC(apic);
 
 	printk(KERN_DEBUG "IRQ to pin mappings:\n");
 	for_each_active_irq(irq) {
@@ -1655,8 +1659,6 @@ __apicdebuginit(void) print_IO_APIC(void
 	}
 
 	printk(KERN_INFO ".................................... done.\n");
-
-	return;
 }
 
 __apicdebuginit(void) print_APIC_field(int base)
@@ -1850,7 +1852,7 @@ __apicdebuginit(int) print_ICs(void)
 		return 0;
 
 	print_local_APICs(show_lapic);
-	print_IO_APIC();
+	print_IO_APICs();
 
 	return 0;
 }

  parent reply	other threads:[~2011-10-12  7:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 15:31 [PATCH] x86, ioapic: Clean up ioapic/apic_id usage Yinghai Lu
2011-07-15 15:41 ` Bjorn Helgaas
2011-07-22 18:18   ` [PATCH 1/2] x86, ioapic: Print out irte with right ioapic index Yinghai Lu
2011-07-22 18:19     ` [PATCH 2/2] x86, ioapic: Clean up ioapic/apic_id usage Yinghai Lu
2011-07-25  7:29       ` Ingo Molnar
2011-07-25  7:28     ` [PATCH 1/2] x86, ioapic: Print out irte with right ioapic index Ingo Molnar
2011-07-29 22:33       ` [PATCH 0/5] x86, ioapic: Clean up ioapic idx and apic id usage Yinghai Lu
2011-10-12  7:32       ` [PATCH 0/5 resend] " Yinghai Lu
2011-10-12  9:47         ` Ingo Molnar
     [not found]       ` <4E33334D.1030007@kernel.org>
2011-07-29 22:34         ` [PATCH 1/5] x86, ioapic: Passing irq_attr struct pointer with setup_ioapic_irq() Yinghai Lu
2011-07-29 22:34         ` [PATCH 2/5] x86, ioapic: Split setup_ioapic_entry for interrupt remapped version Yinghai Lu
2011-07-29 22:34         ` [PATCH 3/5] x86, ioapic: Print out irte with right ioapic index Yinghai Lu
2011-07-29 22:34         ` [PATCH 4/5] x86, ioapic: Seperate print_IO_APIC() to only print one io apic Yinghai Lu
2011-07-29 22:34         ` [PATCH 5/5] x86, ioapic: Clean up ioapic/apic_id usage Yinghai Lu
2011-10-12  7:33         ` [PATCH 1/5] x86, ioapic: Passing irq_attr struct pointer with setup_ioapic_irq() Yinghai Lu
2011-10-12  7:33         ` [PATCH 2/5] x86, ioapic: Split setup_ioapic_entry for interrupt remapped version Yinghai Lu
2011-10-12  7:33         ` [PATCH 3/5] x86, ioapic: Print out irte with right ioapic index Yinghai Lu
2011-10-12  7:33         ` Yinghai Lu [this message]
2011-10-12  7:33         ` [PATCH 5/5] x86, ioapic: Clean up ioapic/apic_id usage Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E9542D3.5000008@oracle.com \
    --to=yinghai.lu@oracle.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nagananda.chumbalkar@hp.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.