diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-11-24 10:58:38 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-11-24 10:58:38 +0000 |
commit | 1c72c48003e4ee5bc8eeb93cd2fe1fc600e4927a (patch) | |
tree | a87bb1d746ecfbb032f351e667cc47d8199e3ef9 | |
parent | b999bee7415660762e25b184a67692aebfae7ab3 (diff) |
Use the pointer to "struct intrhand" as the vintr cookie.
-rw-r--r-- | sys/arch/sparc64/dev/cbus.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/sparc64/dev/cbus.c b/sys/arch/sparc64/dev/cbus.c index baed0994573..bc22f018820 100644 --- a/sys/arch/sparc64/dev/cbus.c +++ b/sys/arch/sparc64/dev/cbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cbus.c,v 1.11 2013/07/16 19:45:37 kettenis Exp $ */ +/* $OpenBSD: cbus.c,v 1.12 2014/11/24 10:58:37 kettenis Exp $ */ /* * Copyright (c) 2008 Mark Kettenis * @@ -124,17 +124,12 @@ cbus_intr_map(int node, int ino, uint64_t *sysino) { int parent; int reg; - int err; parent = OF_parent(node); if (OF_getprop(parent, "reg", ®, sizeof(reg)) != sizeof(reg)) return (-1); *sysino = CBUS_HANDLE(reg) | CBUS_INO(ino); - err = hv_vintr_setcookie(reg, ino, *sysino); - if (err != H_EOK) - return (-1); - return (0); } @@ -186,6 +181,12 @@ cbus_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, return (NULL); } + err = hv_vintr_setcookie(devhandle, devino, (vaddr_t)ih); + if (err != H_EOK) { + printf("hv_vintr_setcookie: %d\n", err); + return (NULL); + } + if (flags & BUS_INTR_ESTABLISH_MPSAFE) ih->ih_mpsafe = 1; |