mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@linaro.org>
To: linux-kernel@vger.kernel.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: [PATCH v2 11/11] irqdomain: Include hwirq number in /proc/interrupts
Date: Fri, 14 Jun 2013 22:08:06 +0100	[thread overview]
Message-ID: <1371244086-9189-12-git-send-email-grant.likely@linaro.org> (raw)
In-Reply-To: <1371244086-9189-1-git-send-email-grant.likely@linaro.org>

From: Grant Likely <grant.likely@secretlab.ca>

Add the hardware interrupt number to the output of /proc/interrupts.
It is often important to have access to the hardware interrupt number because
it identifies exactly how an interrupt signal is wired up to the interrupt
controller.  This is especially important when using irq_domains since irq
numbers get dynamically allocated in that case, and have no relation to the
actual hardware number.

Note: This output is currently conditional on whether or not the irq_domain
pointer is set; however hwirq could still be used without irq_domain.  It
may be worthwhile to always output the hwirq number regardless of the
domain pointer.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Olof Johansson <olof@lixom.net>
Cc: Ben Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/irq/proc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 19ed5c4..36f6ee1 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -462,6 +462,8 @@ int show_interrupts(struct seq_file *p, void *v)
 	} else {
 		seq_printf(p, " %8s", "None");
 	}
+	if (desc->irq_data.domain)
+		seq_printf(p, " %*d", prec, (int) desc->irq_data.hwirq);
 #ifdef CONFIG_GENERIC_IRQ_SHOW_LEVEL
 	seq_printf(p, " %-8s", irqd_is_level_type(&desc->irq_data) ? "Level" : "Edge");
 #endif
-- 
1.8.1.2


      parent reply	other threads:[~2013-06-14 21:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-14 21:07 [PATCH v2 00/11] irqdomain: Refactor Grant Likely
2013-06-14 21:07 ` [PATCH v2 01/11] irqdomain: Relax failure path on setting up mappings Grant Likely
2013-06-14 21:07 ` [PATCH v2 02/11] irqdomain: Replace LEGACY mapping with LINEAR Grant Likely
2013-06-14 21:07 ` [PATCH v2 03/11] irqdomain: Add a name field Grant Likely
2013-06-14 21:07 ` [PATCH v2 04/11] irqdomain: merge linear and tree reverse mappings Grant Likely
2013-06-14 21:08 ` [PATCH v2 05/11] irqdomain: Eliminate revmap type Grant Likely
2013-06-14 21:08 ` [PATCH v2 06/11] irqdomain: Clean up aftermath of irq_domain refactoring Grant Likely
2013-06-14 21:08 ` [PATCH v2 07/11] irqdomain: Beef up debugfs output Grant Likely
2013-06-14 21:08 ` [PATCH v2 08/11] irqdomain: Refactor irq_domain_associate_many() Grant Likely
2013-06-18  1:20   ` Michael Neuling
2013-06-18  1:25     ` Michael Neuling
2013-06-18  1:37       ` Stephen Rothwell
2013-06-18  9:05       ` Grant Likely
2013-06-18  9:46         ` Grant Likely
2013-06-18 11:04           ` Michael Neuling
2013-06-18 12:13             ` Grant Likely
2013-06-14 21:08 ` [PATCH v2 09/11] irqdomain: remove irq_domain_generate_simple() Grant Likely
2013-06-14 21:08 ` [PATCH v2 10/11] irqdomain: make irq_linear_revmap() a fast path again Grant Likely
2013-06-14 21:08 ` Grant Likely [this message]

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=1371244086-9189-12-git-send-email-grant.likely@linaro.org \
    --to=grant.likely@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®