18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Written by Kanoj Sarcar (kanoj@sgi.com) Aug 99 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * PowerPC64 port: 68c2ecf20Sopenharmony_ci * Copyright (C) 2002 Anton Blanchard, IBM Corp. 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#ifndef _ASM_MMZONE_H_ 98c2ecf20Sopenharmony_ci#define _ASM_MMZONE_H_ 108c2ecf20Sopenharmony_ci#ifdef __KERNEL__ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/cpumask.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/* 158c2ecf20Sopenharmony_ci * generic non-linear memory support: 168c2ecf20Sopenharmony_ci * 178c2ecf20Sopenharmony_ci * 1) we will not split memory into more chunks than will fit into the 188c2ecf20Sopenharmony_ci * flags field of the struct page 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#ifdef CONFIG_NEED_MULTIPLE_NODES 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciextern struct pglist_data *node_data[]; 248c2ecf20Sopenharmony_ci/* 258c2ecf20Sopenharmony_ci * Return a pointer to the node data for node n. 268c2ecf20Sopenharmony_ci */ 278c2ecf20Sopenharmony_ci#define NODE_DATA(nid) (node_data[nid]) 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci/* 308c2ecf20Sopenharmony_ci * Following are specific to this numa platform. 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ciextern int numa_cpu_lookup_table[]; 348c2ecf20Sopenharmony_ciextern cpumask_var_t node_to_cpumask_map[]; 358c2ecf20Sopenharmony_ci#ifdef CONFIG_MEMORY_HOTPLUG 368c2ecf20Sopenharmony_ciextern unsigned long max_pfn; 378c2ecf20Sopenharmony_ciu64 memory_hotplug_max(void); 388c2ecf20Sopenharmony_ci#else 398c2ecf20Sopenharmony_ci#define memory_hotplug_max() memblock_end_of_DRAM() 408c2ecf20Sopenharmony_ci#endif 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#else 438c2ecf20Sopenharmony_ci#define memory_hotplug_max() memblock_end_of_DRAM() 448c2ecf20Sopenharmony_ci#endif /* CONFIG_NEED_MULTIPLE_NODES */ 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#ifdef CONFIG_MEMORY_HOTPLUG 478c2ecf20Sopenharmony_ciextern int create_section_mapping(unsigned long start, unsigned long end, 488c2ecf20Sopenharmony_ci int nid, pgprot_t prot); 498c2ecf20Sopenharmony_ci#endif 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */ 528c2ecf20Sopenharmony_ci#endif /* _ASM_MMZONE_H_ */ 53