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

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/uv/uv_geo.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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 /* SPDX-License-Identifier: GPL-2.0-or-later
  2  *
  3  * This file is subject to the terms and conditions of the GNU General Public
  4  * License.  See the file "COPYING" in the main directory of this archive
  5  * for more details.
  6  *
  7  * Copyright (C) 2020 Hewlett Packard Enterprise Development LP. All rights reserved.
  8  */
  9 
 10 #ifndef _ASM_UV_GEO_H
 11 #define _ASM_UV_GEO_H
 12 
 13 /* Type declarations */
 14 
 15 /* Size of a geoid_s structure (must be before decl. of geoid_u) */
 16 #define GEOID_SIZE      8
 17 
 18 /* Fields common to all substructures */
 19 struct geo_common_s {
 20         unsigned char type;             /* What type of h/w is named by this geoid_s */
 21         unsigned char blade;
 22         unsigned char slot;             /* slot is IRU */
 23         unsigned char upos;
 24         unsigned char rack;
 25 };
 26 
 27 /* Additional fields for particular types of hardware */
 28 struct geo_node_s {
 29         struct geo_common_s common;             /* No additional fields needed */
 30 };
 31 
 32 struct geo_rtr_s {
 33         struct geo_common_s common;             /* No additional fields needed */
 34 };
 35 
 36 struct geo_iocntl_s {
 37         struct geo_common_s common;             /* No additional fields needed */
 38 };
 39 
 40 struct geo_pcicard_s {
 41         struct geo_iocntl_s common;
 42         char bus;                               /* Bus/widget number */
 43         char slot;                              /* PCI slot number */
 44 };
 45 
 46 /* Subcomponents of a node */
 47 struct geo_cpu_s {
 48         struct geo_node_s node;
 49         unsigned char   socket:4,       /* Which CPU on the node */
 50                         thread:4;
 51         unsigned char   core;
 52 };
 53 
 54 struct geo_mem_s {
 55         struct geo_node_s node;
 56         char membus;                    /* The memory bus on the node */
 57         char memslot;                   /* The memory slot on the bus */
 58 };
 59 
 60 union geoid_u {
 61         struct geo_common_s common;
 62         struct geo_node_s node;
 63         struct geo_iocntl_s iocntl;
 64         struct geo_pcicard_s pcicard;
 65         struct geo_rtr_s rtr;
 66         struct geo_cpu_s cpu;
 67         struct geo_mem_s mem;
 68         char padsize[GEOID_SIZE];
 69 };
 70 
 71 /* Defined constants */
 72 
 73 #define GEO_MAX_LEN     48
 74 
 75 #define GEO_TYPE_INVALID        0
 76 #define GEO_TYPE_MODULE         1
 77 #define GEO_TYPE_NODE           2
 78 #define GEO_TYPE_RTR            3
 79 #define GEO_TYPE_IOCNTL         4
 80 #define GEO_TYPE_IOCARD         5
 81 #define GEO_TYPE_CPU            6
 82 #define GEO_TYPE_MEM            7
 83 #define GEO_TYPE_MAX            (GEO_TYPE_MEM+1)
 84 
 85 static inline int geo_rack(union geoid_u g)
 86 {
 87         return (g.common.type == GEO_TYPE_INVALID) ?
 88                 -1 : g.common.rack;
 89 }
 90 
 91 static inline int geo_slot(union geoid_u g)
 92 {
 93         return (g.common.type == GEO_TYPE_INVALID) ?
 94                 -1 : g.common.upos;
 95 }
 96 
 97 static inline int geo_blade(union geoid_u g)
 98 {
 99         return (g.common.type == GEO_TYPE_INVALID) ?
100                 -1 : g.common.blade * 2 + g.common.slot;
101 }
102 
103 #endif /* _ASM_UV_GEO_H */
104 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php