]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[SPARC64]: Use sun4v VIRQ interfaces as intended.
authorDavid S. Miller <davem@sunset.davemloft.net>
Sun, 14 Oct 2007 04:51:37 +0000 (21:51 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 14 Oct 2007 04:53:16 +0000 (21:53 -0700)
commitb80e6998120eecec00781658bc43702494117ea8
tree7923d42de2f1248549b0cb35900953b78b570caf
parent10397e4069bbcc8219537e7c1e0d6a6935432156
[SPARC64]: Use sun4v VIRQ interfaces as intended.

We were simply concatenating the devhandle and devino and using that
as the cookie, which defeats the entire purpose of the VIRQ hypervisor
interfaces.

Now that we use physical addresses for the INO buckets, we can
allocate them dynamically for VIRQs and encode the cookies as
~__pa(bucket).  This allows us to test for and decode the cookie with
a simple:

brlz $reg1, 1f
 xnor $reg1, %g0, $reg2

sequence.

This works because bit 64 is never set in traditional
INO vectors, and it is also never set in a physical
address.  So xnor'ing the physical address of the bucket
always gives us a negative number, and thus a unique
condition we can test cheaply.

Inspired by ideas from Greg Onufer.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/sun4v_ivec.S