arch.h revision 11cd02dfb91661c65134cac258cf5924270e9d2b
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _ASM_SN_ARCH_H
20#define _ASM_SN_ARCH_H
21#include <linux/types.h>
22#include <asm/sn/types.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24typedef u64 hubreg_t;
25#define cputonasid(cpu) (sn_cpu_info[(cpu)].p_nasid)
26#define cputoslice(cpu) (sn_cpu_info[(cpu)].p_slice)
27#define makespnum(_nasid, _slice)   (((_nasid) << CPUS_PER_NODE_SHFT) | (_slice))
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define INVALID_NASID (nasid_t)-1
30#define INVALID_CNODEID (cnodeid_t)-1
31#define INVALID_PNODEID (pnodeid_t)-1
32#define INVALID_MODULE (moduleid_t)-1
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define INVALID_PARTID (partid_t)-1
35#define NASID_TO_REGION(nnode)   ((nnode) >>   (is_fine_dirmode() ? NASID_TO_FINEREG_SHFT : NASID_TO_COARSEREG_SHFT))
36#define NASID_TO_COMPACT_NODEID(nnode) (nasid_to_compact_node[nnode])
37#define COMPACT_TO_NASID_NODEID(cnode) (compact_to_nasid_node[cnode])
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define CPUID_TO_COMPACT_NODEID(cpu) (cpuid_to_compact_node[(cpu)])
40#endif
41