From nobody Mon Jul 17 17:29:20 2023 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 4R4Tbf2fwRz4nQYS for ; Mon, 17 Jul 2023 17:29:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R4Tbd4rwhz4XPZ for ; Mon, 17 Jul 2023 17:29:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-51e344efd75so9877614a12.1 for ; Mon, 17 Jul 2023 10:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1689614972; x=1692206972; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fg+dJeASVYPiLzg333HImWtRPW+FLdhoPC3yxshm3Dk=; b=DyJvnqEwCtsyKeneU/LczhtHer9xrOdbZVWzBTFSke1vLt5OQTpW0IvweToZYwezC8 yiEb6VgxWyEuy7bYm76GVx4cDn9JovXh1D7+4MJX5+yztJxFTRLrGP9UrjMc1zBgQ0dk Fxg/DpOn+lKcm1uHQQkFfcWTIHowX11r4teLJYME3XB5GNUIoKMDheRmAXvsHSjcauJg l766cmZRwKz/ENfomZNvzsn9pxLBugPL8ytKp834V4uZDw6tC487vMUMwvt52ftqf48n 8rTMOPeBgqqW0lzDxD5ZaVhxPHoJkbqy0xlNg3X7UbHTK8d/yh+sylkRbvqRCgi32LHu ojMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689614972; x=1692206972; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fg+dJeASVYPiLzg333HImWtRPW+FLdhoPC3yxshm3Dk=; b=lohVuEL6MckwCdV/ADhJlpQXuroAbGmFXN4Wkq9AQd62mh4aO+xC3z0PaLDr/MaBRU zgLbYU/rJ7MdICSkdlV4V7I+y3Dtys7r+Nr7PEe/0rsmcXPprqm04oSgJiKUXW5sDNRL efiQ8U6mbp92ReYBiRsip+Z+PQV+sb0AHUhR3Vn38cgkcgJrvd5hr7oX+nEs28g/xP+r X1uzfh5ucFebHnlMXiqUK9PwzA3lmsCyKVVwmkhRJLnkkM6uAFQyCvCD089EYc/SFR7l iyMuALxTObay/Ridj+bsndPiDIVetra6aHmp/U0SNy9thVW023h/AR6Zelf3sA93/DS+ Wy3Q== X-Gm-Message-State: ABy/qLYS4ymb5dyrCLF+tF41N9eE8Sd1U/wVr0WNRMTmbCQgGEX4O31i hMdZ6iyXbdVYbau/ZDMq84fWqGJM5YEJd9gmhmFPmQ== X-Google-Smtp-Source: APBJJlENXExmteN8q3vZosf8JqWFiQ+Hq+ew2HVPBDuUWXWVSsiubJQGUxojjbqB2VIETiAtAM5DCps+vYYDug4HrFw= X-Received: by 2002:a05:6402:270a:b0:51d:b184:efd with SMTP id y10-20020a056402270a00b0051db1840efdmr10016526edd.20.1689614971653; Mon, 17 Jul 2023 10:29:31 -0700 (PDT) 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202307141841.36EIf3f0019403@gitrepo.freebsd.org> <65d7d8d8-9f98-abd2-1ce3-ae3a2d3bf111@FreeBSD.org> In-Reply-To: <65d7d8d8-9f98-abd2-1ce3-ae3a2d3bf111@FreeBSD.org> From: Warner Losh Date: Mon, 17 Jul 2023 11:29:20 -0600 Message-ID: Subject: Re: git: 60381fd1ee86 - main - memdesc: Retire MEMDESC_CCB. To: John Baldwin Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000316b670600b224d2" X-Rspamd-Queue-Id: 4R4Tbd4rwhz4XPZ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000316b670600b224d2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 17, 2023 at 11:15=E2=80=AFAM John Baldwin wro= te: > On 7/17/23 8:48 AM, Konstantin Belousov wrote: > > On Fri, Jul 14, 2023 at 06:41:03PM +0000, John Baldwin wrote: > >> The branch main has been updated by jhb: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3D60381fd1ee8668ea1e4676a6128883d= 987cab858 > >> > >> commit 60381fd1ee8668ea1e4676a6128883d987cab858 > >> Author: John Baldwin > >> AuthorDate: 2023-07-14 18:30:31 +0000 > >> Commit: John Baldwin > >> CommitDate: 2023-07-14 18:32:16 +0000 > >> > >> memdesc: Retire MEMDESC_CCB. > >> > >> Instead, change memdesc_ccb to examine the CCB and return a > memdesc of > >> a more generic type describing the data buffer. > > > >> diff --git a/sys/kern/subr_bus_dma.c b/sys/kern/subr_bus_dma.c > >> index 65a08aeba17c..bfaad30b37d3 100644 > >> --- a/sys/kern/subr_bus_dma.c > >> +++ b/sys/kern/subr_bus_dma.c > >> @@ -304,94 +304,6 @@ bus_dmamap_load_ma_triv(bus_dma_tag_t dmat, > bus_dmamap_t map, > >> @@ -566,49 +478,18 @@ bus_dmamap_load_ccb(bus_dma_tag_t dmat, > bus_dmamap_t map, union ccb *ccb, > >> + mem =3D memdesc_ccb(ccb); > >> + return (bus_dmamap_load_mem(dmat, map, &mem, callback, > callback_arg, > >> + flags)); > >> } > > This makes kernel not linkable if CAM is not included into it. > > Hmmm, ok. I can either move the memdesc_ccb routine into sys/kern > somewhere > (like the kern_memdesc.c file in my other pending review), or we can #ifd= ef > this function. It probably doesn't make sense to have a > bus_dmamap_load_ccb > if you don't have CAM, so I think I prefer the second option. > MINIMAL doesn't have CAM configured, but it is loadable as a module. I'd think we'd want a dummy one fo these with weak symbol binding and have the actual one live in cam somewhere that overrides this symbol. I just hit this in building MINIMAL for other reasons.... Warner --000000000000316b670600b224d2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jul 17, 2023 at 11:15=E2=80= =AFAM John Baldwin <jhb@freebsd.org> wrote:
On= 7/17/23 8:48 AM, Konstantin Belousov wrote:
> On Fri, Jul 14, 2023 at 06:41:03PM +0000, John Baldwin wrote:
>> The branch main has been updated by jhb:
>>
>> URL:
http= s://cgit.FreeBSD.org/src/commit/?id=3D60381fd1ee8668ea1e4676a6128883d987cab= 858
>>
>> commit 60381fd1ee8668ea1e4676a6128883d987cab858
>> Author:=C2=A0 =C2=A0 =C2=A0John Baldwin <jhb@FreeBSD.org> >> AuthorDate: 2023-07-14 18:30:31 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0John Baldwin <jhb@FreeBSD.org> >> CommitDate: 2023-07-14 18:32:16 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0 memdesc: Retire MEMDESC_CCB.
>>=C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 Instead, change memdesc_ccb to examine the CCB= and return a memdesc of
>>=C2=A0 =C2=A0 =C2=A0 a more generic type describing the data buffer= .
>
>> diff --git a/sys/kern/subr_bus_dma.c b/sys/kern/subr_bus_dma.c
>> index 65a08aeba17c..bfaad30b37d3 100644
>> --- a/sys/kern/subr_bus_dma.c
>> +++ b/sys/kern/subr_bus_dma.c
>> @@ -304,94 +304,6 @@ bus_dmamap_load_ma_triv(bus_dma_tag_t dmat, b= us_dmamap_t map,
>> @@ -566,49 +478,18 @@ bus_dmamap_load_ccb(bus_dma_tag_t dmat, bus_= dmamap_t map, union ccb *ccb,
>> +=C2=A0 =C2=A0 mem =3D memdesc_ccb(ccb);
>> +=C2=A0 =C2=A0 return (bus_dmamap_load_mem(dmat, map, &mem, ca= llback, callback_arg,
>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 flags));
>>=C2=A0 =C2=A0}
> This makes kernel not linkable if CAM is not included into it.

Hmmm, ok.=C2=A0 I can either move the memdesc_ccb routine into sys/kern som= ewhere
(like the kern_memdesc.c file in my other pending review), or we can #ifdef=
this function.=C2=A0 It probably doesn't make sense to have a bus_dmama= p_load_ccb
if you don't have CAM, so I think I prefer the second option.

MINIMAL doesn't have CAM configured, but it = is loadable as a module.

I'd think we'd wa= nt a dummy one fo these with weak symbol binding and have the actual
<= div>one live in cam somewhere that overrides this=C2=A0 symbol.
<= br>
I just hit this in building MINIMAL for other reasons....
=

Warner
--000000000000316b670600b224d2--