Module Name: src Committed By: mrg Date: Sun Aug 28 22:30:09 UTC 2011
Modified Files: src/sys/arch/sparc/include: psl.h Log Message: apply some always_inline attribute to setpsr and spl*. while i am not yet sure exactly why this is necessary, but does avoid crashes seen on sparc INSTALL with gcc 4.5. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/sparc/include/psl.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/sparc/include/psl.h diff -u src/sys/arch/sparc/include/psl.h:1.47 src/sys/arch/sparc/include/psl.h:1.48 --- src/sys/arch/sparc/include/psl.h:1.47 Sat Jul 16 11:15:52 2011 +++ src/sys/arch/sparc/include/psl.h Sun Aug 28 22:30:09 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.47 2011/07/16 11:15:52 nakayama Exp $ */ +/* $NetBSD: psl.h,v 1.48 2011/08/28 22:30:09 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -232,7 +232,7 @@ /* * GCC pseudo-functions for manipulating PSR (primarily PIL field). */ -static __inline int +static __inline __attribute__((__always_inline__)) int getpsr(void) { int psr; @@ -241,7 +241,7 @@ return (psr); } -static __inline int +static __inline __attribute__((__always_inline__)) int getmid(void) { int mid; @@ -250,14 +250,14 @@ return ((mid >> 20) & 0x3); } -static __inline void +static __inline __attribute__((__always_inline__)) void setpsr(int newpsr) { __asm volatile("wr %0,0,%%psr" : : "r" (newpsr) : "memory"); __asm volatile("nop; nop; nop"); } -static __inline void +static __inline __attribute__((__always_inline__)) void spl0(void) { int psr, oldipl; @@ -284,7 +284,7 @@ * into the ipl field.) */ #define _SPLSET(name, newipl) \ -static __inline void name(void) \ +static __inline __attribute__((__always_inline__)) void name(void) \ { \ int psr; \ __asm volatile("rd %%psr,%0" : "=r" (psr)); \ @@ -341,7 +341,7 @@ #define splzs() splraiseipl(makeiplcookie(IPL_ZS)) /* splx does not have a return value */ -static __inline void +static __inline __attribute__((__always_inline__)) void splx(int newipl) { int psr;