Hide {p,v}{addr,size}_t and register_t (and a couple more types that are machine-specific) from userland unless _KERNEL/_KMEMUSER and a new _KERNTYPES variables is defined. The _KERNTYPES should be fixed for many subsystems that should not be using it (rump)...diff -r1.2 -r1.3 src/sys/arch/aarch64/include/types.h
(christos)
--- src/sys/arch/aarch64/include/types.h 2015/08/27 12:30:50 1.2
+++ src/sys/arch/aarch64/include/types.h 2016/01/23 21:22:13 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.2 2015/08/27 12:30:50 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.3 2016/01/23 21:22:13 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Matt Thomas of 3am Software Foundry. | 8 | * by Matt Thomas of 3am Software Foundry. | |
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. | |
@@ -28,63 +28,64 @@ | @@ -28,63 +28,64 @@ | |||
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #ifndef _AARCH64_TYPES_H_ | 32 | #ifndef _AARCH64_TYPES_H_ | |
33 | #define _AARCH64_TYPES_H_ | 33 | #define _AARCH64_TYPES_H_ | |
34 | 34 | |||
35 | #ifdef __aarch64__ | 35 | #ifdef __aarch64__ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | #include <sys/featuretest.h> | 38 | #include <sys/featuretest.h> | |
39 | #include <aarch64/int_types.h> | 39 | #include <aarch64/int_types.h> | |
40 | 40 | |||
41 | /* NB: This should probably be if defined(_KERNEL) */ | 41 | #if defined(_KERNEL) | |
42 | #if defined(_NETBSD_SOURCE) | 42 | typedef struct label_t { /* Used by setjmp & longjmp */ | |
43 | register_t lb_reg[13]; /* x19 .. x30, sp */ | |||
44 | } label_t; | |||
45 | #endif | |||
46 | ||||
47 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |||
43 | typedef unsigned long vm_offset_t; /* depreciated */ | 48 | typedef unsigned long vm_offset_t; /* depreciated */ | |
44 | typedef unsigned long vm_size_t; /* depreciated */ | 49 | typedef unsigned long vm_size_t; /* depreciated */ | |
45 | 50 | |||
46 | typedef unsigned long paddr_t; | 51 | typedef unsigned long paddr_t; | |
47 | typedef unsigned long psize_t; | 52 | typedef unsigned long psize_t; | |
48 | typedef unsigned long vaddr_t; | 53 | typedef unsigned long vaddr_t; | |
49 | typedef unsigned long vsize_t; | 54 | typedef unsigned long vsize_t; | |
50 | #define PRIxPADDR "lx" | 55 | #define PRIxPADDR "lx" | |
51 | #define PRIxPSIZE "lx" | 56 | #define PRIxPSIZE "lx" | |
52 | #define PRIuPSIZE "lu" | 57 | #define PRIuPSIZE "lu" | |
53 | #define PRIxVADDR "lx" | 58 | #define PRIxVADDR "lx" | |
54 | #define PRIxVSIZE "lx" | 59 | #define PRIxVSIZE "lx" | |
55 | #define PRIuVSIZE "lu" | 60 | #define PRIuVSIZE "lu" | |
56 | #endif | |||
57 | 61 | |||
58 | typedef unsigned long long int register_t; | 62 | typedef unsigned long long int register_t; | |
59 | typedef unsigned int register32_t; | 63 | typedef unsigned int register32_t; | |
60 | #define PRIxREGISTER "llx" | 64 | #define PRIxREGISTER "llx" | |
61 | #define PRIxREGISTER32 "lx" | 65 | #define PRIxREGISTER32 "lx" | |
62 | 66 | |||
63 | typedef unsigned long pmc_evid_t; | 67 | typedef unsigned long pmc_evid_t; | |
64 | #define PMC_INVALID_EVID (-1) | 68 | #define PMC_INVALID_EVID (-1) | |
65 | typedef unsigned long pmc_ctr_t; | 69 | typedef unsigned long pmc_ctr_t; | |
66 | typedef unsigned short tlb_asid_t; | 70 | typedef unsigned short tlb_asid_t; | |
67 | 71 | |||
68 | #if defined(_KERNEL) | |||
69 | typedef struct label_t { /* Used by setjmp & longjmp */ | |||
70 | register_t lb_reg[13]; /* x19 .. x30, sp */ | |||
71 | } label_t; | |||
72 | #endif | 72 | #endif | |
73 | 73 | |||
74 | /* | 74 | /* | |
75 | * This should have always been an 8-bit type. | 75 | * This should have always been an 8-bit type. | |
76 | */ | 76 | */ | |
77 | typedef unsigned char __cpu_simple_lock_nv_t; | 77 | typedef unsigned char __cpu_simple_lock_nv_t; | |
78 | typedef unsigned long long int __register_t; | |||
78 | 79 | |||
79 | #define __SIMPLELOCK_LOCKED 1 | 80 | #define __SIMPLELOCK_LOCKED 1 | |
80 | #define __SIMPLELOCK_UNLOCKED 0 | 81 | #define __SIMPLELOCK_UNLOCKED 0 | |
81 | 82 | |||
82 | #define __HAVE_FAST_SOFTINTS | 83 | #define __HAVE_FAST_SOFTINTS | |
83 | #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS | 84 | #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS | |
84 | #define __HAVE_CPU_COUNTER | 85 | #define __HAVE_CPU_COUNTER | |
85 | #define __HAVE_SYSCALL_INTERN | 86 | #define __HAVE_SYSCALL_INTERN | |
86 | #define __HAVE_NEW_STYLE_BUS_H | 87 | #define __HAVE_NEW_STYLE_BUS_H | |
87 | #define __HAVE_MINIMAL_EMUL | 88 | #define __HAVE_MINIMAL_EMUL | |
88 | #define __HAVE_CPU_DATA_FIRST | 89 | #define __HAVE_CPU_DATA_FIRST | |
89 | #define __HAVE___LWP_GETPRIVATE_FAST | 90 | #define __HAVE___LWP_GETPRIVATE_FAST | |
90 | #define __HAVE_COMMON___TLS_GET_ADDR | 91 | #define __HAVE_COMMON___TLS_GET_ADDR |
--- src/sys/arch/alpha/include/types.h 2015/08/28 09:30:01 1.51
+++ src/sys/arch/alpha/include/types.h 2016/01/23 21:22:13 1.52
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.51 2015/08/28 09:30:01 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.52 2016/01/23 21:22:13 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990, 1993 | 4 | * Copyright (c) 1990, 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 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -34,46 +34,44 @@ | @@ -34,46 +34,44 @@ | |||
34 | #ifndef _MACHTYPES_H_ | 34 | #ifndef _MACHTYPES_H_ | |
35 | #define _MACHTYPES_H_ | 35 | #define _MACHTYPES_H_ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | #include <sys/featuretest.h> | 38 | #include <sys/featuretest.h> | |
39 | #include <machine/int_types.h> | 39 | #include <machine/int_types.h> | |
40 | 40 | |||
41 | #if defined(_KERNEL) | 41 | #if defined(_KERNEL) | |
42 | typedef struct label_t { | 42 | typedef struct label_t { | |
43 | long val[10]; | 43 | long val[10]; | |
44 | } label_t; | 44 | } label_t; | |
45 | #endif | 45 | #endif | |
46 | 46 | |||
47 | /* NB: This should probably be if defined(_KERNEL) */ | 47 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
48 | #if defined(_NETBSD_SOURCE) | |||
49 | typedef unsigned long paddr_t; | 48 | typedef unsigned long paddr_t; | |
50 | typedef unsigned long psize_t; | 49 | typedef unsigned long psize_t; | |
51 | typedef unsigned long vaddr_t; | 50 | typedef unsigned long vaddr_t; | |
52 | typedef unsigned long vsize_t; | 51 | typedef unsigned long vsize_t; | |
53 | #define PRIxPADDR "lx" | 52 | #define PRIxPADDR "lx" | |
54 | #define PRIxPSIZE "lx" | 53 | #define PRIxPSIZE "lx" | |
55 | #define PRIuPSIZE "lu" | 54 | #define PRIuPSIZE "lu" | |
56 | #define PRIxVADDR "lx" | 55 | #define PRIxVADDR "lx" | |
57 | #define PRIxVSIZE "lx" | 56 | #define PRIxVSIZE "lx" | |
58 | #define PRIuVSIZE "lu" | 57 | #define PRIuVSIZE "lu" | |
59 | #endif | |||
60 | 58 | |||
61 | typedef long int register_t; | 59 | typedef long int register_t; | |
62 | #if defined(_NETBSD_SOURCE) | |||
63 | #define PRIxREGISTER "lx" | 60 | #define PRIxREGISTER "lx" | |
64 | #endif | 61 | #endif | |
65 | 62 | |||
66 | typedef int __cpu_simple_lock_nv_t; | 63 | typedef int __cpu_simple_lock_nv_t; | |
64 | typedef long int __register_t; | |||
67 | 65 | |||
68 | #define __SIMPLELOCK_LOCKED 1 | 66 | #define __SIMPLELOCK_LOCKED 1 | |
69 | #define __SIMPLELOCK_UNLOCKED 0 | 67 | #define __SIMPLELOCK_UNLOCKED 0 | |
70 | 68 | |||
71 | #define __HAVE_NEW_STYLE_BUS_H | 69 | #define __HAVE_NEW_STYLE_BUS_H | |
72 | #define __HAVE_ATOMIC_OPERATIONS | 70 | #define __HAVE_ATOMIC_OPERATIONS | |
73 | #define __HAVE_MEMBAR_DATADEP_CONSUMER | 71 | #define __HAVE_MEMBAR_DATADEP_CONSUMER | |
74 | #define __HAVE_CPU_COUNTER | 72 | #define __HAVE_CPU_COUNTER | |
75 | #define __HAVE_SYSCALL_INTERN | 73 | #define __HAVE_SYSCALL_INTERN | |
76 | #define __HAVE_MINIMAL_EMUL | 74 | #define __HAVE_MINIMAL_EMUL | |
77 | #define __HAVE_AST_PERPROC | 75 | #define __HAVE_AST_PERPROC | |
78 | #define __HAVE_ATOMIC64_OPS | 76 | #define __HAVE_ATOMIC64_OPS | |
79 | #define __HAVE_MM_MD_DIRECT_MAPPED_IO | 77 | #define __HAVE_MM_MD_DIRECT_MAPPED_IO |
--- src/sys/arch/amd64/include/types.h 2015/08/27 12:30:50 1.48
+++ src/sys/arch/amd64/include/types.h 2016/01/23 21:22:13 1.49
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.48 2015/08/27 12:30:50 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.49 2016/01/23 21:22:13 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -36,47 +36,48 @@ | @@ -36,47 +36,48 @@ | |||
36 | 36 | |||
37 | #ifdef __x86_64__ | 37 | #ifdef __x86_64__ | |
38 | 38 | |||
39 | #include <sys/cdefs.h> | 39 | #include <sys/cdefs.h> | |
40 | #include <sys/featuretest.h> | 40 | #include <sys/featuretest.h> | |
41 | #include <machine/int_types.h> | 41 | #include <machine/int_types.h> | |
42 | 42 | |||
43 | #if defined(_KERNEL) | 43 | #if defined(_KERNEL) | |
44 | typedef struct label_t { | 44 | typedef struct label_t { | |
45 | long val[8]; | 45 | long val[8]; | |
46 | } label_t; | 46 | } label_t; | |
47 | #endif | 47 | #endif | |
48 | 48 | |||
49 | /* NB: This should probably be if defined(_KERNEL) */ | 49 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
50 | #if defined(_NETBSD_SOURCE) | |||
51 | typedef unsigned long paddr_t; | 50 | typedef unsigned long paddr_t; | |
52 | typedef unsigned long psize_t; | 51 | typedef unsigned long psize_t; | |
53 | typedef unsigned long vaddr_t; | 52 | typedef unsigned long vaddr_t; | |
54 | typedef unsigned long vsize_t; | 53 | typedef unsigned long vsize_t; | |
55 | #define PRIxPADDR "lx" | 54 | #define PRIxPADDR "lx" | |
56 | #define PRIxPSIZE "lx" | 55 | #define PRIxPSIZE "lx" | |
57 | #define PRIuPSIZE "lu" | 56 | #define PRIuPSIZE "lu" | |
58 | #define PRIxVADDR "lx" | 57 | #define PRIxVADDR "lx" | |
59 | #define PRIxVSIZE "lx" | 58 | #define PRIxVSIZE "lx" | |
60 | #define PRIuVSIZE "lu" | 59 | #define PRIuVSIZE "lu" | |
61 | #endif | |||
62 | 60 | |||
63 | typedef int pmc_evid_t; | 61 | typedef int pmc_evid_t; | |
64 | typedef __uint64_t pmc_ctr_t; | 62 | typedef __uint64_t pmc_ctr_t; | |
65 | typedef long int register_t; | 63 | typedef long int register_t; | |
66 | typedef int register32_t; | 64 | typedef int register32_t; | |
67 | #define PRIxREGISTER "lx" | 65 | #define PRIxREGISTER "lx" | |
68 | #define PRIxREGISTER32 "x" | 66 | #define PRIxREGISTER32 "x" | |
69 | 67 | |||
68 | #endif | |||
69 | ||||
70 | typedef long int __register_t; | |||
70 | typedef unsigned char __cpu_simple_lock_nv_t; | 71 | typedef unsigned char __cpu_simple_lock_nv_t; | |
71 | 72 | |||
72 | /* __cpu_simple_lock_t used to be a full word. */ | 73 | /* __cpu_simple_lock_t used to be a full word. */ | |
73 | #define __CPU_SIMPLE_LOCK_PAD | 74 | #define __CPU_SIMPLE_LOCK_PAD | |
74 | 75 | |||
75 | #define __SIMPLELOCK_LOCKED 1 | 76 | #define __SIMPLELOCK_LOCKED 1 | |
76 | #define __SIMPLELOCK_UNLOCKED 0 | 77 | #define __SIMPLELOCK_UNLOCKED 0 | |
77 | 78 | |||
78 | /* The amd64 does not have strict alignment requirements. */ | 79 | /* The amd64 does not have strict alignment requirements. */ | |
79 | #define __NO_STRICT_ALIGNMENT | 80 | #define __NO_STRICT_ALIGNMENT | |
80 | 81 | |||
81 | #define __HAVE_NEW_STYLE_BUS_H | 82 | #define __HAVE_NEW_STYLE_BUS_H | |
82 | #define __HAVE_CPU_COUNTER | 83 | #define __HAVE_CPU_COUNTER |
--- src/sys/arch/arm/include/types.h 2015/08/27 12:30:50 1.30
+++ src/sys/arch/arm/include/types.h 2016/01/23 21:22:13 1.31
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.30 2015/08/27 12:30:50 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.31 2016/01/23 21:22:13 christos Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -34,57 +34,57 @@ | @@ -34,57 +34,57 @@ | |||
34 | #ifndef _ARM_TYPES_H_ | 34 | #ifndef _ARM_TYPES_H_ | |
35 | #define _ARM_TYPES_H_ | 35 | #define _ARM_TYPES_H_ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | #include <sys/featuretest.h> | 38 | #include <sys/featuretest.h> | |
39 | #include <arm/int_types.h> | 39 | #include <arm/int_types.h> | |
40 | 40 | |||
41 | #if defined(_KERNEL) | 41 | #if defined(_KERNEL) | |
42 | typedef struct label_t { /* Used by setjmp & longjmp */ | 42 | typedef struct label_t { /* Used by setjmp & longjmp */ | |
43 | int val[11]; | 43 | int val[11]; | |
44 | } label_t; | 44 | } label_t; | |
45 | #endif | 45 | #endif | |
46 | 46 | |||
47 | /* NB: This should probably be if defined(_KERNEL) */ | 47 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
48 | #if defined(_NETBSD_SOURCE) | |||
49 | typedef unsigned long paddr_t; | 48 | typedef unsigned long paddr_t; | |
50 | typedef unsigned long psize_t; | 49 | typedef unsigned long psize_t; | |
51 | typedef unsigned long vaddr_t; | 50 | typedef unsigned long vaddr_t; | |
52 | typedef unsigned long vsize_t; | 51 | typedef unsigned long vsize_t; | |
53 | #define PRIxPADDR "lx" | 52 | #define PRIxPADDR "lx" | |
54 | #define PRIxPSIZE "lx" | 53 | #define PRIxPSIZE "lx" | |
55 | #define PRIuPSIZE "lu" | 54 | #define PRIuPSIZE "lu" | |
56 | #define PRIxVADDR "lx" | 55 | #define PRIxVADDR "lx" | |
57 | #define PRIxVSIZE "lx" | 56 | #define PRIxVSIZE "lx" | |
58 | #define PRIuVSIZE "lu" | 57 | #define PRIuVSIZE "lu" | |
59 | #endif | |||
60 | 58 | |||
61 | typedef int register_t, register32_t; | 59 | typedef int register_t, register32_t; | |
62 | #define PRIxREGISTER "x" | 60 | #define PRIxREGISTER "x" | |
63 | 61 | |||
64 | typedef unsigned long pmc_evid_t; | 62 | typedef unsigned long pmc_evid_t; | |
65 | #define PMC_INVALID_EVID (-1) | 63 | #define PMC_INVALID_EVID (-1) | |
66 | typedef unsigned long pmc_ctr_t; | 64 | typedef unsigned long pmc_ctr_t; | |
67 | typedef unsigned short tlb_asid_t; | 65 | typedef unsigned short tlb_asid_t; | |
66 | #endif | |||
68 | 67 | |||
69 | /* | 68 | /* | |
70 | * This should have always been an 8-bit type, but since it's been exposed | 69 | * This should have always been an 8-bit type, but since it's been exposed | |
71 | * to user-space, we don't want ABI breakage there. | 70 | * to user-space, we don't want ABI breakage there. | |
72 | */ | 71 | */ | |
73 | #if defined(_KERNEL) | 72 | #if defined(_KERNEL) | |
74 | typedef unsigned char __cpu_simple_lock_nv_t; | 73 | typedef unsigned char __cpu_simple_lock_nv_t; | |
75 | #else | 74 | #else | |
76 | typedef int __cpu_simple_lock_nv_t; | 75 | typedef int __cpu_simple_lock_nv_t; | |
77 | #endif /* _KERNEL */ | 76 | #endif /* _KERNEL */ | |
77 | typedef int __register_t; | |||
78 | 78 | |||
79 | #define __SIMPLELOCK_LOCKED 1 | 79 | #define __SIMPLELOCK_LOCKED 1 | |
80 | #define __SIMPLELOCK_UNLOCKED 0 | 80 | #define __SIMPLELOCK_UNLOCKED 0 | |
81 | 81 | |||
82 | #define __HAVE_SYSCALL_INTERN | 82 | #define __HAVE_SYSCALL_INTERN | |
83 | #define __HAVE_NEW_STYLE_BUS_H | 83 | #define __HAVE_NEW_STYLE_BUS_H | |
84 | #define __HAVE_MINIMAL_EMUL | 84 | #define __HAVE_MINIMAL_EMUL | |
85 | #define __HAVE_CPU_DATA_FIRST | 85 | #define __HAVE_CPU_DATA_FIRST | |
86 | #define __HAVE___LWP_GETPRIVATE_FAST | 86 | #define __HAVE___LWP_GETPRIVATE_FAST | |
87 | #define __HAVE_COMMON___TLS_GET_ADDR | 87 | #define __HAVE_COMMON___TLS_GET_ADDR | |
88 | #define __HAVE_TLS_VARIANT_I | 88 | #define __HAVE_TLS_VARIANT_I | |
89 | #define __HAVE_OLD_DISKLABEL | 89 | #define __HAVE_OLD_DISKLABEL | |
90 | #if defined(__ARM_EABI__) && defined(_ARM_ARCH_6) | 90 | #if defined(__ARM_EABI__) && defined(_ARM_ARCH_6) |
--- src/sys/arch/hppa/include/types.h 2015/08/27 12:30:51 1.24
+++ src/sys/arch/hppa/include/types.h 2016/01/23 21:22:13 1.25
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.24 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.25 2016/01/23 21:22:13 christos Exp $ */ | |
2 | 2 | |||
3 | /* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */ | 3 | /* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */ | |
4 | 4 | |||
5 | /*- | 5 | /*- | |
6 | * Copyright (c) 1990, 1993 | 6 | * Copyright (c) 1990, 1993 | |
7 | * The Regents of the University of California. All rights reserved. | 7 | * The Regents of the University of California. All rights reserved. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -29,65 +29,68 @@ | @@ -29,65 +29,68 @@ | |||
29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
31 | * SUCH DAMAGE. | 31 | * SUCH DAMAGE. | |
32 | * | 32 | * | |
33 | * @(#)types.h 8.3 (Berkeley) 1/5/94 | 33 | * @(#)types.h 8.3 (Berkeley) 1/5/94 | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #ifndef _HPPA_TYPES_H_ | 36 | #ifndef _HPPA_TYPES_H_ | |
37 | #define _HPPA_TYPES_H_ | 37 | #define _HPPA_TYPES_H_ | |
38 | 38 | |||
39 | #include <sys/cdefs.h> | 39 | #include <sys/cdefs.h> | |
40 | #include <sys/featuretest.h> | 40 | #include <sys/featuretest.h> | |
41 | 41 | |||
42 | #if defined(_NETBSD_SOURCE) | |||
43 | #if defined(_KERNEL) | 42 | #if defined(_KERNEL) | |
44 | typedef struct label_t { | 43 | typedef struct label_t { | |
45 | int lbl_rp; | 44 | int lbl_rp; | |
46 | int lbl_sp; | 45 | int lbl_sp; | |
47 | int lbl_s[17]; | 46 | int lbl_s[17]; | |
48 | int lbl_ss[1]; | 47 | int lbl_ss[1]; | |
49 | double lbl_sf[10]; /* hp800:fr12-fr15, hp700:fr12-fr21 */ | 48 | double lbl_sf[10]; /* hp800:fr12-fr15, hp700:fr12-fr21 */ | |
50 | } label_t; | 49 | } label_t; | |
51 | #endif | 50 | #endif | |
52 | 51 | |||
52 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |||
53 | typedef unsigned long hppa_hpa_t; | 53 | typedef unsigned long hppa_hpa_t; | |
54 | typedef unsigned long hppa_spa_t; | 54 | typedef unsigned long hppa_spa_t; | |
55 | typedef unsigned int pa_space_t; | 55 | typedef unsigned int pa_space_t; | |
56 | typedef unsigned long vaddr_t; | 56 | typedef unsigned long vaddr_t; | |
57 | typedef unsigned long vsize_t; | 57 | typedef unsigned long vsize_t; | |
58 | typedef unsigned long paddr_t; | 58 | typedef unsigned long paddr_t; | |
59 | typedef unsigned long psize_t; | 59 | typedef unsigned long psize_t; | |
60 | #define PRIxVADDR "lx" | 60 | #define PRIxVADDR "lx" | |
61 | #define PRIxVSIZE "lx" | 61 | #define PRIxVSIZE "lx" | |
62 | #define PRIuVSIZE "lu" | 62 | #define PRIuVSIZE "lu" | |
63 | #define PRIxPADDR "lx" | 63 | #define PRIxPADDR "lx" | |
64 | #define PRIxPSIZE "lx" | 64 | #define PRIxPSIZE "lx" | |
65 | #define PRIuPSIZE "lu" | 65 | #define PRIuPSIZE "lu" | |
66 | ||||
67 | typedef int register_t; | |||
68 | #define PRIxREGISTER "x" | |||
66 | #endif | 69 | #endif | |
67 | 70 | |||
68 | /* | 71 | /* | |
69 | * Semaphores must be aligned on 16-byte boundaries on the PA-RISC. | 72 | * Semaphores must be aligned on 16-byte boundaries on the PA-RISC. | |
70 | */ | 73 | */ | |
71 | typedef struct { | 74 | typedef struct { | |
72 | volatile unsigned long csl_lock[4]; | 75 | volatile unsigned long csl_lock[4]; | |
73 | } __cpu_simple_lock_nv_t; | 76 | } __cpu_simple_lock_nv_t; | |
74 | 77 | |||
78 | typedef int __register_t; | |||
79 | ||||
75 | 80 | |||
76 | #define __SIMPLELOCK_LOCKED { { 0, 0, 0, 0} } | 81 | #define __SIMPLELOCK_LOCKED { { 0, 0, 0, 0} } | |
77 | #define __SIMPLELOCK_UNLOCKED { { 1, 1, 1, 1} } | 82 | #define __SIMPLELOCK_UNLOCKED { { 1, 1, 1, 1} } | |
78 | 83 | |||
79 | typedef int register_t; | |||
80 | #define PRIxREGISTER "x" | |||
81 | 84 | |||
82 | #define __MACHINE_STACK_GROWS_UP /* stack grows to higher addresses */ | 85 | #define __MACHINE_STACK_GROWS_UP /* stack grows to higher addresses */ | |
83 | #define __HAVE_FUNCTION_DESCRIPTORS /* function ptrs may be descriptors */ | 86 | #define __HAVE_FUNCTION_DESCRIPTORS /* function ptrs may be descriptors */ | |
84 | #define __HAVE_RAS | 87 | #define __HAVE_RAS | |
85 | 88 | |||
86 | /* | 89 | /* | |
87 | * On hppa, declaring RAS labels as functions doesn't work, since the toolchain | 90 | * On hppa, declaring RAS labels as functions doesn't work, since the toolchain | |
88 | * will construct PLABELs for them. Make them "const char []" instead. | 91 | * will construct PLABELs for them. Make them "const char []" instead. | |
89 | */ | 92 | */ | |
90 | 93 | |||
91 | #define RAS_DECL(name) \ | 94 | #define RAS_DECL(name) \ | |
92 | extern const char __CONCAT(name,_ras_start[]), __CONCAT(name,_ras_end[]) | 95 | extern const char __CONCAT(name,_ras_start[]), __CONCAT(name,_ras_end[]) | |
93 | 96 |
--- src/sys/arch/i386/include/types.h 2015/08/27 12:30:51 1.83
+++ src/sys/arch/i386/include/types.h 2016/01/23 21:22:14 1.84
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.83 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.84 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -37,69 +37,71 @@ | @@ -37,69 +37,71 @@ | |||
37 | #ifdef _KERNEL_OPT | 37 | #ifdef _KERNEL_OPT | |
38 | #include "opt_xen.h" | 38 | #include "opt_xen.h" | |
39 | #endif | 39 | #endif | |
40 | #include <sys/cdefs.h> | 40 | #include <sys/cdefs.h> | |
41 | #include <sys/featuretest.h> | 41 | #include <sys/featuretest.h> | |
42 | #include <machine/int_types.h> | 42 | #include <machine/int_types.h> | |
43 | 43 | |||
44 | #if defined(_KERNEL) | 44 | #if defined(_KERNEL) | |
45 | typedef struct label_t { | 45 | typedef struct label_t { | |
46 | int val[6]; | 46 | int val[6]; | |
47 | } label_t; | 47 | } label_t; | |
48 | #endif | 48 | #endif | |
49 | 49 | |||
50 | #if defined(_NETBSD_SOURCE) | |||
51 | #if defined(_KERNEL) | 50 | #if defined(_KERNEL) | |
52 | ||||
53 | /* | 51 | /* | |
54 | * XXX JYM for now, in kernel paddr_t can be 32 or 64 bits, depending | 52 | * XXX JYM for now, in kernel paddr_t can be 32 or 64 bits, depending | |
55 | * on PAE. Revisit when paddr_t becomes 64 bits for !PAE systems. | 53 | * on PAE. Revisit when paddr_t becomes 64 bits for !PAE systems. | |
56 | */ | 54 | */ | |
57 | #ifdef PAE | 55 | #ifdef PAE | |
58 | typedef __uint64_t paddr_t; | 56 | typedef __uint64_t paddr_t; | |
59 | typedef __uint64_t psize_t; | 57 | typedef __uint64_t psize_t; | |
60 | #define PRIxPADDR "llx" | 58 | #define PRIxPADDR "llx" | |
61 | #define PRIxPSIZE "llx" | 59 | #define PRIxPSIZE "llx" | |
62 | #define PRIuPSIZE "llu" | 60 | #define PRIuPSIZE "llu" | |
63 | #else /* PAE */ | 61 | #else /* PAE */ | |
64 | typedef unsigned long paddr_t; | 62 | typedef unsigned long paddr_t; | |
65 | typedef unsigned long psize_t; | 63 | typedef unsigned long psize_t; | |
66 | #define PRIxPADDR "lx" | 64 | #define PRIxPADDR "lx" | |
67 | #define PRIxPSIZE "lx" | 65 | #define PRIxPSIZE "lx" | |
68 | #define PRIuPSIZE "lu" | 66 | #define PRIuPSIZE "lu" | |
69 | #endif /* PAE */ | 67 | #endif /* PAE */ | |
70 | 68 | |||
71 | #else /* _KERNEL */ | 69 | #elif defined(_KMEMUSER) || defined(_KERNTYPES) | |
72 | /* paddr_t is always 64 bits for userland */ | 70 | /* paddr_t is always 64 bits for userland */ | |
73 | typedef __uint64_t paddr_t; | 71 | typedef __uint64_t paddr_t; | |
74 | typedef __uint64_t psize_t; | 72 | typedef __uint64_t psize_t; | |
75 | #define PRIxPADDR "llx" | 73 | #define PRIxPADDR "llx" | |
76 | #define PRIxPSIZE "llx" | 74 | #define PRIxPSIZE "llx" | |
77 | #define PRIuPSIZE "llu" | 75 | #define PRIuPSIZE "llu" | |
78 | 76 | |||
79 | #endif /* _KERNEL */ | 77 | #endif /* _KERNEL */ | |
80 | 78 | |||
79 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |||
80 | ||||
81 | typedef unsigned long vaddr_t; | 81 | typedef unsigned long vaddr_t; | |
82 | typedef unsigned long vsize_t; | 82 | typedef unsigned long vsize_t; | |
83 | #define PRIxVADDR "lx" | 83 | #define PRIxVADDR "lx" | |
84 | #define PRIxVSIZE "lx" | 84 | #define PRIxVSIZE "lx" | |
85 | #define PRIuVSIZE "lu" | 85 | #define PRIuVSIZE "lu" | |
86 | #endif /* _NETBSD_SOURCE */ | |||
87 | 86 | |||
88 | typedef int pmc_evid_t; | 87 | typedef int pmc_evid_t; | |
89 | typedef __uint64_t pmc_ctr_t; | 88 | typedef __uint64_t pmc_ctr_t; | |
90 | typedef int register_t; | 89 | typedef int register_t; | |
91 | #define PRIxREGISTER "x" | 90 | #define PRIxREGISTER "x" | |
92 | 91 | |||
92 | #endif /* _KERNEL || _KMEMUSER */ | |||
93 | ||||
94 | typedef int __register_t; | |||
93 | typedef unsigned char __cpu_simple_lock_nv_t; | 95 | typedef unsigned char __cpu_simple_lock_nv_t; | |
94 | 96 | |||
95 | /* __cpu_simple_lock_t used to be a full word. */ | 97 | /* __cpu_simple_lock_t used to be a full word. */ | |
96 | #define __CPU_SIMPLE_LOCK_PAD | 98 | #define __CPU_SIMPLE_LOCK_PAD | |
97 | 99 | |||
98 | #define __SIMPLELOCK_LOCKED 1 | 100 | #define __SIMPLELOCK_LOCKED 1 | |
99 | #define __SIMPLELOCK_UNLOCKED 0 | 101 | #define __SIMPLELOCK_UNLOCKED 0 | |
100 | 102 | |||
101 | /* The x86 does not have strict alignment requirements. */ | 103 | /* The x86 does not have strict alignment requirements. */ | |
102 | #define __NO_STRICT_ALIGNMENT | 104 | #define __NO_STRICT_ALIGNMENT | |
103 | 105 | |||
104 | #define __HAVE_NEW_STYLE_BUS_H | 106 | #define __HAVE_NEW_STYLE_BUS_H | |
105 | #define __HAVE_CPU_DATA_FIRST | 107 | #define __HAVE_CPU_DATA_FIRST |
--- src/sys/arch/ia64/include/types.h 2015/08/27 12:30:51 1.8
+++ src/sys/arch/ia64/include/types.h 2016/01/23 21:22:14 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.8 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.9 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -34,46 +34,46 @@ | @@ -34,46 +34,46 @@ | |||
34 | #ifndef _MACHTYPES_H_ | 34 | #ifndef _MACHTYPES_H_ | |
35 | #define _MACHTYPES_H_ | 35 | #define _MACHTYPES_H_ | |
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | #include <sys/featuretest.h> | 37 | #include <sys/featuretest.h> | |
38 | #include <machine/int_types.h> | 38 | #include <machine/int_types.h> | |
39 | 39 | |||
40 | #if defined(_KERNEL) | 40 | #if defined(_KERNEL) | |
41 | #include <machine/setjmp.h> | 41 | #include <machine/setjmp.h> | |
42 | typedef struct label_t { | 42 | typedef struct label_t { | |
43 | long double val[_JBLEN]; | 43 | long double val[_JBLEN]; | |
44 | } label_t; | 44 | } label_t; | |
45 | #endif | 45 | #endif | |
46 | 46 | |||
47 | /* NB: This should probably be if defined(_KERNEL) */ | 47 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
48 | #if defined(_NETBSD_SOURCE) | |||
49 | typedef unsigned long paddr_t; | 48 | typedef unsigned long paddr_t; | |
50 | typedef unsigned long psize_t; | 49 | typedef unsigned long psize_t; | |
51 | typedef unsigned long vaddr_t; | 50 | typedef unsigned long vaddr_t; | |
52 | typedef unsigned long vsize_t; | 51 | typedef unsigned long vsize_t; | |
53 | #define PRIxPADDR "lx" | 52 | #define PRIxPADDR "lx" | |
54 | #define PRIxPSIZE "lx" | 53 | #define PRIxPSIZE "lx" | |
55 | #define PRIuPSIZE "lu" | 54 | #define PRIuPSIZE "lu" | |
56 | #define PRIxVADDR "lx" | 55 | #define PRIxVADDR "lx" | |
57 | #define PRIxVSIZE "lx" | 56 | #define PRIxVSIZE "lx" | |
58 | #define PRIuVSIZE "lu" | 57 | #define PRIuVSIZE "lu" | |
59 | #endif | |||
60 | 58 | |||
61 | typedef int pmc_evid_t; | 59 | typedef int pmc_evid_t; | |
62 | typedef __uint64_t pmc_ctr_t; | 60 | typedef __uint64_t pmc_ctr_t; | |
63 | typedef long int register_t; | 61 | typedef long int register_t; | |
64 | #define PRIxREGISTER "lx" | 62 | #define PRIxREGISTER "lx" | |
63 | #endif | |||
65 | 64 | |||
66 | typedef int __cpu_simple_lock_nv_t; | 65 | typedef int __cpu_simple_lock_nv_t; | |
66 | typedef long int __register_t; | |||
67 | 67 | |||
68 | #define __SIMPLELOCK_LOCKED 1 | 68 | #define __SIMPLELOCK_LOCKED 1 | |
69 | #define __SIMPLELOCK_UNLOCKED 0 | 69 | #define __SIMPLELOCK_UNLOCKED 0 | |
70 | 70 | |||
71 | #define __HAVE_CPU_DATA_FIRST | 71 | #define __HAVE_CPU_DATA_FIRST | |
72 | #define __HAVE_CPU_COUNTER | 72 | #define __HAVE_CPU_COUNTER | |
73 | #define __HAVE_SYSCALL_INTERN | 73 | #define __HAVE_SYSCALL_INTERN | |
74 | #define __HAVE_MINIMAL_EMUL | 74 | #define __HAVE_MINIMAL_EMUL | |
75 | #define __HAVE_OLD_DISKLABEL | 75 | #define __HAVE_OLD_DISKLABEL | |
76 | #define __HAVE_ATOMIC64_OPS | 76 | #define __HAVE_ATOMIC64_OPS | |
77 | /* XXX: #define __HAVE_CPU_MAXPROC */ | 77 | /* XXX: #define __HAVE_CPU_MAXPROC */ | |
78 | #define __HAVE_TLS_VARIANT_I | 78 | #define __HAVE_TLS_VARIANT_I | |
79 | 79 |
--- src/sys/arch/m68k/include/types.h 2015/08/27 12:30:51 1.31
+++ src/sys/arch/m68k/include/types.h 2016/01/23 21:22:14 1.32
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.31 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.32 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -33,47 +33,47 @@ | @@ -33,47 +33,47 @@ | |||
33 | #ifndef _M68K_TYPES_H_ | 33 | #ifndef _M68K_TYPES_H_ | |
34 | #define _M68K_TYPES_H_ | 34 | #define _M68K_TYPES_H_ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | #include <sys/featuretest.h> | 37 | #include <sys/featuretest.h> | |
38 | #include <m68k/int_types.h> | 38 | #include <m68k/int_types.h> | |
39 | 39 | |||
40 | #if defined(_KERNEL) | 40 | #if defined(_KERNEL) | |
41 | typedef struct label_t { /* consistent with HP-UX */ | 41 | typedef struct label_t { /* consistent with HP-UX */ | |
42 | int val[15]; | 42 | int val[15]; | |
43 | } label_t; | 43 | } label_t; | |
44 | #endif | 44 | #endif | |
45 | 45 | |||
46 | /* NB: This should probably be if defined(_KERNEL) */ | 46 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
47 | #if defined(_NETBSD_SOURCE) | |||
48 | typedef unsigned long vm_offset_t; /* depreciated */ | 47 | typedef unsigned long vm_offset_t; /* depreciated */ | |
49 | typedef unsigned long vm_size_t; /* depreciated */ | 48 | typedef unsigned long vm_size_t; /* depreciated */ | |
50 | 49 | |||
51 | typedef unsigned long paddr_t; | 50 | typedef unsigned long paddr_t; | |
52 | typedef unsigned long psize_t; | 51 | typedef unsigned long psize_t; | |
53 | typedef unsigned long vaddr_t; | 52 | typedef unsigned long vaddr_t; | |
54 | typedef unsigned long vsize_t; | 53 | typedef unsigned long vsize_t; | |
55 | #define PRIxPADDR "lx" | 54 | #define PRIxPADDR "lx" | |
56 | #define PRIxPSIZE "lx" | 55 | #define PRIxPSIZE "lx" | |
57 | #define PRIuPSIZE "lu" | 56 | #define PRIuPSIZE "lu" | |
58 | #define PRIxVADDR "lx" | 57 | #define PRIxVADDR "lx" | |
59 | #define PRIxVSIZE "lx" | 58 | #define PRIxVSIZE "lx" | |
60 | #define PRIuVSIZE "lu" | 59 | #define PRIuVSIZE "lu" | |
61 | #endif | |||
62 | 60 | |||
63 | typedef int register_t; | 61 | typedef int register_t; | |
64 | #define PRIxREGISTER "x" | 62 | #define PRIxREGISTER "x" | |
63 | #endif | |||
65 | 64 | |||
66 | typedef unsigned char __cpu_simple_lock_nv_t; | 65 | typedef unsigned char __cpu_simple_lock_nv_t; | |
66 | typedef int __register_t; | |||
67 | 67 | |||
68 | #define __SIMPLELOCK_LOCKED 0x80 /* result of `tas' insn */ | 68 | #define __SIMPLELOCK_LOCKED 0x80 /* result of `tas' insn */ | |
69 | #define __SIMPLELOCK_UNLOCKED 0 | 69 | #define __SIMPLELOCK_UNLOCKED 0 | |
70 | 70 | |||
71 | /* The m68k does not have strict alignment requirements. */ | 71 | /* The m68k does not have strict alignment requirements. */ | |
72 | #define __NO_STRICT_ALIGNMENT | 72 | #define __NO_STRICT_ALIGNMENT | |
73 | 73 | |||
74 | #define __HAVE_SYSCALL_INTERN | 74 | #define __HAVE_SYSCALL_INTERN | |
75 | #define __HAVE_CPU_DATA_FIRST | 75 | #define __HAVE_CPU_DATA_FIRST | |
76 | #define __HAVE_COMMON___TLS_GET_ADDR | 76 | #define __HAVE_COMMON___TLS_GET_ADDR | |
77 | #define __HAVE___LWP_GETTCB_FAST | 77 | #define __HAVE___LWP_GETTCB_FAST | |
78 | #define __HAVE___LWP_SETTCB | 78 | #define __HAVE___LWP_SETTCB | |
79 | #define __HAVE_TLS_VARIANT_I | 79 | #define __HAVE_TLS_VARIANT_I |
--- src/sys/arch/mips/include/types.h 2015/08/27 12:30:51 1.59
+++ src/sys/arch/mips/include/types.h 2016/01/23 21:22:14 1.60
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.59 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.60 2016/01/23 21:22:14 christos 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. | |
@@ -38,55 +38,53 @@ | @@ -38,55 +38,53 @@ | |||
38 | #define _MACHTYPES_H_ | 38 | #define _MACHTYPES_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 | |||
44 | /* | 44 | /* | |
45 | * Note that mips_reg_t is distinct from the register_t defined | 45 | * Note that mips_reg_t is distinct from the register_t defined | |
46 | * in <types.h> to allow these structures to be as hidden from | 46 | * in <types.h> to allow these structures to be as hidden from | |
47 | * the rest of the operating system as possible. | 47 | * the rest of the operating system as possible. | |
48 | */ | 48 | */ | |
49 | 49 | |||
50 | 50 | |||
51 | /* NB: This should probably be if defined(_KERNEL) */ | 51 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
52 | #if defined(_NETBSD_SOURCE) | |||
53 | #if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64) | 52 | #if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64) | |
54 | typedef __uint64_t paddr_t; | 53 | typedef __uint64_t paddr_t; | |
55 | typedef __uint64_t psize_t; | 54 | typedef __uint64_t psize_t; | |
56 | #define PRIxPADDR PRIx64 | 55 | #define PRIxPADDR PRIx64 | |
57 | #define PRIxPSIZE PRIx64 | 56 | #define PRIxPSIZE PRIx64 | |
58 | #define PRIdPSIZE PRId64 | 57 | #define PRIdPSIZE PRId64 | |
59 | #else | 58 | #else | |
60 | typedef __uint32_t paddr_t; | 59 | typedef __uint32_t paddr_t; | |
61 | typedef __uint32_t psize_t; | 60 | typedef __uint32_t psize_t; | |
62 | #define PRIxPADDR PRIx32 | 61 | #define PRIxPADDR PRIx32 | |
63 | #define PRIxPSIZE PRIx32 | 62 | #define PRIxPSIZE PRIx32 | |
64 | #define PRIdPSIZE PRId32 | 63 | #define PRIdPSIZE PRId32 | |
65 | #endif | 64 | #endif | |
66 | #ifdef _LP64 | 65 | #ifdef _LP64 | |
67 | typedef __uint64_t vaddr_t; | 66 | typedef __uint64_t vaddr_t; | |
68 | typedef __uint64_t vsize_t; | 67 | typedef __uint64_t vsize_t; | |
69 | #define PRIxVADDR PRIx64 | 68 | #define PRIxVADDR PRIx64 | |
70 | #define PRIxVSIZE PRIx64 | 69 | #define PRIxVSIZE PRIx64 | |
71 | #define PRIdVSIZE PRId64 | 70 | #define PRIdVSIZE PRId64 | |
72 | #else | 71 | #else | |
73 | typedef __uint32_t vaddr_t; | 72 | typedef __uint32_t vaddr_t; | |
74 | typedef __uint32_t vsize_t; | 73 | typedef __uint32_t vsize_t; | |
75 | #define PRIxVADDR PRIx32 | 74 | #define PRIxVADDR PRIx32 | |
76 | #define PRIxVSIZE PRIx32 | 75 | #define PRIxVSIZE PRIx32 | |
77 | #define PRIdVSIZE PRId32 | 76 | #define PRIdVSIZE PRId32 | |
78 | #endif | 77 | #endif | |
79 | #endif /* NETBSD_SOURCE */ | |||
80 | 78 | |||
81 | typedef int mips_prid_t; | 79 | typedef int mips_prid_t; | |
82 | /* Make sure this is signed; we need pointers to be sign-extended. */ | 80 | /* Make sure this is signed; we need pointers to be sign-extended. */ | |
83 | #if defined(__mips_o64) || defined(__mips_o32) | 81 | #if defined(__mips_o64) || defined(__mips_o32) | |
84 | typedef __uint32_t fpregister_t; | 82 | typedef __uint32_t fpregister_t; | |
85 | typedef __uint32_t mips_fpreg_t; /* do not use */ | 83 | typedef __uint32_t mips_fpreg_t; /* do not use */ | |
86 | #else | 84 | #else | |
87 | typedef __uint64_t fpregister_t; | 85 | typedef __uint64_t fpregister_t; | |
88 | typedef __uint64_t mips_fpreg_t; /* do not use */ | 86 | typedef __uint64_t mips_fpreg_t; /* do not use */ | |
89 | #endif | 87 | #endif | |
90 | #if defined(__mips_o32) | 88 | #if defined(__mips_o32) | |
91 | typedef __int32_t register_t; | 89 | typedef __int32_t register_t; | |
92 | typedef __uint32_t uregister_t; | 90 | typedef __uint32_t uregister_t; | |
@@ -94,56 +92,62 @@ typedef __int32_t mips_reg_t; /* do not | @@ -94,56 +92,62 @@ typedef __int32_t mips_reg_t; /* do not | |||
94 | typedef __uint32_t mips_ureg_t; /* do not use */ | 92 | typedef __uint32_t mips_ureg_t; /* do not use */ | |
95 | #define PRIxREGISTER PRIx32 | 93 | #define PRIxREGISTER PRIx32 | |
96 | #define PRIxUREGISTER PRIx32 | 94 | #define PRIxUREGISTER PRIx32 | |
97 | #else | 95 | #else | |
98 | typedef __int64_t register_t; | 96 | typedef __int64_t register_t; | |
99 | typedef __uint64_t uregister_t; | 97 | typedef __uint64_t uregister_t; | |
100 | typedef __int64_t mips_reg_t; /* do not use */ | 98 | typedef __int64_t mips_reg_t; /* do not use */ | |
101 | typedef __uint64_t mips_ureg_t; /* do not use */ | 99 | typedef __uint64_t mips_ureg_t; /* do not use */ | |
102 | typedef __int64_t register32_t; | 100 | typedef __int64_t register32_t; | |
103 | typedef __uint64_t uregister32_t; | 101 | typedef __uint64_t uregister32_t; | |
104 | #define PRIxREGISTER PRIx64 | 102 | #define PRIxREGISTER PRIx64 | |
105 | #define PRIxUREGISTER PRIx64 | 103 | #define PRIxUREGISTER PRIx64 | |
106 | #endif /* __mips_o32 */ | 104 | #endif /* __mips_o32 */ | |
105 | #endif /* _KERNEL || _KMEMUSER*/ | |||
107 | 106 | |||
108 | #if defined(_KERNEL) || defined(_NETBSD_SOURCE) | 107 | #if defined(_KERNEL) | |
109 | typedef struct label_t { | 108 | typedef struct label_t { | |
110 | register_t val[14]; | 109 | register_t val[14]; | |
111 | } label_t; | 110 | } label_t; | |
112 | #define _L_S0 0 | 111 | #define _L_S0 0 | |
113 | #define _L_S1 1 | 112 | #define _L_S1 1 | |
114 | #define _L_S2 2 | 113 | #define _L_S2 2 | |
115 | #define _L_S3 3 | 114 | #define _L_S3 3 | |
116 | #define _L_S4 4 | 115 | #define _L_S4 4 | |
117 | #define _L_S5 5 | 116 | #define _L_S5 5 | |
118 | #define _L_S6 6 | 117 | #define _L_S6 6 | |
119 | #define _L_S7 7 | 118 | #define _L_S7 7 | |
120 | #define _L_T8 8 | 119 | #define _L_T8 8 | |
121 | #define _L_GP 9 | 120 | #define _L_GP 9 | |
122 | #define _L_SP 10 | 121 | #define _L_SP 10 | |
123 | #define _L_S8 11 | 122 | #define _L_S8 11 | |
124 | #define _L_RA 12 | 123 | #define _L_RA 12 | |
125 | #define _L_SR 13 | 124 | #define _L_SR 13 | |
126 | 125 | |||
127 | typedef __uint32_t tlb_asid_t; | 126 | typedef __uint32_t tlb_asid_t; | |
128 | #endif /* defined(_KERNEL) || defined(_NETBSD_SOURCE) */ | 127 | #endif /* _KERNEL */ | |
129 | 128 | |||
130 | #if defined(_KERNEL) || defined(_KMEMUSER) | 129 | #if defined(_KERNEL) || defined(_KMEMUSER) | |
131 | #define PCU_FPU 0 | 130 | #define PCU_FPU 0 | |
132 | #define PCU_DSP 1 | 131 | #define PCU_DSP 1 | |
133 | #define PCU_UNIT_COUNT 2 | 132 | #define PCU_UNIT_COUNT 2 | |
134 | #endif | 133 | #endif | |
135 | 134 | |||
136 | typedef unsigned int __cpu_simple_lock_nv_t; | 135 | typedef unsigned int __cpu_simple_lock_nv_t; | |
136 | #if defined(__mips_o32) | |||
137 | typedef __int32_t __register_t; | |||
138 | #else | |||
139 | typedef __int64_t __register_t; | |||
140 | #endif | |||
137 | 141 | |||
138 | #define __SIMPLELOCK_LOCKED 1 | 142 | #define __SIMPLELOCK_LOCKED 1 | |
139 | #define __SIMPLELOCK_UNLOCKED 0 | 143 | #define __SIMPLELOCK_UNLOCKED 0 | |
140 | 144 | |||
141 | #define __HAVE_FAST_SOFTINTS | 145 | #define __HAVE_FAST_SOFTINTS | |
142 | #define __HAVE_AST_PERPROC | 146 | #define __HAVE_AST_PERPROC | |
143 | #define __HAVE_SYSCALL_INTERN | 147 | #define __HAVE_SYSCALL_INTERN | |
144 | #define __HAVE_CPU_LWP_SETPRIVATE | 148 | #define __HAVE_CPU_LWP_SETPRIVATE | |
145 | #define __HAVE_CPU_DATA_FIRST | 149 | #define __HAVE_CPU_DATA_FIRST | |
146 | #define __HAVE_MD_CPU_OFFLINE | 150 | #define __HAVE_MD_CPU_OFFLINE | |
147 | #ifdef MIPS3_PLUS /* XXX bogus! */ | 151 | #ifdef MIPS3_PLUS /* XXX bogus! */ | |
148 | #define __HAVE_CPU_COUNTER | 152 | #define __HAVE_CPU_COUNTER | |
149 | #endif | 153 | #endif |
--- src/sys/arch/or1k/include/types.h 2015/08/27 12:30:51 1.2
+++ src/sys/arch/or1k/include/types.h 2016/01/23 21:22:14 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.2 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.3 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Matt Thomas of 3am Software Foundry. | 8 | * by Matt Thomas of 3am Software Foundry. | |
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. | |
@@ -26,57 +26,57 @@ | @@ -26,57 +26,57 @@ | |||
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #ifndef _OR1K_TYPES_H_ | 32 | #ifndef _OR1K_TYPES_H_ | |
33 | #define _OR1K_TYPES_H_ | 33 | #define _OR1K_TYPES_H_ | |
34 | 34 | |||
35 | #include <sys/cdefs.h> | 35 | #include <sys/cdefs.h> | |
36 | #include <sys/featuretest.h> | 36 | #include <sys/featuretest.h> | |
37 | #include <or1k/int_types.h> | 37 | #include <or1k/int_types.h> | |
38 | 38 | |||
39 | /* NB: This should probably be if defined(_KERNEL) */ | 39 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
40 | #if defined(_NETBSD_SOURCE) | 40 | typedef unsigned long vm_offset_t; /* deprecated */ | |
41 | typedef unsigned long vm_offset_t; /* depreciated */ | 41 | typedef unsigned long vm_size_t; /* deprecated */ | |
42 | typedef unsigned long vm_size_t; /* depreciated */ | |||
43 | 42 | |||
44 | typedef __UINTPTR_TYPE__ paddr_t; | 43 | typedef __UINTPTR_TYPE__ paddr_t; | |
45 | typedef __UINTPTR_TYPE__ psize_t; | 44 | typedef __UINTPTR_TYPE__ psize_t; | |
46 | typedef __UINTPTR_TYPE__ vaddr_t; | 45 | typedef __UINTPTR_TYPE__ vaddr_t; | |
47 | typedef __UINTPTR_TYPE__ vsize_t; | 46 | typedef __UINTPTR_TYPE__ vsize_t; | |
48 | #define PRIxPADDR PRIxPTR | 47 | #define PRIxPADDR PRIxPTR | |
49 | #define PRIxPSIZE PRIxPTR | 48 | #define PRIxPSIZE PRIxPTR | |
50 | #define PRIuPSIZE PRIuPTR | 49 | #define PRIuPSIZE PRIuPTR | |
51 | #define PRIxVADDR PRIxPTR | 50 | #define PRIxVADDR PRIxPTR | |
52 | #define PRIxVSIZE PRIxPTR | 51 | #define PRIxVSIZE PRIxPTR | |
53 | #define PRIuVSIZE PRIuPTR | 52 | #define PRIuVSIZE PRIuPTR | |
54 | #endif | |||
55 | 53 | |||
56 | typedef unsigned long int register_t; | 54 | typedef unsigned long int register_t; | |
57 | 55 | |||
58 | typedef unsigned long pmc_evid_t; | 56 | typedef unsigned long pmc_evid_t; | |
59 | #define PMC_INVALID_EVID (-1) | 57 | #define PMC_INVALID_EVID (-1) | |
60 | typedef unsigned long pmc_ctr_t; | 58 | typedef unsigned long pmc_ctr_t; | |
61 | typedef unsigned short tlb_asid_t; | 59 | typedef unsigned short tlb_asid_t; | |
60 | #endif | |||
62 | 61 | |||
63 | #if defined(_KERNEL) | 62 | #if defined(_KERNEL) | |
64 | typedef struct label_t { /* Used by setjmp & longjmp */ | 63 | typedef struct label_t { /* Used by setjmp & longjmp */ | |
65 | register_t lb_reg[32]; /* */ | 64 | register_t lb_reg[32]; /* */ | |
66 | } label_t; | 65 | } label_t; | |
67 | #endif | 66 | #endif | |
68 | 67 | |||
69 | typedef unsigned int __cpu_simple_lock_nv_t; | 68 | typedef unsigned int __cpu_simple_lock_nv_t; | |
69 | typedef unsigned long int __register_t; | |||
70 | 70 | |||
71 | #define __SIMPLELOCK_LOCKED 1 | 71 | #define __SIMPLELOCK_LOCKED 1 | |
72 | #define __SIMPLELOCK_UNLOCKED 0 | 72 | #define __SIMPLELOCK_UNLOCKED 0 | |
73 | 73 | |||
74 | #define __HAVE_FAST_SOFTINTS | 74 | #define __HAVE_FAST_SOFTINTS | |
75 | #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS | 75 | #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS | |
76 | #define __HAVE_CPU_COUNTER | 76 | #define __HAVE_CPU_COUNTER | |
77 | #define __HAVE_SYSCALL_INTERN | 77 | #define __HAVE_SYSCALL_INTERN | |
78 | #define __HAVE_NEW_STYLE_BUS_H | 78 | #define __HAVE_NEW_STYLE_BUS_H | |
79 | #define __HAVE_MINIMAL_EMUL | 79 | #define __HAVE_MINIMAL_EMUL | |
80 | #define __HAVE_CPU_DATA_FIRST | 80 | #define __HAVE_CPU_DATA_FIRST | |
81 | #define __HAVE___LWP_GETPRIVATE_FAST | 81 | #define __HAVE___LWP_GETPRIVATE_FAST | |
82 | #define __HAVE_COMMON___TLS_GET_ADDR | 82 | #define __HAVE_COMMON___TLS_GET_ADDR |
--- src/sys/arch/powerpc/include/types.h 2015/08/27 12:30:51 1.51
+++ src/sys/arch/powerpc/include/types.h 2016/01/23 21:22:14 1.52
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.51 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.52 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (C) 1995 Wolfgang Solfrank. | 4 | * Copyright (C) 1995 Wolfgang Solfrank. | |
5 | * Copyright (C) 1995 TooLs GmbH. | 5 | * Copyright (C) 1995 TooLs GmbH. | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -28,57 +28,57 @@ | @@ -28,57 +28,57 @@ | |||
28 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 28 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
32 | */ | 32 | */ | |
33 | 33 | |||
34 | #ifndef _MACHTYPES_H_ | 34 | #ifndef _MACHTYPES_H_ | |
35 | #define _MACHTYPES_H_ | 35 | #define _MACHTYPES_H_ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | #include <sys/featuretest.h> | 38 | #include <sys/featuretest.h> | |
39 | #include <powerpc/int_types.h> | 39 | #include <powerpc/int_types.h> | |
40 | 40 | |||
41 | /* NB: This should probably be if defined(_KERNEL) */ | 41 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
42 | #if defined(_NETBSD_SOURCE) | |||
43 | typedef unsigned long paddr_t, vaddr_t; | 42 | typedef unsigned long paddr_t, vaddr_t; | |
44 | typedef unsigned long psize_t, vsize_t; | 43 | typedef unsigned long psize_t, vsize_t; | |
45 | #define PRIxPADDR "lx" | 44 | #define PRIxPADDR "lx" | |
46 | #define PRIxPSIZE "lx" | 45 | #define PRIxPSIZE "lx" | |
47 | #define PRIuPSIZE "lu" | 46 | #define PRIuPSIZE "lu" | |
48 | #define PRIxVADDR "lx" | 47 | #define PRIxVADDR "lx" | |
49 | #define PRIxVSIZE "lx" | 48 | #define PRIxVSIZE "lx" | |
50 | #define PRIuVSIZE "lu" | 49 | #define PRIuVSIZE "lu" | |
51 | #endif | |||
52 | 50 | |||
53 | /* | 51 | /* | |
54 | * Because lwz etal don't sign extend, it's best to make registers unsigned. | 52 | * Because lwz etal don't sign extend, it's best to make registers unsigned. | |
55 | */ | 53 | */ | |
56 | typedef unsigned long register_t; | 54 | typedef unsigned long register_t; | |
57 | typedef __uint64_t register64_t; | 55 | typedef __uint64_t register64_t; | |
58 | typedef __uint32_t register32_t; | 56 | typedef __uint32_t register32_t; | |
59 | #define PRIxREGISTER "lx" | 57 | #define PRIxREGISTER "lx" | |
60 | #define PRIxREGISTER64 PRIx64 | 58 | #define PRIxREGISTER64 PRIx64 | |
61 | #define PRIxREGISTER32 PRIx32 | 59 | #define PRIxREGISTER32 PRIx32 | |
60 | #endif | |||
62 | 61 | |||
63 | #if defined(_KERNEL) | 62 | #if defined(_KERNEL) | |
64 | typedef struct label_t { | 63 | typedef struct label_t { | |
65 | register_t val[40]; /* double check this XXX */ | 64 | register_t val[40]; /* double check this XXX */ | |
66 | } label_t; | 65 | } label_t; | |
67 | 66 | |||
68 | typedef __uint32_t tlb_asid_t; /* for booke */ | 67 | typedef __uint32_t tlb_asid_t; /* for booke */ | |
69 | #endif | 68 | #endif | |
70 | 69 | |||
71 | typedef int __cpu_simple_lock_nv_t; | 70 | typedef int __cpu_simple_lock_nv_t; | |
71 | typedef unsigned long __register_t; | |||
72 | 72 | |||
73 | #define __SIMPLELOCK_LOCKED 1 | 73 | #define __SIMPLELOCK_LOCKED 1 | |
74 | #define __SIMPLELOCK_UNLOCKED 0 | 74 | #define __SIMPLELOCK_UNLOCKED 0 | |
75 | 75 | |||
76 | #define __HAVE_CPU_COUNTER | 76 | #define __HAVE_CPU_COUNTER | |
77 | #define __HAVE_NEW_STYLE_BUS_H | 77 | #define __HAVE_NEW_STYLE_BUS_H | |
78 | #define __HAVE_SYSCALL_INTERN | 78 | #define __HAVE_SYSCALL_INTERN | |
79 | #define __HAVE_CPU_DATA_FIRST | 79 | #define __HAVE_CPU_DATA_FIRST | |
80 | #define __HAVE_CPU_UAREA_ROUTINES | 80 | #define __HAVE_CPU_UAREA_ROUTINES | |
81 | #ifdef _LP64 | 81 | #ifdef _LP64 | |
82 | #define __HAVE_ATOMIC64_OPS | 82 | #define __HAVE_ATOMIC64_OPS | |
83 | #endif | 83 | #endif | |
84 | #define __HAVE_CPU_LWP_SETPRIVATE | 84 | #define __HAVE_CPU_LWP_SETPRIVATE |
--- src/sys/arch/riscv/include/types.h 2015/08/27 12:30:51 1.3
+++ src/sys/arch/riscv/include/types.h 2016/01/23 21:22:14 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.3 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.4 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Matt Thomas of 3am Software Foundry. | 8 | * by Matt Thomas of 3am Software Foundry. | |
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. | |
@@ -26,66 +26,70 @@ | @@ -26,66 +26,70 @@ | |||
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #ifndef _RISCV_TYPES_H_ | 32 | #ifndef _RISCV_TYPES_H_ | |
33 | #define _RISCV_TYPES_H_ | 33 | #define _RISCV_TYPES_H_ | |
34 | 34 | |||
35 | #include <sys/cdefs.h> | 35 | #include <sys/cdefs.h> | |
36 | #include <sys/featuretest.h> | 36 | #include <sys/featuretest.h> | |
37 | #include <riscv/int_types.h> | 37 | #include <riscv/int_types.h> | |
38 | 38 | |||
39 | /* NB: This should probably be if defined(_KERNEL) */ | 39 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
40 | #if defined(_NETBSD_SOURCE) | |||
41 | typedef __UINTPTR_TYPE__ paddr_t; | 40 | typedef __UINTPTR_TYPE__ paddr_t; | |
42 | typedef __UINTPTR_TYPE__ psize_t; | 41 | typedef __UINTPTR_TYPE__ psize_t; | |
43 | typedef __UINTPTR_TYPE__ vaddr_t; | 42 | typedef __UINTPTR_TYPE__ vaddr_t; | |
44 | typedef __UINTPTR_TYPE__ vsize_t; | 43 | typedef __UINTPTR_TYPE__ vsize_t; | |
45 | #define PRIxPADDR PRIxPTR | 44 | #define PRIxPADDR PRIxPTR | |
46 | #define PRIxPSIZE PRIxPTR | 45 | #define PRIxPSIZE PRIxPTR | |
47 | #define PRIuPSIZE PRIuPTR | 46 | #define PRIuPSIZE PRIuPTR | |
48 | #define PRIxVADDR PRIxPTR | 47 | #define PRIxVADDR PRIxPTR | |
49 | #define PRIxVSIZE PRIxPTR | 48 | #define PRIxVSIZE PRIxPTR | |
50 | #define PRIuVSIZE PRIuPTR | 49 | #define PRIuVSIZE PRIuPTR | |
51 | #endif | |||
52 | 50 | |||
53 | #ifdef _LP64 // match <riscv/reg.h> | 51 | #ifdef _LP64 // match <riscv/reg.h> | |
54 | #define PRIxREGISTER PRIx64 | 52 | #define PRIxREGISTER PRIx64 | |
55 | typedef __int64_t register_t; | 53 | typedef __int64_t register_t; | |
56 | typedef __uint64_t uregister_t; | 54 | typedef __uint64_t uregister_t; | |
57 | #else | 55 | #else | |
58 | #define PRIxREGISTER PRIx32 | 56 | #define PRIxREGISTER PRIx32 | |
59 | typedef __int32_t register_t; | 57 | typedef __int32_t register_t; | |
60 | typedef __uint32_t uregister_t; | 58 | typedef __uint32_t uregister_t; | |
61 | #endif | 59 | #endif | |
62 | typedef signed int register32_t; | 60 | typedef signed int register32_t; | |
63 | typedef unsigned int uregister32_t; | 61 | typedef unsigned int uregister32_t; | |
64 | #define PRIxREGISTER32 "x" | 62 | #define PRIxREGISTER32 "x" | |
65 | 63 | |||
66 | typedef unsigned long pmc_evid_t; | 64 | typedef unsigned long pmc_evid_t; | |
67 | #define PMC_INVALID_EVID (-1) | 65 | #define PMC_INVALID_EVID (-1) | |
68 | typedef unsigned long pmc_ctr_t; | 66 | typedef unsigned long pmc_ctr_t; | |
69 | typedef unsigned short tlb_asid_t; | 67 | typedef unsigned short tlb_asid_t; | |
68 | #endif | |||
70 | 69 | |||
71 | #if defined(_KERNEL) | 70 | #if defined(_KERNEL) | |
72 | typedef struct label_t { /* Used by setjmp & longjmp */ | 71 | typedef struct label_t { /* Used by setjmp & longjmp */ | |
73 | register_t lb_reg[16]; /* */ | 72 | register_t lb_reg[16]; /* */ | |
74 | __uint32_t lb_sr; | 73 | __uint32_t lb_sr; | |
75 | } label_t; | 74 | } label_t; | |
76 | #endif | 75 | #endif | |
77 | 76 | |||
78 | typedef unsigned int __cpu_simple_lock_nv_t; | 77 | typedef unsigned int __cpu_simple_lock_nv_t; | |
78 | #ifdef _LP64 | |||
79 | typedef __int64_t __register_t; | |||
80 | #else | |||
81 | typedef __int32_t __register_t; | |||
82 | #endif | |||
79 | 83 | |||
80 | #define __SIMPLELOCK_LOCKED 1 | 84 | #define __SIMPLELOCK_LOCKED 1 | |
81 | #define __SIMPLELOCK_UNLOCKED 0 | 85 | #define __SIMPLELOCK_UNLOCKED 0 | |
82 | 86 | |||
83 | #define __HAVE_FAST_SOFTINTS | 87 | #define __HAVE_FAST_SOFTINTS | |
84 | #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS | 88 | #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS | |
85 | #define __HAVE_CPU_COUNTER | 89 | #define __HAVE_CPU_COUNTER | |
86 | #define __HAVE_SYSCALL_INTERN | 90 | #define __HAVE_SYSCALL_INTERN | |
87 | #define __HAVE_CPU_DATA_FIRST | 91 | #define __HAVE_CPU_DATA_FIRST | |
88 | #define __HAVE___LWP_GETPRIVATE_FAST | 92 | #define __HAVE___LWP_GETPRIVATE_FAST | |
89 | #define __HAVE_COMMON___TLS_GET_ADDR | 93 | #define __HAVE_COMMON___TLS_GET_ADDR | |
90 | #define __HAVE_TLS_VARIANT_I | 94 | #define __HAVE_TLS_VARIANT_I | |
91 | #ifdef __LP64 | 95 | #ifdef __LP64 |
--- src/sys/arch/sh3/include/types.h 2015/08/27 12:30:51 1.35
+++ src/sys/arch/sh3/include/types.h 2016/01/23 21:22:14 1.36
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.35 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.36 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -34,47 +34,47 @@ | @@ -34,47 +34,47 @@ | |||
34 | #ifndef _SH3_TYPES_H_ | 34 | #ifndef _SH3_TYPES_H_ | |
35 | #define _SH3_TYPES_H_ | 35 | #define _SH3_TYPES_H_ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | #include <sys/featuretest.h> | 38 | #include <sys/featuretest.h> | |
39 | #include <sh3/int_types.h> | 39 | #include <sh3/int_types.h> | |
40 | 40 | |||
41 | #if defined(_KERNEL) | 41 | #if defined(_KERNEL) | |
42 | typedef struct label_t { | 42 | typedef struct label_t { | |
43 | int val[9]; | 43 | int val[9]; | |
44 | } label_t; | 44 | } label_t; | |
45 | #endif | 45 | #endif | |
46 | 46 | |||
47 | /* NB: This should probably be if defined(_KERNEL) */ | 47 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
48 | #if defined(_NETBSD_SOURCE) | |||
49 | typedef unsigned long vm_offset_t; | 48 | typedef unsigned long vm_offset_t; | |
50 | typedef unsigned long vm_size_t; | 49 | typedef unsigned long vm_size_t; | |
51 | 50 | |||
52 | typedef unsigned long paddr_t; | 51 | typedef unsigned long paddr_t; | |
53 | typedef unsigned long psize_t; | 52 | typedef unsigned long psize_t; | |
54 | typedef unsigned long vaddr_t; | 53 | typedef unsigned long vaddr_t; | |
55 | typedef unsigned long vsize_t; | 54 | typedef unsigned long vsize_t; | |
56 | #define PRIxPADDR "lx" | 55 | #define PRIxPADDR "lx" | |
57 | #define PRIxPSIZE "lx" | 56 | #define PRIxPSIZE "lx" | |
58 | #define PRIuPSIZE "lu" | 57 | #define PRIuPSIZE "lu" | |
59 | #define PRIxVADDR "lx" | 58 | #define PRIxVADDR "lx" | |
60 | #define PRIxVSIZE "lx" | 59 | #define PRIxVSIZE "lx" | |
61 | #define PRIuVSIZE "lu" | 60 | #define PRIuVSIZE "lu" | |
62 | #endif | |||
63 | 61 | |||
64 | typedef int register_t; | 62 | typedef int register_t; | |
65 | #define PRIxREGISTER "x" | 63 | #define PRIxREGISTER "x" | |
64 | #endif | |||
66 | 65 | |||
67 | typedef unsigned char __cpu_simple_lock_nv_t; | 66 | typedef unsigned char __cpu_simple_lock_nv_t; | |
67 | typedef int __register_t; | |||
68 | 68 | |||
69 | #define __SIMPLELOCK_LOCKED 0x80 | 69 | #define __SIMPLELOCK_LOCKED 0x80 | |
70 | #define __SIMPLELOCK_UNLOCKED 0 | 70 | #define __SIMPLELOCK_UNLOCKED 0 | |
71 | 71 | |||
72 | #define __HAVE_AST_PERPROC | 72 | #define __HAVE_AST_PERPROC | |
73 | #define __HAVE_NEW_STYLE_BUS_H | 73 | #define __HAVE_NEW_STYLE_BUS_H | |
74 | #define __HAVE_CPU_DATA_FIRST | 74 | #define __HAVE_CPU_DATA_FIRST | |
75 | #define __HAVE_SYSCALL_INTERN | 75 | #define __HAVE_SYSCALL_INTERN | |
76 | #define __HAVE_MM_MD_DIRECT_MAPPED_IO | 76 | #define __HAVE_MM_MD_DIRECT_MAPPED_IO | |
77 | #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS | 77 | #define __HAVE_MM_MD_DIRECT_MAPPED_PHYS | |
78 | #define __HAVE_MM_MD_KERNACC | 78 | #define __HAVE_MM_MD_KERNACC | |
79 | 79 | |||
80 | #if defined(_KERNEL) | 80 | #if defined(_KERNEL) |
--- src/sys/arch/sparc/include/types.h 2015/10/06 20:03:05 1.64
+++ src/sys/arch/sparc/include/types.h 2016/01/23 21:22:14 1.65
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.64 2015/10/06 20:03:05 martin Exp $ */ | 1 | /* $NetBSD: types.h,v 1.65 2016/01/23 21:22:14 christos 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 software was developed by the Computer Systems Engineering group | 7 | * This software was developed by the Computer Systems Engineering group | |
8 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and | 8 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and | |
9 | * contributed to Berkeley. | 9 | * contributed to Berkeley. | |
10 | * | 10 | * | |
11 | * All advertising materials mentioning features or use of this software | 11 | * All advertising materials mentioning features or use of this software | |
12 | * must display the following acknowledgement: | 12 | * must display the following acknowledgement: | |
13 | * This product includes software developed by the University of | 13 | * This product includes software developed by the University of | |
14 | * California, Lawrence Berkeley Laboratory. | 14 | * California, Lawrence Berkeley Laboratory. | |
@@ -48,76 +48,79 @@ | @@ -48,76 +48,79 @@ | |||
48 | #endif | 48 | #endif | |
49 | 49 | |||
50 | #if defined(_KERNEL_OPT) | 50 | #if defined(_KERNEL_OPT) | |
51 | #include "opt_sparc_arch.h" | 51 | #include "opt_sparc_arch.h" | |
52 | #endif | 52 | #endif | |
53 | 53 | |||
54 | #ifndef _LOCORE | 54 | #ifndef _LOCORE | |
55 | 55 | |||
56 | #include <sys/cdefs.h> | 56 | #include <sys/cdefs.h> | |
57 | #include <sys/featuretest.h> | 57 | #include <sys/featuretest.h> | |
58 | #include <machine/int_types.h> | 58 | #include <machine/int_types.h> | |
59 | 59 | |||
60 | /* The following are unsigned to prevent annoying sign extended pointers. */ | 60 | /* The following are unsigned to prevent annoying sign extended pointers. */ | |
61 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |||
61 | typedef unsigned long int register_t; | 62 | typedef unsigned long int register_t; | |
62 | #define PRIxREGISTER "lx" | 63 | #define PRIxREGISTER "lx" | |
63 | typedef unsigned int register32_t; | 64 | typedef unsigned int register32_t; | |
64 | #define PRIxREGISTER32 "x" | 65 | #define PRIxREGISTER32 "x" | |
65 | #ifdef __arch64__ | 66 | #ifdef __arch64__ | |
66 | typedef unsigned long int register64_t; | 67 | typedef unsigned long int register64_t; | |
67 | #define PRIxREGISTER64 "lx" | 68 | #define PRIxREGISTER64 "lx" | |
68 | #else | 69 | #else | |
69 | /* LONGLONG */ | 70 | /* LONGLONG */ | |
70 | typedef unsigned long long int register64_t; | 71 | typedef unsigned long long int register64_t; | |
71 | #define PRIxREGISTER64 "llx" | 72 | #define PRIxREGISTER64 "llx" | |
72 | #endif | 73 | #endif | |
74 | #endif | |||
73 | 75 | |||
74 | #if defined(_KERNEL) | 76 | #if defined(_KERNEL) | |
75 | typedef struct label_t { | 77 | typedef struct label_t { | |
76 | #ifdef __sparc_v9__ | 78 | #ifdef __sparc_v9__ | |
77 | register64_t val[2]; | 79 | register64_t val[2]; | |
78 | #else | 80 | #else | |
79 | register_t val[3]; | 81 | register_t val[3]; | |
80 | #endif | 82 | #endif | |
81 | } label_t; | 83 | } label_t; | |
82 | #endif | 84 | #endif | |
83 | 85 | |||
84 | #if defined(_NETBSD_SOURCE) | 86 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
85 | typedef unsigned long int vaddr_t; | 87 | typedef unsigned long int vaddr_t; | |
86 | typedef vaddr_t vsize_t; | 88 | typedef vaddr_t vsize_t; | |
87 | #define PRIxVADDR "lx" | 89 | #define PRIxVADDR "lx" | |
88 | #define PRIxVSIZE "lx" | 90 | #define PRIxVSIZE "lx" | |
89 | #define PRIuVSIZE "lu" | 91 | #define PRIuVSIZE "lu" | |
90 | #ifdef __sparc_v9__ | 92 | #ifdef __sparc_v9__ | |
91 | #ifdef __arch64__ | 93 | #ifdef __arch64__ | |
92 | typedef unsigned long int paddr_t; | 94 | typedef unsigned long int paddr_t; | |
93 | #define PRIxPADDR "lx" | 95 | #define PRIxPADDR "lx" | |
94 | #define PRIuPSIZE "lu" | 96 | #define PRIuPSIZE "lu" | |
95 | #else | 97 | #else | |
96 | /* LONGLONG */ | 98 | /* LONGLONG */ | |
97 | typedef unsigned long long int paddr_t; | 99 | typedef unsigned long long int paddr_t; | |
98 | #define PRIxPADDR "llx" | 100 | #define PRIxPADDR "llx" | |
99 | #define PRIuPSIZE "llu" | 101 | #define PRIuPSIZE "llu" | |
100 | #endif /* __arch64__ */ | 102 | #endif /* __arch64__ */ | |
101 | #else | 103 | #else | |
102 | typedef unsigned long int paddr_t; | 104 | typedef unsigned long int paddr_t; | |
103 | #define PRIxPADDR "lx" | 105 | #define PRIxPADDR "lx" | |
104 | #define PRIuPSIZE "lu" | 106 | #define PRIuPSIZE "lu" | |
105 | #endif /* __sparc_v9__ */ | 107 | #endif /* __sparc_v9__ */ | |
106 | typedef paddr_t psize_t; | 108 | typedef paddr_t psize_t; | |
107 | #define PRIxPSIZE PRIxPADDR | 109 | #define PRIxPSIZE PRIxPADDR | |
108 | #endif | 110 | #endif | |
109 | 111 | |||
110 | typedef unsigned char __cpu_simple_lock_nv_t; | 112 | typedef unsigned char __cpu_simple_lock_nv_t; | |
113 | typedef unsigned long int __register_t; | |||
111 | 114 | |||
112 | /* __cpu_simple_lock_t used to be a full word. */ | 115 | /* __cpu_simple_lock_t used to be a full word. */ | |
113 | #define __CPU_SIMPLE_LOCK_PAD | 116 | #define __CPU_SIMPLE_LOCK_PAD | |
114 | 117 | |||
115 | #define __SIMPLELOCK_LOCKED 0xff | 118 | #define __SIMPLELOCK_LOCKED 0xff | |
116 | #define __SIMPLELOCK_UNLOCKED 0 | 119 | #define __SIMPLELOCK_UNLOCKED 0 | |
117 | 120 | |||
118 | #endif /* _LOCORE */ | 121 | #endif /* _LOCORE */ | |
119 | 122 | |||
120 | #define __HAVE_NEW_STYLE_BUS_H | 123 | #define __HAVE_NEW_STYLE_BUS_H | |
121 | #define __HAVE_SYSCALL_INTERN | 124 | #define __HAVE_SYSCALL_INTERN | |
122 | #define __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS | 125 | #define __GENERIC_SOFT_INTERRUPTS_ALL_LEVELS | |
123 | #define __HAVE_CPU_DATA_FIRST | 126 | #define __HAVE_CPU_DATA_FIRST |
--- src/sys/arch/usermode/include/types.h 2015/08/27 12:30:51 1.9
+++ src/sys/arch/usermode/include/types.h 2016/01/23 21:22:14 1.10
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.9 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.10 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> | 4 | * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -29,40 +29,44 @@ | @@ -29,40 +29,44 @@ | |||
29 | #ifndef _ARCH_USERMODE_INCLUDE_TYPES_H | 29 | #ifndef _ARCH_USERMODE_INCLUDE_TYPES_H | |
30 | #define _ARCH_USERMODE_INCLUDE_TYPES_H | 30 | #define _ARCH_USERMODE_INCLUDE_TYPES_H | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | #include <sys/featuretest.h> | 33 | #include <sys/featuretest.h> | |
34 | #include <machine/int_types.h> | 34 | #include <machine/int_types.h> | |
35 | 35 | |||
36 | #if defined(_KERNEL) | 36 | #if defined(_KERNEL) | |
37 | typedef struct label_t { | 37 | typedef struct label_t { | |
38 | long val[8]; | 38 | long val[8]; | |
39 | } label_t; | 39 | } label_t; | |
40 | #endif | 40 | #endif | |
41 | 41 | |||
42 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |||
42 | typedef unsigned long paddr_t; | 43 | typedef unsigned long paddr_t; | |
43 | typedef unsigned long psize_t; | 44 | typedef unsigned long psize_t; | |
44 | typedef unsigned long vaddr_t; | 45 | typedef unsigned long vaddr_t; | |
45 | typedef unsigned long vsize_t; | 46 | typedef unsigned long vsize_t; | |
46 | typedef long int register_t; | 47 | typedef long int register_t; | |
47 | #define PRIxPADDR "lx" | 48 | #define PRIxPADDR "lx" | |
48 | #define PRIxPSIZE "lx" | 49 | #define PRIxPSIZE "lx" | |
49 | #define PRIuPSIZE "lu" | 50 | #define PRIuPSIZE "lu" | |
50 | #define PRIxVADDR "lx" | 51 | #define PRIxVADDR "lx" | |
51 | #define PRIxVSIZE "lx" | 52 | #define PRIxVSIZE "lx" | |
52 | #define PRIuVSIZE "lu" | 53 | #define PRIuVSIZE "lu" | |
53 | #define PRIxREGISTER "lx" | 54 | #define PRIxREGISTER "lx" | |
55 | #endif | |||
54 | 56 | |||
55 | typedef unsigned char __cpu_simple_lock_nv_t; | 57 | typedef unsigned char __cpu_simple_lock_nv_t; | |
58 | typedef long int __register_t; | |||
59 | ||||
56 | #define __CPU_SIMPLE_LOCK_PAD | 60 | #define __CPU_SIMPLE_LOCK_PAD | |
57 | 61 | |||
58 | #define __SIMPLELOCK_LOCKED 1 | 62 | #define __SIMPLELOCK_LOCKED 1 | |
59 | #define __SIMPLELOCK_UNLOCKED 0 | 63 | #define __SIMPLELOCK_UNLOCKED 0 | |
60 | 64 | |||
61 | #if defined(__i386__) | 65 | #if defined(__i386__) | |
62 | #define __HAVE_OLD_DISKLABEL | 66 | #define __HAVE_OLD_DISKLABEL | |
63 | #endif | 67 | #endif | |
64 | 68 | |||
65 | #define __HAVE_CPU_DATA_FIRST | 69 | #define __HAVE_CPU_DATA_FIRST | |
66 | #define __HAVE_MM_MD_KERNACC | 70 | #define __HAVE_MM_MD_KERNACC | |
67 | 71 | |||
68 | #endif /* !_ARCH_USERMODE_INCLUDE_TYPES_H */ | 72 | #endif /* !_ARCH_USERMODE_INCLUDE_TYPES_H */ |
--- src/sys/arch/vax/include/types.h 2015/08/27 12:30:51 1.48
+++ src/sys/arch/vax/include/types.h 2016/01/23 21:22:14 1.49
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.48 2015/08/27 12:30:51 pooka Exp $ */ | 1 | /* $NetBSD: types.h,v 1.49 2016/01/23 21:22:14 christos Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -34,47 +34,47 @@ | @@ -34,47 +34,47 @@ | |||
34 | #ifndef _MACHTYPES_H_ | 34 | #ifndef _MACHTYPES_H_ | |
35 | #define _MACHTYPES_H_ | 35 | #define _MACHTYPES_H_ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | #include <sys/featuretest.h> | 38 | #include <sys/featuretest.h> | |
39 | #include <machine/int_types.h> | 39 | #include <machine/int_types.h> | |
40 | 40 | |||
41 | #if defined(_KERNEL) | 41 | #if defined(_KERNEL) | |
42 | typedef struct label_t { | 42 | typedef struct label_t { | |
43 | int val[6]; | 43 | int val[6]; | |
44 | } label_t; | 44 | } label_t; | |
45 | #endif | 45 | #endif | |
46 | 46 | |||
47 | /* NB: This should probably be if defined(_KERNEL) */ | 47 | #if defined(_KERNEL) || defined(_KMEMUSER) || defined(_KERNTYPES) | |
48 | #if defined(_NETBSD_SOURCE) | |||
49 | typedef unsigned long paddr_t; | 48 | typedef unsigned long paddr_t; | |
50 | typedef unsigned long psize_t; | 49 | typedef unsigned long psize_t; | |
51 | typedef unsigned long vaddr_t; | 50 | typedef unsigned long vaddr_t; | |
52 | typedef unsigned long vsize_t; | 51 | typedef unsigned long vsize_t; | |
53 | #define PRIxPADDR "lx" | 52 | #define PRIxPADDR "lx" | |
54 | #define PRIxPSIZE "lx" | 53 | #define PRIxPSIZE "lx" | |
55 | #define PRIuPSIZE "lu" | 54 | #define PRIuPSIZE "lu" | |
56 | #define PRIxVADDR "lx" | 55 | #define PRIxVADDR "lx" | |
57 | #define PRIxVSIZE "lx" | 56 | #define PRIxVSIZE "lx" | |
58 | #define PRIuVSIZE "lu" | 57 | #define PRIuVSIZE "lu" | |
59 | #endif | |||
60 | 58 | |||
61 | typedef int register_t; | 59 | typedef int register_t; | |
62 | #define PRIxREGISTER "x" | 60 | #define PRIxREGISTER "x" | |
61 | #endif | |||
63 | 62 | |||
64 | /* | 63 | /* | |
65 | * BBCCI/BBSSI can operate on bytes so let's save some space. | 64 | * BBCCI/BBSSI can operate on bytes so let's save some space. | |
66 | */ | 65 | */ | |
67 | typedef char __cpu_simple_lock_nv_t; | 66 | typedef char __cpu_simple_lock_nv_t; | |
67 | typedef int __register_t; | |||
68 | 68 | |||
69 | #define __SIMPLELOCK_LOCKED 1 | 69 | #define __SIMPLELOCK_LOCKED 1 | |
70 | #define __SIMPLELOCK_UNLOCKED 0 | 70 | #define __SIMPLELOCK_UNLOCKED 0 | |
71 | 71 | |||
72 | /* The VAX does not have strict alignment requirements. */ | 72 | /* The VAX does not have strict alignment requirements. */ | |
73 | #define __NO_STRICT_ALIGNMENT | 73 | #define __NO_STRICT_ALIGNMENT | |
74 | 74 | |||
75 | #define __HAVE_DEVICE_REGISTER | 75 | #define __HAVE_DEVICE_REGISTER | |
76 | #define __HAVE_SYSCALL_INTERN | 76 | #define __HAVE_SYSCALL_INTERN | |
77 | #define __HAVE_FAST_SOFTINTS | 77 | #define __HAVE_FAST_SOFTINTS | |
78 | #define __HAVE_MD_SOFTINT_TRIGGER | 78 | #define __HAVE_MD_SOFTINT_TRIGGER | |
79 | #define __HAVE_CPU_DATA_FIRST | 79 | #define __HAVE_CPU_DATA_FIRST | |
80 | #define __HAVE_MM_MD_READWRITE | 80 | #define __HAVE_MM_MD_READWRITE |