summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-loongson64/mmzone.h
blob: a3d65d37b8b5d5188d30cbf91d7c4615ae4db5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2010 Loongson Inc. & Lemote Inc. &
 *                    Institute of Computing Technology
 * Author:  Xiang Gao, gaoxiang@ict.ac.cn
 *          Huacai Chen, chenhc@lemote.com
 *          Xiaofu Meng, Shuangshuang Zhang
 */
#ifndef _ASM_MACH_LOONGSON64_MMZONE_H
#define _ASM_MACH_LOONGSON64_MMZONE_H

#define NODE_ADDRSPACE_SHIFT 44

#define pa_to_nid(addr)  (((addr) & 0xf00000000000) >> NODE_ADDRSPACE_SHIFT)
#define nid_to_addrbase(nid) ((unsigned long)(nid) << NODE_ADDRSPACE_SHIFT)

extern struct pglist_data *__node_data[];

#define NODE_DATA(n)		(__node_data[n])

extern void __init prom_init_numa_memory(void);

#endif /* _ASM_MACH_MMZONE_H */