From patchwork Thu Nov 14 19:37:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 3184911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 92B989F3AE for ; Thu, 14 Nov 2013 19:38:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE8F720939 for ; Thu, 14 Nov 2013 19:38:37 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C3AB20938 for ; Thu, 14 Nov 2013 19:38:36 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vh2kG-0006YN-W6; Thu, 14 Nov 2013 19:38:29 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vh2kE-0002W5-Ad; Thu, 14 Nov 2013 19:38:26 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vh2kB-0002VA-Jl for linux-arm-kernel@lists.infradead.org; Thu, 14 Nov 2013 19:38:24 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id rAEJboq8008381; Thu, 14 Nov 2013 13:37:50 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAEJbo7D022447; Thu, 14 Nov 2013 13:37:50 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Thu, 14 Nov 2013 13:37:50 -0600 Received: from ula0393909.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAEJblpt012468; Thu, 14 Nov 2013 13:37:49 -0600 From: Santosh Shilimkar To: Subject: [PATCH 1/6] arm64: mm: Add __virt_to_idmap() to keep kvm build happy Date: Thu, 14 Nov 2013 14:37:41 -0500 Message-ID: <1384457866-16135-2-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1384457866-16135-1-git-send-email-santosh.shilimkar@ti.com> References: <1384457866-16135-1-git-send-email-santosh.shilimkar@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131114_143823_717388_28E5890B X-CRM114-Status: UNSURE ( 8.76 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.9 (------) Cc: Marc Zyngier , Catalin Marinas , Will Deacon , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Christoffer Dall X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ARM kvm code will make use of __virt_to_idmap() on arm32 machines as hardware interconnect supported alias of physical memory for idmap purposes. The same code is shared with arm64 bit and hence will break the builds. So we add __virt_to_idmap() which is just __virt_to_phys() on arm64 bit to keep build happy. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Santosh Shilimkar --- arch/arm64/include/asm/memory.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h index 3776217..d9341ee 100644 --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -75,6 +75,14 @@ #define __phys_to_virt(x) ((unsigned long)((x) - PHYS_OFFSET + PAGE_OFFSET)) /* + * Added to keep arm64 kvm build working which shares code with + * 32bit port. ARM kvm code makes use of __virt_to_idmap() on arm32 + * machines as hardware interconnect supported alias of physical + * memory for idmap purposes. + */ +#define virt_to_idmap(x) __virt_to_phys(x) + +/* * Convert a physical address to a Page Frame Number and back */ #define __phys_to_pfn(paddr) ((unsigned long)((paddr) >> PAGE_SHIFT))