From nobody Wed Oct 30 18:21:00 2024 X-Original-To: dev-commits-src-main@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 4XdwRc5sDSz5bnjn; Wed, 30 Oct 2024 18:21:00 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XdwRc4slQz4NTV; Wed, 30 Oct 2024 18:21:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730312460; 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=o9WLCTXrn4E8XfRAIUTUNWEs65oo3P/IHZ/pkvFYVZI=; b=k8t1hwmrdXekMOmUEjzUNjxjBoXMnsK/wZb8ay+tuxygWUj6V8aAHsoIrRhQ73ab2cXDgz tAq9nm/w6klLiAjvCvcleeCLjkTH3ccNLH173R570T/sdDuCNRL58MA1eS1gt3OQe71yjH XoECRMMx+Wvl0bKet2SEW4M1Od2DWNK0yePP2yR8g2euGOcjisqf/f6uiWuYfE0XlkYaOx 6pKnoEbGgnynLa+GbjSyElTLTnooLvrYmKJjCcsU4pqGIQZYu2DCMquP56j8rjKGGCaJmg ya+i+7pTKkEpQjnSIJLMcU5nlCMFViUi8HnQzFV0Jy8fSPFM4ydMzPIoPuqHcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730312460; 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=o9WLCTXrn4E8XfRAIUTUNWEs65oo3P/IHZ/pkvFYVZI=; b=DD7KCa4BMZhoa1wqekCFbNy6pdP2301DOHbi/oFXwHvJpAIQi/cdyTGRAleQqISdql1zQ3 fdGvN+DOG1cuOIbVm8Y/weqth9R4zRI1PybP65t1SGoi9kaIVs7goHNFv56x7CN/qcgmBX 9aO7lfYa0x+rXZjMN/NlHG1umLhlEXo51+Abj52Wp+9zjrtIrLA5rsRSxaDoRNZliQZlgG 2C3ZVAFEXWS49Bk3bVpJvuPGZLo7eFxu0WodkHaCCGQ+g7leA4YbnxxLn0JCEZ4uVrMHF2 GAetZA8VHdauW8g3nf89xsMnRZ4HXZ7gcZqKurQbMmM8J3nqiy57NGDNmdAVCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730312460; a=rsa-sha256; cv=none; b=ocxGaszXEYBtwl7hqcvhHmbP52iExbrd4R27PfUHPrGMLLcKUw/fj9W2d1/up32zDy60IG WY2I8J+gguvrsNo7EGvAEVR3sDXQFX2dGQqk7PS5tcwMbwwa/VZKfs1a7olMO+9OBI6o1r 9Q+6T3Q5NnLua2dFEfKyyxr6sElPK/r0TR0pECs0dPjlPP+PMOFBaDsNPYGOyNovyzUTam UmYiT6Me1fKxiiHLc+nqgc/eTsOZi+DUK3k+7f2iS2f1H1MPDQ1qJushKDUGwXqIswo+Pg OoRUQt1qUXu6bPngVoCeX4k84cfnUJx9uELVm4I7yK573/WzVuDGcM6QjX8mvQ== 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 4XdwRc4SVvz1Hgp; Wed, 30 Oct 2024 18:21:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49UIL0P0048839; Wed, 30 Oct 2024 18:21:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49UIL0mY048836; Wed, 30 Oct 2024 18:21:00 GMT (envelope-from git) Date: Wed, 30 Oct 2024 18:21:00 GMT Message-Id: <202410301821.49UIL0mY048836@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: 5050fdb6b60e - main - plic: tweak macro argument names List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 5050fdb6b60e98e78c093f69b679d33fb9f5effd Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5050fdb6b60e98e78c093f69b679d33fb9f5effd commit 5050fdb6b60e98e78c093f69b679d33fb9f5effd Author: Mitchell Horne AuthorDate: 2024-10-30 18:16:28 +0000 Commit: Mitchell Horne CommitDate: 2024-10-30 18:16:28 +0000 plic: tweak macro argument names Be clearer in the intention. 'h' implies a hart ID, but these take logical CPU IDs instead. 'n' is acceptable, but '_irq' is clearer. Reviewed by: br MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47133 --- sys/riscv/riscv/plic.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/riscv/riscv/plic.c b/sys/riscv/riscv/plic.c index 5280ec0bb333..7ae68c00d78a 100644 --- a/sys/riscv/riscv/plic.c +++ b/sys/riscv/riscv/plic.c @@ -63,13 +63,13 @@ #define PLIC_CONTEXT_THRESHOLD 0x0U #define PLIC_CONTEXT_CLAIM 0x4U -#define PLIC_PRIORITY(n) (PLIC_PRIORITY_BASE + (n) * sizeof(uint32_t)) -#define PLIC_ENABLE(sc, n, h) \ - (sc->contexts[h].enable_offset + ((n) / 32) * sizeof(uint32_t)) -#define PLIC_THRESHOLD(sc, h) \ - (sc->contexts[h].context_offset + PLIC_CONTEXT_THRESHOLD) -#define PLIC_CLAIM(sc, h) \ - (sc->contexts[h].context_offset + PLIC_CONTEXT_CLAIM) +#define PLIC_PRIORITY(_irq) (PLIC_PRIORITY_BASE + (_irq) * sizeof(uint32_t)) +#define PLIC_ENABLE(_sc, _irq, _cpu) \ + (_sc->contexts[_cpu].enable_offset + ((_irq) / 32) * sizeof(uint32_t)) +#define PLIC_THRESHOLD(_sc, _cpu) \ + (_sc->contexts[_cpu].context_offset + PLIC_CONTEXT_THRESHOLD) +#define PLIC_CLAIM(_sc, _cpu) \ + (_sc->contexts[_cpu].context_offset + PLIC_CONTEXT_CLAIM) static pic_disable_intr_t plic_disable_intr; static pic_enable_intr_t plic_enable_intr;