Thu Jul 30 06:54:07 2020 UTC ()
Sort the #define __HAVEs. NFCI.


(skrll)
diff -r1.70 -r1.71 src/sys/arch/mips/include/types.h

cvs diff -r1.70 -r1.71 src/sys/arch/mips/include/types.h (switch to unified diff)

--- src/sys/arch/mips/include/types.h 2020/04/30 20:48:10 1.70
+++ src/sys/arch/mips/include/types.h 2020/07/30 06:54:07 1.71
@@ -1,181 +1,179 @@ @@ -1,181 +1,179 @@
1/* $NetBSD: types.h,v 1.70 2020/04/30 20:48:10 skrll Exp $ */ 1/* $NetBSD: types.h,v 1.71 2020/07/30 06:54:07 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1992, 1993 4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Ralph Campbell. 8 * Ralph Campbell.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the 16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution. 17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of the University nor the names of its contributors 18 * 3. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software 19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission. 20 * without specific prior written permission.
21 * 21 *
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE. 32 * SUCH DAMAGE.
33 * 33 *
34 * @(#)types.h 8.3 (Berkeley) 1/5/94 34 * @(#)types.h 8.3 (Berkeley) 1/5/94
35 */ 35 */
36 36
37#ifndef _MIPS_TYPES_H_ 37#ifndef _MIPS_TYPES_H_
38#define _MIPS_TYPES_H_ 38#define _MIPS_TYPES_H_
39 39
40#include <sys/cdefs.h> 40#include <sys/cdefs.h>
41#include <sys/featuretest.h> 41#include <sys/featuretest.h>
42#include <mips/int_types.h> 42#include <mips/int_types.h>
43 43
44typedef __int32_t __register32_t; 44typedef __int32_t __register32_t;
45typedef __int64_t __register64_t; 45typedef __int64_t __register64_t;
46typedef __uint32_t __fpregister32_t; 46typedef __uint32_t __fpregister32_t;
47typedef __uint64_t __fpregister64_t; 47typedef __uint64_t __fpregister64_t;
48 48
49typedef unsigned int __cpu_simple_lock_nv_t; 49typedef unsigned int __cpu_simple_lock_nv_t;
50#if defined(__mips_o32) 50#if defined(__mips_o32)
51typedef __register32_t __register_t; 51typedef __register32_t __register_t;
52#else 52#else
53typedef __register64_t __register_t; 53typedef __register64_t __register_t;
54#endif 54#endif
55#if defined(__mips_o64) || defined(__mips_o32) 55#if defined(__mips_o64) || defined(__mips_o32)
56typedef __fpregister32_t __fpregister_t; 56typedef __fpregister32_t __fpregister_t;
57#else 57#else
58typedef __fpregister64_t __fpregister_t; 58typedef __fpregister64_t __fpregister_t;
59#endif 59#endif
60 60
61/* 61/*
62 * Note that mips_reg_t is distinct from the register_t defined 62 * Note that mips_reg_t is distinct from the register_t defined
63 * in <types.h> to allow these structures to be as hidden from 63 * in <types.h> to allow these structures to be as hidden from
64 * the rest of the operating system as possible. 64 * the rest of the operating system as possible.
65 */ 65 */
66 66
67 67
68#if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE) 68#if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) || defined(_STANDALONE)
69#if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64) 69#if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64)
70typedef __uint64_t paddr_t; 70typedef __uint64_t paddr_t;
71typedef __uint64_t psize_t; 71typedef __uint64_t psize_t;
72#define PRIxPADDR PRIx64 72#define PRIxPADDR PRIx64
73#define PRIxPSIZE PRIx64 73#define PRIxPSIZE PRIx64
74#define PRIdPSIZE PRId64 74#define PRIdPSIZE PRId64
75#else 75#else
76typedef __uint32_t paddr_t; 76typedef __uint32_t paddr_t;
77typedef __uint32_t psize_t; 77typedef __uint32_t psize_t;
78#define PRIxPADDR PRIx32 78#define PRIxPADDR PRIx32
79#define PRIxPSIZE PRIx32 79#define PRIxPSIZE PRIx32
80#define PRIdPSIZE PRId32 80#define PRIdPSIZE PRId32
81#endif 81#endif
82#ifdef _LP64 82#ifdef _LP64
83typedef __uint64_t vaddr_t; 83typedef __uint64_t vaddr_t;
84typedef __uint64_t vsize_t; 84typedef __uint64_t vsize_t;
85#define PRIxVADDR PRIx64 85#define PRIxVADDR PRIx64
86#define PRIxVSIZE PRIx64 86#define PRIxVSIZE PRIx64
87#define PRIdVSIZE PRId64 87#define PRIdVSIZE PRId64
88#else 88#else
89typedef __uint32_t vaddr_t; 89typedef __uint32_t vaddr_t;
90typedef __uint32_t vsize_t; 90typedef __uint32_t vsize_t;
91#define PRIxVADDR PRIx32 91#define PRIxVADDR PRIx32
92#define PRIxVSIZE PRIx32 92#define PRIxVSIZE PRIx32
93#define PRIdVSIZE PRId32 93#define PRIdVSIZE PRId32
94#endif 94#endif
95 95
96 96
97typedef int mips_prid_t; 97typedef int mips_prid_t;
98/* Make sure this is signed; we need pointers to be sign-extended. */ 98/* Make sure this is signed; we need pointers to be sign-extended. */
99typedef __fpregister_t fpregister_t; 99typedef __fpregister_t fpregister_t;
100typedef __fpregister_t mips_fpreg_t; /* do not use */ 100typedef __fpregister_t mips_fpreg_t; /* do not use */
101typedef __register_t register_t; 101typedef __register_t register_t;
102typedef __register_t mips_reg_t; 102typedef __register_t mips_reg_t;
103 103
104#if defined(__mips_o32) 104#if defined(__mips_o32)
105typedef __uint32_t uregister_t; 105typedef __uint32_t uregister_t;
106typedef __uint32_t mips_ureg_t; /* do not use */ 106typedef __uint32_t mips_ureg_t; /* do not use */
107#define PRIxREGISTER PRIx32 107#define PRIxREGISTER PRIx32
108#define PRIxUREGISTER PRIx32 108#define PRIxUREGISTER PRIx32
109#else 109#else
110typedef __uint64_t uregister_t; 110typedef __uint64_t uregister_t;
111typedef __uint64_t mips_ureg_t; /* do not use */ 111typedef __uint64_t mips_ureg_t; /* do not use */
112typedef __int64_t register32_t; 112typedef __int64_t register32_t;
113typedef __uint64_t uregister32_t; 113typedef __uint64_t uregister32_t;
114#define PRIxREGISTER PRIx64 114#define PRIxREGISTER PRIx64
115#define PRIxUREGISTER PRIx64 115#define PRIxUREGISTER PRIx64
116#endif /* __mips_o32 */ 116#endif /* __mips_o32 */
117 117
118typedef struct label_t { 118typedef struct label_t {
119 register_t val[14]; 119 register_t val[14];
120} label_t; 120} label_t;
121#define _L_S0 0 121#define _L_S0 0
122#define _L_S1 1 122#define _L_S1 1
123#define _L_S2 2 123#define _L_S2 2
124#define _L_S3 3 124#define _L_S3 3
125#define _L_S4 4 125#define _L_S4 4
126#define _L_S5 5 126#define _L_S5 5
127#define _L_S6 6 127#define _L_S6 6
128#define _L_S7 7 128#define _L_S7 7
129#define _L_T8 8 129#define _L_T8 8
130#define _L_GP 9 130#define _L_GP 9
131#define _L_SP 10 131#define _L_SP 10
132#define _L_S8 11 132#define _L_S8 11
133#define _L_RA 12 133#define _L_RA 12
134#define _L_SR 13 134#define _L_SR 13
135 135
136typedef __uint32_t tlb_asid_t; 136typedef __uint32_t tlb_asid_t;
137#endif /* _KERNEL */ 137#endif /* _KERNEL */
138 138
139#if defined(_KERNEL) || defined(_KMEMUSER) 139#if defined(_KERNEL) || defined(_KMEMUSER)
140#define PCU_FPU 0 140#define PCU_FPU 0
141#define PCU_DSP 1 141#define PCU_DSP 1
142#define PCU_UNIT_COUNT 2 142#define PCU_UNIT_COUNT 2
143#endif 143#endif
144 144
145 
146#define __SIMPLELOCK_LOCKED 1 145#define __SIMPLELOCK_LOCKED 1
147#define __SIMPLELOCK_UNLOCKED 0 146#define __SIMPLELOCK_UNLOCKED 0
148 147
149#define __HAVE_FAST_SOFTINTS 148#define __HAVE_COMMON___TLS_GET_ADDR
150#define __HAVE_SYSCALL_INTERN 
151#define __HAVE_CPU_LWP_SETPRIVATE 
152#define __HAVE_CPU_DATA_FIRST 
153#define __HAVE_MD_CPU_OFFLINE 
154#define __HAVE_CPU_COUNTER 149#define __HAVE_CPU_COUNTER
 150#define __HAVE_CPU_DATA_FIRST
 151#define __HAVE_CPU_LWP_SETPRIVATE
155#define __HAVE_CPU_UAREA_ROUTINES 152#define __HAVE_CPU_UAREA_ROUTINES
156#define __HAVE_COMMON___TLS_GET_ADDR 153#define __HAVE_FAST_SOFTINTS
 154#define __HAVE_MD_CPU_OFFLINE
 155#define __HAVE_MM_MD_DIRECT_MAPPED_PHYS
 156#define __HAVE_MM_MD_KERNACC
 157#define __HAVE_MM_MD_CACHE_ALIASING
 158#define __HAVE_SYSCALL_INTERN
 159#define __HAVE_TLS_VARIANT_I
 160#define __HAVE_UCAS_FULL
157#define __HAVE___LWP_GETTCB_FAST 161#define __HAVE___LWP_GETTCB_FAST
158#define __HAVE___LWP_SETTCB 162#define __HAVE___LWP_SETTCB
159#define __HAVE_TLS_VARIANT_I 163
 164/* XXX temporary */
 165#define __HAVE_UNLOCKED_PMAP
160 166
161#if !defined(__mips_o32) 167#if !defined(__mips_o32)
162#define __HAVE_ATOMIC64_OPS 168#define __HAVE_ATOMIC64_OPS
163#endif 169#endif
164 170
165#define __HAVE_UCAS_FULL 
166 
167#if defined(_KERNEL) 171#if defined(_KERNEL)
168#define __HAVE_RAS 172#define __HAVE_RAS
169#if defined(_LP64) 173#if defined(_LP64)
170#define __HAVE_CPU_VMSPACE_EXEC 174#define __HAVE_CPU_VMSPACE_EXEC
171#endif 175#endif
172#endif /* _KERNEL */ 176#endif /* _KERNEL */
173 177
174#define __HAVE_MM_MD_DIRECT_MAPPED_PHYS 
175#define __HAVE_MM_MD_KERNACC 
176#define __HAVE_MM_MD_CACHE_ALIASING 
177 
178/* XXX temporary */ 
179#define __HAVE_UNLOCKED_PMAP 
180 178
181#endif /* _MIPS_TYPES_H_ */ 179#endif /* _MIPS_TYPES_H_ */