Module Name: src Committed By: matt Date: Fri Apr 29 21:42:41 UTC 2011
Modified Files: src/sys/arch/powerpc/include: profile.h Log Message: Use the wrtee inlines for booke. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/profile.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/include/profile.h diff -u src/sys/arch/powerpc/include/profile.h:1.7 src/sys/arch/powerpc/include/profile.h:1.8 --- src/sys/arch/powerpc/include/profile.h:1.7 Fri Jul 7 21:28:03 2006 +++ src/sys/arch/powerpc/include/profile.h Fri Apr 29 21:42:40 2011 @@ -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