Commit Diff
Diff:
e357cde48581909e3465bf37849706588f7f3aaa
82189061f23db95e01ab51c11cac5d4788c87903
Commit:
82189061f23db95e01ab51c11cac5d4788c87903
Tree:
97f91ae2976e70fb9bbeadc9eb3e6e8cbb10dc99
Author:
powerpc64 <powerpc64@localhost>
Committer:
powerpc64 <powerpc64@localhost>
Date:
Sun Jul 29 19:25:54 2018 UTC
Message:
in compiling the kernel I noticed this was awry. pted_desc does not exist but pte_desc does. also there was a chicken and egg problem with declared structs, so declare an empty struct before the first one. move pmap_t typedef up.
blob - d1a1527050f9f0f8e5ebfc5af1a83f3757e8e0fa
blob + 8bc396c2753f4ba7fafcc2cce1cf60ffdb11dc03
--- include/pmap.h
+++ include/pmap.h
@@ -39,13 +39,9 @@
#include <machine/slb.h>
-#ifdef 32BIT_DO_NOT_USE
/*
* Segment registers
*/
-#ifndef _LOCORE
-typedef u_int32_t sr_t;
-#endif /* _LOCORE */
#define SR_TYPE 0x80000000
#define SR_SUKEY 0x40000000
#define SR_PRKEY 0x20000000
@@ -74,14 +70,17 @@ typedef u_int32_t sr_t;
#define VP_IDX2_MASK (VP_IDX2_SIZE-1)
#define VP_IDX2_POS 12
-#endif
-
/* cache flags */
#define PMAP_CACHE_DEFAULT 0 /* WB cache managed mem, devices not */
#define PMAP_CACHE_CI 1 /* cache inhibit */
#define PMAP_CACHE_WT 2 /* writethru */
#define PMAP_CACHE_WB 3 /* writeback */
+#ifdef _KERNEL
+
+struct pmap;
+typedef struct pmap *pmap_t;
+
struct pte_desc {
/* Linked list of phys -> virt entries */
LIST_ENTRY(pte_desc) pted_pv_list;
@@ -91,9 +90,6 @@ struct pte_desc {
vaddr_t pted_va;
};
-
-#ifdef _KERNEL
-
struct slbcontainer;
SPLAY_HEAD(slb_tree, slbcontainer);
@@ -112,7 +108,7 @@ struct pmap {
int pm_refs; /* ref count */
struct pmap_statistics pm_stats; /* pmap statistics */
struct mutex pm_mtx; /* protect VP table */
- struct pted_desc pm_pted;
+ struct pte_desc pm_pted;
};
/*
@@ -128,7 +124,6 @@ struct pmap {
#define NPMAPS 32768 /* Number of pmaps in system */
#endif
-typedef struct pmap *pmap_t;
extern struct pmap kernel_pmap_;
#define pmap_kernel() (&kernel_pmap_)
repomaster@centroid.eu