From nobody Wed Feb 08 20:52:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PBsd25jjQz3pHBl; Wed, 8 Feb 2023 20:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PBsd25CCZz3Qhj; Wed, 8 Feb 2023 20:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675889542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hf5CHiHONhyYDzipSrXK5wV5V0a0rzdChCwd5V5vIlk=; b=IPwWN4zVYT4ZFhwDpce0Ysvx3FLHmWz51rfwmkfF6LdxeyDOfzzl3HMYAP974K+n7UHAFl oTr8rtHOs0Oe43gOR3DtrQWPzU/W4QNrAG6SjwO6A3smcmYSWZPiDFaH7BOjSpQMz/hhHL cjzINDjKvezEj4QNkICYXNCOyD/AaKHslw5hRhc7swu3QPKnRYs3qhIYFSIDjD8F9yPE4J s0aSJ9PHLw88MyjtKNpaJzHjUTVT1A+hPmeAbIEDDanRaDNlO4TxBZIGKcoJBpUeLFhB4f 87AiBTMTM2a713M9DEzqpGoaqx9jpqftHdGS1V/jxAjxPNkK34aVcFZRO542NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675889542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hf5CHiHONhyYDzipSrXK5wV5V0a0rzdChCwd5V5vIlk=; b=Ib3JGOK9ssNe79Blmy2L56pheC/NaKnhQnfcXvnDcEwFGPVRrRWYxGnHX/uHJ5i0kaFLIK JloHzBcWxoMBzMeyA+vKuiPDwVNSbqwZ8XdLkqdkrGGhCSifjaFQZkDkKvTkAYjwnkeQly QJY9vTHs2KaV4jxSbtki3h3/Har3Dejq1z7YTbEbmmxYf2OtiYflaWwZMaE4m3GjNy33La TNS+hWfU1oqJPin6NBSxmoBClK6HnyF8OOsKHN7h7vYiKN5jCqKZMM7ul10ePjNKXSPyAR o2EA1fcJcE5EbUP4vHKgnj1t7vlArPypgYR8JmBTGvqtb41sr5QYfuNJn4q9zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675889542; a=rsa-sha256; cv=none; b=FuZRuiDxxGj+L+ImGrZ3n+ADgieAdXqTkNnD8fAYEt7d8FVK1DiRjym1BUyZ7ijQm1d1bA sQImqB//yRz2ubLIhm0dNfSQGD/nnP6pHgXQPe/Hqz6TTBa4axPdCHupMHIdpNVS8j4hsV 4kzIG7u7tdY9haBX3PtdXPkdnyHlk4SKv4krrTDUqSTLybJYouNgVQrZg+w57bGvh9vW4p hle+zIfzhfuMQeFZ/7uw+yhud8tEqYVGPzHjtFxl/m2rzcUvP7YMC61k54E6u0YE3Juzlj bjVkfzkvEQrFrNJBbfCte3V7dxQoGdx5E+YPta7fC6Sd9sRBOash9vYtOecMdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PBsd24Fy6z19kQ; Wed, 8 Feb 2023 20:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 318KqMcV052426; Wed, 8 Feb 2023 20:52:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 318KqMoS052425; Wed, 8 Feb 2023 20:52:22 GMT (envelope-from git) Date: Wed, 8 Feb 2023 20:52:22 GMT Message-Id: <202302082052.318KqMoS052425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 1d03c3578d05 - main - arm: add an interrupt rman to nexus List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d03c3578d05b011dc714ec0735a5783c421530b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1d03c3578d05b011dc714ec0735a5783c421530b commit 1d03c3578d05b011dc714ec0735a5783c421530b Author: Mitchell Horne AuthorDate: 2021-12-05 15:27:50 +0000 Commit: Mitchell Horne CommitDate: 2023-02-08 20:50:46 +0000 arm: add an interrupt rman to nexus Allow the nexus bus to own and manage interrupt resources. Currently, interrupt resources on this architecture are managed completely by ofwbus, but it is desirable that system-wide memory and interrupt resources be managed by the top-level bus. This is a pre-requisite to moving this resource management out of ofwbus. Reviewed By: ian, Elliott Mitchell MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D32357 --- sys/arm/arm/nexus.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index bc91becce6e0..81500f9b8e35 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -77,6 +77,7 @@ struct nexus_device { #define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev)) static struct rman mem_rman; +static struct rman irq_rman; static int nexus_probe(device_t); static int nexus_attach(device_t); @@ -171,6 +172,12 @@ nexus_attach(device_t dev) if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR)) panic("nexus_probe mem_rman"); + irq_rman.rm_start = 0; + irq_rman.rm_end = ~0; + irq_rman.rm_type = RMAN_ARRAY; + irq_rman.rm_descr = "Interrupts"; + if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0)) + panic("nexus_attach irq_rman"); /* * First, deal with the children we know about already @@ -227,6 +234,10 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, flags &= ~RF_ACTIVE; switch (type) { + case SYS_RES_IRQ: + rm = &irq_rman; + break; + case SYS_RES_MEMORY: case SYS_RES_IOPORT: rm = &mem_rman;