From 408a98eda0a10cadb704be572ff6ebad25db3ddc Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 26 Apr 2005 20:41:48 +0000 Subject: [PATCH] Remove the special _amd64_set_gsbase() code for #ifdef COMPAT_32BIT, now that the amd64 kernel implements i386_get/set_gsbase(). All the rest of the ldt backwards compat code should go away soon. --- lib/libkse/arch/i386/i386/pthread_md.c | 6 ------ lib/libkse/arch/i386/include/pthread_md.h | 4 ---- lib/libpthread/arch/i386/i386/pthread_md.c | 6 ------ lib/libpthread/arch/i386/include/pthread_md.h | 4 ---- 4 files changed, 20 deletions(-) diff --git a/lib/libkse/arch/i386/i386/pthread_md.c b/lib/libkse/arch/i386/i386/pthread_md.c index 96cdac047f4a..acb60f5aa8db 100644 --- a/lib/libkse/arch/i386/i386/pthread_md.c +++ b/lib/libkse/arch/i386/i386/pthread_md.c @@ -78,10 +78,8 @@ _tcb_dtor(struct tcb *tcb) struct kcb * _kcb_ctor(struct kse *kse) { -#ifndef COMPAT_32BIT union descriptor ldt; void *base; -#endif struct kcb *kcb; int error; @@ -90,7 +88,6 @@ _kcb_ctor(struct kse *kse) bzero(kcb, sizeof(struct kcb)); kcb->kcb_self = kcb; kcb->kcb_kse = kse; -#ifndef COMPAT_32BIT switch (_thr_using_setbase) { case 1: /* use i386_set_gsbase() in _kcb_set */ kcb->kcb_ldt = -1; @@ -121,7 +118,6 @@ _kcb_ctor(struct kse *kse) } break; } -#endif } return (kcb); } @@ -129,11 +125,9 @@ _kcb_ctor(struct kse *kse) void _kcb_dtor(struct kcb *kcb) { -#ifndef COMPAT_32BIT if (kcb->kcb_ldt >= 0) { i386_set_ldt(kcb->kcb_ldt, NULL, 1); kcb->kcb_ldt = -1; /* just in case */ } -#endif free(kcb); } diff --git a/lib/libkse/arch/i386/include/pthread_md.h b/lib/libkse/arch/i386/include/pthread_md.h index e339391a626d..da200d3c3b5f 100644 --- a/lib/libkse/arch/i386/include/pthread_md.h +++ b/lib/libkse/arch/i386/include/pthread_md.h @@ -154,7 +154,6 @@ void _kcb_dtor(struct kcb *); static __inline void _kcb_set(struct kcb *kcb) { -#ifndef COMPAT_32BIT int val; if (_thr_using_setbase == 1) { @@ -163,9 +162,6 @@ _kcb_set(struct kcb *kcb) val = (kcb->kcb_ldt << 3) | 7; __asm __volatile("movl %0, %%gs" : : "r" (val)); } -#else - _amd64_set_gsbase(kcb); -#endif } diff --git a/lib/libpthread/arch/i386/i386/pthread_md.c b/lib/libpthread/arch/i386/i386/pthread_md.c index 96cdac047f4a..acb60f5aa8db 100644 --- a/lib/libpthread/arch/i386/i386/pthread_md.c +++ b/lib/libpthread/arch/i386/i386/pthread_md.c @@ -78,10 +78,8 @@ _tcb_dtor(struct tcb *tcb) struct kcb * _kcb_ctor(struct kse *kse) { -#ifndef COMPAT_32BIT union descriptor ldt; void *base; -#endif struct kcb *kcb; int error; @@ -90,7 +88,6 @@ _kcb_ctor(struct kse *kse) bzero(kcb, sizeof(struct kcb)); kcb->kcb_self = kcb; kcb->kcb_kse = kse; -#ifndef COMPAT_32BIT switch (_thr_using_setbase) { case 1: /* use i386_set_gsbase() in _kcb_set */ kcb->kcb_ldt = -1; @@ -121,7 +118,6 @@ _kcb_ctor(struct kse *kse) } break; } -#endif } return (kcb); } @@ -129,11 +125,9 @@ _kcb_ctor(struct kse *kse) void _kcb_dtor(struct kcb *kcb) { -#ifndef COMPAT_32BIT if (kcb->kcb_ldt >= 0) { i386_set_ldt(kcb->kcb_ldt, NULL, 1); kcb->kcb_ldt = -1; /* just in case */ } -#endif free(kcb); } diff --git a/lib/libpthread/arch/i386/include/pthread_md.h b/lib/libpthread/arch/i386/include/pthread_md.h index e339391a626d..da200d3c3b5f 100644 --- a/lib/libpthread/arch/i386/include/pthread_md.h +++ b/lib/libpthread/arch/i386/include/pthread_md.h @@ -154,7 +154,6 @@ void _kcb_dtor(struct kcb *); static __inline void _kcb_set(struct kcb *kcb) { -#ifndef COMPAT_32BIT int val; if (_thr_using_setbase == 1) { @@ -163,9 +162,6 @@ _kcb_set(struct kcb *kcb) val = (kcb->kcb_ldt << 3) | 7; __asm __volatile("movl %0, %%gs" : : "r" (val)); } -#else - _amd64_set_gsbase(kcb); -#endif }