From mboxrd@z Thu Jan 1 00:00:00 1970 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 74C7128DC1; Thu, 12 Oct 2023 13:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39833C433C8; Thu, 12 Oct 2023 13:25:03 +0000 (UTC) Message-ID: Date: Thu, 12 Oct 2023 23:25:00 +1000 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/6] net: fec: use dma_alloc_noncoherent for m532x Content-Language: en-US To: Michael Schmitz , Christoph Hellwig Cc: Robin Murphy , iommu@lists.linux.dev, Marek Szyprowski , Geert Uytterhoeven , Wei Fang , Shenwei Wang , Clark Wang , NXP Linux Team , linux-m68k@lists.linux-m68k.org, netdev@vger.kernel.org, Jim Quinlan References: <20231009074121.219686-1-hch@lst.de> <20231009074121.219686-6-hch@lst.de> <0299895c-24a5-4bd4-b7a4-dc50cc21e3d8@linux-m68k.org> <20231011055213.GA1131@lst.de> <12c7b0db-938c-9ca4-7861-dd703a83389a@gmail.com> From: Greg Ungerer In-Reply-To: <12c7b0db-938c-9ca4-7861-dd703a83389a@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Michael, On 12/10/23 04:21, Michael Schmitz wrote: > Hi Greg, > > On 12/10/23 02:09, Greg Ungerer wrote: >> >> I think this needs to be CONFIG_COLDFIRE is set and none of CONFIG_HAVE_CACHE_CB or >> CONFIG_CACHE_D or CONFIG_CACHE_BOTH are set. >> >> >> >>> in the fec driver do the alloc_noncoherent and global cache flush >>> hack if: >>> >>> COMFIG_COLDFIRE && (CONFIG_CACHE_D || CONFIG_CACHE_BOTH) >> >> And then this becomes: >> >> CONFIG_COLDFIRE && (CONFIG_HAVE_CACHE_CB || CONFIG_CACHE_D || CONFIG_CACHE_BOTH) > > You appear to have dropped a '!' there ... Not sure I follow. This is the opposite of the case above. The noncoherent alloc and cache flush should be performed if ColdFire and any of CONFIG_HAVE_CACHE_CB, CONFIG_CACHE_D or CONFIG_CACHE_BOTH are set - since that means there is data caching involved. Regards Greg