summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/param.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-07-02 14:37:21 +0000
committerkib <kib@FreeBSD.org>2015-07-02 14:37:21 +0000
commit77205a0535aed99b4194879b73077c1a1a4bf4f6 (patch)
treea1fbffaad7b43ca5ec177ee3f3d30ff713e09b9b /sys/i386/include/param.h
parent6fa1b93946b24835a4849b0342944e3a8b1b3dd2 (diff)
downloadFreeBSD-src-77205a0535aed99b4194879b73077c1a1a4bf4f6.zip
FreeBSD-src-77205a0535aed99b4194879b73077c1a1a4bf4f6.tar.gz
Use single instance of the identical INKERNEL() and PMC_IN_KERNEL()
macros on amd64 and i386. Move the definition to machine/param.h. kgdb defines INKERNEL() too, the conflict is resolved by renaming kgdb version to PINKERNEL(). On i386, correct the lowest kernel address. After the shared page was introduced, USRSTACK no longer points to the last user address + 1 [*] Submitted by: Oliver Pinter [*] Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys/i386/include/param.h')
-rw-r--r--sys/i386/include/param.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h
index 54477c1..b3fd85f 100644
--- a/sys/i386/include/param.h
+++ b/sys/i386/include/param.h
@@ -157,4 +157,7 @@
#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
+#define INKERNEL(va) (((vm_offset_t)(va)) >= VM_MAXUSER_ADDRESS && \
+ ((vm_offset_t)(va)) < VM_MAX_KERNEL_ADDRESS)
+
#endif /* !_I386_INCLUDE_PARAM_H_ */
OpenPOWER on IntegriCloud