From d0e06f834fe40846ef18646bbb611b7b4f7d983e Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 27 Jun 2003 20:27:19 +0000 Subject: [PATCH] go back to using gd_cpuid instead of gd_cpu. --- sys/i386/i386/genassym.c | 4 ++-- sys/i386/i386/globals.s | 6 +++--- sys/i386/include/globaldata.h | 4 ++-- sys/kern/init_main.c | 6 +++--- sys/kern/lwkt_thread.c | 18 +++++++++--------- sys/platform/pc32/i386/genassym.c | 4 ++-- sys/platform/pc32/i386/globals.s | 6 +++--- sys/platform/pc32/include/globaldata.h | 4 ++-- sys/platform/vkernel/i386/genassym.c | 4 ++-- sys/sys/thread2.h | 4 ++-- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c index 63e11f530e..f06e249b23 100644 --- a/sys/i386/i386/genassym.c +++ b/sys/i386/i386/genassym.c @@ -35,7 +35,7 @@ * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ - * $DragonFly: src/sys/i386/i386/Attic/genassym.c,v 1.14 2003/06/27 03:30:37 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/genassym.c,v 1.15 2003/06/27 20:27:15 dillon Exp $ */ #include "opt_user_ldt.h" @@ -197,7 +197,7 @@ ASSYM(GD_CURRENTLDT, offsetof(struct globaldata, gd_currentldt)); #endif #ifdef SMP -ASSYM(GD_CPU, offsetof(struct globaldata, gd_cpu)); +ASSYM(GD_CPUID, offsetof(struct globaldata, gd_cpuid)); ASSYM(GD_CPU_LOCKID, offsetof(struct globaldata, gd_cpu_lockid)); ASSYM(GD_OTHER_CPUS, offsetof(struct globaldata, gd_other_cpus)); ASSYM(GD_SS_EFLAGS, offsetof(struct globaldata, gd_ss_eflags)); diff --git a/sys/i386/i386/globals.s b/sys/i386/i386/globals.s index 7b94ee4955..fc5e0cb2d2 100644 --- a/sys/i386/i386/globals.s +++ b/sys/i386/i386/globals.s @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/globals.s,v 1.13.2.1 2000/05/16 06:58:06 dillon Exp $ - * $DragonFly: src/sys/i386/i386/Attic/globals.s,v 1.8 2003/06/23 23:36:05 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/globals.s,v 1.9 2003/06/27 20:27:15 dillon Exp $ */ #include "opt_user_ldt.h" @@ -109,12 +109,12 @@ _CPU_prvspace: * The BSP version of these get setup in locore.s and pmap.c, while * the AP versions are setup in mp_machdep.c. */ - .globl gd_cpu, gd_cpu_lockid, gd_other_cpus + .globl gd_cpuid, gd_cpu_lockid, gd_other_cpus .globl gd_ss_eflags, gd_inside_intr .globl gd_prv_CMAP1, gd_prv_CMAP2, gd_prv_CMAP3, gd_prv_PMAP1 .globl gd_prv_CADDR1, gd_prv_CADDR2, gd_prv_CADDR3, gd_prv_PADDR1 - .set gd_cpu,globaldata + GD_CPUID + .set gd_cpuid,globaldata + GD_CPUID .set gd_cpu_lockid,globaldata + GD_CPU_LOCKID .set gd_other_cpus,globaldata + GD_OTHER_CPUS .set gd_ss_eflags,globaldata + GD_SS_EFLAGS diff --git a/sys/i386/include/globaldata.h b/sys/i386/include/globaldata.h index 147e668909..2dc2e43355 100644 --- a/sys/i386/include/globaldata.h +++ b/sys/i386/include/globaldata.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/globaldata.h,v 1.11.2.1 2000/05/16 06:58:10 dillon Exp $ - * $DragonFly: src/sys/i386/include/Attic/globaldata.h,v 1.10 2003/06/23 23:36:08 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/globaldata.h,v 1.11 2003/06/27 20:27:18 dillon Exp $ */ /* @@ -54,7 +54,7 @@ struct globaldata { struct segment_descriptor gd_common_tssd; struct segment_descriptor *gd_tss_gdt; int gd_currentldt; /* USER_LDT */ - u_int gd_cpu; + u_int gd_cpuid; struct timeval gd_stattv; #ifdef SMP u_int gd_cpu_lockid; diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 85665b702f..08867f17c9 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -40,7 +40,7 @@ * * @(#)init_main.c 8.9 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/init_main.c,v 1.134.2.8 2003/06/06 20:21:32 tegge Exp $ - * $DragonFly: src/sys/kern/init_main.c,v 1.12 2003/06/25 03:55:57 dillon Exp $ + * $DragonFly: src/sys/kern/init_main.c,v 1.13 2003/06/27 20:27:18 dillon Exp $ */ #include "opt_init_path.h" @@ -577,9 +577,9 @@ SYSINIT(kickinit,SI_SUB_KTHREAD_INIT, SI_ORDER_FIRST, kick_init, NULL) * Machine independant globaldata initialization */ void -mi_gdinit(struct globaldata *gd, int cpu) +mi_gdinit(struct globaldata *gd, int cpuid) { - gd->gd_cpu = cpu; + gd->gd_cpuid = cpuid; lwkt_gdinit(gd); } diff --git a/sys/kern/lwkt_thread.c b/sys/kern/lwkt_thread.c index 5067c818f4..b5bc010f3c 100644 --- a/sys/kern/lwkt_thread.c +++ b/sys/kern/lwkt_thread.c @@ -27,7 +27,7 @@ * thread scheduler, which means that generally speaking we only need * to use a critical section to prevent hicups. * - * $DragonFly: src/sys/kern/lwkt_thread.c,v 1.6 2003/06/27 03:30:42 dillon Exp $ + * $DragonFly: src/sys/kern/lwkt_thread.c,v 1.7 2003/06/27 20:27:18 dillon Exp $ */ #include @@ -332,7 +332,7 @@ lwkt_schedule(thread_t td) TAILQ_REMOVE(&w->wa_waitq, td, td_threadq); --w->wa_count; td->td_wait = NULL; - if (td->td_cpu == mycpu->gd_cpu) { + if (td->td_cpu == mycpu->gd_cpuid) { _lwkt_enqueue(td); } else { panic("lwkt_schedule: cpu mismatch1"); @@ -357,7 +357,7 @@ lwkt_schedule(thread_t td) * do not own the thread there might be a race but the * target cpu will deal with it. */ - if (td->td_cpu == mycpu->gd_cpu) { + if (td->td_cpu == mycpu->gd_cpuid) { _lwkt_enqueue(td); } else { panic("lwkt_schedule: cpu mismatch3"); @@ -402,7 +402,7 @@ lwkt_deschedule(thread_t td) if (td == curthread) { _lwkt_dequeue(td); } else { - if (td->td_cpu == mycpu->gd_cpu) { + if (td->td_cpu == mycpu->gd_cpuid) { _lwkt_dequeue(td); } else { panic("lwkt_deschedule: cpu mismatch"); @@ -469,7 +469,7 @@ lwkt_signal(lwkt_wait_t w) TAILQ_REMOVE(&w->wa_waitq, td, td_threadq); td->td_wait = NULL; td->td_wmesg = NULL; - if (td->td_cpu == mycpu->gd_cpu) { + if (td->td_cpu == mycpu->gd_cpuid) { _lwkt_enqueue(td); } else { #if 0 @@ -507,7 +507,7 @@ lwkt_gettoken(lwkt_token_t tok) */ crit_enter(); #if 0 - while (tok->t_cpu != mycpu->gd_cpu) { + while (tok->t_cpu != mycpu->gd_cpuid) { lwkt_cpu_msg_union msg; initTokenReqMsg(&msg.mu_TokenReq); cpu_domsg(&msg); @@ -533,7 +533,7 @@ lwkt_gettoken(lwkt_token_t tok) void lwkt_reltoken(lwkt_token_t tok) { - if (tok->t_cpu == mycpu->gd_cpu) { + if (tok->t_cpu == mycpu->gd_cpuid) { tok->t_cpu = tok->t_reqcpu; } crit_exit(); @@ -548,8 +548,8 @@ int lwkt_regettoken(lwkt_token_t tok) { #if 0 - if (tok->t_cpu != mycpu->gd_cpu) { - while (tok->t_cpu != mycpu->gd_cpu) { + if (tok->t_cpu != mycpu->gd_cpuid) { + while (tok->t_cpu != mycpu->gd_cpuid) { lwkt_cpu_msg_union msg; initTokenReqMsg(&msg.mu_TokenReq); cpu_domsg(&msg); diff --git a/sys/platform/pc32/i386/genassym.c b/sys/platform/pc32/i386/genassym.c index 006b6cf0cc..7c7de231d7 100644 --- a/sys/platform/pc32/i386/genassym.c +++ b/sys/platform/pc32/i386/genassym.c @@ -35,7 +35,7 @@ * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ - * $DragonFly: src/sys/platform/pc32/i386/genassym.c,v 1.14 2003/06/27 03:30:37 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/genassym.c,v 1.15 2003/06/27 20:27:15 dillon Exp $ */ #include "opt_user_ldt.h" @@ -197,7 +197,7 @@ ASSYM(GD_CURRENTLDT, offsetof(struct globaldata, gd_currentldt)); #endif #ifdef SMP -ASSYM(GD_CPU, offsetof(struct globaldata, gd_cpu)); +ASSYM(GD_CPUID, offsetof(struct globaldata, gd_cpuid)); ASSYM(GD_CPU_LOCKID, offsetof(struct globaldata, gd_cpu_lockid)); ASSYM(GD_OTHER_CPUS, offsetof(struct globaldata, gd_other_cpus)); ASSYM(GD_SS_EFLAGS, offsetof(struct globaldata, gd_ss_eflags)); diff --git a/sys/platform/pc32/i386/globals.s b/sys/platform/pc32/i386/globals.s index bf8aedffbc..0d19507956 100644 --- a/sys/platform/pc32/i386/globals.s +++ b/sys/platform/pc32/i386/globals.s @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/globals.s,v 1.13.2.1 2000/05/16 06:58:06 dillon Exp $ - * $DragonFly: src/sys/platform/pc32/i386/globals.s,v 1.8 2003/06/23 23:36:05 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/globals.s,v 1.9 2003/06/27 20:27:15 dillon Exp $ */ #include "opt_user_ldt.h" @@ -109,12 +109,12 @@ _CPU_prvspace: * The BSP version of these get setup in locore.s and pmap.c, while * the AP versions are setup in mp_machdep.c. */ - .globl gd_cpu, gd_cpu_lockid, gd_other_cpus + .globl gd_cpuid, gd_cpu_lockid, gd_other_cpus .globl gd_ss_eflags, gd_inside_intr .globl gd_prv_CMAP1, gd_prv_CMAP2, gd_prv_CMAP3, gd_prv_PMAP1 .globl gd_prv_CADDR1, gd_prv_CADDR2, gd_prv_CADDR3, gd_prv_PADDR1 - .set gd_cpu,globaldata + GD_CPUID + .set gd_cpuid,globaldata + GD_CPUID .set gd_cpu_lockid,globaldata + GD_CPU_LOCKID .set gd_other_cpus,globaldata + GD_OTHER_CPUS .set gd_ss_eflags,globaldata + GD_SS_EFLAGS diff --git a/sys/platform/pc32/include/globaldata.h b/sys/platform/pc32/include/globaldata.h index ecdf7abb53..a8c72497e4 100644 --- a/sys/platform/pc32/include/globaldata.h +++ b/sys/platform/pc32/include/globaldata.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/globaldata.h,v 1.11.2.1 2000/05/16 06:58:10 dillon Exp $ - * $DragonFly: src/sys/platform/pc32/include/globaldata.h,v 1.10 2003/06/23 23:36:08 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/include/globaldata.h,v 1.11 2003/06/27 20:27:18 dillon Exp $ */ /* @@ -54,7 +54,7 @@ struct globaldata { struct segment_descriptor gd_common_tssd; struct segment_descriptor *gd_tss_gdt; int gd_currentldt; /* USER_LDT */ - u_int gd_cpu; + u_int gd_cpuid; struct timeval gd_stattv; #ifdef SMP u_int gd_cpu_lockid; diff --git a/sys/platform/vkernel/i386/genassym.c b/sys/platform/vkernel/i386/genassym.c index 6a90bea76a..27cdd371db 100644 --- a/sys/platform/vkernel/i386/genassym.c +++ b/sys/platform/vkernel/i386/genassym.c @@ -35,7 +35,7 @@ * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ - * $DragonFly: src/sys/platform/vkernel/i386/genassym.c,v 1.14 2003/06/27 03:30:37 dillon Exp $ + * $DragonFly: src/sys/platform/vkernel/i386/genassym.c,v 1.15 2003/06/27 20:27:15 dillon Exp $ */ #include "opt_user_ldt.h" @@ -197,7 +197,7 @@ ASSYM(GD_CURRENTLDT, offsetof(struct globaldata, gd_currentldt)); #endif #ifdef SMP -ASSYM(GD_CPU, offsetof(struct globaldata, gd_cpu)); +ASSYM(GD_CPUID, offsetof(struct globaldata, gd_cpuid)); ASSYM(GD_CPU_LOCKID, offsetof(struct globaldata, gd_cpu_lockid)); ASSYM(GD_OTHER_CPUS, offsetof(struct globaldata, gd_other_cpus)); ASSYM(GD_SS_EFLAGS, offsetof(struct globaldata, gd_ss_eflags)); diff --git a/sys/sys/thread2.h b/sys/sys/thread2.h index a8c951e861..252c069705 100644 --- a/sys/sys/thread2.h +++ b/sys/sys/thread2.h @@ -8,7 +8,7 @@ * on a different cpu will not be immediately scheduled by a yield() on * this cpu. * - * $DragonFly: src/sys/sys/thread2.h,v 1.1 2003/06/21 07:54:57 dillon Exp $ + * $DragonFly: src/sys/sys/thread2.h,v 1.2 2003/06/27 20:27:19 dillon Exp $ */ #ifndef _SYS_THREAD2_H_ @@ -83,7 +83,7 @@ lwkt_setpri(int pri) static __inline int lwkt_havetoken(lwkt_token_t tok) { - return (tok->t_cpu == mycpu->gd_cpu); + return (tok->t_cpu == mycpu->gd_cpuid); } #endif -- 2.41.0