From patchwork Wed Jan 14 17:22:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Andrianov X-Patchwork-Id: 5633861 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9D4019F357 for ; Wed, 14 Jan 2015 17:23:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED49C201FB for ; Wed, 14 Jan 2015 17:23:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11F8B201FA for ; Wed, 14 Jan 2015 17:23:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YBRdf-00060a-0D; Wed, 14 Jan 2015 17:21:51 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YBRdZ-0005sa-Ic for linux-arm-kernel@lists.infradead.org; Wed, 14 Jan 2015 17:21:46 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id t0EHL0bH019758; Wed, 14 Jan 2015 11:21:00 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t0EHL0DR026369; Wed, 14 Jan 2015 11:21:00 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Wed, 14 Jan 2015 11:21:00 -0600 Received: from uda0794637.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t0EHKxiv015041; Wed, 14 Jan 2015 11:20:59 -0600 From: Vitaly Andrianov To: , , , , Subject: [PATCH] ARM: mm: use phys_addr_t in __arm_ioremap functions Date: Wed, 14 Jan 2015 12:22:34 -0500 Message-ID: <1421256154-18514-1-git-send-email-vitalya@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150114_092145_738230_B839761E X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.0 (-----) Cc: Vitaly Andrianov X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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, T_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 On a 32 bit ARM architecture with LPAE extension physical addresses cannot fit into unsigned long variable. This patch fixes the ioremap_page, __map_ioremap_pfn_caller, __arm_ioremap and __arm_ioremap_exec functions. Signed-off-by: Vitaly Andrianov Acked-by: Murali Karicheri --- arch/arm/include/asm/mach/map.h | 2 +- arch/arm/mm/ioremap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 2fe141f..836f006 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h @@ -52,7 +52,7 @@ extern const struct mem_type *get_mem_type(unsigned int type); /* * external interface to remap single page with appropriate type */ -extern int ioremap_page(unsigned long virt, unsigned long phys, +extern int ioremap_page(unsigned long virt, phys_addr_t phys, const struct mem_type *mtype); #else #define iotable_init(map,num) do { } while (0) diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index f123d6e..e0fe50f 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -103,7 +103,7 @@ void __init add_static_vm_early(struct static_vm *svm) list_add_tail(&svm->list, &curr_svm->list); } -int ioremap_page(unsigned long virt, unsigned long phys, +int ioremap_page(unsigned long virt, phys_addr_t phys, const struct mem_type *mtype) { return ioremap_page_range(virt, virt + PAGE_SIZE, phys,