From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by kanga.kvack.org (Postfix) with ESMTP id 2A9206B0288 for ; Tue, 25 Oct 2016 17:38:52 -0400 (EDT) Received: by mail-pa0-f72.google.com with SMTP id ra7so11535940pab.5 for ; Tue, 25 Oct 2016 14:38:52 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com. [134.134.136.65]) by mx.google.com with ESMTPS id u15si22782954pfa.246.2016.10.25.14.38.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 25 Oct 2016 14:38:51 -0700 (PDT) Subject: [net-next PATCH 16/27] arch/openrisc: Add option to skip DMA sync as a part of mapping From: Alexander Duyck Date: Tue, 25 Oct 2016 11:38:13 -0400 Message-ID: <20161025153813.4815.18848.stgit@ahduyck-blue-test.jf.intel.com> In-Reply-To: <20161025153220.4815.61239.stgit@ahduyck-blue-test.jf.intel.com> References: <20161025153220.4815.61239.stgit@ahduyck-blue-test.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Jonas Bonn , davem@davemloft.net, brouer@redhat.com This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to avoid invoking cache line invalidation if the driver will just handle it via a sync_for_cpu or sync_for_device call. Cc: Jonas Bonn Signed-off-by: Alexander Duyck --- arch/openrisc/kernel/dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/openrisc/kernel/dma.c b/arch/openrisc/kernel/dma.c index 140c991..906998b 100644 --- a/arch/openrisc/kernel/dma.c +++ b/arch/openrisc/kernel/dma.c @@ -141,6 +141,9 @@ unsigned long cl; dma_addr_t addr = page_to_phys(page) + offset; + if (attrs & DMA_ATTR_SKIP_CPU_SYNC) + return addr; + switch (dir) { case DMA_TO_DEVICE: /* Flush the dcache for the requested range */ -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org