|
@@ -1063,12 +1063,28 @@ static acpi_status vmbus_walk_resources(struct acpi_resource *res, void *ctx)
|
|
new_res->start = start;
|
|
new_res->start = start;
|
|
new_res->end = end;
|
|
new_res->end = end;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Stick ranges from higher in address space at the front of the list.
|
|
|
|
+ * If two ranges are adjacent, merge them.
|
|
|
|
+ */
|
|
do {
|
|
do {
|
|
if (!*old_res) {
|
|
if (!*old_res) {
|
|
*old_res = new_res;
|
|
*old_res = new_res;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (((*old_res)->end + 1) == new_res->start) {
|
|
|
|
+ (*old_res)->end = new_res->end;
|
|
|
|
+ kfree(new_res);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if ((*old_res)->start == new_res->end + 1) {
|
|
|
|
+ (*old_res)->start = new_res->start;
|
|
|
|
+ kfree(new_res);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
if ((*old_res)->end < new_res->start) {
|
|
if ((*old_res)->end < new_res->start) {
|
|
new_res->sibling = *old_res;
|
|
new_res->sibling = *old_res;
|
|
if (prev_res)
|
|
if (prev_res)
|