sb_zbbus.c (202090) | sb_zbbus.c (203509) |
---|---|
1/*- 2 * Copyright (c) 2009 Neelkanth Natu 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 --- 23 unchanged lines hidden (view full) --- 32#include <sys/malloc.h> 33#include <sys/rman.h> 34 35#include <machine/resource.h> 36#include <machine/intr_machdep.h> 37 38#include "sb_scd.h" 39 | 1/*- 2 * Copyright (c) 2009 Neelkanth Natu 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 --- 23 unchanged lines hidden (view full) --- 32#include <sys/malloc.h> 33#include <sys/rman.h> 34 35#include <machine/resource.h> 36#include <machine/intr_machdep.h> 37 38#include "sb_scd.h" 39 |
40__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_zbbus.c 202090 2010-01-11 17:14:46Z imp $"); | 40__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_zbbus.c 203509 2010-02-05 03:20:47Z neel $"); |
41 42static MALLOC_DEFINE(M_INTMAP, "sb1250 intmap", "Sibyte 1250 Interrupt Mapper"); 43 44#define NUM_HARD_IRQS 6 45 46struct sb_intmap { 47 int intsrc; /* interrupt mapper register number (0 - 63) */ 48 int hardint; /* cpu interrupt from 0 to NUM_HARD_IRQS - 1 */ --- 64 unchanged lines hidden (view full) --- 113{ 114 struct sb_intmap *map; 115 116 KASSERT(intrnum >= 0 && intrnum < NUM_HARD_IRQS, 117 ("intrnum is out of range: %d", intrnum)); 118 119 map = sb_intmap_lookup(intrnum, dev, rid); 120 if (map) { | 41 42static MALLOC_DEFINE(M_INTMAP, "sb1250 intmap", "Sibyte 1250 Interrupt Mapper"); 43 44#define NUM_HARD_IRQS 6 45 46struct sb_intmap { 47 int intsrc; /* interrupt mapper register number (0 - 63) */ 48 int hardint; /* cpu interrupt from 0 to NUM_HARD_IRQS - 1 */ --- 64 unchanged lines hidden (view full) --- 113{ 114 struct sb_intmap *map; 115 116 KASSERT(intrnum >= 0 && intrnum < NUM_HARD_IRQS, 117 ("intrnum is out of range: %d", intrnum)); 118 119 map = sb_intmap_lookup(intrnum, dev, rid); 120 if (map) { |
121 sb_enable_intsrc(map->intsrc); | 121 sb_enable_intsrc(0, map->intsrc); |
122 } else { 123 /* 124 * In zbbus_setup_intr() we blindly call sb_intmap_activate() 125 * for every interrupt activation that comes our way. 126 * 127 * We might end up here if we did not "hijack" the SYS_RES_IRQ 128 * resource in zbbus_alloc_resource(). 129 */ --- 267 unchanged lines hidden --- | 122 } else { 123 /* 124 * In zbbus_setup_intr() we blindly call sb_intmap_activate() 125 * for every interrupt activation that comes our way. 126 * 127 * We might end up here if we did not "hijack" the SYS_RES_IRQ 128 * resource in zbbus_alloc_resource(). 129 */ --- 267 unchanged lines hidden --- |