Make the spl oriented inline functions less likely to allow

potentially volatile memory to be kept in registers during
the "call" (inline expansion.)  Do the same for pmap_update.
This commit is contained in:
John Dyson 1995-08-08 04:50:52 +00:00
parent 3bef267d25
commit 8966b85c8f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10004
3 changed files with 12 additions and 9 deletions

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cpufunc.h,v 1.37 1995/05/30 08:00:30 rgrimes Exp $
* $Id: cpufunc.h,v 1.38 1995/07/25 21:28:47 bde Exp $
*/
/*
@ -63,13 +63,13 @@ bdb(void)
static __inline void
disable_intr(void)
{
__asm __volatile("cli");
__asm __volatile("cli" : : : "memory");
}
static __inline void
enable_intr(void)
{
__asm __volatile("sti");
__asm __volatile("sti" : : : "memory");
}
#define HAVE_INLINE_FFS
@ -268,7 +268,8 @@ pmap_update(void)
* This should be implemented as load_cr3(rcr3()) when load_cr3()
* is inlined.
*/
__asm __volatile("movl %%cr3, %0; movl %0, %%cr3" : "=r" (temp));
__asm __volatile("movl %%cr3, %0; movl %0, %%cr3" : "=r" (temp) :
: "memory");
}
static __inline u_long

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cpufunc.h,v 1.37 1995/05/30 08:00:30 rgrimes Exp $
* $Id: cpufunc.h,v 1.38 1995/07/25 21:28:47 bde Exp $
*/
/*
@ -63,13 +63,13 @@ bdb(void)
static __inline void
disable_intr(void)
{
__asm __volatile("cli");
__asm __volatile("cli" : : : "memory");
}
static __inline void
enable_intr(void)
{
__asm __volatile("sti");
__asm __volatile("sti" : : : "memory");
}
#define HAVE_INLINE_FFS
@ -268,7 +268,8 @@ pmap_update(void)
* This should be implemented as load_cr3(rcr3()) when load_cr3()
* is inlined.
*/
__asm __volatile("movl %%cr3, %0; movl %0, %%cr3" : "=r" (temp));
__asm __volatile("movl %%cr3, %0; movl %0, %%cr3" : "=r" (temp) :
: "memory");
}
static __inline u_long

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: spl.h,v 1.7 1995/05/11 00:13:01 wollman Exp $
* $Id: spl.h,v 1.8 1995/05/11 07:44:16 bde Exp $
*/
#ifndef _MACHINE_IPL_H_
@ -105,6 +105,7 @@ static __inline int name(void) \
{ \
unsigned x; \
\
asm volatile("":::"memory"); \
x = cpl; \
set_cpl; \
return (x); \