From nobody Fri Sep 16 15:53:52 2022 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 4MTdsY0ml3z4cL21; Fri, 16 Sep 2022 15:53:53 +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 4MTdsY0KJKz3hGh; Fri, 16 Sep 2022 15:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663343633; 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=xmfvhirE0OITiMhJQIaqwq2DUTJpln0Jb/Aue6rKpJY=; b=MLAYsBzm5ttkN6moBpiy+8BqSpsCNWhi+6hHFH9K0Gu1OCYpGnV13WweM6PG+yWuQ1Wgxp 4NO3yDVRM6MY4a2OY9TdOSizLXIrf9D/orqXNyZItR03sSzwdbU2OGK6DgLfC3j2Oo4IKm lRF5xlLO8C0BY8nL4+l2/UpSj0XULGcVhkYJyCyMPXcbmMD40WyymKI7TTnLJrtaOrrc03 bQ2ETAblwhCv1ZQdQwRBBnVYbJaru3sz6ICD7zXO18WqD3g34Rmw8ZcoFG2Otmwa2Ailfl a8+ZY6a9kB4bTWNxukVAvgcTrUI1LbOrwvy4aGGh31jShN3iholrkLtfUsp6XA== 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 4MTdsX6VJrzPht; Fri, 16 Sep 2022 15:53:52 +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 28GFrqgE086357; Fri, 16 Sep 2022 15:53:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28GFrqJh086356; Fri, 16 Sep 2022 15:53:52 GMT (envelope-from git) Date: Fri, 16 Sep 2022 15:53:52 GMT Message-Id: <202209161553.28GFrqJh086356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4c670b53a000 - main - stand: use archsw.arch_copyin instead of direct call 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c670b53a0007739a0fc84ea4bc24a5895953aae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663343633; 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=xmfvhirE0OITiMhJQIaqwq2DUTJpln0Jb/Aue6rKpJY=; b=XHUnevL6WBElRhLRwS58vXzbiHku/lsrWdAVSb5n5DFj2A9eV3afg6Fg/nTLI2QcRWuB0e hRpUsDcP5WV1DDkwsi7f463TZvowZzhZFJNpwyI80EF48v/Bdd30EM9cd3vP/PkAWWznIO eCvCl5W9G7vZjIB+7ykW7uUSerXB1Lmpdiz7cEpLXgOIiFmElGCAJPrGd5RiVTotEuuEU0 8DLH+M5NcFKnqtmQefqNtTm+4/CxtqTyrANtY0FvwIzy+lOqaXRlRhVRbJp5TecGntbtB7 Cccxb9gpP7j9rTW3YoT9qJlQ+Babwvcp6dfxNJBBYEbYjhM67TuncSh15teOsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663343633; a=rsa-sha256; cv=none; b=FIoonzSZVqhoJ9uA6qMFx24OPbbn6SuLRzsWiLWbB5DmHFtYswtTvP0ODtfhsfOOWt/xN6 A5bio/MMQbHgomww9hkgX1b4XJlG/VG35W9QBBbeiwY7yBHft0y99HqTenW3KvAEUbLfnl /Iq4NiFQVddKCDNe+W3npIyuMzUM+BE7LoFL9YIV8QKhRtWZyiJPFq3iThfqkf2I8dzl3F PFQibUPBjonRC02LnC+GNX48D85OQDbqKVqSYGHQ3sCDCFz/gGK4Jaz6NUdHnnmZH6bo9g c98XqFd5/qdwjjTMXCz+tyz1d3Cggp5xVEBcfoHFQqmnWXDNL6Sg6wuPnUkB1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c670b53a0007739a0fc84ea4bc24a5895953aae commit 4c670b53a0007739a0fc84ea4bc24a5895953aae Author: Warner Losh AuthorDate: 2022-09-16 15:08:32 +0000 Commit: Warner Losh CommitDate: 2022-09-16 15:18:56 +0000 stand: use archsw.arch_copyin instead of direct call This replaces the CALLBACK(copyin, ...) with a call to archsw.arch_copyin which points to a function that does the callback. More diff reduction for the multiple copies of these routines in the tree. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D36569 --- stand/userboot/userboot/bootinfo.c | 10 +++++----- stand/userboot/userboot/bootinfo32.c | 8 ++++---- stand/userboot/userboot/bootinfo64.c | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/stand/userboot/userboot/bootinfo.c b/stand/userboot/userboot/bootinfo.c index 43088e2a7c0e..36a5e1982313 100644 --- a/stand/userboot/userboot/bootinfo.c +++ b/stand/userboot/userboot/bootinfo.c @@ -96,18 +96,18 @@ bi_copyenv(vm_offset_t addr) /* traverse the environment */ for (ep = environ; ep != NULL; ep = ep->ev_next) { - CALLBACK(copyin, ep->ev_name, addr, strlen(ep->ev_name)); + archsw.arch_copyin(ep->ev_name, addr, strlen(ep->ev_name)); addr += strlen(ep->ev_name); - CALLBACK(copyin, "=", addr, 1); + archsw.arch_copyin("=", addr, 1); addr++; if (ep->ev_value != NULL) { - CALLBACK(copyin, ep->ev_value, addr, strlen(ep->ev_value)); + archsw.arch_copyin(ep->ev_value, addr, strlen(ep->ev_value)); addr += strlen(ep->ev_value); } - CALLBACK(copyin, "", addr, 1); + archsw.arch_copyin("", addr, 1); addr++; } - CALLBACK(copyin, "", addr, 1); + archsw.arch_copyin("", addr, 1); addr++; return(addr); } diff --git a/stand/userboot/userboot/bootinfo32.c b/stand/userboot/userboot/bootinfo32.c index b830b767906d..26376709e899 100644 --- a/stand/userboot/userboot/bootinfo32.c +++ b/stand/userboot/userboot/bootinfo32.c @@ -61,7 +61,7 @@ static struct bootinfo bi; #define COPY32(v, a, c) { \ uint32_t x = (v); \ if (c) \ - CALLBACK(copyin, &x, a, sizeof(x)); \ + archsw.arch_copyin(&x, a, sizeof(x)); \ a += sizeof(x); \ } @@ -69,7 +69,7 @@ static struct bootinfo bi; COPY32(t, a, c); \ COPY32(strlen(s) + 1, a, c); \ if (c) \ - CALLBACK(copyin, s, a, strlen(s) + 1); \ + archsw.arch_copyin(s, a, strlen(s) + 1);\ a += roundup(strlen(s) + 1, sizeof(uint32_t));\ } @@ -81,7 +81,7 @@ static struct bootinfo bi; COPY32(t, a, c); \ COPY32(sizeof(s), a, c); \ if (c) \ - CALLBACK(copyin, &s, a, sizeof(s)); \ + archsw.arch_copyin(&s, a, sizeof(s)); \ a += roundup(sizeof(s), sizeof(uint32_t)); \ } @@ -92,7 +92,7 @@ static struct bootinfo bi; COPY32(MODINFO_METADATA | mm->md_type, a, c); \ COPY32(mm->md_size, a, c); \ if (c) \ - CALLBACK(copyin, mm->md_data, a, mm->md_size); \ + archsw.arch_copyin(mm->md_data, a, mm->md_size);\ a += roundup(mm->md_size, sizeof(uint32_t));\ } diff --git a/stand/userboot/userboot/bootinfo64.c b/stand/userboot/userboot/bootinfo64.c index 0086ef21b60a..f2713adf5513 100644 --- a/stand/userboot/userboot/bootinfo64.c +++ b/stand/userboot/userboot/bootinfo64.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #define COPY32(v, a, c) { \ uint32_t x = (v); \ if (c) \ - CALLBACK(copyin, &x, a, sizeof(x)); \ + archsw.arch_copyin(&x, a, sizeof(x)); \ a += sizeof(x); \ } @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); COPY32(t, a, c); \ COPY32(strlen(s) + 1, a, c); \ if (c) \ - CALLBACK(copyin, s, a, strlen(s) + 1); \ + archsw.arch_copyin(s, a, strlen(s) + 1);\ a += roundup(strlen(s) + 1, sizeof(uint64_t));\ } @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); COPY32(t, a, c); \ COPY32(sizeof(s), a, c); \ if (c) \ - CALLBACK(copyin, &s, a, sizeof(s)); \ + archsw.arch_copyin(&s, a, sizeof(s)); \ a += roundup(sizeof(s), sizeof(uint64_t)); \ } @@ -89,7 +89,7 @@ __FBSDID("$FreeBSD$"); COPY32(MODINFO_METADATA | mm->md_type, a, c); \ COPY32(mm->md_size, a, c); \ if (c) \ - CALLBACK(copyin, mm->md_data, a, mm->md_size); \ + archsw.arch_copyin(mm->md_data, a, mm->md_size);\ a += roundup(mm->md_size, sizeof(uint64_t));\ }