Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/include Use the wrtee inlines for booke.
details: https://anonhg.NetBSD.org/src/rev/123d87997745
branches: trunk
changeset: 764633:123d87997745
user: matt <matt%NetBSD.org@localhost>
date: Fri Apr 29 21:42:40 2011 +0000
description:
Use the wrtee inlines for booke.
diffstat:
sys/arch/powerpc/include/profile.h | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diffs (39 lines):
diff -r 1b8ab4b7bd2e -r 123d87997745 sys/arch/powerpc/include/profile.h
--- a/sys/arch/powerpc/include/profile.h Fri Apr 29 20:33:42 2011 +0000
+++ b/sys/arch/powerpc/include/profile.h Fri Apr 29 21:42:40 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: profile.h,v 1.7 2006/07/07 21:28:03 ross Exp $ */
+/* $NetBSD: profile.h,v 1.8 2011/04/29 21:42:40 matt Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -26,6 +26,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef _KERNEL_OPT
+#include "opt_ppcarch.h"
+#endif
+
#define _MCOUNT_DECL void __mcount
#ifdef _LP64
@@ -122,6 +126,12 @@
#endif
#ifdef _KERNEL
+#ifdef PPC_BOOKE
+#include <powerpc/booke/cpuvar.h>
+
+#define MCOUNT_ENTER do s = wrtee(0); while (/*CONSTCOND*/ 0)
+#define MCOUNT_EXIT wrtee(s)
+#else
#define MCOUNT_ENTER \
__asm volatile("mfmsr %0" : "=r"(s)); \
if ((s & (PSL_IR | PSL_DR)) != (PSL_IR | PSL_DR)) \
@@ -132,3 +142,5 @@
#define MCOUNT_EXIT \
__asm volatile("mtmsr %0" :: "r"(s))
#endif
+
+#endif
Home |
Main Index |
Thread Index |
Old Index