Re: HPET regression in 2.6.26 versus 2.6.25 -- found another user with the same regression

Yinghai Lu
2008-08-21T02:02:49Z

[-- Attachment #1: Type: text/plain, Size: 94 bytes --]

please apply attached patch to see if insert_resource/request resource
works on your conf

YH

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: insert_resource_debug.patch --]
[-- Type: text/x-patch; name=insert_resource_debug.patch, Size: 2227 bytes --]

Index: linux-2.6/kernel/resource.c
===================================================================
--- linux-2.6.orig/kernel/resource.c
+++ linux-2.6/kernel/resource.c
@@ -201,6 +201,7 @@ int request_resource(struct resource *ro
write_lock(&resource_lock);
conflict = __request_resource(root, new);
write_unlock(&resource_lock);
+ printk(KERN_DEBUG "request_resource: root: (%s) [%llx, %llx], new: (%s) [%llx, %llx] conflict %d\n", root->name, root->start, root->end, new->name, new->start, new->end, !!conflict);
return conflict ? -EBUSY : 0;
}

@@ -382,16 +383,20 @@ int insert_resource(struct resource *par

write_lock(&resource_lock);

+ printk(KERN_DEBUG "insert_resource: parent: (%s) [%llx, %llx], new: (%s) [%llx, %llx]\n", parent->name, parent->start, parent->end, new->name, new->start, new->end);
for (;; parent = first) {
result = 0;
first = __request_resource(parent, new);
- if (!first)
+ if (!first) {
+ printk(KERN_DEBUG " insert_resource: good with request direct parent: (%s) [%llx, %llx], new: (%s) [%llx, %llx]\n", parent->name, parent->start, parent->end, new->name, new->start, new->end);
goto out;
+ }

result = -EBUSY;
if (first == parent)
goto out;

+ printk(KERN_DEBUG " insert_resource: first: (%s) [%llx, %llx], new: (%s) [%llx, %llx]\n", first->name, first->start, first->end, new->name, new->start, new->end);
if ((first->start > new->start) || (first->end < new->end))
break;
if ((first->start == new->start) && (first->end == new->end))
@@ -413,10 +418,13 @@ int insert_resource(struct resource *par
new->parent = parent;
new->sibling = next->sibling;
new->child = first;
+ printk(KERN_DEBUG " insert_resource: direct parent: (%s) [%llx, %llx], new: (%s) [%llx, %llx]\n", parent->name, parent->start, parent->end, new->name, new->start, new->end);

next->sibling = NULL;
- for (next = first; next; next = next->sibling)
+ for (next = first; next; next = next->sibling) {
next->parent = new;
+ printk(KERN_DEBUG " insert_resource: child: (%s) [%llx, %llx], new: (%s) [%llx, %llx]\n", next->name, next->start, next->end, new->name, new->start, new->end);
+ }

if (parent->child == first) {
parent->child = new;