From patchwork Mon Dec 18 17:39:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 10121145 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 9965960390 for ; Mon, 18 Dec 2017 17:39:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8946C28C56 for ; Mon, 18 Dec 2017 17:39:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DEF128CD3; Mon, 18 Dec 2017 17:39:44 +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.9 required=2.0 tests=BAYES_00,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 0845328C56 for ; Mon, 18 Dec 2017 17:39:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937457AbdLRRjm (ORCPT ); Mon, 18 Dec 2017 12:39:42 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54182 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935974AbdLRRje (ORCPT ); Mon, 18 Dec 2017 12:39:34 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6850A1596; Mon, 18 Dec 2017 09:39:34 -0800 (PST) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.207.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9C3A23F557; Mon, 18 Dec 2017 09:39:32 -0800 (PST) From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: Christoffer Dall , Mark Rutland , Catalin Marinas , Will Deacon , James Morse , Steve Capper , Peter Maydell Subject: [PATCH v3 01/19] arm64: asm-offsets: Avoid clashing DMA definitions Date: Mon, 18 Dec 2017 17:39:08 +0000 Message-Id: <20171218173926.16911-2-marc.zyngier@arm.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171218173926.16911-1-marc.zyngier@arm.com> References: <20171218173926.16911-1-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP asm-offsets.h contains a few DMA related definitions that have the exact same name than the enum members they are derived from. While this is not a problem so far, it will become an issue if both asm-offsets.h and include/linux/dma-direction.h: are pulled by the same file. Let's sidestep the issue by renaming the asm-offsets.h constants. Signed-off-by: Marc Zyngier --- arch/arm64/kernel/asm-offsets.c | 6 +++--- arch/arm64/mm/cache.S | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index 71bf088f1e4b..7e8be0c22ce0 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -87,9 +87,9 @@ int main(void) BLANK(); DEFINE(PAGE_SZ, PAGE_SIZE); BLANK(); - DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL); - DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE); - DEFINE(DMA_FROM_DEVICE, DMA_FROM_DEVICE); + DEFINE(__DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL); + DEFINE(__DMA_TO_DEVICE, DMA_TO_DEVICE); + DEFINE(__DMA_FROM_DEVICE, DMA_FROM_DEVICE); BLANK(); DEFINE(CLOCK_REALTIME, CLOCK_REALTIME); DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC); diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S index 7f1dbe962cf5..c1336be085eb 100644 --- a/arch/arm64/mm/cache.S +++ b/arch/arm64/mm/cache.S @@ -205,7 +205,7 @@ ENDPIPROC(__dma_flush_area) * - dir - DMA direction */ ENTRY(__dma_map_area) - cmp w2, #DMA_FROM_DEVICE + cmp w2, #__DMA_FROM_DEVICE b.eq __dma_inv_area b __dma_clean_area ENDPIPROC(__dma_map_area) @@ -217,7 +217,7 @@ ENDPIPROC(__dma_map_area) * - dir - DMA direction */ ENTRY(__dma_unmap_area) - cmp w2, #DMA_TO_DEVICE + cmp w2, #__DMA_TO_DEVICE b.ne __dma_inv_area ret ENDPIPROC(__dma_unmap_area)