Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1932749rdb; Wed, 31 Jan 2024 13:47:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8Q0cOnxPtpu/GpbCHJ4CIpewKC300Q4NqQyv4dLOC3DNmrgjPORk1tAefOARyKbzhieHy X-Received: by 2002:ac8:5ace:0:b0:42b:edf6:cce1 with SMTP id d14-20020ac85ace000000b0042bedf6cce1mr2209713qtd.35.1706737632826; Wed, 31 Jan 2024 13:47:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706737632; cv=pass; d=google.com; s=arc-20160816; b=IIyIJDx+/Rw5+DhB9ZE3gQ8HoMD24NrVAF/GcphqHi63POgzYThPHwFncPfCy6g5D6 Gcx0HV1LSsFJc4J6oLHBK4/MOvns4bsAQVAgxOHO0/WB7XljR1JyXxK65CQbXb9DJMY+ TQhWbzGBkyD+o5lze4i8dmg0+gGi1TRX8dO8JnUtxK+BULEPGqiCkDPfNYLw9xJAdv9d xzd3g9z78Sfc1aOrgbNykPLaQn8inDbpiHVidJsxeVXIIDnDp+y2Wpbk9RuFSLH/+lar i0XlAeUOQ1DCZKQMVhbqwepQBV5A7D6saCjO33AQD2isJVU0BT9I8iwk1YSOn9sRYQy+ qFMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=7dbCchYRiPga9CCVNutbEbzEx6jSnpAXwCYBNUJ7928=; fh=uEMXyWPVui44rwp2qNejtXOqbVPIMSpp5aEui9ejULc=; b=s+Ew4EQTjf/zvDLHEFxKTB/dSkoiIYZ2KjpF+fYMsZ1wpLLrrIDnuAA4BoNO3ufByK z6pCuW8ABhEkNUr1nF8xSIqTt4aK15B5fY4v5hyqhQftZyeIrfiBzPlVzb4JTocQ8KwJ HJb5eFehxCjKOn+dFwS/NC1NbKV0DkU7KyalvXKNhrQWmh+vixpgleaxOcdQ4U3GfnPN fyTW/eEA5+UeI9ddgXIgi2HZ6cKKFyE2w/amIz4DghEcryrQ7eqL+dOPKnC2Eeu4X367 Rk2QbuVWb6nwM/a/49BoUKrHDbNgmhNfVaabHG3mFAfrIBOGIT3gLwycsS+BYPiSIKic oiWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PTGyIgiq; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-47189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCUVYzzJdu58Geom9r/GlAXKkdEcv+Qym6uiXH4Vc1LzNM7He0+EBgN/VVyLrAoAl02d9Htd7XC4zQSTSVjrbSFYP8V4AivYGeDYwohkYw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c22-20020a05622a025600b0042bec0c4534si1529845qtx.76.2024.01.31.13.47.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 13:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PTGyIgiq; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-47189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E783E1C25B02 for ; Wed, 31 Jan 2024 21:45:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F84039AFE; Wed, 31 Jan 2024 21:45:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PTGyIgiq" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 DA74239AE8 for ; Wed, 31 Jan 2024 21:45:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737509; cv=none; b=r6sy7wGm3SHaZdEGn+ssKkEd3n26G5NLb4mCVJJsmQa99kt4zpgqhm5DrXl6n5j+XoTFzr/LsUrW2smxMxMtcbjqi7X+u/Mv7Br7Y3uRs3hGNM07EWsTe60H3Tjo+u8Dk6Lbl96/zYBB6+MnRbrfMoyycvAaelf9wnpxOvEEJOg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706737509; c=relaxed/simple; bh=RNO5W0OP+zOfgTSimLFGWc0A4ecEarSa4TiMbXZZvIs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=qVbqn9xWaQdxLmDZegw+T8TBsn7dGqxNxT4ft0JhiOPokLeKnYO8iwxVs3GO3Ve1dGRuhwzEZqHmOrdSWGDcWNU/QC3OsyQvxDAwMzCCtjjEWkRBmaGxHTRfbjVJiqXo+ANDYKz5TGg2hnP7CIagwnQzZHHBgQFUrl9SujjzKVM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PTGyIgiq; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706737506; 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=7dbCchYRiPga9CCVNutbEbzEx6jSnpAXwCYBNUJ7928=; b=PTGyIgiqfzGHIXHjD7mq8aock1j2dMZxNW/68eI7/i5jlbf78lDm1toZygFzd7dwzavgRn 5nDCPRHQCFIto+MB51PP+B5cfi0JyrwnmfdwgYOhNX3i5xnjA6f0bMLSORFIceM7JnHsKl EOPKBhYQ3qu6vixrBSwjKD4AkqJcg4Q= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-192-DVs2aktzOIOW9Noo_NFuoQ-1; Wed, 31 Jan 2024 16:45:03 -0500 X-MC-Unique: DVs2aktzOIOW9Noo_NFuoQ-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2cf30de8dd8so2367321fa.3 for ; Wed, 31 Jan 2024 13:45:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706737501; x=1707342301; h=content-transfer-encoding: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=7dbCchYRiPga9CCVNutbEbzEx6jSnpAXwCYBNUJ7928=; b=TIPwaFjfL2vyQfUZQNnRa2o/fg88kmLQAhDlhgbK/HVRCwrS4zplmItDSPSEwpJQWz kDqAMyJ1kZ4NKNcGoErn1xxNntxPKnAzZHAoP/4/9P9YwaU17tm2HG995sQp5oEajyrl oqrlSn6ABf55wfEDNztX1U1ejj7r5OfWixhbQnRdpAorpPNx9UHCGHfc0jstPrVdF5xi ITjvHP1AyLUlMlVtYX9IVrbQK1c2GxES0QmWN/6HDnGiUMn1b4Wx35PVs52VmWYzmQx0 aBsAbRYaJ3pAC/9ZDgtKlGcTfEFNC2ixKJ5CuG7NxBueowG0aQubA2g6kWTUNJsq+s9h y6vw== X-Gm-Message-State: AOJu0YzXyc1ncTl+lvGQOTMjCZc8J284FhAn3IUsJv+MbUk4rn0J4iZB a3Dnr6LZr/yV+Hi7hJSUstmf8ZK0r+uXlZw6vp+TfZfCr5WbWzTe4DX6me32T6H9+fBXSnnG7MN TN7gNjdoxtQLvZw2gjf9nyRrNBkfywvJD7NrIONDlZVU2byKRQkwWbwHQfYPNg/fmHa7LFG/Fja Mq3xMRO/kM9iuIzc1jEXybPWGJfwQOHrzjgkCZyfgPmQcv3II= X-Received: by 2002:a2e:8553:0:b0:2cf:3324:cedd with SMTP id u19-20020a2e8553000000b002cf3324ceddmr2282113ljj.24.1706737501757; Wed, 31 Jan 2024 13:45:01 -0800 (PST) X-Received: by 2002:a2e:8553:0:b0:2cf:3324:cedd with SMTP id u19-20020a2e8553000000b002cf3324ceddmr2282099ljj.24.1706737501453; Wed, 31 Jan 2024 13:45:01 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240131191732.3247996-1-cleech@redhat.com> <20240131191732.3247996-2-cleech@redhat.com> <2024013110-greasily-juvenile-73fc@gregkh> In-Reply-To: <2024013110-greasily-juvenile-73fc@gregkh> From: Chris Leech Date: Wed, 31 Jan 2024 13:44:50 -0800 Message-ID: Subject: Re: [PATCH 1/2] uio: introduce UIO_MEM_DMA_COHERENT type To: Greg Kroah-Hartman Cc: 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 1:29=E2=80=AFPM Greg Kroah-Hartman wrote: > > On Wed, Jan 31, 2024 at 11:17:31AM -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 ther= e > > are a few other uio drivers which map dma_alloc_coherent memory and > > could be converted to use dma_mmap_coherent as well. > > What other drivers could use this? Patches doing the conversion would > be welcome, otherwise, again, I am very loath to take this > one-off-change for just a single driver that shouldn't be doing this in > the first place :) uio_pruss and uio_dmem_genirq both appear to mmap dma_alloc_coherent memory as UIO_MEM_PHYS. It might not be an issue on that platforms where those are used, but I'd be happy to include untested patches to convert them for better adherence to the DMA APIs. (sorry for the double send on this Greg, missed the reply-all) - Chris