Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751766AbbFYQdc (ORCPT ); Thu, 25 Jun 2015 12:33:32 -0400 Received: from mail-qc0-f172.google.com ([209.85.216.172]:34637 "EHLO mail-qc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751252AbbFYQdX (ORCPT ); Thu, 25 Jun 2015 12:33:23 -0400 Date: Thu, 25 Jun 2015 12:33:18 -0400 (EDT) From: Nicolas Pitre To: santosh shilimkar cc: linux@arm.linux.org.uk, Vitaly Andrianov , ssantosh@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: use phys_addr_t in pfn_to_kaddr() In-Reply-To: <558B0388.1040006@oracle.com> Message-ID: References: <1435072386-13527-1-git-send-email-vitalya@ti.com> <558B0388.1040006@oracle.com> User-Agent: Alpine 2.11 (LFD 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1452 Lines: 44 On Wed, 24 Jun 2015, santosh shilimkar wrote: > On 6/23/2015 8:13 AM, Vitaly Andrianov wrote: > > This patch fixes pfn_to_kaddr() to use phys_addr_t. Without this, > > this macro is broken on LPAE systems. For physical addresses above > > first 4GB result of shifting pfn with PAGE_SHIFT may be truncated. > > > > Signed-off-by: Vitaly Andrianov > > --- > Looks a valid fix. > > RMK, Nico, what you say ? Looks fine to me. Acked-by: Nicolas Pitre > > > arch/arm/include/asm/memory.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h > > index 184def0..063ef31 100644 > > --- a/arch/arm/include/asm/memory.h > > +++ b/arch/arm/include/asm/memory.h > > @@ -291,7 +291,7 @@ static inline void *phys_to_virt(phys_addr_t x) > > */ > > #define __pa(x) __virt_to_phys((unsigned long)(x)) > > #define __va(x) ((void > > *)__phys_to_virt((phys_addr_t)(x))) > > -#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) > > +#define pfn_to_kaddr(pfn) __va((phys_addr_t)(pfn) << PAGE_SHIFT) > > > > extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x); > > > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/