Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sh3/sh3 adapt for _UC_TLSBASE.
details: https://anonhg.NetBSD.org/src/rev/7daeaf8e0cda
branches: trunk
changeset: 781665:7daeaf8e0cda
user: ryo <ryo%NetBSD.org@localhost>
date: Fri Sep 21 09:05:08 2012 +0000
description:
adapt for _UC_TLSBASE.
Approved by manu@ and msaitoh@
diffstat:
sys/arch/sh3/sh3/sh3_machdep.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (47 lines):
diff -r 6cb5ff05619e -r 7daeaf8e0cda sys/arch/sh3/sh3/sh3_machdep.c
--- a/sys/arch/sh3/sh3/sh3_machdep.c Fri Sep 21 08:42:33 2012 +0000
+++ b/sys/arch/sh3/sh3/sh3_machdep.c Fri Sep 21 09:05:08 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sh3_machdep.c,v 1.100 2012/07/08 20:14:12 dsl Exp $ */
+/* $NetBSD: sh3_machdep.c,v 1.101 2012/09/21 09:05:08 ryo Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.100 2012/07/08 20:14:12 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.101 2012/09/21 09:05:08 ryo Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -432,7 +432,7 @@
(void *) gr[_REG_PC])) != -1)
gr[_REG_PC] = ras_pc;
- *flags |= _UC_CPU;
+ *flags |= (_UC_CPU|_UC_TLSBASE);
/* FPU context is currently not handled by the kernel. */
memset(&mcp->__fpregs, 0, sizeof (mcp->__fpregs));
@@ -465,7 +465,8 @@
if (error)
return error;
- tf->tf_gbr = gr[_REG_GBR];
+ /* done in lwp_setprivate */
+ /* tf->tf_gbr = gr[_REG_GBR]; */
tf->tf_spc = gr[_REG_PC];
tf->tf_ssr = gr[_REG_SR];
tf->tf_macl = gr[_REG_MACL];
@@ -488,7 +489,8 @@
tf->tf_r0 = gr[_REG_R0];
tf->tf_r15 = gr[_REG_R15];
- lwp_setprivate(l, (void *)(uintptr_t)gr[_REG_GBR]);
+ if (flags & _UC_TLSBASE)
+ lwp_setprivate(l, (void *)(uintptr_t)gr[_REG_GBR]);
}
#if 0
Home |
Main Index |
Thread Index |
Old Index