From nobody Tue Nov 12 14:29:17 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 4XnphK2llGz5ccKg; Tue, 12 Nov 2024 14:29:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnphK13kNz4NLC; Tue, 12 Nov 2024 14:29:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x730.google.com with SMTP id af79cd13be357-7b14f3927ddso396611185a.3; Tue, 12 Nov 2024 06:29:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731421760; x=1732026560; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=sXs/JayoG7dMdCaT4xdwxGJgBk0lQTbZ7C2yuLqPUaU=; b=lLhhXy2xESw560amYSAtInhE+W1WDvX9K1XDDnVtJ2h1rjSDKqV/jCuggRSOlrSrvJ 3b0hhmpJbI5F7wMRxX00LvCmmViLrrTBAbiG8C3E7YrfNSFfJXVCm59zJHl1mgy7Su5s JayyGITx5aqyccCnGm0DVuwz+Nzka9Tt8OZ73TBuTeicRrxnDJ3tuMjMA5vIn6vDso9J 8sg7AYtrHc7DmBZDGff2DgeQT5faWJqU3Rp60RTQPoJnpkWhnGJ/4FGyxd9pgL9p8WT7 di5ieh7QMFzK8sNiz2kBkZzM4J5rRi3Lc/F/HOTcdYQ7MZ++kUZ77OREEiGyGJspnTEG 8VMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731421760; x=1732026560; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sXs/JayoG7dMdCaT4xdwxGJgBk0lQTbZ7C2yuLqPUaU=; b=RuzY1F6P+Db+ebQeI4lGrWWDiknAlYR/8x7d53yUm92Fe1j+bNSTXPmjAAmgK0vhix NAzaTcJL7Ig4srcNIf0l1+UsIXWEgWqx0FdV18Hm7qZgq4mbMNuZSbB4yq+ACuOeo5Og JONicoyizZwykJc2FO9kq7Kens6erfR6hQBF6QT1+l0kAv7u2L9tGYZ7BreyfmUyRLZN aLuHmTF+oeMY5HaIRHSawmvgbjz3VD15aAs9yXc9nX1OqfolIObKojwl/3mxwcodDQs+ pFMl/kFBFMKnOexusnwaaJgHKO8NMT/R98Kvi2p/yDWc20x8VBVsIf7TQG/nSJo9p/M4 aW4A== X-Forwarded-Encrypted: i=1; AJvYcCV0xHdLZ/kqu1mNqzA0iNk8ffRR4JXXPjiVYk/DyA66cm9n+2rh3CogqTJqvhlbOzkjA/pmf1fG04psu0O5iH8=@freebsd.org, AJvYcCVC/cSsb/eCNamfQ87LYmkDEX288vnQb31ETQhchXINLGv4b42HveSaHXv5Z4rXvYDLb4aBzTTPyORQo/nARR/FcYZwNw==@freebsd.org X-Gm-Message-State: AOJu0YwPjuY+uEY7jXnk22GQEC0VeZv8pUJqe//dc/3JPA1aWGgpEhAp +hE3MvZj1S4K6rbZOSgGyAP067xXn5+1IZSDD3oekwA7rXwYqWLhgHA80A== X-Google-Smtp-Source: AGHT+IGzDac9aC5TIvZk3GW3pQ9oSzbskOedMnY37ps4ixNGzB4i9EhC81yXkgmPi3mCaVz+nvG0hQ== X-Received: by 2002:a05:620a:2953:b0:7b1:48d2:f174 with SMTP id af79cd13be357-7b331ec6151mr2163145085a.34.1731421760359; Tue, 12 Nov 2024 06:29:20 -0800 (PST) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b32ac2daa6sm593873485a.14.2024.11.12.06.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 06:29:20 -0800 (PST) Date: Tue, 12 Nov 2024 09:29:17 -0500 From: Mark Johnston To: Ronald Klop Cc: dev-commits-src-all@freebsd.org, src-committers@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 195402c5c5b7 - main - busdma_bounce: Replace a SYSINIT with static initializations Message-ID: References: <202411120201.4AC21wNW023064@gitrepo.freebsd.org> <705420107.1610.1731399133226@localhost> 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=us-ascii Content-Disposition: inline In-Reply-To: <705420107.1610.1731399133226@localhost> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XnphK13kNz4NLC X-Spamd-Bar: ---- On Tue, Nov 12, 2024 at 09:12:13AM +0100, Ronald Klop wrote: > Out of curiosity, what is the "why" of this commit? Just to remove unneeded code. All of the required initialization can be done using static definitions, so I wanted to simplify the initialization a bit ahead of https://reviews.freebsd.org/D47521 > Van: Mark Johnston > Datum: dinsdag, 12 november 2024 03:01 > Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org > Onderwerp: git: 195402c5c5b7 - main - busdma_bounce: Replace a SYSINIT with static initializations > > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=195402c5c5b7b3236c0680f06b60b7f9465982c8 > > > > commit 195402c5c5b7b3236c0680f06b60b7f9465982c8 > > Author: Mark Johnston > > AuthorDate: 2024-11-12 01:57:35 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-11-12 01:57:35 +0000 > > > > busdma_bounce: Replace a SYSINIT with static initializations > > No functional change intended. > > MFC after: 1 week > > --- > > 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 a27bc423c23a..60fe2fc6b2a6 100644 > > --- a/sys/kern/subr_busdma_bounce.c > > +++ b/sys/kern/subr_busdma_bounce.c > > @@ -86,11 +86,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"); > > @@ -130,17 +133,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) > > { > > > > > > > >