Received: by 10.192.165.148 with SMTP id m20csp1730985imm; Thu, 26 Apr 2018 01:08:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+aCRFnSdzqHbIn59x6/mLITNXcRfE7gL03fbcpapGhwGK2EVuf8qsGRiqqC6o0PXpp/4x9 X-Received: by 10.99.145.196 with SMTP id l187mr26369745pge.261.1524730136772; Thu, 26 Apr 2018 01:08:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524730136; cv=none; d=google.com; s=arc-20160816; b=Qr+hleNh63+odFABbEQI6EOdBww73Zav+QoITfLEa2PU+/aMYyG0ymdyysGAxmpfBE n2S02JnyaM7Z/Jv3loiZVhE7FQM7eGQgZlSbhToloqp65uguiQLZd/uSovJL+2N8O4Q1 8oYGjma7vXtLE3zM2/mlWb07PrRymrkOlg52zLWzv1veiUWr5cPvGTd+qLdwuIuSolN8 WY9yzWpW31e7YtfmNnzov+ixaATGr/UiphlQmwR/yiCvsZRDIYcta1Ogm4ld+QEmbjf5 wFSvhy+N6rTQbElKgfk73h7WU8iQYALGQLg8Xp5CV+jr30CHc/oiNnMxUTZNVSml+6PD Wcjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=1Cs27d8M3KYeTg4O3kW3IAen7kTR90Q57zsMXMOF/r4=; b=CEWOm8JmAFMi62eNh3+a2XIr2n1bFKd7K/fcwo18/kL8pFn6JKRVWbKNMSUM7z5Twu qbbUcvZ8tPaoCxYc0NR675G4X6iCch6IcUl0s1oSOmk8hSIvvqzbyRzACnTFuBva1sxX uNgKyos58Ff0jYwN/ARve2v9bit4K1Ym2EQfYEEqX8fN4dNaX7Adgb+dGgsTy5SNdfYJ ROy+puQ5mo07B5F2OGjK4VrzwCEqUpNmm+HYKSeDeE4gHNE+lgAXR9mY4OrN37S9Rm8x ZR3Cvx/k7JxqLzJ9w9P0vtp6x4UbVyGfEIiHm/PwQCQ9DFgIsJPKrFzwAUu77lYZDRcm P7zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NTc5ymZm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6si1712527pgn.425.2018.04.26.01.08.42; Thu, 26 Apr 2018 01:08:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NTc5ymZm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753951AbeDZIHX (ORCPT + 99 others); Thu, 26 Apr 2018 04:07:23 -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 Received: by mail-ua0-f194.google.com with SMTP id f3so11109324uan.9; Thu, 26 Apr 2018 01:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1Cs27d8M3KYeTg4O3kW3IAen7kTR90Q57zsMXMOF/r4=; b=NTc5ymZmnVjpdaoapZfPbiJ5m0VvdEYQ3oSp6KEVIx8Put4OL6ZdB/r5OW72NhLYeg 3w1Gh4Njt77R4bJocj1tH8iQyffMjFW/oPAergOULZ3a23C6aNeIS0Rgvh7HSdrKUaho nKKGI54WFpZ/Epxnm5iuWk7WvPamZDiLd8zJGE7lQBQMtnjXNgpu7WJLsWFx/mNdtyRl oxec77qojzpJkG64uxjdxZetFrjXCc6sHAkmdOfp50ENjNNu65cotcbapoRAyXA3tfeo TaOdDqajvFCvp8XqQIEBQjJf/WabSU+j3wl0s3ji71/CoyxY2ctKhQz72d5nYvuE7PKI rvog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1Cs27d8M3KYeTg4O3kW3IAen7kTR90Q57zsMXMOF/r4=; b=iyPmhN9FwwzxXjk7Qu7t2u71hh78gnb2Q3fJTMquGs7bX+ITlkcblPTWWx1hXoAXqu qxz9IregWcroE5WpHtWAwsS4rv17r55/fXnS64H1tFDVytS6gsOBH9uNj0wv+ny5FdLm crkuLCWOk5qELY2kiBK1XwuvLBpA+zHTsPnda5kUTTqF+PQ+Zc46W/Bqi0yE5Vh0tZCm xocMEhRyCIsFHf0sq9daBOEUoYUwCx191PD3rmWMKCQIiJp76MCTgut5oT4mbc0Pch9M Mjq0kaNRJ7CySbnlkLa9u72NxVaLl7er/oMaXTxzzTEh/43BKz0GQleBU9DraVTWBjOr WfrQ== X-Gm-Message-State: ALQs6tDB98QdYWEnrqpCYGemczGM19Sv49Ly+tmyDGSas8sVGYDSaQrK lLfKAxb9aqK2nShh+VWbVK+S/7evPv+2Bx6ns98= X-Received: by 10.176.16.20 with SMTP id f20mr23542646uab.141.1524730034501; Thu, 26 Apr 2018 01:07:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.92.86 with HTTP; Thu, 26 Apr 2018 01:06:34 -0700 (PDT) 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@lists.linux-m68k.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 Precedence: bulk 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!!!