~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/sn/arch.h

Version: ~ [ linux-5.9 ] ~ [ linux-5.8.14 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.70 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.150 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.200 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.238 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.238 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This file is subject to the terms and conditions of the GNU General Public
  3  * License.  See the file "COPYING" in the main directory of this archive
  4  * for more details.
  5  *
  6  * SGI specific setup.
  7  *
  8  * Copyright (C) 1995 - 1997, 1999 Silcon Graphics, Inc.
  9  * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org)
 10  */
 11 #ifndef _ASM_SN_ARCH_H
 12 #define _ASM_SN_ARCH_H
 13 
 14 #include <linux/types.h>
 15 #include <asm/sn/types.h>
 16 #ifdef CONFIG_SGI_IP27
 17 #include <asm/sn/sn0/arch.h>
 18 #endif
 19 
 20 typedef u64     hubreg_t;
 21 
 22 #define cputonasid(cpu)         (sn_cpu_info[(cpu)].p_nasid)
 23 #define cputoslice(cpu)         (sn_cpu_info[(cpu)].p_slice)
 24 #define makespnum(_nasid, _slice)                                       \
 25                 (((_nasid) << CPUS_PER_NODE_SHFT) | (_slice))
 26 
 27 #define INVALID_NASID           (nasid_t)-1
 28 #define INVALID_CNODEID         (cnodeid_t)-1
 29 #define INVALID_PNODEID         (pnodeid_t)-1
 30 #define INVALID_MODULE          (moduleid_t)-1
 31 #define INVALID_PARTID          (partid_t)-1
 32 
 33 extern nasid_t get_nasid(void);
 34 extern cnodeid_t get_cpu_cnode(cpuid_t);
 35 extern int get_cpu_slice(cpuid_t);
 36 
 37 /*
 38  * NO ONE should access these arrays directly.  The only reason we refer to
 39  * them here is to avoid the procedure call that would be required in the
 40  * macros below.  (Really want private data members here :-)
 41  */
 42 extern cnodeid_t nasid_to_compact_node[MAX_NASIDS];
 43 extern nasid_t compact_to_nasid_node[MAX_COMPACT_NODES];
 44 
 45 /*
 46  * These macros are used by various parts of the kernel to convert
 47  * between the three different kinds of node numbering.   At least some
 48  * of them may change to procedure calls in the future, but the macros
 49  * will continue to work.  Don't use the arrays above directly.
 50  */
 51 
 52 #define NASID_TO_REGION(nnode)          \
 53     ((nnode) >> \
 54      (is_fine_dirmode() ? NASID_TO_FINEREG_SHFT : NASID_TO_COARSEREG_SHFT))
 55 
 56 extern cnodeid_t nasid_to_compact_node[MAX_NASIDS];
 57 extern nasid_t compact_to_nasid_node[MAX_COMPACT_NODES];
 58 extern cnodeid_t cpuid_to_compact_node[MAXCPUS];
 59 
 60 #define NASID_TO_COMPACT_NODEID(nnode)  (nasid_to_compact_node[nnode])
 61 #define COMPACT_TO_NASID_NODEID(cnode)  (compact_to_nasid_node[cnode])
 62 #define CPUID_TO_COMPACT_NODEID(cpu)    (cpuid_to_compact_node[(cpu)])
 63 
 64 #endif /* _ASM_SN_ARCH_H */
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp