On 09/04/2011 04:41 PM, Anthony Liguori wrote:
See it as you like, but we need the support, not only for device
assigment. And I do not see any gain it hacking this instead of
designing it.
You can design a hack but it's still a hack.
Device state belongs in devices. Trying to extract device state
(interrupt routing paths) and externalizing it is by definition a hack.
Pet peeve - saying something is "by definition" a hack is just rhetoric
unless the definition of device state is "something that cannot be
extracted and externalized". Let's avoid this.
In fact it's exactly what we do with the memory API. Memory routing is
part of device state, yet we expose it to the memory API and let it do
its thing instead of going through the hierarchy on every single memory
access.
Whether it's worthwhile to do this for interrupts as well depends on how
common the situation is and what we gain from it. We can only do this
if the routing is semi-static (depends only on other state but not the
actual interrupt) - probably the only exception to this is the "least
priority" mode which means the last leg cannot be computed statically.
I agree the gain is low if we limit ourselves to 440fx, but if we add
interrupt remapping it becomes considerably more complicated to do this
backward path computation.
--
error compiling committee.c: too many arguments to function