* [PATCH stable] resources: skip sanity check of busy resources
@ 2009-01-27 16:10 Kyle McMartin
2009-01-29 0:43 ` [stable] " Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Kyle McMartin @ 2009-01-27 16:10 UTC (permalink / raw)
To: stable; +Cc: linux-kernel, arjan
From: Arjan van de Ven <arjan@linux.intel.com>
Impact: reduce false positives in iomem_map_sanity_check()
Some drivers (vesafb) only map/reserve a portion of a resource.
If then some other driver comes in and maps the whole resource,
the current code WARN_ON's. This is not the intent of the checks
in iomem_map_sanity_check(); rather these checks want to
warn when crossing *hardware* resources only.
This patch skips BUSY resources as suggested by Linus.
Note: having two drivers talk to the same hardware at the same
time is obviously not optimal behavior, but that's a separate story.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Kyle McMartin <kyle@redhat.com>
---
Bug fix for 2.6.28-stable only (relevant iomem_map_sanity_check hadn't
been added to 2.6.27.) This resolves a fairly nasty boot time WARN
in acpi ec seen on a number of systems. (RH #480700)
kernel/resource.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index 4337063..e633106 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -853,6 +853,15 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
if (PFN_DOWN(p->start) <= PFN_DOWN(addr) &&
PFN_DOWN(p->end) >= PFN_DOWN(addr + size - 1))
continue;
+ /*
+ * if a resource is "BUSY", it's not a hardware resource
+ * but a driver mapping of such a resource; we don't want
+ * to warn for those; some drivers legitimately map only
+ * partial hardware resources. (example: vesafb)
+ */
+ if (p->flags & IORESOURCE_BUSY)
+ continue;
+
printk(KERN_WARNING "resource map sanity check conflict: "
"0x%llx 0x%llx 0x%llx 0x%llx %s\n",
(unsigned long long)addr,
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [stable] [PATCH stable] resources: skip sanity check of busy resources
2009-01-27 16:10 [PATCH stable] resources: skip sanity check of busy resources Kyle McMartin
@ 2009-01-29 0:43 ` Greg KH
2009-01-29 1:05 ` Kyle McMartin
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2009-01-29 0:43 UTC (permalink / raw)
To: kyle; +Cc: stable, arjan, linux-kernel
On Tue, Jan 27, 2009 at 11:10:07AM -0500, Kyle McMartin wrote:
> From: Arjan van de Ven <arjan@linux.intel.com>
>
> Impact: reduce false positives in iomem_map_sanity_check()
>
> Some drivers (vesafb) only map/reserve a portion of a resource.
> If then some other driver comes in and maps the whole resource,
> the current code WARN_ON's. This is not the intent of the checks
> in iomem_map_sanity_check(); rather these checks want to
> warn when crossing *hardware* resources only.
>
> This patch skips BUSY resources as suggested by Linus.
>
> Note: having two drivers talk to the same hardware at the same
> time is obviously not optimal behavior, but that's a separate story.
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Kyle McMartin <kyle@redhat.com>
> ---
>
> Bug fix for 2.6.28-stable only (relevant iomem_map_sanity_check hadn't
> been added to 2.6.27.) This resolves a fairly nasty boot time WARN
> in acpi ec seen on a number of systems. (RH #480700)
Thanks for the patch. Next time, if you could let us know what the git
commit id is for the patch in Linus's tree, it would save me having to
dig to find it :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [stable] [PATCH stable] resources: skip sanity check of busy resources
2009-01-29 0:43 ` [stable] " Greg KH
@ 2009-01-29 1:05 ` Kyle McMartin
0 siblings, 0 replies; 3+ messages in thread
From: Kyle McMartin @ 2009-01-29 1:05 UTC (permalink / raw)
To: Greg KH; +Cc: kyle, stable, arjan, linux-kernel
On Wed, Jan 28, 2009 at 04:43:06PM -0800, Greg KH wrote:
> Thanks for the patch. Next time, if you could let us know what the git
> commit id is for the patch in Linus's tree, it would save me having to
> dig to find it :)
>
Doh, sorry, I thought I had passed -x to cherry-pick.
Will remember for next time.
cheers, Kyle
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-29 1:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-27 16:10 [PATCH stable] resources: skip sanity check of busy resources Kyle McMartin
2009-01-29 0:43 ` [stable] " Greg KH
2009-01-29 1:05 ` Kyle McMartin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®