svn commit: r232458 - projects/armv6/sys/arm/arm
Olivier Houchard
cognet at FreeBSD.org
Sat Mar 3 12:41:20 UTC 2012
Author: cognet
Date: Sat Mar 3 12:41:19 2012
New Revision: 232458
URL: http://svn.freebsd.org/changeset/base/232458
Log:
Use set_tls()/get_tls() for >= armv6
Modified:
projects/armv6/sys/arm/arm/sys_machdep.c
Modified: projects/armv6/sys/arm/arm/sys_machdep.c
==============================================================================
--- projects/armv6/sys/arm/arm/sys_machdep.c Sat Mar 3 12:27:53 2012 (r232457)
+++ projects/armv6/sys/arm/arm/sys_machdep.c Sat Mar 3 12:41:19 2012 (r232458)
@@ -90,9 +90,12 @@ arm32_set_tp(struct thread *td, void *ar
if (td != curthread)
td->td_md.md_tp = (register_t)args;
- else
- /* XXX: wrong for SMP case */
+ else
+#ifdef _ARM_ARCH_6
+ set_tls(args);
+#else
*(register_t *)ARM_TP_ADDRESS = (register_t)args;
+#endif
return (0);
}
@@ -103,8 +106,11 @@ arm32_get_tp(struct thread *td, void *ar
if (td != curthread)
td->td_retval[0] = td->td_md.md_tp;
else
- /* XXX: wrong for SMP case */
+#ifdef _ARM_ARCH_6
+ td->td_retval[0] = (register_t)get_tls();
+#else
td->td_retval[0] = *(register_t *)ARM_TP_ADDRESS;
+#endif
return (0);
}
More information about the svn-src-projects
mailing list