Bug 12267
Summary: | WARNING: ioremap on starting X with intel driver and multi-display | ||
---|---|---|---|
Product: | Memory Management | Reporter: | Dionisus Torimens (djtm) |
Component: | Other | Assignee: | Andrew Morton (akpm) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | jbarnes |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.28-rc9 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Dionisus Torimens
2008-12-21 04:53:07 UTC
Reply-To: akpm@linux-foundation.org On Sun, 21 Dec 2008 04:53:07 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=12267 > > Summary: WARNING: ioremap on starting X with intel driver and > multi-display > Product: Memory Management > Version: 2.5 > KernelVersion: 2.6.28-rc9 > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: Other > AssignedTo: akpm@osdl.org > ReportedBy: djtm@gmx.net > CC: jbarnes@virtuousgeek.org > > > Latest working kernel version: > Latest failing kernel version: 2.6.28-rc9 > Distribution: Ubuntu > Hardware Environment: Acer Extensa 5220 > Software Environment: Xorg 7.4~5ubuntu3 > Problem Description: > When I start X, this error appears in dmesg. > X usually crashes sometime later then. > > For my logs see http://bugs.freedesktop.org/show_bug.cgi?id=18496 > > for other reports > > http://kerneloops.org/search.php?filter=2.6.28-rc8-git1&search=__ioremap_caller > > The warning looks like this: > [28556.214595] WARNING: at arch/x86/mm/ioremap.c:226 We seem to be getting a lot of reports like this? On Sun, 21 Dec 2008 09:05:55 -0800 Andrew Morton <akpm@linux-foundation.org> wrote: > > for other reports > > > http://kerneloops.org/search.php?filter=2.6.28-rc8-git1&search=__ioremap_caller > > > > The warning looks like this: > > [28556.214595] WARNING: at arch/x86/mm/ioremap.c:226 > > We seem to be getting a lot of reports like this? it's a case of having 2 drivers using the same resource at a time Linus said it's valid, but the patch below (already sent before) should fix it: From 1cc2effbb8ce20c2874022d1f141927d9684b705 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven <arjan@linux.intel.com> Date: Sat, 13 Dec 2008 09:12:18 -0800 Subject: [PATCH] resource: Don't warn for driver originated resource structures 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> --- 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.4 * Arjan van de Ven <arjan@infradead.org> wrote: > On Sun, 21 Dec 2008 09:05:55 -0800 > Andrew Morton <akpm@linux-foundation.org> wrote: > > > > for other reports > > > > http://kerneloops.org/search.php?filter=2.6.28-rc8-git1&search=__ioremap_caller > > > > > > The warning looks like this: > > > [28556.214595] WARNING: at arch/x86/mm/ioremap.c:226 > > > > We seem to be getting a lot of reports like this? > > it's a case of having 2 drivers using the same resource at a time Linus > said it's valid, but the patch below (already sent before) should fix > it: i queued up your patch for v2.6.29 a week ago - should it perhaps also be marked as Cc: stable? (we can still do it - it's at the tail of the tip/core/resources topic branch) Ingo The patch doesn't apply for me, but I've pasted the changes and I will test it now... It works. No warnings in current git with Arjan's modification (manually applied). I therefore resolve this bug. |