Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163267344
D35439.id106775.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35439.id106775.diff
View Options
Index: sys/dev/iommu/iommu_gas.c
===================================================================
--- sys/dev/iommu/iommu_gas.c
+++ sys/dev/iommu/iommu_gas.c
@@ -377,14 +377,6 @@
{
struct iommu_map_entry *child;
- child = RB_RIGHT(entry, rb_entry);
- if (child != NULL && entry->end < a->common->lowaddr &&
- iommu_gas_match_one(a, entry->end, child->first,
- a->common->lowaddr)) {
- iommu_gas_match_insert(a);
- return (0);
- }
-
/*
* If the subtree doesn't have free space for the requested allocation
* plus two guard pages, give up.
@@ -393,16 +385,22 @@
return (ENOMEM);
if (entry->first >= a->common->lowaddr)
return (ENOMEM);
- child = RB_LEFT(entry, rb_entry);
+ child = RB_RIGHT(entry, rb_entry);
if (child != NULL && 0 == iommu_gas_lowermatch(a, child))
return (0);
+ if (child != NULL && entry->end < a->common->lowaddr &&
+ iommu_gas_match_one(a, entry->end, child->first,
+ a->common->lowaddr)) {
+ iommu_gas_match_insert(a);
+ return (0);
+ }
+ child = RB_LEFT(entry, rb_entry);
if (child != NULL && child->last < a->common->lowaddr &&
iommu_gas_match_one(a, child->last, entry->start,
a->common->lowaddr)) {
iommu_gas_match_insert(a);
return (0);
}
- child = RB_RIGHT(entry, rb_entry);
if (child != NULL && 0 == iommu_gas_lowermatch(a, child))
return (0);
return (ENOMEM);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 22, 2:35 PM (10 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35367413
Default Alt Text
D35439.id106775.diff (1 KB)
Attached To
Mode
D35439: iommu_gas: reorder lowermatch
Attached
Detach File
Event Timeline
Log In to Comment