From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753554AbeDZIHY (ORCPT ); Thu, 26 Apr 2018 04:07:24 -0400 Received: from mail-ua0-f194.google.com ([209.85.217.194]:42275 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752972AbeDZIHP (ORCPT ); Thu, 26 Apr 2018 04:07:15 -0400 X-Google-Smtp-Source: AIpwx48NeExR0omRE0oSaLs6aSgt8ueAUNG9R9255zNOFkdZtzbQOp3U4zdpqy0g84hs6FsU/1xkO1BGZbqffinETqQ= MIME-Version: 1.0 In-Reply-To: <20180426064239.GA13895@lst.de> References: <20180420080313.18796-1-hch@lst.de> <20180420080313.18796-14-hch@lst.de> <20180424191640.GA32495@lst.de> <20180425064055.GA11460@lst.de> <20180426064239.GA13895@lst.de> From: Greentime Hu Date: Thu, 26 Apr 2018 16:06:34 +0800 Message-ID: Subject: Re: [PATCH 13/22] nds32: use generic dma_noncoherent_ops To: Christoph Hellwig Cc: linux-arch , Michal Simek , Vincent Chen , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, linux-m68k@vger.kernel.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux , linux-xtensa@linux-xtensa.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-04-26 14:42 GMT+08:00 Christoph Hellwig : > Can you try this patch ontop of either the new or original one? > > --- > diff --git a/lib/dma-noncoherent.c b/lib/dma-noncoherent.c > index f4b8532c20ac..a2c192b3508d 100644 > --- a/lib/dma-noncoherent.c > +++ b/lib/dma-noncoherent.c > @@ -48,7 +48,7 @@ static int dma_noncoherent_map_sg(struct device *dev, struct scatterlist *sgl, > return nents; > } > > -#ifdef CONFIG_DMA_NONCOHERENT_SYNC_FOR_CPU > +#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU > static void dma_noncoherent_sync_single_for_cpu(struct device *dev, > dma_addr_t addr, size_t size, enum dma_data_direction dir) > { > @@ -88,7 +88,7 @@ const struct dma_map_ops dma_noncoherent_ops = { > .sync_sg_for_device = dma_noncoherent_sync_sg_for_device, > .map_page = dma_noncoherent_map_page, > .map_sg = dma_noncoherent_map_sg, > -#ifdef CONFIG_DMA_NONCOHERENT_SYNC_FOR_CPU > +#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU > .sync_single_for_cpu = dma_noncoherent_sync_single_for_cpu, > .sync_sg_for_cpu = dma_noncoherent_sync_sg_for_cpu, > .unmap_page = dma_noncoherent_unmap_page, It works!!!