Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99 |
| 4 | * |
| 5 | * PowerPC64 port: |
| 6 | * Copyright (C) 2002 Anton Blanchard, IBM Corp. |
| 7 | */ |
| 8 | #ifndef _ASM_MMZONE_H_ |
| 9 | #define _ASM_MMZONE_H_ |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 10 | #ifdef __KERNEL__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
Stephen Rothwell | 17ad6ea | 2009-03-19 22:03:22 +1100 | [diff] [blame] | 12 | #include <linux/cpumask.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
Anton Blanchard | 45fb6ce | 2005-11-11 14:22:35 +1100 | [diff] [blame] | 14 | /* |
| 15 | * generic non-linear memory support: |
Andy Whitcroft | 145e664 | 2005-06-23 00:08:03 -0700 | [diff] [blame] | 16 | * |
| 17 | * 1) we will not split memory into more chunks than will fit into the |
| 18 | * flags field of the struct page |
| 19 | */ |
| 20 | |
Andy Whitcroft | 145e664 | 2005-06-23 00:08:03 -0700 | [diff] [blame] | 21 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | |
| 23 | extern struct pglist_data *node_data[]; |
Andy Whitcroft | 145e664 | 2005-06-23 00:08:03 -0700 | [diff] [blame] | 24 | /* |
| 25 | * Return a pointer to the node data for node n. |
| 26 | */ |
| 27 | #define NODE_DATA(nid) (node_data[nid]) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | |
| 29 | /* |
| 30 | * Following are specific to this numa platform. |
| 31 | */ |
| 32 | |
| 33 | extern int numa_cpu_lookup_table[]; |
Anton Blanchard | 25863de | 2010-04-26 15:32:43 +0000 | [diff] [blame] | 34 | extern cpumask_var_t node_to_cpumask_map[]; |
Mike Kravetz | 82dd26a | 2005-11-04 15:20:24 -0800 | [diff] [blame] | 35 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 36 | extern unsigned long max_pfn; |
Nishanth Aravamudan | cd34206 | 2010-10-26 17:35:12 +0000 | [diff] [blame] | 37 | u64 memory_hotplug_max(void); |
| 38 | #else |
| 39 | #define memory_hotplug_max() memblock_end_of_DRAM() |
Mike Kravetz | 82dd26a | 2005-11-04 15:20:24 -0800 | [diff] [blame] | 40 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | |
Nishanth Aravamudan | cd34206 | 2010-10-26 17:35:12 +0000 | [diff] [blame] | 42 | #else |
| 43 | #define memory_hotplug_max() memblock_end_of_DRAM() |
Andy Whitcroft | 145e664 | 2005-06-23 00:08:03 -0700 | [diff] [blame] | 44 | #endif /* CONFIG_NEED_MULTIPLE_NODES */ |
Srikar Dronamraju | 1e76609c | 2016-10-07 16:59:21 -0700 | [diff] [blame] | 45 | #ifdef CONFIG_FA_DUMP |
| 46 | #define __HAVE_ARCH_RESERVED_KERNEL_PAGES |
| 47 | #endif |
Andy Whitcroft | 145e664 | 2005-06-23 00:08:03 -0700 | [diff] [blame] | 48 | |
Arnd Bergmann | 88ced03 | 2005-12-16 22:43:46 +0100 | [diff] [blame] | 49 | #endif /* __KERNEL__ */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | #endif /* _ASM_MMZONE_H_ */ |