From nobody Tue Nov 19 14:31:22 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 4Xt6PQ6XPlz5f5BX; Tue, 19 Nov 2024 14:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt6PQ4PR9z439J; Tue, 19 Nov 2024 14:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026682; 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=yQXlgg5/JPwL7MNcMGgPkWpnqUEPdTbCShFSUWFCYds=; b=Z7UPTSxwi3AJ1tqwsPaW1mIkjpznl130v3yikcTOXTEX5DefwddQawiu7+DfMgjDwUQCuE tFhRkvM7dymleV/D/kSEfjxfT+DR1JvNh8VjaECBduh1kHQBZc4fTgccLDtw3CstVOw6oN ii1I86qVQ+sKIlEYNFFhpE+CPIaABlshxRaGs6UoLJgMlRLXDxRHQFeQyGCuVrfBr/ywk4 bg6zfl39a2wGrwRaFj7gbfudmjYCdfR+OKOjMrYGdajNQXPdnX5qTWSt8qMMDoQPQ5/Xes Fm8JaxFqsC9VGF0+WZXoJvQkRAzPx0mxydvgr71m1cy95P2azkvHm15DAx1auA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732026682; 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=yQXlgg5/JPwL7MNcMGgPkWpnqUEPdTbCShFSUWFCYds=; b=hQLWZQlbl1VggAb4EOjx7h7T7o8En1BIuXqw7/NVouY5dF/t6s4XVi1xRTLNYN4zpEHE69 XIArwCUlWddfTGRURof0+vr8ycsfDXj39SYrJvtDkyZtrBFgTuhZqaEZsyTsTlAEEvPG4b psvwjNXx3n7FUoZFmhwLFfy7jZY2AiJIVUE/k0h36pZo10W4o0ESAfL4w/FMf2G0x2e9BK stwHoKThSC3eRyUZNQHy92AJ9xe5owrleDp2oQj1RH7xkK2WdKa3F5YEFtSOLE4tQHJhyd x7NemWFmCgyEhGHUXLEFu3UPuIIyVDkb42z5e1zSIgHfYf0D+roX9tV3+77ylA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732026682; a=rsa-sha256; cv=none; b=skNiGd9Z+7i/sisn8s1ojbHRq0Ao0JNruHmnTB0SToSO8aVn7z9HfiJHmiT1ieqgJfbDle xhLJUXchO0TZiCqMgfBNwEhiTklsyWOeUSUXCEjg0nt8w9+YyD0ma8po+W/c4NXizse7af hP2AZgjNJN2SMOAeVx6+W/ZhSwoUWju4t9wPiua4AFoxXGs5IhwSXUt4CDWqh3dL3XorQe rX5W8g6aUTPsiob8av/IrC9mSPFAxlmd+VTHz/pdqN+LAO1wsB1S/81kq2k4lbFjgGHQ/8 axfKwTjAlW2P2fCXYlvn2+rXTJePicb09Tfe40iTossmJCHUeF850bq7ifvJGQ== 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 4Xt6PQ3dRMz1Rd2; Tue, 19 Nov 2024 14:31:22 +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 4AJEVMg2040995; Tue, 19 Nov 2024 14:31:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJEVMtu040992; Tue, 19 Nov 2024 14:31:22 GMT (envelope-from git) Date: Tue, 19 Nov 2024 14:31:22 GMT Message-Id: <202411191431.4AJEVMtu040992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 476d590738cf - stable/14 - busdma_bounce: Replace a SYSINIT with static initializations 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 476d590738cf6cbecb9d2f62ec962d49d02ec96c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=476d590738cf6cbecb9d2f62ec962d49d02ec96c commit 476d590738cf6cbecb9d2f62ec962d49d02ec96c Author: Mark Johnston AuthorDate: 2024-11-12 01:57:35 +0000 Commit: Mark Johnston CommitDate: 2024-11-19 14:15:21 +0000 busdma_bounce: Replace a SYSINIT with static initializations No functional change intended. MFC after: 1 week (cherry picked from commit 195402c5c5b7b3236c0680f06b60b7f9465982c8) --- sys/kern/subr_busdma_bounce.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sys/kern/subr_busdma_bounce.c b/sys/kern/subr_busdma_bounce.c index f5f27dae9b05..134bc6a5eb68 100644 --- a/sys/kern/subr_busdma_bounce.c +++ b/sys/kern/subr_busdma_bounce.c @@ -85,11 +85,14 @@ struct bounce_zone { }; static struct mtx bounce_lock; +MTX_SYSINIT(bounce_lock, &bounce_lock, "bounce pages lock", MTX_DEF); static int total_bpages; static int busdma_zonecount; -static STAILQ_HEAD(, bounce_zone) bounce_zone_list; -static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; +static STAILQ_HEAD(, bounce_zone) bounce_zone_list = + STAILQ_HEAD_INITIALIZER(bounce_zone_list); +static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist = + STAILQ_HEAD_INITIALIZER(bounce_map_callbacklist); static MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); @@ -128,17 +131,6 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags) return (0); } -static void -init_bounce_pages(void *dummy __unused) -{ - - total_bpages = 0; - STAILQ_INIT(&bounce_zone_list); - STAILQ_INIT(&bounce_map_callbacklist); - mtx_init(&bounce_lock, "bounce pages lock", NULL, MTX_DEF); -} -SYSINIT(bpages, SI_SUB_LOCK, SI_ORDER_ANY, init_bounce_pages, NULL); - static struct sysctl_ctx_list * busdma_sysctl_tree(struct bounce_zone *bz) {