shithub: plan9front

Download patch

ref: 5484260b42b0a4061444670e812aff3973cc79fb
parent: 3e98132fc613f8bbe0124225adc92a0fec2546e6
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Oct 11 07:52:37 EDT 2021

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

--- a/sys/src/9/bcm/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/bcm/fns.h	Mon Oct 11 07:52:37 2021
@@ -133,8 +133,6 @@
 #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))
 
--- a/sys/src/9/bcm64/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/bcm64/fns.h	Mon Oct 11 07:52:37 2021
@@ -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 *);
--- a/sys/src/9/cycv/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/cycv/fns.h	Mon Oct 11 07:52:37 2021
@@ -16,7 +16,6 @@
 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)
--- a/sys/src/9/kw/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/kw/fns.h	Mon Oct 11 07:52:37 2021
@@ -143,8 +143,6 @@
 #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
--- a/sys/src/9/mtx/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/mtx/fns.h	Mon Oct 11 07:52:37 2021
@@ -89,6 +89,5 @@
 #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)
--- a/sys/src/9/omap/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/omap/fns.h	Mon Oct 11 07:52:37 2021
@@ -160,8 +160,6 @@
 #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))
 
--- a/sys/src/9/pc/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/pc/fns.h	Mon Oct 11 07:52:37 2021
@@ -175,6 +175,5 @@
 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))
--- a/sys/src/9/pc64/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/pc64/fns.h	Mon Oct 11 07:52:37 2021
@@ -177,6 +177,5 @@
 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))
--- a/sys/src/9/port/portfns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/port/portfns.h	Mon Oct 11 07:52:37 2021
@@ -230,6 +230,7 @@
 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);
--- a/sys/src/9/ppc/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/ppc/fns.h	Mon Oct 11 07:52:37 2021
@@ -100,7 +100,6 @@
 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()
--- a/sys/src/9/sgi/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/sgi/fns.h	Mon Oct 11 07:52:37 2021
@@ -63,8 +63,6 @@
 #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)
 
--- a/sys/src/9/teg2/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/teg2/fns.h	Mon Oct 11 07:52:37 2021
@@ -194,8 +194,6 @@
 #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))
 
--- a/sys/src/9/xen/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/xen/fns.h	Mon Oct 11 07:52:37 2021
@@ -92,7 +92,6 @@
 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)
 
--- a/sys/src/9/zynq/fns.h	Sun Oct 10 13:13:57 2021
+++ b/sys/src/9/zynq/fns.h	Mon Oct 11 07:52:37 2021
@@ -16,7 +16,6 @@
 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)