cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

mmzone.h (756B)


      1/* SPDX-License-Identifier: GPL-2.0-or-later */
      2/*
      3 * Copyright (C) 2010 Loongson Inc. & Lemote Inc. &
      4 *                    Institute of Computing Technology
      5 * Author:  Xiang Gao, gaoxiang@ict.ac.cn
      6 *          Huacai Chen, chenhc@lemote.com
      7 *          Xiaofu Meng, Shuangshuang Zhang
      8 */
      9#ifndef _ASM_MACH_LOONGSON64_MMZONE_H
     10#define _ASM_MACH_LOONGSON64_MMZONE_H
     11
     12#define NODE_ADDRSPACE_SHIFT 44
     13
     14#define pa_to_nid(addr)  (((addr) & 0xf00000000000) >> NODE_ADDRSPACE_SHIFT)
     15#define nid_to_addrbase(nid) ((unsigned long)(nid) << NODE_ADDRSPACE_SHIFT)
     16
     17extern struct pglist_data *__node_data[];
     18
     19#define NODE_DATA(n)		(__node_data[n])
     20
     21extern void setup_zero_pages(void);
     22extern void __init prom_init_numa_memory(void);
     23
     24#endif /* _ASM_MACH_MMZONE_H */