From nobody Mon Jul 17 17:45:33 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 4R4Ty74G0Jz4nZHd; Mon, 17 Jul 2023 17:45:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R4Ty73pfBz4cnD; Mon, 17 Jul 2023 17:45:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689615935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x28pI7KpLvb2jGdNQuXq/LvDrcBSaUX+1AFxfbiPaKw=; b=KVkZRlzrtxQ9GI2zBIkO8K9E+1bo59oYwG1rBEQpb/9ICnK4qiiSQcHa2XAzjI/GQ5vv9q 1LtYPsVqkDgJNqjYNW/9CyOkgN55ka57ogPiYlxJXu2yc2Oj33Gzl0gLOp4tr4Yo2Newz/ 2vjQmKktrTf//z1qAjV+O+Uya5QAKU1K0C5UdYEnGVFUpY8FMSfBruO1FEK7DwPEiPbgmO RkDkxH/qdCI4f23LvYmarT/kH3sByKF7U9HvhIovPQ8Sb/vFU6Lr4RGjQMh6bS7o+vmZQR /6Ln6YVf90XC3nnoSH4+GfwH817lmsm/qT/StKBP45MbCtyo5r2pPWKM/qAkvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689615935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x28pI7KpLvb2jGdNQuXq/LvDrcBSaUX+1AFxfbiPaKw=; b=SSmSOhBrUigC+2C77yCNa5DoLGc2vfxGD8l5enRSqXVhfGMwgIJspM1j1kKaYfIHUJyYtW ASLcMLAOLpGVsArE9PofCLSH9jTGNksbjXdflVapFqveULEpMJq2uDK9CXdWoGsBkctEQK Ur4ysMwSGWj4lQelJKRJGwcoYOYAqokPpXIMrJvI05fOT59i0l6UIKww0ZHiQqSs3HE3vU ZuzCt2UbJdXtQyqM46QG9zMfoxpQA4q6Sf7TtpoKCvLxywpYfTEpjcklLQk7Xo9GaPRIgG d1aFz0wFjiS2MAmGCd8jbmy5RqZsLldB+ypywNhQaX3ZaLZOCxHPW++uHs0T/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689615935; a=rsa-sha256; cv=none; b=TcKhqUy06Dkiudm8Pf4qoiLK7Vx+7uDjeWYZpA4MHY9owaktqVJ7Bka2fgmKrg2cE4Q7rG vJciyQBsR/ikLw4yw3KPMDJ+w072LoB6wAt6sZQUbVYB6FwJfVyEdbbrZ7nxb+jK5JGkm4 ohqUm46PZpAO6WkDRFoINe/LgrJj9GP83+KM5/5qL82c7wJz+EuJ5VcC5Zy/U8KG9YRTlK jVqWDxyNQfVYdviKOCBkeA6HWlNiKVxXLTnqRmNf9hhLh50iNnLJw4ByUgjB5/RM/7twjT d1gnUbJioME3EHE16Y1L+9P+LvVG8lINSzAUt7jVEXuXO0MHGQV6p/zubR26vA== Received: from [IPV6:2601:648:8680:16b0:2c33:b8f1:d09:3750] (unknown [IPv6:2601:648:8680:16b0:2c33:b8f1:d09:3750]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4R4Ty66GZKz1Mfk; Mon, 17 Jul 2023 17:45:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <17cd00bb-c6f2-5afa-a1ac-b7e14c3c758e@FreeBSD.org> Date: Mon, 17 Jul 2023 10:45:33 -0700 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 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: git: 60381fd1ee86 - main - memdesc: Retire MEMDESC_CCB. Content-Language: en-US To: Warner Losh Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202307141841.36EIf3f0019403@gitrepo.freebsd.org> <65d7d8d8-9f98-abd2-1ce3-ae3a2d3bf111@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 7/17/23 10:29 AM, Warner Losh wrote: > On Mon, Jul 17, 2023 at 11:15 AM John Baldwin 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: >> https://cgit.FreeBSD.org/src/commit/?id=60381fd1ee8668ea1e4676a6128883d987cab858 >>>> >>>> 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 = 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 #ifdef >> 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.... Yeah, I was testing MINIMAL locally (which is still broken due to recent TCP commits) to try out possible fixes. One could possibly move bus_dmamap_load_ccb into cam.ko entirely? Especially this current version doesn't really have any bus_dma-specific knowledge anymore but is just a thin wrapper around bus_dmamap_load_mem: int bus_dmamap_load_ccb(bus_dma_tag_t dmat, bus_dmamap_t map, union ccb *ccb, bus_dmamap_callback_t *callback, void *callback_arg, int flags) { struct ccb_hdr *ccb_h; struct memdesc mem; ccb_h = &ccb->ccb_h; if ((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_NONE) { callback(callback_arg, NULL, 0, 0); return (0); } mem = memdesc_ccb(ccb); return (bus_dmamap_load_mem(dmat, map, &mem, callback, callback_arg, flags)); } -- John Baldwin