From nobody Tue Jan 24 22:12:33 2023 X-Original-To: dev-commits-src-branches@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 4P1h6V16kPz3bg5s; Tue, 24 Jan 2023 22:12: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 4P1h6V0Jdfz3DJZ; Tue, 24 Jan 2023 22:12:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598354; 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=ijEAtMFvkLFu+N3wLLufZLA5gH5rk2ACFwx3tnjJM2A=; b=KQjqI7RxawKe/+GnWgMwH9U9lm/yjddj8aMkku7Kcg8EfQ8SIgf3WdIjbvjIjUd26x77Z3 pplfwlFg+L6bBdC38oUs1XdqxWDIzNyjdMRnb9hnp19vIuzcT5LtjTLJIgRCZ4iDBrQ58b n4SmT+nrANkg56nAW5YB+qKsJCPGHgfrXyY4tqq7yvVNocBGzs81QXAKDHhmmwyEr8MJhO G15z8bAejoPWAEAPTfcfTgvs9M40ALBEcHflAYfef+eB5nM4bYGHCk/epQ3tAu2LrQOQZQ QjHhgec63MmbYpMhvtEN1+EPhJMn1Ke9H8TeSxnqEF8jQBI+1WRvKkB83+4rRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598354; 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=ijEAtMFvkLFu+N3wLLufZLA5gH5rk2ACFwx3tnjJM2A=; b=dVKYQyim3bJ3ZULDshWmkaqZ7Rhaq1zPmXAll6raWR5cgTqg6GWxg2hjazsq4NOSEzqXRu grBTQqK02k0SGJQOuHNPeMhNxq4EIvTh/02E/5aEsI7NkCAmUOVMCk6pNvAWkt4bYQbUGF TdVlREFACzZToDcJ0nhkRQGPo7gNpkQEZLQqp97/21ql8SNH44vfTRDVMJShzO/J62gwjY /tl1I6txeCYk9wVeQYnJsrSdxWyYSVqhU2YTUlxsvuuL216wnQMKcEhGc3JIgxAK27N4Z9 9mq54/jMwuoo/Iv//axFsm4IActdzTR2CmyvlyZ7W6cYXjoITIepl6jhFuo/1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598354; a=rsa-sha256; cv=none; b=irYmjrocRrfJQcQSd7XnaC6mAWA/Y8O99J3NHh8Ihgtb/sEPI8E47IbrWm0rXQiRS6rFYR BkgnDO1Ez4WFFuYN9Uyiq5Af4JbbNFVT3cpP6XsLl1FTcIy06mSL0PThypi+urtSDUONO9 3bbBfeCJwvGJUga7bdMsFrUKadXKvY/iSkPkmc6Zsc62p/zVW1LKO+tcVCGTT3sprabyYf nefGj+jM1vXbklarz1Gp6+dbl/AbiM19c8GgoWTAsg9EtRHkM8umkHlOJnV90X0BaYcZp5 GvJRz9T94Ujxuxq8/MOytHLfJX2sfXecM9ti6VI17zU9vGmXWbJ05/JbmTkzWQ== 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 4P1h6T69pJzQgc; Tue, 24 Jan 2023 22:12:33 +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 30OMCX0v087195; Tue, 24 Jan 2023 22:12:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMCX6m087194; Tue, 24 Jan 2023 22:12:33 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:12:33 GMT Message-Id: <202301242212.30OMCX6m087194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: cf96360237ea - stable/13 - stand: use archsw.arch_copyin instead of direct call List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: cf96360237eada5ff5626832b4fb09c0e8b1b63f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cf96360237eada5ff5626832b4fb09c0e8b1b63f commit cf96360237eada5ff5626832b4fb09c0e8b1b63f Author: Warner Losh AuthorDate: 2022-09-16 15:08:32 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:34 +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 (cherry picked from commit 4c670b53a0007739a0fc84ea4bc24a5895953aae) --- 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));\ }