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

TOMOYO Linux Cross Reference
Linux/arch/tile/include/asm/topology.h

Version: ~ [ linux-6.0-rc6 ] ~ [ linux-5.19.10 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.69 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.144 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.214 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.259 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.294 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.329 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Copyright 2010 Tilera Corporation. All Rights Reserved.
  3  *
  4  *   This program is free software; you can redistribute it and/or
  5  *   modify it under the terms of the GNU General Public License
  6  *   as published by the Free Software Foundation, version 2.
  7  *
  8  *   This program is distributed in the hope that it will be useful, but
  9  *   WITHOUT ANY WARRANTY; without even the implied warranty of
 10  *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
 11  *   NON INFRINGEMENT.  See the GNU General Public License for
 12  *   more details.
 13  */
 14 
 15 #ifndef _ASM_TILE_TOPOLOGY_H
 16 #define _ASM_TILE_TOPOLOGY_H
 17 
 18 #ifdef CONFIG_NUMA
 19 
 20 #include <linux/cpumask.h>
 21 
 22 /* Mappings between logical cpu number and node number. */
 23 extern struct cpumask node_2_cpu_mask[];
 24 extern char cpu_2_node[];
 25 
 26 /* Returns the number of the node containing CPU 'cpu'. */
 27 static inline int cpu_to_node(int cpu)
 28 {
 29         return cpu_2_node[cpu];
 30 }
 31 
 32 /*
 33  * Returns the number of the node containing Node 'node'.
 34  * This architecture is flat, so it is a pretty simple function!
 35  */
 36 #define parent_node(node) (node)
 37 
 38 /* Returns a bitmask of CPUs on Node 'node'. */
 39 static inline const struct cpumask *cpumask_of_node(int node)
 40 {
 41         return &node_2_cpu_mask[node];
 42 }
 43 
 44 /* For now, use numa node -1 for global allocation. */
 45 #define pcibus_to_node(bus)             ((void)(bus), -1)
 46 
 47 #endif /* CONFIG_NUMA */
 48 
 49 #include <asm-generic/topology.h>
 50 
 51 #ifdef CONFIG_SMP
 52 #define topology_physical_package_id(cpu)       ((void)(cpu), 0)
 53 #define topology_core_id(cpu)                   (cpu)
 54 #define topology_core_cpumask(cpu)              ((void)(cpu), cpu_online_mask)
 55 #define topology_sibling_cpumask(cpu)           cpumask_of(cpu)
 56 #endif
 57 
 58 #endif /* _ASM_TILE_TOPOLOGY_H */
 59 

~ [ 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