From patchwork Tue Apr 24 19:16:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10360795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 704EA601BE for ; Tue, 24 Apr 2018 19:15:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5ECAF28D5A for ; Tue, 24 Apr 2018 19:15:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5332028E19; Tue, 24 Apr 2018 19:15:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFB7A28D5A for ; Tue, 24 Apr 2018 19:15:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751492AbeDXTPN (ORCPT ); Tue, 24 Apr 2018 15:15:13 -0400 Received: from verein.lst.de ([213.95.11.211]:32796 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbeDXTPK (ORCPT ); Tue, 24 Apr 2018 15:15:10 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id A3A4868DB7; Tue, 24 Apr 2018 21:16:40 +0200 (CEST) Date: Tue, 24 Apr 2018 21:16:40 +0200 From: Christoph Hellwig To: Greentime Hu Cc: Christoph Hellwig , 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 Subject: Re: [PATCH 13/22] nds32: use generic dma_noncoherent_ops Message-ID: <20180424191640.GA32495@lst.de> References: <20180420080313.18796-1-hch@lst.de> <20180420080313.18796-14-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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? --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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();