pull splraiseipl() for sparc64 from newlock branch.
reviewed by Martin Husemann.
This commit is contained in:
parent
15dc85722d
commit
4aed9e155a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: intr.h,v 1.12 2005/12/11 12:19:10 christos Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.13 2006/05/04 12:18:54 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -50,15 +50,18 @@
|
||||
#define IPL_NET PIL_NET /* network */
|
||||
#define IPL_SOFTSERIAL 4 /* serial */
|
||||
#define IPL_TTY PIL_TTY /* terminal */
|
||||
#define IPL_VM PIL_IMP /* memory allocation */
|
||||
#define IPL_VM PIL_VM /* memory allocation */
|
||||
#define IPL_AUDIO PIL_AUD /* audio */
|
||||
#define IPL_CLOCK PIL_CLOCK /* clock */
|
||||
#define IPL_STATCLOCK PIL_STATCLOCK /* statclock */
|
||||
#define IPL_SERIAL PIL_SER /* serial */
|
||||
#define IPL_SCHED PIL_SCHED /* scheduler */
|
||||
#define IPL_LOCK PIL_LOCK /* locks */
|
||||
#define IPL_HIGH PIL_HIGH /* everything */
|
||||
#define IPL_HALT 5 /* cpu stop-self */
|
||||
#define IPL_PAUSE 13 /* pause cpu */
|
||||
#define IPL_LPT PIL_LPT
|
||||
#define IPL_IPI PIL_HIGH
|
||||
|
||||
/*
|
||||
* Interprocessor interrupts. In order how we want them processed.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: psl.h,v 1.32 2006/02/20 19:00:27 cdi Exp $ */
|
||||
/* $NetBSD: psl.h,v 1.33 2006/05/04 12:18:54 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -81,11 +81,12 @@
|
||||
#define PIL_TTY 6
|
||||
#define PIL_LPT 6
|
||||
#define PIL_NET 6
|
||||
#define PIL_IMP 7
|
||||
#define PIL_VM 7
|
||||
#define PIL_AUD 8
|
||||
#define PIL_CLOCK 10
|
||||
#define PIL_FD 11
|
||||
#define PIL_SER 12
|
||||
#define PIL_STATCLOCK 14
|
||||
#define PIL_HIGH 15
|
||||
#define PIL_SCHED PIL_CLOCK
|
||||
#define PIL_LOCK PIL_HIGH
|
||||
@ -365,6 +366,22 @@ static __inline int name(void) \
|
||||
}
|
||||
#endif
|
||||
|
||||
static __inline int __attribute__((__unused__))
|
||||
splraiseipl(int newpil)
|
||||
{
|
||||
int oldpil;
|
||||
|
||||
/*
|
||||
* NetBSD/sparc64's IPL_* constants equate directly to the
|
||||
* corresponding PIL_* names; no need to map them here.
|
||||
*/
|
||||
__asm __volatile("rdpr %%pil,%0" : "=r" (oldpil));
|
||||
if (newpil <= oldpil)
|
||||
return (oldpil);
|
||||
__asm __volatile("wrpr %0,0,%%pil" : : "r" (newpil));
|
||||
return (oldpil);
|
||||
}
|
||||
|
||||
SPL(spl0, 0)
|
||||
|
||||
SPL(spllowersoftclock, 1)
|
||||
@ -396,7 +413,7 @@ SPLHOLD(spllpt, PIL_LPT)
|
||||
/*
|
||||
* Memory allocation (must be as high as highest network, tty, or disk device)
|
||||
*/
|
||||
SPLHOLD(splvm, PIL_IMP)
|
||||
SPLHOLD(splvm, PIL_VM)
|
||||
|
||||
SPLHOLD(splclock, PIL_CLOCK)
|
||||
|
||||
@ -411,7 +428,7 @@ SPLHOLD(splserial, PIL_SER)
|
||||
SPLHOLD(splaudio, PIL_AUD)
|
||||
|
||||
/* second sparc timer interrupts at level 14 */
|
||||
SPLHOLD(splstatclock, 14)
|
||||
SPLHOLD(splstatclock, PIL_STATCLOCK)
|
||||
|
||||
SPLHOLD(splsched, PIL_SCHED)
|
||||
SPLHOLD(spllock, PIL_LOCK)
|
||||
|
Loading…
Reference in New Issue
Block a user