| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: cpu.h,v 1.81 2014/01/21 20:18:46 christos Exp $ */ | | 1 | /* $NetBSD: cpu.h,v 1.82 2014/01/22 22:52:04 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1998, 1999, 2000, 2001 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 Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, |
9 | * NASA Ames Research Center, and by Charles M. Hannum. | | 9 | * NASA Ames Research Center, and by Charles M. Hannum. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -99,48 +99,48 @@ struct mchkinfo { | | | @@ -99,48 +99,48 @@ struct mchkinfo { |
99 | | | 99 | |
100 | struct cpu_info { | | 100 | struct cpu_info { |
101 | /* | | 101 | /* |
102 | * Private members accessed in assembly with 8 bit offsets. | | 102 | * Private members accessed in assembly with 8 bit offsets. |
103 | */ | | 103 | */ |
104 | struct lwp *ci_fpcurlwp; /* current owner of the FPU */ | | 104 | struct lwp *ci_fpcurlwp; /* current owner of the FPU */ |
105 | paddr_t ci_curpcb; /* PA of current HW PCB */ | | 105 | paddr_t ci_curpcb; /* PA of current HW PCB */ |
106 | | | 106 | |
107 | /* | | 107 | /* |
108 | * Public members. | | 108 | * Public members. |
109 | */ | | 109 | */ |
110 | struct lwp *ci_curlwp; /* current owner of the processor */ | | 110 | struct lwp *ci_curlwp; /* current owner of the processor */ |
111 | struct cpu_data ci_data; /* MI per-cpu data */ | | 111 | struct cpu_data ci_data; /* MI per-cpu data */ |
112 | #if !defined(_KMEMUSER) || defined(_RUMPKERNEL) | | 112 | #if !defined(_KMEMUSER) |
113 | struct cctr_state ci_cc; /* cycle counter state */ | | 113 | struct cctr_state ci_cc; /* cycle counter state */ |
114 | struct cpu_info *ci_next; /* next cpu_info structure */ | | 114 | struct cpu_info *ci_next; /* next cpu_info structure */ |
115 | int ci_mtx_count; | | 115 | int ci_mtx_count; |
116 | int ci_mtx_oldspl; | | 116 | int ci_mtx_oldspl; |
117 | | | 117 | |
118 | /* | | 118 | /* |
119 | * Private members. | | 119 | * Private members. |
120 | */ | | 120 | */ |
121 | struct mchkinfo ci_mcinfo; /* machine check info */ | | 121 | struct mchkinfo ci_mcinfo; /* machine check info */ |
122 | cpuid_t ci_cpuid; /* our CPU ID */ | | 122 | cpuid_t ci_cpuid; /* our CPU ID */ |
123 | struct cpu_softc *ci_softc; /* pointer to our device */ | | 123 | struct cpu_softc *ci_softc; /* pointer to our device */ |
124 | u_long ci_want_resched; /* preempt current process */ | | 124 | u_long ci_want_resched; /* preempt current process */ |
125 | u_long ci_intrdepth; /* interrupt trap depth */ | | 125 | u_long ci_intrdepth; /* interrupt trap depth */ |
126 | struct trapframe *ci_db_regs; /* registers for debuggers */ | | 126 | struct trapframe *ci_db_regs; /* registers for debuggers */ |
127 | uint64_t ci_pcc_freq; /* cpu cycles/second */ | | 127 | uint64_t ci_pcc_freq; /* cpu cycles/second */ |
128 | | | 128 | |
129 | #if defined(MULTIPROCESSOR) | | 129 | #if defined(MULTIPROCESSOR) |
130 | volatile u_long ci_flags; /* flags; see below */ | | 130 | volatile u_long ci_flags; /* flags; see below */ |
131 | volatile u_long ci_ipis; /* interprocessor interrupts pending */ | | 131 | volatile u_long ci_ipis; /* interprocessor interrupts pending */ |
132 | #endif | | 132 | #endif |
133 | #endif /* !_KMEMUSER || _RUMPKERNEL */ | | 133 | #endif /* !_KMEMUSER */ |
134 | }; | | 134 | }; |
135 | | | 135 | |
136 | #endif /* _KERNEL || _KMEMUSER */ | | 136 | #endif /* _KERNEL || _KMEMUSER */ |
137 | | | 137 | |
138 | #if defined(_KERNEL) | | 138 | #if defined(_KERNEL) |
139 | | | 139 | |
140 | #define CPUF_PRIMARY 0x01 /* CPU is primary CPU */ | | 140 | #define CPUF_PRIMARY 0x01 /* CPU is primary CPU */ |
141 | #define CPUF_PRESENT 0x02 /* CPU is present */ | | 141 | #define CPUF_PRESENT 0x02 /* CPU is present */ |
142 | #define CPUF_RUNNING 0x04 /* CPU is running */ | | 142 | #define CPUF_RUNNING 0x04 /* CPU is running */ |
143 | #define CPUF_PAUSED 0x08 /* CPU is paused */ | | 143 | #define CPUF_PAUSED 0x08 /* CPU is paused */ |
144 | #define CPUF_FPUSAVE 0x10 /* CPU is currently in fpusave_cpu() */ | | 144 | #define CPUF_FPUSAVE 0x10 /* CPU is currently in fpusave_cpu() */ |
145 | | | 145 | |
146 | extern struct cpu_info cpu_info_primary; | | 146 | extern struct cpu_info cpu_info_primary; |