From patchwork Wed Jan 14 17:44:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Andrianov X-Patchwork-Id: 5634191 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 353AC9F2ED for ; Wed, 14 Jan 2015 17:51:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7229820219 for ; Wed, 14 Jan 2015 17:51:07 +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 9941020122 for ; Wed, 14 Jan 2015 17:51:06 +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 1YBS3V-0000Av-Uw; Wed, 14 Jan 2015 17:48:33 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YBRyN-0003Qp-BN for linux-arm-kernel@lists.infradead.org; Wed, 14 Jan 2015 17:43:16 +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 t0EHghbk003010; Wed, 14 Jan 2015 11:42:43 -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 t0EHghBj010581; Wed, 14 Jan 2015 11:42:43 -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:42:42 -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 t0EHggGK007156; Wed, 14 Jan 2015 11:42:42 -0600 From: Vitaly Andrianov To: , , , , Subject: [Resend PATCH] ARM: mm: use phys_addr_t in ioremap_page functions Date: Wed, 14 Jan 2015 12:44:12 -0500 Message-ID: <1421257452-18834-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_094315_501273_9BAC4C4E X-CRM114-Status: UNSURE ( 7.76 ) 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 function. Signed-off-by: Vitaly Andrianov Acked-by: Murali Karicheri - Fixing the commit log and resending --- 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,