* all TLS functions were passing out or assuming the wrong value to load
into gs. As a matter of fact, this should be the same for SMP and UP,
but just in case keep the old code in #if 0's.
if (idx < GTLS_START) {
idx -= 6;
} else {
-#ifdef SMP
+#if 0 /* was SMP */
idx -= (GTLS_START + mycpu->gd_cpuid * NGDT);
-#else
+#endif
idx -= GTLS_START;
-#endif
}
KKASSERT(idx >= 0);
}
/* Tell the caller about the allocated entry number */
-#if 0
- info.entry_number = idx;
-#endif
-#ifdef SMP
+#if 0 /* was SMP */
info.entry_number = GTLS_START + mycpu->gd_cpuid * NGDT + idx;
-#else
- info.entry_number = GTLS_START + idx;
#endif
+ info.entry_number = GTLS_START + idx;
+
error = copyout(&info, args->desc, sizeof(struct l_user_desc));
if (error)
if (idx < GTLS_START) {
idx -= 6;
} else {
-#ifdef SMP
+#if 0 /* was SMP */
idx -= (GTLS_START + mycpu->gd_cpuid * NGDT);
-#else
+#endif
idx -= GTLS_START;
-#endif
+
}
KKASSERT(idx >= 0);