From patchwork Tue Oct 3 10:43:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9982197 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 DC7F260375 for ; Tue, 3 Oct 2017 10:46:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D01B02884C for ; Tue, 3 Oct 2017 10:46:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4F5628895; Tue, 3 Oct 2017 10:46:35 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 40D802884C for ; Tue, 3 Oct 2017 10:46:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751128AbdJCKqe (ORCPT ); Tue, 3 Oct 2017 06:46:34 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:36904 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751926AbdJCKn2 (ORCPT ); Tue, 3 Oct 2017 06:43:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=o7QJnndeiqaN2wFi6+09T8F5b0ayXQCh8tIr87nftnQ=; b=mRd8pEkQnDyopxLvT1l1lnqVu 0R983yLXUseq/MK5QThwX1sM8XmtFsV4+Ai4s92etCzy9OdppiQ+aE4UqaBMcbwh9zy6+o0IamRbL pF3eyLX1jZQJTjaMHgW1l1goFWNE4UeAGHtYpbBbha+E3XKu1szsnofhW09skS1BB0bCihF5GoAyw Ke3rGfPa6Fnc5fkzVsr2jvbi+uuwdW3z7S2cLV9DdBJ5/yrk5mROeuYEFiQDaV2UNuuWPZKwiiq2Z 0vwWKQpbOiOoIaMQCD/dLxcXCZeM89Te9JkXSJsZWbgge+s5HjOsSfw9dmTOblN3UiIDaRW+N4o66 AWtxcffwA==; Received: from 80-109-164-210.cable.dynamic.surfer.at ([80.109.164.210] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dzKfY-0000O1-Cz; Tue, 03 Oct 2017 10:43:20 +0000 From: Christoph Hellwig To: iommu@lists.linux-foundation.org Cc: Marek Szyprowski , Robin Murphy , Michal Simek , David Howells , Guan Xuetao , Chris Zankel , Max Filippov , x86@kernel.org, linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/11] x86: make dma_cache_sync a no-op Date: Tue, 3 Oct 2017 12:43:02 +0200 Message-Id: <20171003104311.10058-3-hch@lst.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171003104311.10058-1-hch@lst.de> References: <20171003104311.10058-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP x86 does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't make any sense to do any work in dma_cache_sync given that it must be a no-op when dma_alloc_attrs returns coherent memory. Signed-off-by: Christoph Hellwig Reviewed-by: Thomas Gleixner --- arch/x86/include/asm/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 1387dafdba2d..c6d3367be916 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h @@ -71,7 +71,6 @@ static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction dir) { - flush_write_buffers(); } static inline unsigned long dma_alloc_coherent_mask(struct device *dev,