vdevice.c (255927) | vdevice.c (256994) |
---|---|
1/*- 2 * Copyright (c) 2011 Nathan Whitehorn 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2011 Nathan Whitehorn 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/powerpc/pseries/vdevice.c 255927 2013-09-28 15:46:03Z nwhitehorn $"); | 28__FBSDID("$FreeBSD: head/sys/powerpc/pseries/vdevice.c 256994 2013-10-23 17:24:21Z nwhitehorn $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34#include <sys/malloc.h> 35#include <sys/bus.h> 36#include <sys/cpu.h> --- 114 unchanged lines hidden (view full) --- 151 sizeof(iparent)) <= 0) 152 iparent = -1; 153 nintr = OF_getprop_alloc(child, "interrupts", sizeof(*intr), 154 (void **)&intr); 155 if (nintr > 0) { 156 for (i = 0; i < nintr; i += icells) { 157 u_int irq = intr[i]; 158 if (iparent != -1) | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34#include <sys/malloc.h> 35#include <sys/bus.h> 36#include <sys/cpu.h> --- 114 unchanged lines hidden (view full) --- 151 sizeof(iparent)) <= 0) 152 iparent = -1; 153 nintr = OF_getprop_alloc(child, "interrupts", sizeof(*intr), 154 (void **)&intr); 155 if (nintr > 0) { 156 for (i = 0; i < nintr; i += icells) { 157 u_int irq = intr[i]; 158 if (iparent != -1) |
159 irq = MAP_IRQ(iparent, intr[i]); | 159 irq = ofw_bus_map_intr(dev, iparent, 160 intr[i]); |
160 161 resource_list_add(&dinfo->mdi_resources, 162 SYS_RES_IRQ, i, irq, irq, i); 163 } 164 } 165 166 cdev = device_add_child(dev, NULL, -1); 167 if (cdev == NULL) { --- 65 unchanged lines hidden --- | 161 162 resource_list_add(&dinfo->mdi_resources, 163 SYS_RES_IRQ, i, irq, irq, i); 164 } 165 } 166 167 cdev = device_add_child(dev, NULL, -1); 168 if (cdev == NULL) { --- 65 unchanged lines hidden --- |