Received: by 10.192.165.148 with SMTP id m20csp130743imm; Tue, 24 Apr 2018 18:45:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqjb5VsF5GJwCr3TUX/eFzVYjsP62fjSlNLayyvjkDuyYVlzJHu/q34nlnrjXpBYbeBTrRF X-Received: by 10.101.96.35 with SMTP id p3mr4729060pgu.175.1524620750305; Tue, 24 Apr 2018 18:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524620750; cv=none; d=google.com; s=arc-20160816; b=f+dzs3ev87WNptYCpuL6/Hd6UywtJoilF5sdC0u7WtABnEeVZK2kIBfvjffiPXqQ2r fcelgkdYY4cuvwsYhka+8eoPhdsZkT2E9wUPftcSdTBbbBkNxrEziKhGzV3RfieuNt9T qJe0+YqnOgU7Q2gkRECrk6Wg15Gko33fVqCYkPoTC7yroQUq+MXOHGyvRx0l2Y7y65XE MXjPK+XsW5uDHoB28neaNExG+ZdUwWWpukhQ5Ky6hwJJ75De5aNawmnzSuOkQrcdZcyy klofwfsdnpDXPA/52xF5VUxvcTiJwCHxkvH4X1RkA4xA0rhyXyxmu1JmD/XlDSm27yTK lECg== 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=3C51TpAG+K6U4V7FfaTVIUADFSk2HKkKNiJZSyN8GL8=; b=FksT8pbamz1xyFD41hiNykOU4Y9mBHxCPn/rVjul8V0v2cs0D1skTRBuAo/5ZB0AMc eQwoOMOBsyHGes6eghgqAMHxCQehMXPxeCTNyKY6ldID8JvIksYjU1yyRbzfvuvjiyvL qPqkdkeMrNtLMye3Ezd1ofq+KmJWxqJsvZAwwJkeoLHZr9uvywQc7x1Lgu/skdDcgYNM /KCv9PmqD73Ln46fc6FhZU7lwIkk3ybBXSWdLiACi/rXDksIAsL+RlIHZmJrbtyDCYS4 ytXxSlRfq+04UcENdIn+WmJcSncpp4+02M8tshZ4js4ExSq8ltHH4+um0HnN6n/cqC34 0X7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NaAbh05q; 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 a61-v6si15284474pla.400.2018.04.24.18.45.35; Tue, 24 Apr 2018 18:45:50 -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=NaAbh05q; 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 S1751255AbeDYBoa (ORCPT + 99 others); Tue, 24 Apr 2018 21:44:30 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:45696 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbeDYBoZ (ORCPT ); Tue, 24 Apr 2018 21:44:25 -0400 Received: by mail-vk0-f65.google.com with SMTP id 203so12883593vka.12; Tue, 24 Apr 2018 18:44:25 -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=3C51TpAG+K6U4V7FfaTVIUADFSk2HKkKNiJZSyN8GL8=; b=NaAbh05qJViXOqOiEfgycystPAKA+mFuFeB5JQX+7cwiVICz6Obkjq6Cr1880BjgIi lSPwju82rMkL/bEqO4Mi53uJ9n7CEfPbKMWINdE4NJQqaN1MgS2r8nCjWOyGH1dtk5+d Af1YJuy+zFu9tYWjydM1VjfT3KMbl5eddFFs8RiTGMDeEMpenZ70HEAb8mgSwNj+v38C OiwGZCmYNaA9dToqJexnS+cyvE6ufq9SgjH9SyMcV20SQOjOzXuUjE1cBhISYrgTfDbx vd1XNPHl65w5x0bfOaQHGw3/Ta6+NxC5NdmNtXYAm59W5IKh/gZ4juOmE+7D4Fw6goSb zoPw== 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=3C51TpAG+K6U4V7FfaTVIUADFSk2HKkKNiJZSyN8GL8=; b=THba2xyVXeJvhRHBp2hJkHXPKFKd4A8/aRnMgR+pODEWvRD9EW4BQl/yGJxfWmgg2Y n4Uud2836fzduCCMVc0zA3p8kTRLrwFJCbYJd8wP3Zgm/kohkXIqgybezFbvW7nFOraY yuFldA7ftFlgJ6Mc1bJeMlu3zOd+ezxlySR/RFMfBPUg1h62iv4VQH4NfUDYNpCkvoG0 L8kms107Of6AF3hf/lK38+6qIyMwq2/Oh9/xs9QhMQCNtfClOYkxRktzyJvZg5QYxxxv 3AlKojqHtx5qRU90iEkHwaSDdkegf9P9Yi8lO1zX9IzdQzjacLUPCZTvqSxMG9fOJpzV +UGQ== X-Gm-Message-State: ALQs6tAUBA9pHShd5TubUgDG6+Ah3LgHJzvko2BpDVrxuCWZOcpXpORu DNFbjVU8sENkK8HXpDdX0iMjKclUD9bvYORIsNw= X-Received: by 10.31.80.68 with SMTP id e65mr4152263vkb.182.1524620664497; Tue, 24 Apr 2018 18:44:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.92.86 with HTTP; Tue, 24 Apr 2018 18:43:43 -0700 (PDT) In-Reply-To: <20180424191640.GA32495@lst.de> References: <20180420080313.18796-1-hch@lst.de> <20180420080313.18796-14-hch@lst.de> <20180424191640.GA32495@lst.de> From: Greentime Hu Date: Wed, 25 Apr 2018 09:43:43 +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-25 3:16 GMT+08:00 Christoph Hellwig : > Hi Greentime, > > thanks for testing the patch! > > It looks like nds32 doesn't have a buildbot yet, so this code didn't > even get syntax checkin, sorry. > > Below is the incremental fixes based on this thread. > > Can you check if my tree works if you just revert the > "nds32: use generic dma_noncoherent_ops" commit? > > diff --git a/arch/nds32/kernel/dma.c b/arch/nds32/kernel/dma.c > index 688f1a03dee6..48018275e7f4 100644 > --- a/arch/nds32/kernel/dma.c > +++ b/arch/nds32/kernel/dma.c > @@ -330,7 +330,7 @@ void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr, > void *addr = kmap_atomic_pfn(PHYS_PFN(paddr)); > unsigned long start = (unsigned long)addr; > > - switch (direction) { > + switch (dir) { > case DMA_FROM_DEVICE: > break; > case DMA_TO_DEVICE: > @@ -350,12 +350,12 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr, > void *addr = kmap_atomic_pfn(PHYS_PFN(paddr)); > unsigned long start = (unsigned long)addr; > > - switch (direction) { > + switch (dir) { > case DMA_TO_DEVICE: > break; > case DMA_FROM_DEVICE: > case DMA_BIDIRECTIONAL: > - cpu_dma_inval_range(start, end); > + cpu_dma_inval_range(start, start + size); > break; > default: > BUG(); Hi Crhistoph, The ftmac100 works if I revert this commit. commit de46b9ba5298aafc47284735a4f21baa8e4ed4b7 Author: Greentime Hu Date: Wed Apr 25 09:33:51 2018 +0800 Revert "nds32: use generic dma_noncoherent_ops" This reverts commit 0489ce952072e7542456e0d962437062916ce0df.