From patchwork Fri Jun 11 09:20:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 105521 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5B9Kdh4004412 for ; Fri, 11 Jun 2010 09:20:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757829Ab0FKJUi (ORCPT ); Fri, 11 Jun 2010 05:20:38 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:39263 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755121Ab0FKJUh (ORCPT ); Fri, 11 Jun 2010 05:20:37 -0400 Received: from m5.gw.fujitsu.co.jp ([10.0.50.75]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o5B9KYtj026191 (envelope-from kaneshige.kenji@jp.fujitsu.com); Fri, 11 Jun 2010 18:20:35 +0900 Received: from smail (m5 [127.0.0.1]) by outgoing.m5.gw.fujitsu.co.jp (Postfix) with ESMTP id 2112A45DE4F; Fri, 11 Jun 2010 18:20:34 +0900 (JST) Received: from s5.gw.fujitsu.co.jp (s5.gw.fujitsu.co.jp [10.0.50.95]) by m5.gw.fujitsu.co.jp (Postfix) with ESMTP id EE25945DE51; Fri, 11 Jun 2010 18:20:33 +0900 (JST) Received: from s5.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s5.gw.fujitsu.co.jp (Postfix) with ESMTP id C3D08E18002; Fri, 11 Jun 2010 18:20:33 +0900 (JST) Received: from m106.s.css.fujitsu.com (m106.s.css.fujitsu.com [10.249.87.106]) by s5.gw.fujitsu.co.jp (Postfix) with ESMTP id 32DF1E08003; Fri, 11 Jun 2010 18:20:33 +0900 (JST) Received: from m106.css.fujitsu.com (m106 [127.0.0.1]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id 01C43A00004; Fri, 11 Jun 2010 18:20:33 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id 69967A00003; Fri, 11 Jun 2010 18:20:32 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Received: from KANE-LIFEBOOK[10.124.100.137] by KANE-LIFEBOOK (FujitsuOutboundMailChecker v1.3.1/9992[10.124.100.137]); Fri, 11 Jun 2010 18:20:10 +0900 (JST) Message-ID: <4C11FFC0.1030006@jp.fujitsu.com> Date: Fri, 11 Jun 2010 18:20:00 +0900 From: Kenji Kaneshige User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-kernel@vger.kernel.org CC: linux-pci@vger.kernel.org, jbarnes@virtuousgeek.org Subject: [PATCH 2/4] x86: ioremap: fix physical address check References: <4C11FF10.4060203@jp.fujitsu.com> In-Reply-To: <4C11FF10.4060203@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 11 Jun 2010 09:20:39 +0000 (UTC) Index: linux-2.6.34/arch/x86/mm/physaddr.h =================================================================== --- linux-2.6.34.orig/arch/x86/mm/physaddr.h 2010-06-10 07:28:28.177229689 +0900 +++ linux-2.6.34/arch/x86/mm/physaddr.h 2010-06-10 07:28:32.587190857 +0900 @@ -3,8 +3,12 @@ static inline int phys_addr_valid(resource_size_t addr) { #ifdef CONFIG_PHYS_ADDR_T_64BIT +#ifdef CONFIG_X86_64 return !(addr >> boot_cpu_data.x86_phys_bits); #else + return !(addr >> 36); +#endif +#else return 1; #endif }