#ifdef DDB #include <machine/db_machdep.h> #include <ddb/db_sym.h> #include <ddb/db_extern.h> #endif #ifdef RASTERCONSOLE #error options RASTERCONSOLE is obsolete for sparc64 - remove it from your config file #endif #include <dev/wsfb/genfbvar.h> #include "ksyms.h" struct evcnt intr_evcnts[] = { EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "spur"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev1"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev2"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev3"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev4"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev5"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev6"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev7"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev8"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev9"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "clock"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev11"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev12"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev13"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "prof"), EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "intr", "lev15")
{ PVR_405D5X2, 0xfffff000, "Xilinx Virtex 4 FX" }, { 0, 0, NULL } }; static int cpumatch(struct device *, struct cfdata *, void *); static void cpuattach(struct device *, struct device *, void *); CFATTACH_DECL(cpu, sizeof(struct device), cpumatch, cpuattach, NULL, NULL); int ncpus; struct cpu_info cpu_info[1] = { { /* XXX add more ci_ev_* as we teach 4xx about them */ .ci_ev_clock = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "cpu0", "clock"), .ci_ev_statclock = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "cpu0", "stat clock"), .ci_ev_softclock = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "cpu0", "soft clock"), .ci_ev_softnet = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "cpu0", "soft net"), .ci_ev_softserial = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "cpu0", "soft serial"), .ci_curlwp = &lwp0, } }; char cpu_model[80]; int cpufound = 0;
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> #include <machine/intr.h> static void avr32_def_cpu_intr(int, uint32_t, uint32_t); void (*cpu_intr)(int, uint32_t, uint32_t) = avr32_def_cpu_intr; const int *ipl2spl_table = NULL; struct evcnt avr32_clock_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "clock", "intr"); struct evcnt avr32_memerr_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "memerr", "intr"); ipl_cookie_t makeiplcookie(ipl_t ipl) { return (ipl_cookie_t){._spl = ipl2spl_table[ipl]}; } static void avr32_def_cpu_intr(int level, uint32_t sr, uint32_t pc) { panic("avr32_def_cpu_intr"); }
#include <machine/locore.h> #include <machine/psl.h> #include <machine/autoconf.h> #include <machine/machtype.h> #include <machine/sysconf.h> #include <dev/arcbios/arcbios.h> #include <dev/arcbios/arcbiosvar.h> static int cpu_match(device_t, cfdata_t, void *); static void cpu_attach(device_t, device_t, void *); void cpu_intr(int, vaddr_t, uint32_t); void *cpu_intr_establish(int, int, int (*func)(void *), void *); static struct evcnt mips_int0_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 0"); static struct evcnt mips_int1_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 1"); static struct evcnt mips_int2_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 2"); static struct evcnt mips_int3_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 3"); static struct evcnt mips_int4_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 4"); static struct evcnt mips_int5_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 5");
#include <uvm/uvm.h> #include <mips/cache.h> #ifdef _LP64 #include <mips/mips3_pte.h> #endif #include <mips/locore.h> const struct mips_bus_dmamap_ops mips_bus_dmamap_ops = _BUS_DMAMAP_OPS_INITIALIZER; const struct mips_bus_dmamem_ops mips_bus_dmamem_ops = _BUS_DMAMEM_OPS_INITIALIZER; const struct mips_bus_dmatag_ops mips_bus_dmatag_ops = _BUS_DMATAG_OPS_INITIALIZER; static struct evcnt bus_dma_creates = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "busdma", "creates"); static struct evcnt bus_dma_bounced_creates = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "busdma", "bounced creates"); static struct evcnt bus_dma_loads = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "busdma", "loads"); static struct evcnt bus_dma_bounced_loads = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "busdma", "bounced loads"); static struct evcnt bus_dma_read_bounces = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "busdma", "read bounces"); static struct evcnt bus_dma_write_bounces = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "busdma", "write bounces"); static struct evcnt bus_dma_bounced_unloads = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "busdma", "bounced unloads"); static struct evcnt bus_dma_unloads = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "busdma", "unloads"); static struct evcnt bus_dma_bounced_destroys =
struct pic_softc *pic_list[PIC_MAXPICS]; #if PIC_MAXPICS > 32 #error PIC_MAXPICS > 32 not supported #endif volatile uint32_t pic_blocked_pics; volatile uint32_t pic_pending_pics; volatile uint32_t pic_pending_ipls; struct intrsource *pic_sources[PIC_MAXMAXSOURCES]; struct intrsource *pic__iplsources[PIC_MAXMAXSOURCES]; struct intrsource **pic_iplsource[NIPL] = { [0 ... NIPL-1] = pic__iplsources, }; size_t pic_ipl_offset[NIPL+1]; size_t pic_sourcebase; static struct evcnt pic_deferral_ev = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "deferred", "intr"); EVCNT_ATTACH_STATIC(pic_deferral_ev); #ifdef __HAVE_PIC_SET_PRIORITY void pic_set_priority(struct cpu_info *ci, int newipl) { register_t psw = cpsid(I32_bit); if (pic_list[0] != NULL) (pic_list[0]->pic_ops->pic_set_priority)(pic_list[0], newipl); ci->ci_cpl = newipl; if ((psw & I32_bit) == 0) cpsie(I32_bit); } #endif
static int timer_jazzio_match(device_t , cfdata_t, void *); static void timer_jazzio_attach(device_t , device_t , void *); CFATTACH_DECL_NEW(timer_jazzio, 0, timer_jazzio_match, timer_jazzio_attach, NULL, NULL); /* Jazz timer access code */ static void timer_jazzio_init(device_t); struct timerfns timerfns_jazzio = { timer_jazzio_init, }; struct timer_jazzio_config *timer_jazzio_conf = NULL; struct evcnt timer_jazzio_ev = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "jazzio", "timer"); static int timer_jazzio_found = 0; static int timer_jazzio_match(device_t parent, cfdata_t cf, void *aux) { struct jazzio_attach_args *ja = aux; /* make sure that we're looking for this type of device. */ if (strcmp(ja->ja_name, "timer") != 0) return 0; if (timer_jazzio_found) return 0;
* relocated to a high address (0xffff0000). This is primarily * to support the Fast Context Switch Extension. * * This variable contains the address of the vector page. It * defaults to 0; it only needs to be initialized if we enable * relocated vectors. */ vaddr_t vector_page; #if defined(ARM_LOCK_CAS_DEBUG) /* * Event counters for tracking activity of the RAS-based _lock_cas() * routine. */ struct evcnt _lock_cas_restart = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "_lock_cas", "restart"); EVCNT_ATTACH_STATIC(_lock_cas_restart); struct evcnt _lock_cas_success = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "_lock_cas", "success"); EVCNT_ATTACH_STATIC(_lock_cas_success); struct evcnt _lock_cas_fail = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "_lock_cas", "fail"); EVCNT_ATTACH_STATIC(_lock_cas_fail); #endif /* ARM_LOCK_CAS_DEBUG */ /* * Clear registers on exec */
#include <machine/trap.h> #include <machine/promlib.h> #include <sparc/sparc/asm.h> #include <sparc/sparc/cpuvar.h> #if defined(MULTIPROCESSOR) && defined(DDB) #include <machine/db_machdep.h> #endif void *softnet_cookie; #if defined(MULTIPROCESSOR) void *xcall_cookie; /* Stats */ struct evcnt lev13_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR,0,"xcall","std"); struct evcnt lev14_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR,0,"xcall","fast"); EVCNT_ATTACH_STATIC(lev13_evcnt); EVCNT_ATTACH_STATIC(lev14_evcnt); #endif void strayintr __P((struct clockframe *)); #ifdef DIAGNOSTIC void bogusintr __P((struct clockframe *)); #endif void softnet __P((void *)); /* * Stray interrupt handler. Clear it if possible. * If not, and if we get 10 interrupts in 10 seconds, panic.
const struct cdevsw crl_cdevsw = { .d_open = crlopen, .d_close = crlclose, .d_read = crlrw, .d_write = crlrw, .d_ioctl = noioctl, .d_stop = nostop, .d_tty = notty, .d_poll = nopoll, .d_mmap = nommap, .d_kqfilter = nokqfilter, .d_discard = nodiscard, .d_flag = 0 }; struct evcnt crl_ev = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "crl", "intr"); EVCNT_ATTACH_STATIC(crl_ev); void crlattach(void) { scb_vecalloc(0xF0, crlintr, NULL, SCB_ISTACK, &crl_ev); } /*ARGSUSED*/ int crlopen(dev_t dev, int flag, int mode, struct lwp *l) { if (vax_cputype != VAX_8600) return (ENXIO); if (crltab.crl_state != CRL_IDLE)
struct in_multihashhead *in_multihashtbl; struct ifqueue ipintrq; ipid_state_t * ip_ids; uint16_t ip_id; percpu_t *ipstat_percpu; pfil_head_t *inet_pfil_hook; struct pool inmulti_pool; #ifdef INET_CSUM_COUNTERS #include <sys/device.h> struct evcnt ip_hwcsum_bad = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "inet", "hwcsum bad"); struct evcnt ip_hwcsum_ok = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "inet", "hwcsum ok"); struct evcnt ip_swcsum = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "inet", "swcsum"); #define INET_CSUM_COUNTER_INCR(ev) (ev)->ev_count++ EVCNT_ATTACH_STATIC(ip_hwcsum_bad); EVCNT_ATTACH_STATIC(ip_hwcsum_ok); EVCNT_ATTACH_STATIC(ip_swcsum); #else #define INET_CSUM_COUNTER_INCR(ev) /* nothing */
#define FWISO_WRITE 0x08 #define FWISO_NONBLOCK 0x10 size_t fd_uioprev; /* previous uio value: XXX really needed? */ }; struct fwiso_data fwiso_data_str[NFWISO]; static int fwiso_min_space[FWISO_MODE_MAX] = {1, 480, 488, 1}; static int fwiso_head_offset[FWISO_MODE_MAX] = {0, 8, 0, 0}; #define FWISO_MAX_INTERFACE 10 /* I hope all the elements of fwiso_interface is initialised as NULL */ static struct ieee1394_softc *fwiso_interface[FWISO_MAX_INTERFACE] = {NULL}; static struct evcnt fwiso_drop_ev = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "fwiso", "dropframe"); static struct evcnt fwiso_frame_ev = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, "fwiso", "frame"); void fwisoattach(int); static struct ieee1394_softc *fwiso_lookup_if(const char *); int fwisowrite_dv(struct fwiso_data *, struct uio *, int); static int fwiso_set_handler(struct fwiso_data *); dev_type_open(fwisoopen); dev_type_close(fwisoclose); dev_type_read(fwisoread); dev_type_write(fwisowrite); dev_type_ioctl(fwisoioctl); dev_type_poll(fwisopoll);
#include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> #include <uvm/uvm_extern.h> #include <machine/ctlreg.h> #include <machine/pte.h> #include <sparc/sparc/asm.h> #include <sparc/sparc/cache.h> #include <sparc/sparc/cpuvar.h> struct evcnt vcache_flush_pg = EVCNT_INITIALIZER(EVCNT_TYPE_INTR,0,"vcfl","pg"); EVCNT_ATTACH_STATIC(vcache_flush_pg); struct evcnt vcache_flush_seg = EVCNT_INITIALIZER(EVCNT_TYPE_INTR,0,"vcfl","seg"); EVCNT_ATTACH_STATIC(vcache_flush_seg); struct evcnt vcache_flush_reg = EVCNT_INITIALIZER(EVCNT_TYPE_INTR,0,"vcfl","reg"); EVCNT_ATTACH_STATIC(vcache_flush_reg); struct evcnt vcache_flush_ctx = EVCNT_INITIALIZER(EVCNT_TYPE_INTR,0,"vcfl","ctx"); EVCNT_ATTACH_STATIC(vcache_flush_ctx); struct evcnt vcache_flush_range = EVCNT_INITIALIZER(EVCNT_TYPE_INTR,0,"vcfl","rng"); EVCNT_ATTACH_STATIC(vcache_flush_range); int cache_alias_dist; /* Cache anti-aliasing constants */
#include <playstation2/ee/dmacreg.h> #include <playstation2/ee/dmacvar.h> #include <playstation2/ee/timervar.h> #ifdef INTR_DEBUG #include <playstation2/ee/gsvar.h> /* debug monitor */ #endif #ifdef DEBUG #define STATIC #else #define STATIC static #endif struct _playstation2_evcnt _playstation2_evcnt = { .clock = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "hard", "clock"), .sbus = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "hard", "sbus"), .dmac = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "hard", "dmac"), }; STATIC struct { u_int32_t sr, imask; } _sif_call_env; struct clockframe playstation2_clockframe; struct playstation2_soft_intr playstation2_soft_intrs[_IPL_NSOFT]; struct playstation2_soft_intrhand *softnet_intrhand; u_int32_t __icu_mask[_IPL_N]; /* interrupt mask of DMAC/INTC */ volatile u_int32_t md_imask;