From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757932AbZKXBlR (ORCPT ); Mon, 23 Nov 2009 20:41:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757922AbZKXBlO (ORCPT ); Mon, 23 Nov 2009 20:41:14 -0500 Received: from relay1.sgi.com ([192.48.179.29]:43909 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757781AbZKXBjr (ORCPT ); Mon, 23 Nov 2009 20:39:47 -0500 Message-Id: <20091124013953.324186000@alcatraz.americas.sgi.com> User-Agent: quilt/0.47-1 Date: Mon, 23 Nov 2009 19:39:40 -0600 From: Robin Holt To: Andrew Morton Cc: Robin Holt , Jack Steiner , linux-kernel , linux-mm@vger.kernel.org Subject: [patch 3/8] x86: UV - Introduce uv_gpa_is_mmr. References: <20091124013937.354595000@alcatraz.americas.sgi.com> Content-Disposition: inline; filename=uv_gpa_is_mmr_space Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Provide a mechanism for determining if a global physical address is pointing to a UV hub MMR. To: Andrew Morton Signed-off-by: Robin Holt Cc: Jack Steiner Cc: lkml Cc: linux-mm@vger.kernel.org --- arch/x86/include/asm/uv/uv_hub.h | 7 +++++++ 1 file changed, 7 insertions(+) Index: linux-x86/arch/x86/include/asm/uv/uv_hub.h =================================================================== --- linux-x86.orig/arch/x86/include/asm/uv/uv_hub.h 2009-11-09 08:50:25.000000000 -0600 +++ linux-x86/arch/x86/include/asm/uv/uv_hub.h 2009-11-09 08:52:14.000000000 -0600 @@ -232,6 +232,13 @@ static inline unsigned long uv_gpa(void return uv_soc_phys_ram_to_gpa(__pa(v)); } +/* Top two bits indicate the requested address is in MMR space. */ +static inline int +uv_gpa_in_mmr_space(unsigned long gpa) +{ + return (gpa >> 62) == 0x3UL; +} + /* UV global physical address --> socket phys RAM */ static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa) {