Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1811724rdb; Sun, 4 Feb 2024 02:21:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWEij0nS+rtQQ6xn2HcBJuW74sIf4fA2DIytTU9I2sCP3E1ijRUVNM2H0aRHnmW5R2vIn+ X-Received: by 2002:a17:90a:9c6:b0:296:1611:fc21 with SMTP id 64-20020a17090a09c600b002961611fc21mr7796890pjo.0.1707042067453; Sun, 04 Feb 2024 02:21:07 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUO4vlzMu4qIL0QzIx7RQGhoCFQfPgJTPthnDNbChsIxpdauOiocQoRkm2V+rXe9HBznOqhw9I7ea6sWOQD0fApItYCMWCEKrFwjVATjQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id nl1-20020a17090b384100b00295d77a7be9si2811687pjb.35.2024.02.04.02.21.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 02:21:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=VnzcaKaN; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-51577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1EDDA2839AD for ; Sun, 4 Feb 2024 10:21:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5A191B7F9; Sun, 4 Feb 2024 10:20:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VnzcaKaN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 045FA1B59C; Sun, 4 Feb 2024 10:20:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707042056; cv=none; b=AkEQAaH0sh6mBK8pEM8uovnOSvdjc8J9TRtiyjJ3x9iSxtpLic/06Blyvsjw1TfyGFbVjeyOAyuloH9CO/WSy2qwGGanM0GnCn9uEdEMVwmN4BJsiWGR1YfyZWKCcRkrNtTeXTmFjOGKjK2GliKd3M/dMIEnyWrkAfedlgDjBGQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707042056; c=relaxed/simple; bh=FlDUZIVR1R9thyOlKJz8I0F2dcW/QljUsBEVwxTgjgg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Rv8+nXsGzvYbHGAIoyNCf4OXu7MctY45zvlEaY5Bdaslwkzfcc54LVabQNj7L4IDh+RmDy7S/ac5MDl695vMDRoiQD+YzpptS2H+j+RMO36jHuMixMCXJ630lF6/aAVzXDyrtAfMX2NtMEY1qdMlunE0GeDuTIaauSOkjeWEeTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VnzcaKaN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CEB2C433F1; Sun, 4 Feb 2024 10:20:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707042055; bh=FlDUZIVR1R9thyOlKJz8I0F2dcW/QljUsBEVwxTgjgg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VnzcaKaNQX/+UF88IZHG2lIi7bb8FcePwmS/5scU2yYOtiptiq/obKXco+vQAKzOs tQ3qSGozkOqNLFrEhDE/RM7C9Gavnj/kys8afk0SOjFqSswgFnyV5TlCdrnHw3cTbT JwHWrezcaiV+6PjOrNe6U5Yq/NEIWwwGodDbCfKyHwPwW3iJ4PymFtz6KksQ7iBZRN uZoWv/EO7K55STCqABIOn/G7tJ2vQo6k/R++uAT2/JUIw/kXSB0OHScYlFZ9vTd3sH iY7c07mK105jWY8ptBvIVWVOXKpgK+l/zKfPUsN89x5GLsmvaRVEl+k8EO1n4tSV1B a+OAKtvPSlAcA== Date: Sun, 4 Feb 2024 10:20:50 +0000 From: Simon Horman To: Chris Leech Cc: Greg Kroah-Hartman , Nilesh Javali , Christoph Hellwig , John Meneghini , Lee Duncan , Mike Christie , Hannes Reinecke , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, GR-QLogic-Storage-Upstream@marvell.com Subject: Re: [PATCH v5 1/4] uio: introduce UIO_MEM_DMA_COHERENT type Message-ID: <20240204102050.GB916983@kernel.org> References: <20240201233400.3394996-1-cleech@redhat.com> <20240201233400.3394996-2-cleech@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240201233400.3394996-2-cleech@redhat.com> On Thu, Feb 01, 2024 at 03:33:57PM -0800, Chris Leech wrote: > Add a UIO memtype specifically for sharing dma_alloc_coherent > memory with userspace, backed by dma_mmap_coherent. > > This is mainly for the bnx2/bnx2x/bnx2i "cnic" interface, although there > are a few other uio drivers which map dma_alloc_coherent memory and will > be converted to use dma_mmap_coherent as well. > > Signed-off-by: Nilesh Javali > Signed-off-by: Chris Leech > Reviewed-by: Christoph Hellwig .. > diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h > index 47c5962b876b0..a7756f909dd01 100644 > --- a/include/linux/uio_driver.h > +++ b/include/linux/uio_driver.h > @@ -37,10 +37,12 @@ struct uio_map; > struct uio_mem { > const char *name; > phys_addr_t addr; > + dma_addr_t dma_addr; > unsigned long offs; > resource_size_t size; > int memtype; > void __iomem *internal_addr; > + struct device *dma_device; > struct uio_map *map; > }; Hi Chris, please consider adding these new fields to the kernel doc for this structure, which appears just above in uio_driver.h. ..