kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Chan Kim <ckim@etri.re.kr>
Cc: kernelnewbies@kernelnewbies.org,
	'qemu-discuss' <qemu-discuss@nongnu.org>
Subject: Re: Can't understand /proc/interrupts output for GICv3 case
Date: Mon, 11 Apr 2022 14:49:31 +0200	[thread overview]
Message-ID: <YlQj28enkHjZM2J5@kroah.com> (raw)
In-Reply-To: <06c401d84da0$bc1a5ca0$344f15e0$@etri.re.kr>

On Mon, Apr 11, 2022 at 09:36:14PM +0900, Chan Kim wrote:
> Hi, 
> nobody's replying to my question.. so sad..
> I found the kernel makes an array (actually a radix tree) of 'irq_desc's. 
> And my hwirq (SPI 15) is assigned to one of these irq_descs while processing
> device tree.
> In my case it was assigned irq 6 (this irq is what is called virtual irq).
> So I registered the handler by request_irq(6,...) and the interrupt works
> fine.
> So now my question is : how can find my irq number (correct irq_desc number)
> in kernel driver module?

You ask the system for it.  It depends on the bus type your driver is
written for for how to do this.

For example, if you have a platform driver, you would call
platform_get_irq().  If you are a pci driver, the irq for your device is
already stored in the pci device structure passed into your probe
function.

What bus type is your driver written for?

hope this helps,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2022-04-11 12:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  4:53 Can't understand /proc/interrupts output for GICv3 case Chan Kim
2022-04-11 12:36 ` Chan Kim
2022-04-11 12:49   ` Greg KH [this message]
2022-04-11 13:13     ` Chan Kim
2022-04-11 13:34       ` 'Greg KH'
2022-04-11 14:15         ` Chan Kim
2022-04-11 14:26           ` 'Greg KH'
2022-04-12  2:18             ` Chan Kim
2022-04-12  4:50               ` 'Greg KH'
2022-04-12  4:54                 ` Chan Kim
2022-04-12  6:51                   ` Chan Kim
2022-04-12 10:14                     ` 'Greg KH'
2022-04-11 14:32           ` Peter Maydell
2022-04-11 14:49             ` Greg KH
2022-04-11 14:58               ` Peter Maydell
2022-04-11 14:59               ` Ozgur Karatas
2022-04-11 14:53           ` Ozgur Karatas
2022-04-12  2:43             ` Chan Kim
2022-04-12  7:14               ` Ozgur Karatas
2022-04-12  7:22                 ` Chan Kim
2022-04-12  7:29                   ` Ozgur Karatas
2022-04-11 13:09   ` Ozgur Kara
2022-04-11 13:16     ` Chan Kim
2022-04-11 13:28       ` Ozgur Kara

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=YlQj28enkHjZM2J5@kroah.com \
    --to=greg@kroah.com \
    --cc=ckim@etri.re.kr \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=qemu-discuss@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).