kernel: move waserror() macro to port/portfns.h

This commit is contained in:
cinap_lenrek 2021-10-11 11:52:37 +00:00
parent 3e98132fc6
commit 5484260b42
14 changed files with 1 additions and 19 deletions

View file

@ -133,8 +133,6 @@ extern void sysprocsetup(Proc*);
#define kmapinval()
#define countpagerefs(a, b)
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(pa) ((void*)(KZERO | ((uintptr)(pa) & ~KSEGM)))
#define PADDR(va) (PHYSDRAM | ((uintptr)(va) & ~KSEGM))

View file

@ -1,7 +1,5 @@
#include "../port/portfns.h"
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
/* l.s */
extern void sev(void);
extern int tas(void *);

View file

@ -16,7 +16,6 @@ void procsetup(Proc *);
KMap* kmap(Page *);
void kunmap(KMap *);
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define getpgcolor(a) 0
#define kmapinval()
#define KADDR(a) kaddr(a)

View file

@ -143,8 +143,6 @@ void vunmap(void*, usize);
#define getpgcolor(a) 0
#define kmapinval()
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
/*
* this low-level printing stuff is ugly,
* but there appears to be no other way to

View file

@ -89,6 +89,5 @@ void tlbflushall(void);
#define userureg(ur) (((ur)->status & MSR_PR) != 0)
void watchreset(void);
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(a) ((void*)((ulong)(a)|KZERO))
#define PADDR(a) ((ulong)(a)&~KZERO)

View file

@ -160,8 +160,6 @@ void vunmap(void*, usize);
#define getpgcolor(a) 0
#define kmapinval()
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(pa) ((void*)(KZERO | ((uintptr)(pa) & ~KSEGM)))
#define PADDR(va) (PHYSDRAM | ((uintptr)(va) & ~KSEGM))

View file

@ -175,6 +175,5 @@ int xchgw(ushort*, int);
void rdrandbuf(void*, ulong);
#define userureg(ur) (((ur)->cs & 3) == 3)
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(a) kaddr(a)
#define PADDR(a) paddr((void*)(a))

View file

@ -177,6 +177,5 @@ int xchgw(ushort*, int);
void rdrandbuf(void*, ulong);
#define userureg(ur) (((ur)->cs & 3) == 3)
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(a) kaddr(a)
#define PADDR(a) paddr((void*)(a))

View file

@ -230,6 +230,7 @@ ulong perfticks(void);
void pexit(char*, int);
void pgrpcpy(Pgrp*, Pgrp*);
ulong pidalloc(Proc*);
#define waserror() setlabel(&up->errlab[up->nerrlab++])
#define poperror() up->nerrlab--
void portcountpagerefs(ulong*, int);
int postnote(Proc*, int, char*, int);

View file

@ -100,7 +100,6 @@ void touser(void*);
void trapinit(void);
void trapvec(void);
#define userureg(ur) (((ur)->status & MSR_PR) != 0)
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(a) ((void*)((ulong)(a)|KZERO))
#define PADDR(a) ((((ulong)(a)&0xf0000000)==0xf0000000)?(ulong)(a):((ulong)(a)&~KZERO))
#define coherence() eieio()

View file

@ -63,8 +63,6 @@ void wrcount(ulong);
#define PTR2UINT(p) ((uintptr)(p))
#define UINT2PTR(i) ((void*)(i))
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(a) ((void*)((ulong)(a)|KSEG0))
#define PADDR(a) ((ulong)(a)&~KSEGM)

View file

@ -194,8 +194,6 @@ void vunmap(void*, usize);
#define getpgcolor(a) 0
#define kmapinval()
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(pa) ((void*)(KZERO | ((uintptr)(pa) & ~KSEGM)))
#define PADDR(va) (PHYSDRAM | ((uintptr)(va) & ~KSEGM))

View file

@ -92,7 +92,6 @@ uint xchgw(ushort*, uint);
uint xchgb(uchar*, uint);
void rdrandbuf(void*, ulong);
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define KADDR(a) ((void*)((ulong)(a)|KZERO))
#define PADDR(a) ((ulong)(a)&~KZERO)

View file

@ -16,7 +16,6 @@ void procsetup(Proc *);
KMap* kmap(Page *);
void kunmap(KMap *);
#define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
#define getpgcolor(a) 0
#define kmapinval()
#define KADDR(a) kaddr(a)