Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168826773
D21061.id60116.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D21061.id60116.diff
View Options
Index: sys/powerpc/aim/mmu_oea64.c
===================================================================
--- sys/powerpc/aim/mmu_oea64.c
+++ sys/powerpc/aim/mmu_oea64.c
@@ -2364,9 +2364,9 @@
moea64_remove_pages(mmu_t mmu, pmap_t pm)
{
struct pvo_entry *pvo, *tpvo;
- struct pvo_tree tofree;
+ struct pvo_dlist tofree;
- RB_INIT(&tofree);
+ SLIST_INIT(&tofree);
PMAP_LOCK(pm);
RB_FOREACH_SAFE(pvo, pvo_tree, &pm->pmap_pvo, tpvo) {
@@ -2379,13 +2379,14 @@
* pass
*/
moea64_pvo_remove_from_pmap(mmu, pvo);
- RB_INSERT(pvo_tree, &tofree, pvo);
+ SLIST_INSERT_HEAD(&tofree, pvo, pvo_dlink);
}
PMAP_UNLOCK(pm);
- RB_FOREACH_SAFE(pvo, pvo_tree, &tofree, tpvo) {
+ while (!SLIST_EMPTY(&tofree)) {
+ pvo = SLIST_FIRST(&tofree);
+ SLIST_REMOVE_HEAD(&tofree, pvo_dlink);
moea64_pvo_remove_from_page(mmu, pvo);
- RB_REMOVE(pvo_tree, &tofree, pvo);
free_pvo_entry(pvo);
}
}
@@ -2397,7 +2398,7 @@
moea64_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva)
{
struct pvo_entry *pvo, *tpvo, key;
- struct pvo_tree tofree;
+ struct pvo_dlist tofree;
/*
* Perform an unsynchronized read. This is, however, safe.
@@ -2407,7 +2408,7 @@
key.pvo_vaddr = sva;
- RB_INIT(&tofree);
+ SLIST_INIT(&tofree);
PMAP_LOCK(pm);
for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key);
@@ -2420,13 +2421,14 @@
* pass
*/
moea64_pvo_remove_from_pmap(mmu, pvo);
- RB_INSERT(pvo_tree, &tofree, pvo);
+ SLIST_INSERT_HEAD(&tofree, pvo, pvo_dlink);
}
PMAP_UNLOCK(pm);
- RB_FOREACH_SAFE(pvo, pvo_tree, &tofree, tpvo) {
+ while (!SLIST_EMPTY(&tofree)) {
+ pvo = SLIST_FIRST(&tofree);
+ SLIST_REMOVE_HEAD(&tofree, pvo_dlink);
moea64_pvo_remove_from_page(mmu, pvo);
- RB_REMOVE(pvo_tree, &tofree, pvo);
free_pvo_entry(pvo);
}
}
Index: sys/powerpc/include/pmap.h
===================================================================
--- sys/powerpc/include/pmap.h
+++ sys/powerpc/include/pmap.h
@@ -90,7 +90,10 @@
#ifndef __powerpc64__
LIST_ENTRY(pvo_entry) pvo_olink; /* Link to overflow entry */
#endif
- RB_ENTRY(pvo_entry) pvo_plink; /* Link to pmap entries */
+ union {
+ RB_ENTRY(pvo_entry) pvo_plink; /* Link to pmap entries */
+ SLIST_ENTRY(pvo_entry) pvo_dlink; /* Link to delete enty */
+ };
struct {
#ifndef __powerpc64__
/* 32-bit fields */
@@ -106,6 +109,7 @@
uint64_t pvo_vpn; /* Virtual page number */
};
LIST_HEAD(pvo_head, pvo_entry);
+SLIST_HEAD(pvo_dlist, pvo_entry);
RB_HEAD(pvo_tree, pvo_entry);
int pvo_vaddr_compare(struct pvo_entry *, struct pvo_entry *);
RB_PROTOTYPE(pvo_tree, pvo_entry, pvo_plink, pvo_vaddr_compare);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 31, 8:24 AM (4 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37668340
Default Alt Text
D21061.id60116.diff (2 KB)
Attached To
Mode
D21061: powerpc64/mmu: Use a SLIST for the PVO delete list, instead of a RB_TREE
Attached
Detach File
Event Timeline
Log In to Comment