From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michal Ostrowski <mostrows@watson.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [RFC/PATCH 0/8] Overhaul of virt IRQ configuration. / Kill ppc64_interrupt_controller.
Date: Wed, 31 May 2006 09:10:25 +1000 [thread overview]
Message-ID: <1149030626.9986.79.camel@localhost.localdomain> (raw)
In-Reply-To: <1149029585.6507.39.camel@brick>
> The fact that the allocation may be sparse does not mean it actually
> will be. As long as code expects arbitrary remappings it will have a
> degree of robustness; but that does not mean that the mechanism by which
> remappings are done cannot instantiate simple mappings. In other words,
> I'd like to see the concept of "irq offsets" being banished, but having
> re-mapping code be smart enough so that, for example, an MPIC that must
> deal with interrupt vectors 0..127 has these vectors made visible to the
> system at 16..143.
>
> I think that the current virt irq remapping algorithm would provide you
> with exactly this behavior.
The current virt irq remapper is not very efficient. It's especially
slow in the critical path of real -> virt translation which is probably
why xics locally has a radix tree version. I suppose we could generalize
that in a "better" remapper using both the array and the radix tree
though.
Offsets sounded like a simpler thing, specially for platforms that don't
need arbitrary remappings, and less code/memory hungry (embedded
platformns would like that for example).
> In cases where we have a struct device_node, the struct device_node
> should have a pointer to the PIC (or the PIC's device_node), and the
> raw, unmodified interrupt line values. When one wants to present an
> irq to generic code, we use the (PIC,line) information from the
> device_node to instantiate a virq.
>
> If there is no struct device_node, you still have to come up with a
> (PIC,line) pair in order to get a virq.
I won't add anything to struct device node. Only remove from it. The
device node is only used initially when binding a given device to an
irq, no need to "cache" that in the struct device node or whatever. The
generic code will provide means for walking the interrupt tree along the
lines I described to obtain a line,PIC pair, which will then be looked
up in a table of PICs so an offset can be obtained or a remapping of
the line into a global virq.
> virt_irq_create_mapping() (or whatever replaces it) should take the
> physical line and a PIC identifier/pointer as arguments so that it can
> inform the PIC about a mapping it has instantiated (in case we really
> have to make an arbitrary re-mapping) and so that it can try to
> instantiate an identity or offset-only translation if possible. In the
> latter case, the PIC object will tell the remapper what offset range to
> use.
Sounds over complicated to me.
> I think our thoughts on this differ only on the aspect of whether the
> remapper is considered to be an arbitrary remapper, a smart
> implementation of which results in IRQ being remapped via offsets,
> versus multi-level remapping, with offsets first followed by arbitrary
> remappings as necessary (and the distinction between offsets and
> arbitrary remapping being visible beyond the remapper function).
Beware of over engineering :)
Ben.
next prev parent reply other threads:[~2006-05-30 23:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-29 20:41 [RFC/PATCH 0/8] Overhaul of virt IRQ configuration. / Kill ppc64_interrupt_controller Michal Ostrowski
2006-05-29 20:42 ` [PATCH 3/8] Avoid use of ppc64_interrupt_controller mostrows
2006-05-29 20:42 ` [PATCH 4/8] " mostrows
2006-05-29 20:42 ` [PATCH 2/8] PIC discovery re-organization mostrows
2006-05-29 20:42 ` [PATCH 1/8] Formalize virtual-IRQ remapping configuration mostrows
2006-05-29 20:42 ` [PATCH 5/8] Avoid use of ppc64_interrupt_controller mostrows
2006-05-29 20:42 ` [PATCH 8/8] Kill the ppc64_interrupt_controller global symbol mostrows
2006-05-29 20:42 ` [PATCH 7/8] Cleaner checks for MPIC on pSeries mostrows
2006-05-29 20:50 ` Olof Johansson
2006-05-29 20:42 ` [PATCH 6/8] Avoid use of ppc64_interrupt_controller mostrows
2006-05-29 21:28 ` [RFC/PATCH 0/8] Overhaul of virt IRQ configuration. / Kill ppc64_interrupt_controller Benjamin Herrenschmidt
2006-05-29 23:08 ` Michal Ostrowski
2006-05-30 13:54 ` Michal Ostrowski
2006-05-30 22:13 ` Benjamin Herrenschmidt
2006-05-30 22:53 ` Michal Ostrowski
2006-05-30 23:10 ` Benjamin Herrenschmidt [this message]
2006-05-29 21:56 ` Paul Mackerras
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=1149030626.9986.79.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mostrows@watson.ibm.com \
/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).