[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210210085724.GA24610@lst.de>
Date: Wed, 10 Feb 2021 09:57:24 +0100
From: Christoph Hellwig <hch@....de>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: Christoph Hellwig <hch@....de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org
Subject: Re: [PATCH 4/6] MIPS: refactor the maybe coherent DMA indicators
On Tue, Feb 09, 2021 at 02:12:37PM +0100, Thomas Bogendoerfer wrote:
> > +#ifdef CONFIG_DMA_MAYBE_COHERENT
> > +extern bool dma_default_coherent;
> > static inline bool dev_is_dma_coherent(struct device *dev)
> > {
> > - return coherentio == IO_COHERENCE_ENABLED ||
> > - (coherentio == IO_COHERENCE_DEFAULT && hw_coherentio);
> > + return dma_default_coherent;
>
> this breaks overriding of coherentio via command line. plat_mem_setup/
> plat_setup_iocoherency is called before earlyparams are handled. So
> changing coherentio after that doesn't have any effect.
Hmm. In that case a manual override does actually work for alchemy,
as that initializes coherentio from plat_mem_setup(). But the
elaborate sanity checking that malta performs in plat_setup_iocoherency
is rather pointless then, as coherentio will always be set to
IO_COHERENCE_DISABLED at this point.
Powered by blists - more mailing lists