summaryrefslogtreecommitdiff
path: root/arch/x86/machine/pmap.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-09-07 20:59:07 +0200
committerRichard Braun <rbraun@sceen.net>2017-09-07 20:59:07 +0200
commit888853dc07f1cdb9701f3612dea7828cc96b84cc (patch)
treeb255b28e240c2ccc9c43c10b8429766d8548fa53 /arch/x86/machine/pmap.h
parent4febbe1c657c026a33bdb16b51a0f317217b8d5a (diff)
Use accessors when referring to global kernel objects
The kernel_map/kernel_pmap/kernel_task/etc... names were reused as they were in the Mach source code. They've been a (mostly harmless) long-standing violation of the coding rules.
Diffstat (limited to 'arch/x86/machine/pmap.h')
-rw-r--r--arch/x86/machine/pmap.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/machine/pmap.h b/arch/x86/machine/pmap.h
index 96fc21e4..d8c2455b 100644
--- a/arch/x86/machine/pmap.h
+++ b/arch/x86/machine/pmap.h
@@ -183,10 +183,13 @@ typedef phys_addr_t pmap_pte_t;
*/
struct pmap;
-/*
- * The kernel pmap.
- */
-extern struct pmap *kernel_pmap;
+static inline struct pmap *
+pmap_get_kernel_pmap(void)
+{
+ extern struct pmap pmap_kernel_pmap;
+
+ return &pmap_kernel_pmap;
+}
/*
* Early initialization of the MMU.