Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99
0004  *
0005  * PowerPC64 port:
0006  * Copyright (C) 2002 Anton Blanchard, IBM Corp.
0007  */
0008 #ifndef _ASM_MMZONE_H_
0009 #define _ASM_MMZONE_H_
0010 #ifdef __KERNEL__
0011 
0012 #include <linux/cpumask.h>
0013 
0014 /*
0015  * generic non-linear memory support:
0016  *
0017  * 1) we will not split memory into more chunks than will fit into the
0018  *    flags field of the struct page
0019  */
0020 
0021 #ifdef CONFIG_NUMA
0022 
0023 extern struct pglist_data *node_data[];
0024 /*
0025  * Return a pointer to the node data for node n.
0026  */
0027 #define NODE_DATA(nid)      (node_data[nid])
0028 
0029 /*
0030  * Following are specific to this numa platform.
0031  */
0032 
0033 extern int numa_cpu_lookup_table[];
0034 extern cpumask_var_t node_to_cpumask_map[];
0035 #ifdef CONFIG_MEMORY_HOTPLUG
0036 extern unsigned long max_pfn;
0037 u64 memory_hotplug_max(void);
0038 #else
0039 #define memory_hotplug_max() memblock_end_of_DRAM()
0040 #endif
0041 
0042 #else
0043 #define memory_hotplug_max() memblock_end_of_DRAM()
0044 #endif /* CONFIG_NUMA */
0045 #ifdef CONFIG_FA_DUMP
0046 #define __HAVE_ARCH_RESERVED_KERNEL_PAGES
0047 #endif
0048 
0049 #ifdef CONFIG_MEMORY_HOTPLUG
0050 extern int create_section_mapping(unsigned long start, unsigned long end,
0051                   int nid, pgprot_t prot);
0052 #endif
0053 
0054 #endif /* __KERNEL__ */
0055 #endif /* _ASM_MMZONE_H_ */