From nobody Tue Jun 04 23:19:34 2024 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 4Vv64Q6l3Vz5MvPB; Tue, 04 Jun 2024 23:19:34 +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 4Vv64Q59V0z4F6k; Tue, 4 Jun 2024 23:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717543174; 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=A9XsId/jZ3uxCyyYTorIMkXKezLKeVBlObLcvZzrxOE=; b=S2sIYFpb3ubTBMJFD1QT4QK8wcEiZZvztGFxqLtZMaC0g/CGi+Bj0N9rxUnsH50EzchMUn QrWIsvntMiLeTu+ZyAbWRerrHyUjyGUMm9CWnURlsZg+iGzMK2daei7SuNbUOZ8WSp79hL c2Rga+d8pG9E7Ft+whsdo7UQUgeM7WxD+gZqjqLXSxr65R86T6KsBrK1MQQywtyhQKMDN0 O4yflnI7R3LEQC898MGBxkbCDdiJauRUgIGiv0+cnYyUghNvQBc6BNUxePlZsdwrObS8/o CWGS8pNswVMAMMpqdGUaGx/oCQf/R2pFSzTlbWX4h2t9zibtsesfsxRywh+I+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717543174; a=rsa-sha256; cv=none; b=wmJQih62wQVZcABdC5z8qxLfiIrnalTDeFXjsP6HDLC+cfoe2iVt2xOvXMKKfKuyncQx2b xi/DzGeDj3YLOslwwU8/FVzuqwRamLeJlYixlfIA6lQ6OZcqVg1pSmxJzFWP2loRYSjwwt cyn3wDSGUIYcYcUV6kaC3RMYCT0IOXDQZ/TVc3OdDG5NH3sN8r+cYxwIHmkhK8auTUFBC4 Z7QuwX6dyZW8zsEXgss3qTJy0NndYWMmjwZipi407ImDS4WwtDGopx6b3s2zokSdGo8Zyr MyzHhvn6wInHhopmo1Dk1KwWFqlWPWaz5tkhd+fKKPQW9osUpR0bxGb8KUwXzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717543174; 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=A9XsId/jZ3uxCyyYTorIMkXKezLKeVBlObLcvZzrxOE=; b=SgfCDvXHXrYDF2TPsr0C3qejAKkmvfBJZrRUFUyMjgjwYWJv6xMzxf/dF5gv3vcMlNrk8c GZ9jPK97YNJWF4v1SkPfNn2yQuOkoS8BxLnWEHgT3SO8dCzlo3z9LSKiGLY9fRqHL90FAv p7GyunM7nKI59Ddm9ATfM72GBdCK9YAhxvUgrQQJgTY68D6rxvSSkHGPJwMuswyQxQjch3 wvobgI7iU7EE/1w9EytFTnQifZvhAZ2v/R8amKix+N4BtW0Hh2c4tz/PdOZ10cXEHZRXNl FO0dI0/BcsTDOQWc29OUt6AbxHx83N7GBm5fs9kgigWQ2i/dUq/x4OxMI62opA== 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 4Vv64Q4mqnzf5x; Tue, 4 Jun 2024 23:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 454NJY1i096570; Tue, 4 Jun 2024 23:19:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 454NJYdo096567; Tue, 4 Jun 2024 23:19:34 GMT (envelope-from git) Date: Tue, 4 Jun 2024 23:19:34 GMT Message-Id: <202406042319.454NJYdo096567@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: 5df74441b35f - main - devmap: eliminate unused arguments 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 5df74441b35f2303ecdc7b79f9d331f5e77a07db Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5df74441b35f2303ecdc7b79f9d331f5e77a07db commit 5df74441b35f2303ecdc7b79f9d331f5e77a07db Author: Mitchell Horne AuthorDate: 2024-06-04 23:17:47 +0000 Commit: Mitchell Horne CommitDate: 2024-06-04 23:17:47 +0000 devmap: eliminate unused arguments The optional 'table' pointer is a legacy part of the interface, which has been replaced by devmap_register_table()/devmap_add_entry(). The few in-tree callers have already adapted to this, so it can be removed. The 'l1pt' argument is already entirely unused within the function. Reviewed by: andrew, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45319 --- sys/arm/arm/machdep.c | 2 +- sys/arm64/arm64/machdep.c | 2 +- sys/kern/subr_devmap.c | 17 ++++------------- sys/riscv/riscv/machdep.c | 2 +- sys/sys/devmap.h | 7 +++---- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index c36953c513be..f54113e3d0ca 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -551,7 +551,7 @@ initarm(struct arm_boot_params *abp) /* Establish static device mappings. */ err_devmap = platform_devmap_init(); - devmap_bootstrap(0, NULL); + devmap_bootstrap(); vm_max_kernel_address = platform_lastaddr(); /* diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 517f4e7c2e23..e7d46ff70531 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -996,7 +996,7 @@ initarm(struct arm64_bootparams *abp) physmem_init_kernel_globals(); - devmap_bootstrap(0, NULL); + devmap_bootstrap(); valid = bus_probe(); diff --git a/sys/kern/subr_devmap.c b/sys/kern/subr_devmap.c index 441ffeb1270a..3ab20a2a4d43 100644 --- a/sys/kern/subr_devmap.c +++ b/sys/kern/subr_devmap.c @@ -165,28 +165,19 @@ devmap_register_table(const struct devmap_entry *table) /* * Map all of the static regions in the devmap table, and remember the devmap * table so the mapdev, ptov, and vtop functions can do lookups later. - * - * If a non-NULL table pointer is given it is used unconditionally, otherwise - * the previously-registered table is used. This smooths transition from legacy - * code that fills in a local table then calls this function passing that table, - * and newer code that uses devmap_register_table() in platform-specific - * code, then lets the common platform-specific init function call this function - * with a NULL pointer. */ void -devmap_bootstrap(vm_offset_t l1pt, const struct devmap_entry *table) +devmap_bootstrap(void) { const struct devmap_entry *pd; devmap_bootstrap_done = true; /* - * If given a table pointer, use it. Otherwise, if a table was - * previously registered, use it. Otherwise, no work to do. + * If a table was previously registered, use it. Otherwise, no work to + * do. */ - if (table != NULL) - devmap_table = table; - else if (devmap_table == NULL) + if (devmap_table == NULL) return; for (pd = devmap_table; pd->pd_size != 0; ++pd) { diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 4e3564b11c9e..f44056f56212 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -568,7 +568,7 @@ initriscv(struct riscv_bootparams *rvbp) physmem_init_kernel_globals(); /* Establish static device mappings */ - devmap_bootstrap(0, NULL); + devmap_bootstrap(); cninit(); diff --git a/sys/sys/devmap.h b/sys/sys/devmap.h index 786608e0ce30..914bec31af4c 100644 --- a/sys/sys/devmap.h +++ b/sys/sys/devmap.h @@ -71,11 +71,10 @@ void devmap_register_table(const struct devmap_entry * _table); * Establish mappings for all the entries in the table. This is called * automatically from the common platform-specific init function in * /machdep.c, and also from the custom platform-specific init routines - * in older code. If the table pointer is NULL, this will use the table - * installed previously by devmap_register_table(). + * in older code. This function only has an effect when a table was installed + * previously by devmap_register_table(). */ -void devmap_bootstrap(vm_offset_t _l1pt, - const struct devmap_entry *_table); +void devmap_bootstrap(void); /* * Translate between virtual and physical addresses within a region that is