From owner-svn-src-all@freebsd.org Fri Oct 12 15:51:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A76810C2691; Fri, 12 Oct 2018 15:51:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41AF28979C; Fri, 12 Oct 2018 15:51:42 +0000 (UTC) (envelope-from br@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CA1421818; Fri, 12 Oct 2018 15:51:42 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9CFpgHp009377; Fri, 12 Oct 2018 15:51:42 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9CFpgLC009376; Fri, 12 Oct 2018 15:51:42 GMT (envelope-from br@FreeBSD.org) Message-Id: <201810121551.w9CFpgLC009376@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 12 Oct 2018 15:51:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339332 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 339332 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2018 15:51:42 -0000 Author: br Date: Fri Oct 12 15:51:41 2018 New Revision: 339332 URL: https://svnweb.freebsd.org/changeset/base/339332 Log: Initialize interrupt priority to 0 on all sources. Without this hardware raises an interrupt regardless of any pending bits set. This fixes operation on RocketChip and derivatives (e.g. lowRISC). Approved by: re (kib) Sponsored by: DARPA, AFRL Modified: head/sys/riscv/riscv/plic.c Modified: head/sys/riscv/riscv/plic.c ============================================================================== --- head/sys/riscv/riscv/plic.c Fri Oct 12 15:30:15 2018 (r339331) +++ head/sys/riscv/riscv/plic.c Fri Oct 12 15:51:41 2018 (r339332) @@ -218,6 +218,7 @@ plic_attach(device_t dev) if (error != 0) return (error); + WR4(sc, PLIC_PRIORITY(irq), 0); WR4(sc, PLIC_ENABLE(irq, cpu), 0); } WR4(sc, PLIC_THRESHOLD(cpu), 0);