blob: 91c69ff53a8a849e12b0b5638205b331e7143687 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
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 Bergmann88ced032005-12-16 22:43:46 +010010#ifdef __KERNEL__
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Stephen Rothwell17ad6ea2009-03-19 22:03:22 +110012#include <linux/cpumask.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013
Anton Blanchard45fb6ce2005-11-11 14:22:35 +110014/*
15 * generic non-linear memory support:
Andy Whitcroft145e6642005-06-23 00:08:03 -070016 *
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 Whitcroft145e6642005-06-23 00:08:03 -070021#ifdef CONFIG_NEED_MULTIPLE_NODES
Linus Torvalds1da177e2005-04-16 15:20:36 -070022
23extern struct pglist_data *node_data[];
Andy Whitcroft145e6642005-06-23 00:08:03 -070024/*
25 * Return a pointer to the node data for node n.
26 */
27#define NODE_DATA(nid) (node_data[nid])
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
29/*
30 * Following are specific to this numa platform.
31 */
32
33extern int numa_cpu_lookup_table[];
Anton Blanchard25863de2010-04-26 15:32:43 +000034extern cpumask_var_t node_to_cpumask_map[];
Mike Kravetz82dd26a2005-11-04 15:20:24 -080035#ifdef CONFIG_MEMORY_HOTPLUG
36extern unsigned long max_pfn;
Nishanth Aravamudancd342062010-10-26 17:35:12 +000037u64 memory_hotplug_max(void);
38#else
39#define memory_hotplug_max() memblock_end_of_DRAM()
Mike Kravetz82dd26a2005-11-04 15:20:24 -080040#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070041
Nishanth Aravamudancd342062010-10-26 17:35:12 +000042#else
43#define memory_hotplug_max() memblock_end_of_DRAM()
Andy Whitcroft145e6642005-06-23 00:08:03 -070044#endif /* CONFIG_NEED_MULTIPLE_NODES */
Srikar Dronamraju1e76609c2016-10-07 16:59:21 -070045#ifdef CONFIG_FA_DUMP
46#define __HAVE_ARCH_RESERVED_KERNEL_PAGES
47#endif
Andy Whitcroft145e6642005-06-23 00:08:03 -070048
Arnd Bergmann88ced032005-12-16 22:43:46 +010049#endif /* __KERNEL__ */
Linus Torvalds1da177e2005-04-16 15:20:36 -070050#endif /* _ASM_MMZONE_H_ */