mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
pc64: no need to CLI in noteret() and forkret()
Interrupts are disabled when returning from trap() or when gotolabel()'ing to forkret().
This commit is contained in:
parent
c2ec061689
commit
72aa282792
2 changed files with 4 additions and 14 deletions
|
@ -141,7 +141,7 @@ TEXT _warp64<>(SB), 1, $-4
|
|||
MOVL DX, PDPO(KZERO+GiB)(AX)
|
||||
|
||||
ADDL $PTSZ, AX /* PD0 at PML4 + 2*PTSZ */
|
||||
MOVL $(PTESIZE|PTEGLOBAL|PTEWRITE|PTEVALID), DX
|
||||
MOVL $(PTEACCESSED|PTEDIRTY|PTESIZE|PTEGLOBAL|PTEWRITE|PTEVALID), DX
|
||||
MOVL DX, PDO(0)(AX) /* PDE for double-map */
|
||||
|
||||
/*
|
||||
|
@ -942,7 +942,6 @@ TEXT syscallentry(SB), 1, $-4
|
|||
CALL syscall(SB)
|
||||
|
||||
TEXT forkret(SB), 1, $-4
|
||||
CLI
|
||||
SWAPGS
|
||||
|
||||
MOVQ 8(SP), AX /* return value */
|
||||
|
@ -1001,7 +1000,7 @@ _intrnested:
|
|||
PUSHQ SP
|
||||
CALL trap(SB)
|
||||
|
||||
TEXT _intrr(SB), 1, $-4
|
||||
TEXT noteret(SB), 1, $-4
|
||||
_intrestore:
|
||||
POPQ AX
|
||||
|
||||
|
@ -1031,10 +1030,6 @@ _iretnested:
|
|||
ADDQ $40, SP
|
||||
IRETQ
|
||||
|
||||
TEXT noteret(SB), 1, $-4
|
||||
CLI
|
||||
JMP _intrestore
|
||||
|
||||
TEXT vectortable(SB), $0
|
||||
CALL _strayintr(SB); BYTE $0x00 /* divide error */
|
||||
CALL _strayintr(SB); BYTE $0x01 /* debug exception */
|
||||
|
|
|
@ -349,14 +349,11 @@ debugexc(Ureg *ureg, void *)
|
|||
static void
|
||||
debugbpt(Ureg* ureg, void*)
|
||||
{
|
||||
char buf[ERRMAX];
|
||||
|
||||
if(up == 0)
|
||||
panic("kernel bpt");
|
||||
/* restore pc to instruction that caused the trap */
|
||||
ureg->pc--;
|
||||
snprint(buf, sizeof(buf), "sys: breakpoint");
|
||||
postnote(up, 1, buf, NDebug);
|
||||
postnote(up, 1, "sys: breakpoint", NDebug);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -478,9 +475,7 @@ syscall(Ureg* ureg)
|
|||
splx(s);
|
||||
startns = todget(nil);
|
||||
}
|
||||
if(scallnr >= nsyscall || systab[scallnr] == 0){
|
||||
pprint("bad sys call number %lud pc %#p\n",
|
||||
scallnr, ureg->pc);
|
||||
if(scallnr >= nsyscall || systab[scallnr] == nil){
|
||||
postnote(up, 1, "sys: bad sys call", NDebug);
|
||||
error(Ebadarg);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue