mach_intr.c revision 1.4
11.4Sthorpej/* $NetBSD: mach_intr.c,v 1.4 2023/12/20 14:12:25 thorpej Exp $ */ 21.1Shikaru 31.1Shikaru/*- 41.1Shikaru * Copyright (c) 2001 The NetBSD Foundation, Inc. 51.1Shikaru * All rights reserved. 61.1Shikaru * 71.1Shikaru * This code is derived from software contributed to The NetBSD Foundation 81.1Shikaru * by Jason R. Thorpe. 91.1Shikaru * 101.1Shikaru * Redistribution and use in source and binary forms, with or without 111.1Shikaru * modification, are permitted provided that the following conditions 121.1Shikaru * are met: 131.1Shikaru * 1. Redistributions of source code must retain the above copyright 141.1Shikaru * notice, this list of conditions and the following disclaimer. 151.1Shikaru * 2. Redistributions in binary form must reproduce the above copyright 161.1Shikaru * notice, this list of conditions and the following disclaimer in the 171.1Shikaru * documentation and/or other materials provided with the distribution. 181.1Shikaru * 191.1Shikaru * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.1Shikaru * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.1Shikaru * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.1Shikaru * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.1Shikaru * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.1Shikaru * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.1Shikaru * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.1Shikaru * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.1Shikaru * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.1Shikaru * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.1Shikaru * POSSIBILITY OF SUCH DAMAGE. 301.1Shikaru */ 311.1Shikaru 321.1Shikaru/* 331.1Shikaru * Platform-specific interrupt support for the Alchemy parts. 341.1Shikaru * 351.1Shikaru * These boards just use the interrupt controller built into the 361.1Shikaru * Alchemy processors, so we just provide evbmips-compliant wrapper 371.1Shikaru * routines. 381.1Shikaru */ 391.1Shikaru 401.1Shikaru#include <sys/cdefs.h> 411.4Sthorpej__KERNEL_RCSID(0, "$NetBSD: mach_intr.c,v 1.4 2023/12/20 14:12:25 thorpej Exp $"); 421.1Shikaru 431.1Shikaru#include "opt_ddb.h" 441.1Shikaru 451.1Shikaru#include <sys/param.h> 461.1Shikaru#include <sys/bus.h> 471.2Smatt#include <sys/lwp.h> 481.1Shikaru#include <sys/device.h> 491.1Shikaru#include <sys/intr.h> 501.1Shikaru#include <sys/kernel.h> 511.1Shikaru#include <sys/systm.h> 521.1Shikaru 531.1Shikaru#include <mips/locore.h> 541.1Shikaru#include <mips/cavium/octeonvar.h> 551.1Shikaru 561.1Shikaruvoid 571.1Shikaruevbmips_intr_init(void) 581.1Shikaru{ 591.2Smatt octeon_intr_init(curcpu()); 601.1Shikaru} 611.1Shikaru 621.1Shikaruvoid 631.3Sskrllevbmips_iointr(int ipl, uint32_t ipending, struct clockframe *cf) 641.1Shikaru{ 651.1Shikaru 661.3Sskrll octeon_iointr(ipl, cf->pc, ipending); 671.1Shikaru} 68