From owner-svn-src-head@freebsd.org Fri Apr 8 15:48:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B099B081B5; Fri, 8 Apr 2016 15:48:12 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E93F31642; Fri, 8 Apr 2016 15:48:11 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u38FmBBa068873; Fri, 8 Apr 2016 15:48:11 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u38FmBRM068872; Fri, 8 Apr 2016 15:48:11 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <201604081548.u38FmBRM068872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Fri, 8 Apr 2016 15:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297720 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2016 15:48:12 -0000 Author: sgalabov Date: Fri Apr 8 15:48:10 2016 New Revision: 297720 URL: https://svnweb.freebsd.org/changeset/base/297720 Log: Fix MIPS INTRNG omissions, add soft/hard interrupts with different names Reviewed by: kan Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D5888 Modified: head/sys/mips/mips/mips_pic.c Modified: head/sys/mips/mips/mips_pic.c ============================================================================== --- head/sys/mips/mips/mips_pic.c Fri Apr 8 15:43:49 2016 (r297719) +++ head/sys/mips/mips/mips_pic.c Fri Apr 8 15:48:10 2016 (r297720) @@ -134,13 +134,6 @@ pic_irq_mask(struct mips_pic_softc *sc, mips_wr_status(mips_rd_status() & ~((1 << irq) << 8)); } -#ifdef SMP -static void -mips_pic_init_secondary(device_t dev) -{ -} -#endif /* SMP */ - static inline intptr_t pic_xref(device_t dev) { @@ -155,23 +148,30 @@ static int mips_pic_register_isrcs(struct mips_pic_softc *sc) { int error; - uint32_t irq, i; + uint32_t irq, i, tmpirq; struct intr_irqsrc *isrc; - const char *name; + char *name; - name = device_get_nameunit(sc->pic_dev); for (irq = 0; irq < sc->nirqs; irq++) { sc->pic_irqs[irq].irq = irq; sc->pic_irqs[irq].res = rman_reserve_resource(&sc->pic_irq_rman, irq, irq, 1, RF_ACTIVE, sc->pic_dev); if (sc->pic_irqs[irq].res == NULL) { device_printf(sc->pic_dev, - "%s failed to alloc resource for irq %d", + "%s failed to alloc resource for irq %u", __func__, irq); return (ENOMEM); } isrc = PIC_INTR_ISRC(sc, irq); - error = intr_isrc_register(isrc, sc->pic_dev, 0, "%s", name); + if (irq < NSOFT_IRQS) { + name = "sint"; + tmpirq = irq; + } else { + name = "int"; + tmpirq = irq - NSOFT_IRQS; + } + error = intr_isrc_register(isrc, sc->pic_dev, 0, "%s%u", + name, tmpirq); if (error != 0) { for (i = 0; i < irq; i++) { intr_isrc_deregister(PIC_INTR_ISRC(sc, i));