Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1926665rdb; Wed, 31 Jan 2024 13:31:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGptmzuHnFWRH4M6S6Pmdam82cFfZd3H6anq/P0iTxuP506cFCPjV4QMV6qnIAt2w2xXUv/ X-Received: by 2002:a17:906:d0c9:b0:a36:6c96:3161 with SMTP id bq9-20020a170906d0c900b00a366c963161mr2163167ejb.32.1706736699457; Wed, 31 Jan 2024 13:31:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706736699; cv=pass; d=google.com; s=arc-20160816; b=OQijc3PUuReITyIQqn+wqXICvmrkE95j7POKxOAsxdn/X7Lou+SVhsUFystq/lQEUx m8AkZGamAd0WFs0ZkFl06/h1r8DXYnMPuxGEL4MTmKNwJG5+IUyq4/FAzozGVpYZ3NSW 8eK/K4CG3V29u5VaaWa6ZydUHZeuxjqNOEr1L5VqEeofw8UtlVPB8dybgJPYTAwTtsPc HLHJIE+prYtaVtnDO1Fr/O2uYaPyzVTuLR4/iBU68vdNrCwagcBYq2txhw1zJ/6d0z0P I86G0QulyJK+8Qi8OBAjj/ET6USJRtyMpi7KZFs2offKV0VVsXaNfh3zReYLx5b0z3IY IPqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OoKJ98QVFMKrPIrD2GdIUsw9oyDce1iAb0cIgnP3Dbk=; fh=o81B/Nb5CAVknr+0xw1LeGNpBWOqZ83hEDo9uBM2Lis=; b=NWveEzR9I1uOMLLC8nO4lXEkkxXpB27BRV/JpgCUwWKVcdStGQSCyEr7t7ZHcRFmJV ROHDYHGOIxaLDwh4yJJtX0UY6hqlpdZA7uqd+8qB+FzRmr/Hyy92yaRSQhOUboCYZIzq kxGCL5twQUzu7JxeEpTyzfvCNDtR1OjDEvVTbEwq9uqy7CEFqDJ2Ku7qRjIa9aqCEzRD h6TwfVNkNQLzZHUnUgAs5QIpuXN4Ni4M+KfVW4IxhQOgmX0bfsOluetq5QnJF7S9dW/p CFXO/FGLcCXPWZ6nZlwI5jSo4mM7G0b5dOt8NDFZI5MfPS6VwhHaD4T6TqX81ofLU50j rC7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AI3vnwwT; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-47171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47171-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=1; AJvYcCXlaVMse7L6SyS/KoILRLzm0MViLyZ2Lc8WB4yfuP94r6HJ5dwVoCu4WdzS7ReDeRZkXlrdJRKdW1CpckeUPa+sFVq3yYEN6IAXXefrtw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id um11-20020a170906cf8b00b00a36607a6b8fsi1221244ejb.791.2024.01.31.13.31.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 13:31:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AI3vnwwT; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-47171-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47171-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 196C31F21D45 for ; Wed, 31 Jan 2024 21:31:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E3CD3A28E; Wed, 31 Jan 2024 21:29:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AI3vnwwT" 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 A017139ACE; Wed, 31 Jan 2024 21:29:56 +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=1706736596; cv=none; b=MdKbFTS7jhLhZq7x1Z/LokxI6hNgrWBzX/mMrqKQgg06enEnYPtSzBRu2RBRh7G8DeqY02EU5N3hVvgo8gq/6rCnnQxT0XUu7koN+Zqlgw4KSo44AA/6eK4xWQlMzKHlxcZKh/UV9TQXpQ3SLYQXSC3PLLHolhSVe8nAd5Ykc1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706736596; c=relaxed/simple; bh=6fj/DX2RBc3mm1fSA9gkesW+xuAGsYbPXv5YOo3ZBf8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hFiahCazhwRFPd99t1p5rxVmU4uTtJpZuOIKDfakyQRSr2aQMYbftK6hq1peRETnxCqwNbS07GBI3RRTR0INHCmsA0KfhkfPjfYmw1yDoATlWw6bQ8bDl1hZOE4C4DwZSdFLWnlCUaQv1jAKFg/vPsNcFiAU8Gs3ZvACwds5+0c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AI3vnwwT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21762C433F1; Wed, 31 Jan 2024 21:29:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706736596; bh=6fj/DX2RBc3mm1fSA9gkesW+xuAGsYbPXv5YOo3ZBf8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AI3vnwwTrvTu/QmK0+wair/yqTNxuvY3lHDtxhEJsUHHEdbIgVtl/EEh5Bp8psqwm iOERzdMsjw2BfNEmJNqTAtyyeZv5WqKX0HKBR6Ny3xbF4O8NGXIrDZNlkX59mP91f4 YYcd60X77bb0TPxulFrcoGTJNmwkr8vI+TL+g0ko= Date: Wed, 31 Jan 2024 13:29:56 -0800 From: Greg Kroah-Hartman To: Chris Leech 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 Subject: Re: [PATCH 2/2] cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT Message-ID: <2024013125-unraveled-definite-7fc6@gregkh> References: <20240131191732.3247996-1-cleech@redhat.com> <20240131191732.3247996-3-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: <20240131191732.3247996-3-cleech@redhat.com> On Wed, Jan 31, 2024 at 11:17:32AM -0800, Chris Leech wrote: > Use the UIO_MEM_DMA_COHERENT type to properly handle mmap for > dma_alloc_coherent buffers. > > The cnic l2_ring and l2_buf mmaps have caused page refcount issues as > the dma_alloc_coherent no longer provide __GFP_COMP allocation as per > commit "dma-mapping: reject __GFP_COMP in dma_alloc_attrs". > > Fix this by having the uio device use dma_mmap_coherent. > > The bnx2 and bnx2x status block allocations are also dma_alloc_coherent, > and should use dma_mmap_coherent. They don't allocate multiple pages, > but this interface does not work correctly with an iommu enabled unless > dma_mmap_coherent is used. > > Fixes: bb73955c0b1d ("cnic: don't pass bogus GFP_ flags to dma_alloc_coherent") This is really the commit that broke things? By adding this, are you expecting anyone to backport this change to older kernels? thanks, greg k-h