xref: /OK3568_Linux_fs/kernel/arch/mips/include/asm/mach-ip27/mmzone.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun #ifndef _ASM_MACH_MMZONE_H
3*4882a593Smuzhiyun #define _ASM_MACH_MMZONE_H
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun #include <asm/sn/addrs.h>
6*4882a593Smuzhiyun #include <asm/sn/arch.h>
7*4882a593Smuzhiyun #include <asm/sn/agent.h>
8*4882a593Smuzhiyun #include <asm/sn/klkernvars.h>
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #define pa_to_nid(addr)		NASID_GET(addr)
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun struct hub_data {
13*4882a593Smuzhiyun 	kern_vars_t	kern_vars;
14*4882a593Smuzhiyun 	DECLARE_BITMAP(h_bigwin_used, HUB_NUM_BIG_WINDOW);
15*4882a593Smuzhiyun 	cpumask_t	h_cpus;
16*4882a593Smuzhiyun };
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun struct node_data {
19*4882a593Smuzhiyun 	struct pglist_data pglist;
20*4882a593Smuzhiyun 	struct hub_data hub;
21*4882a593Smuzhiyun };
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun extern struct node_data *__node_data[];
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun #define NODE_DATA(n)		(&__node_data[(n)]->pglist)
26*4882a593Smuzhiyun #define hub_data(n)		(&__node_data[(n)]->hub)
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun #endif /* _ASM_MACH_MMZONE_H */
29