- If we ever do the per-cpu KTR stuff, the index won't be volatile as it
will be private to each CPU. - Re-style(9) the globaldata structures. There really needs to be a MI struct pcpu that has a MD struct mdpcpu member at some point.
This commit is contained in:
parent
63077d1623
commit
fd54558a83
@ -61,7 +61,7 @@ struct globaldata {
|
|||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[0];
|
char gd_ktr_buf_data[0];
|
||||||
#endif
|
#endif
|
||||||
|
@ -61,7 +61,7 @@ struct globaldata {
|
|||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[0];
|
char gd_ktr_buf_data[0];
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,23 +52,23 @@
|
|||||||
* other processors"
|
* other processors"
|
||||||
*/
|
*/
|
||||||
struct globaldata {
|
struct globaldata {
|
||||||
struct globaldata *gd_prvspace; /* self-reference */
|
struct globaldata *gd_prvspace; /* Self-reference */
|
||||||
struct thread *gd_curthread;
|
struct thread *gd_curthread;
|
||||||
struct thread *gd_npxthread;
|
struct thread *gd_npxthread;
|
||||||
struct pcb *gd_curpcb;
|
struct pcb *gd_curpcb;
|
||||||
struct thread *gd_idlethread;
|
struct thread *gd_idlethread;
|
||||||
struct timeval gd_switchtime;
|
struct timeval gd_switchtime;
|
||||||
struct i386tss gd_common_tss;
|
struct i386tss gd_common_tss;
|
||||||
int gd_switchticks;
|
int gd_switchticks;
|
||||||
struct segment_descriptor gd_common_tssd;
|
struct segment_descriptor gd_common_tssd;
|
||||||
struct segment_descriptor *gd_tss_gdt;
|
struct segment_descriptor *gd_tss_gdt;
|
||||||
int gd_currentldt;
|
int gd_currentldt;
|
||||||
u_int gd_cpuid;
|
u_int gd_cpuid;
|
||||||
u_int gd_other_cpus;
|
u_int gd_other_cpus;
|
||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[KTR_SIZE];
|
char gd_ktr_buf_data[KTR_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,23 +52,23 @@
|
|||||||
* other processors"
|
* other processors"
|
||||||
*/
|
*/
|
||||||
struct globaldata {
|
struct globaldata {
|
||||||
struct globaldata *gd_prvspace; /* self-reference */
|
struct globaldata *gd_prvspace; /* Self-reference */
|
||||||
struct thread *gd_curthread;
|
struct thread *gd_curthread;
|
||||||
struct thread *gd_npxthread;
|
struct thread *gd_npxthread;
|
||||||
struct pcb *gd_curpcb;
|
struct pcb *gd_curpcb;
|
||||||
struct thread *gd_idlethread;
|
struct thread *gd_idlethread;
|
||||||
struct timeval gd_switchtime;
|
struct timeval gd_switchtime;
|
||||||
struct i386tss gd_common_tss;
|
struct i386tss gd_common_tss;
|
||||||
int gd_switchticks;
|
int gd_switchticks;
|
||||||
struct segment_descriptor gd_common_tssd;
|
struct segment_descriptor gd_common_tssd;
|
||||||
struct segment_descriptor *gd_tss_gdt;
|
struct segment_descriptor *gd_tss_gdt;
|
||||||
int gd_currentldt;
|
int gd_currentldt;
|
||||||
u_int gd_cpuid;
|
u_int gd_cpuid;
|
||||||
u_int gd_other_cpus;
|
u_int gd_other_cpus;
|
||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[KTR_SIZE];
|
char gd_ktr_buf_data[KTR_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,23 +52,23 @@
|
|||||||
* other processors"
|
* other processors"
|
||||||
*/
|
*/
|
||||||
struct globaldata {
|
struct globaldata {
|
||||||
struct globaldata *gd_prvspace; /* self-reference */
|
struct globaldata *gd_prvspace; /* Self-reference */
|
||||||
struct thread *gd_curthread;
|
struct thread *gd_curthread;
|
||||||
struct thread *gd_npxthread;
|
struct thread *gd_npxthread;
|
||||||
struct pcb *gd_curpcb;
|
struct pcb *gd_curpcb;
|
||||||
struct thread *gd_idlethread;
|
struct thread *gd_idlethread;
|
||||||
struct timeval gd_switchtime;
|
struct timeval gd_switchtime;
|
||||||
struct i386tss gd_common_tss;
|
struct i386tss gd_common_tss;
|
||||||
int gd_switchticks;
|
int gd_switchticks;
|
||||||
struct segment_descriptor gd_common_tssd;
|
struct segment_descriptor gd_common_tssd;
|
||||||
struct segment_descriptor *gd_tss_gdt;
|
struct segment_descriptor *gd_tss_gdt;
|
||||||
int gd_currentldt;
|
int gd_currentldt;
|
||||||
u_int gd_cpuid;
|
u_int gd_cpuid;
|
||||||
u_int gd_other_cpus;
|
u_int gd_other_cpus;
|
||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[KTR_SIZE];
|
char gd_ktr_buf_data[KTR_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,14 +44,14 @@
|
|||||||
* point at the globaldata structure.
|
* point at the globaldata structure.
|
||||||
*/
|
*/
|
||||||
struct globaldata {
|
struct globaldata {
|
||||||
struct thread *gd_curthread; /* current thread */
|
struct thread *gd_curthread; /* current thread */
|
||||||
struct thread *gd_idlethread; /* idle thread */
|
struct thread *gd_idlethread; /* idle thread */
|
||||||
struct thread *gd_fpcurthread; /* fp state owner */
|
struct thread *gd_fpcurthread; /* fp state owner */
|
||||||
struct pcb *gd_curpcb; /* current pcb */
|
struct pcb *gd_curpcb; /* current pcb */
|
||||||
struct timeval gd_switchtime;
|
struct timeval gd_switchtime;
|
||||||
int gd_switchticks;
|
int gd_switchticks;
|
||||||
u_int gd_cpuid; /* this cpu number */
|
u_int gd_cpuid; /* this cpu number */
|
||||||
u_int gd_other_cpus; /* all other cpus */
|
u_int gd_other_cpus; /* all other cpus */
|
||||||
u_int64_t gd_pending_ipis; /* pending IPI events */
|
u_int64_t gd_pending_ipis; /* pending IPI events */
|
||||||
struct pmap *gd_current_pmap; /* which pmap is active */
|
struct pmap *gd_current_pmap; /* which pmap is active */
|
||||||
u_int32_t gd_next_asn; /* next ASN to allocate */
|
u_int32_t gd_next_asn; /* next ASN to allocate */
|
||||||
@ -60,7 +60,7 @@ struct globaldata {
|
|||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[0];
|
char gd_ktr_buf_data[0];
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,14 +44,14 @@
|
|||||||
* point at the globaldata structure.
|
* point at the globaldata structure.
|
||||||
*/
|
*/
|
||||||
struct globaldata {
|
struct globaldata {
|
||||||
struct thread *gd_curthread; /* current thread */
|
struct thread *gd_curthread; /* current thread */
|
||||||
struct thread *gd_idlethread; /* idle thread */
|
struct thread *gd_idlethread; /* idle thread */
|
||||||
struct thread *gd_fpcurthread; /* fp state owner */
|
struct thread *gd_fpcurthread; /* fp state owner */
|
||||||
struct pcb *gd_curpcb; /* current pcb */
|
struct pcb *gd_curpcb; /* current pcb */
|
||||||
struct timeval gd_switchtime;
|
struct timeval gd_switchtime;
|
||||||
int gd_switchticks;
|
int gd_switchticks;
|
||||||
u_int gd_cpuid; /* this cpu number */
|
u_int gd_cpuid; /* this cpu number */
|
||||||
u_int gd_other_cpus; /* all other cpus */
|
u_int gd_other_cpus; /* all other cpus */
|
||||||
u_int64_t gd_pending_ipis; /* pending IPI events */
|
u_int64_t gd_pending_ipis; /* pending IPI events */
|
||||||
struct pmap *gd_current_pmap; /* which pmap is active */
|
struct pmap *gd_current_pmap; /* which pmap is active */
|
||||||
u_int32_t gd_next_asn; /* next ASN to allocate */
|
u_int32_t gd_next_asn; /* next ASN to allocate */
|
||||||
@ -60,7 +60,7 @@ struct globaldata {
|
|||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[0];
|
char gd_ktr_buf_data[0];
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,15 +44,15 @@
|
|||||||
* point at the globaldata structure.
|
* point at the globaldata structure.
|
||||||
*/
|
*/
|
||||||
struct globaldata {
|
struct globaldata {
|
||||||
struct thread *gd_curthread; /* current thread */
|
struct thread *gd_curthread; /* current thread */
|
||||||
struct thread *gd_idlethread; /* idle thread */
|
struct thread *gd_idlethread; /* idle thread */
|
||||||
struct thread *gd_fpcurthread; /* fp state owner */
|
struct thread *gd_fpcurthread; /* fp state owner */
|
||||||
struct pcb *gd_curpcb; /* current pcb */
|
struct pcb *gd_curpcb; /* current pcb */
|
||||||
struct timeval gd_switchtime;
|
struct timeval gd_switchtime;
|
||||||
int gd_switchticks;
|
int gd_switchticks;
|
||||||
u_int gd_cpuid; /* this cpu number */
|
u_int gd_cpuid; /* this cpu number */
|
||||||
u_int gd_other_cpus; /* all other cpus */
|
u_int gd_other_cpus; /* all other cpus */
|
||||||
int gd_inside_intr;
|
int gd_inside_intr;
|
||||||
u_int32_t gd_next_asn; /* next ASN to allocate */
|
u_int32_t gd_next_asn; /* next ASN to allocate */
|
||||||
u_int32_t gd_current_asngen; /* ASN rollover check */
|
u_int32_t gd_current_asngen; /* ASN rollover check */
|
||||||
u_int32_t gd_intr_nesting_level; /* interrupt recursion */
|
u_int32_t gd_intr_nesting_level; /* interrupt recursion */
|
||||||
@ -60,7 +60,7 @@ struct globaldata {
|
|||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[KTR_SIZE];
|
char gd_ktr_buf_data[KTR_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,15 +44,15 @@
|
|||||||
* point at the globaldata structure.
|
* point at the globaldata structure.
|
||||||
*/
|
*/
|
||||||
struct globaldata {
|
struct globaldata {
|
||||||
struct thread *gd_curthread; /* current thread */
|
struct thread *gd_curthread; /* current thread */
|
||||||
struct thread *gd_idlethread; /* idle thread */
|
struct thread *gd_idlethread; /* idle thread */
|
||||||
struct thread *gd_fpcurthread; /* fp state owner */
|
struct thread *gd_fpcurthread; /* fp state owner */
|
||||||
struct pcb *gd_curpcb; /* current pcb */
|
struct pcb *gd_curpcb; /* current pcb */
|
||||||
struct timeval gd_switchtime;
|
struct timeval gd_switchtime;
|
||||||
int gd_switchticks;
|
int gd_switchticks;
|
||||||
u_int gd_cpuid; /* this cpu number */
|
u_int gd_cpuid; /* this cpu number */
|
||||||
u_int gd_other_cpus; /* all other cpus */
|
u_int gd_other_cpus; /* all other cpus */
|
||||||
int gd_inside_intr;
|
int gd_inside_intr;
|
||||||
u_int32_t gd_next_asn; /* next ASN to allocate */
|
u_int32_t gd_next_asn; /* next ASN to allocate */
|
||||||
u_int32_t gd_current_asngen; /* ASN rollover check */
|
u_int32_t gd_current_asngen; /* ASN rollover check */
|
||||||
u_int32_t gd_intr_nesting_level; /* interrupt recursion */
|
u_int32_t gd_intr_nesting_level; /* interrupt recursion */
|
||||||
@ -60,7 +60,7 @@ struct globaldata {
|
|||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[KTR_SIZE];
|
char gd_ktr_buf_data[KTR_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,7 +56,7 @@ struct globaldata {
|
|||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[0];
|
char gd_ktr_buf_data[0];
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,7 +56,7 @@ struct globaldata {
|
|||||||
SLIST_ENTRY(globaldata) gd_allcpu;
|
SLIST_ENTRY(globaldata) gd_allcpu;
|
||||||
struct lock_list_entry *gd_spinlocks;
|
struct lock_list_entry *gd_spinlocks;
|
||||||
#ifdef KTR_PERCPU
|
#ifdef KTR_PERCPU
|
||||||
volatile int gd_ktr_idx; /* Index into trace table */
|
int gd_ktr_idx; /* Index into trace table */
|
||||||
char *gd_ktr_buf;
|
char *gd_ktr_buf;
|
||||||
char gd_ktr_buf_data[0];
|
char gd_ktr_buf_data[0];
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user