xref: /openbmc/linux/arch/ia64/include/asm/mmzone.h (revision 976e3645923bdd2fe7893aae33fd7a21098bfb28)
17f30491cSTony Luck /*
27f30491cSTony Luck  * This file is subject to the terms and conditions of the GNU General Public
37f30491cSTony Luck  * License.  See the file "COPYING" in the main directory of this archive
47f30491cSTony Luck  * for more details.
57f30491cSTony Luck  *
67f30491cSTony Luck  * Copyright (c) 2000,2003 Silicon Graphics, Inc.  All rights reserved.
77f30491cSTony Luck  * Copyright (c) 2002 NEC Corp.
87f30491cSTony Luck  * Copyright (c) 2002 Erich Focht <efocht@ess.nec.de>
97f30491cSTony Luck  * Copyright (c) 2002 Kimio Suganuma <k-suganuma@da.jp.nec.com>
107f30491cSTony Luck  */
117f30491cSTony Luck #ifndef _ASM_IA64_MMZONE_H
127f30491cSTony Luck #define _ASM_IA64_MMZONE_H
137f30491cSTony Luck 
147f30491cSTony Luck #include <linux/numa.h>
157f30491cSTony Luck #include <asm/page.h>
167f30491cSTony Luck #include <asm/meminit.h>
177f30491cSTony Luck 
187f30491cSTony Luck #ifdef CONFIG_NUMA
197f30491cSTony Luck 
pfn_to_nid(unsigned long pfn)207f30491cSTony Luck static inline int pfn_to_nid(unsigned long pfn)
217f30491cSTony Luck {
227f30491cSTony Luck 	extern int paddr_to_nid(unsigned long);
237f30491cSTony Luck 	int nid = paddr_to_nid(pfn << PAGE_SHIFT);
247f30491cSTony Luck 	if (nid < 0)
257f30491cSTony Luck 		return 0;
267f30491cSTony Luck 	else
277f30491cSTony Luck 		return nid;
287f30491cSTony Luck }
297f30491cSTony Luck 
307f30491cSTony Luck #define MAX_PHYSNODE_ID		2048
317f30491cSTony Luck #endif /* CONFIG_NUMA */
327f30491cSTony Luck 
33*df41017eSChristoph Hellwig #define NR_NODE_MEMBLKS		(MAX_NUMNODES * 4)
34*df41017eSChristoph Hellwig 
357f30491cSTony Luck #endif /* _ASM_IA64_MMZONE_H */
36