Replace the body of lcsplx() with an open-coded version of spllower()
and return the previous priority level, which is actually expected by cpu_switch() in order to it be stashed into the PCB.
This commit is contained in:
parent
ec701021fd
commit
1790b00d25
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.9 2000/07/02 04:40:44 cgd Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.10 2000/08/14 08:58:39 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -106,7 +106,7 @@ void initppc __P((u_long, u_long, u_int, void *));
|
|||
void identifycpu __P((void));
|
||||
void dumpsys __P((void));
|
||||
void strayintr __P((int));
|
||||
void lcsplx __P((int));
|
||||
int lcsplx __P((int));
|
||||
|
||||
/* Our exported CPU info; we have only one right now. */
|
||||
struct cpu_info cpu_info_store;
|
||||
|
@ -921,12 +921,24 @@ halt_sys:
|
|||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
void
|
||||
/*
|
||||
* lcsplx() is called from locore; it is an open-coded version of
|
||||
* splx() differing in that it returns the previous priority level.
|
||||
*/
|
||||
int
|
||||
lcsplx(ipl)
|
||||
int ipl;
|
||||
{
|
||||
int oldcpl;
|
||||
|
||||
splx(ipl);
|
||||
__asm__ volatile("sync; eieio\n"); /* reorder protect */
|
||||
oldcpl = cpl;
|
||||
cpl = ipl;
|
||||
if (ipending & ~ipl)
|
||||
do_pending_int();
|
||||
__asm__ volatile("sync; eieio\n"); /* reorder protect */
|
||||
|
||||
return (oldcpl);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue