From: Olga Kitaina <okitain@elvees.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Marc Zyngier <maz@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: irqchip: Figuring out utility of hierarchy irqdomain
Date: Thu, 16 Jan 2020 18:50:55 +0300 [thread overview]
Message-ID: <b27626dc-dad7-b19c-dcfd-f3668c5e5be6@elvees.com> (raw)
Hi, I'm looking to implement an interrupt controller (referred to here
as QLIC) that is based on the RISC-V PLIC (see
drivers/irqchip/irq-sifive-plic.c), with the difference that it's not
the root interrupt controller, but instead it is connected to a GIC.
The features of the controller are as follows:
* A cluster of DSPs serve as interrupt sources to QLIC, each DSP with
several interrupt lines going to QLIC.
* Several interrupt lines (documented as TARGET_x) go from QLIC to the GIC.
* Sources are mapped to targets by way of writing a mask of allowed
sources in the TARG_x_ENABLE register.
* The source of an interrupt mapped to TARGET_x can be determined by
reading from register TARG_x_CC. Writing the number of the source to
TARG_x_CC masks the interrupt.
* To mask all interrupts corresponding to TARGET_x, TARG_x_CC must be
read repeatedly, with the values written back after the source interrupt
is handled.
* Source numbers start from 1, 0 is a special case in TARG_x_CC - it
corresponds to "no interrupt", and writing 0 to the register does nothing.
I am not yet well-acquainted with the irq subsystem, which means I am
not sure what kind of APIs I need to use. This is why I have a couple of
questions:
1. Do I understand correctly that using hierarchy irqdomain means that
the interrupt controller has to have a 1:1 mapping between inputs and
outputs?
2. Is a chained handler necessary for this setup, e.g. handling 0 in
TARG_x_CC?
--
Regards,
Olga
next reply other threads:[~2020-01-16 16:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 15:50 Olga Kitaina [this message]
2020-01-25 12:02 ` Marc Zyngier
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=b27626dc-dad7-b19c-dcfd-f3668c5e5be6@elvees.com \
--to=okitain@elvees.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@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®