Re: [PATCH 22/22] parisc: use generic dma_noncoherent_ops

From: James Bottomley
Date: Sat Apr 21 2018 - 17:43:42 EST


On Fri, 2018-04-20 at 10:03 +0200, Christoph Hellwig wrote:
> diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
> index 8d3a7b80ac42..4e87c35c22b7 100644
> --- a/arch/parisc/kernel/setup.c
> +++ b/arch/parisc/kernel/setup.c
> @@ -97,14 +97,12 @@ void __init dma_ops_init(void)
> Â panic( "PA-RISC Linux currently only supports
> machines that conform to\n"
> Â "the PA-RISC 1.1 or 2.0 architecture
> specification.\n");
> Â
> - case pcxs:
> - case pcxt:
> - hppa_dma_ops = &pcx_dma_ops;
> - break;
> Â case pcxl2:
> Â pa7300lc_init();
> Â case pcxl: /* falls through */
> - hppa_dma_ops = &pcxl_dma_ops;
> + case pcxs:
> + case pcxt:
> + hppa_dma_ops = &dma_noncoherent_ops;
> Â break;
> Â default:
> Â break;

Well, this is wrong: you just made every 32 bit parisc system
unnecessarily use non-coherent. We actually only have a small small
set of non-coherent systems. The pxcs and pcxt systems (which are
about 99% of the user base) can use coherent dma ops. The problem
seems to be in your new world you only have one dma_noncoherent_ops
pointer ... we definitely need two on parisc, so whether
arch_dma_cache_sync is present or not needs to be dynamic not config
defined.

James

--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html