x86info results ioremap.c:226 __ioremap_caller+0xf2/0x2d6() WARNINGs
When running x86info on a 2.6.27-git8 system I get
(the M taint is harmless in this case, came from other testing)
resource map sanity check conflict: 0x9e000 0x9efff 0x10000 0x9e7ff System RAM
------------[ cut here ]------------ WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6() Modules linked in: Pid: 8805, comm: x86info Tainted: G M 2.6.27-git8 #110 Call Trace: [<ffffffff80236ba1>] warn_on_slowpath+0x58/0x75 [<ffffffff8021db80>] ? do_flush_tlb_all+0x0/0x37 [<ffffffff8023b058>] ? on_each_cpu+0x21/0x2c [<ffffffff8023bc80>] ? iomem_map_sanity_check+0x61/0x89 [<ffffffff8022467b>] __ioremap_caller+0xf2/0x2d6 [<ffffffff803c0648>] ? read_mem+0x5a/0xca [<ffffffff802248e4>] xlate_dev_mem_ptr+0x73/0x9e [<ffffffff803c0648>] read_mem+0x5a/0xca [<ffffffff8028ed19>] vfs_read+0xab/0x134 [<ffffffff8028f01e>] sys_read+0x47/0x70 [<ffffffff8020b27b>] system_call_fastpath+0x16/0x1b ---[ end trace 8262d1d3f66bcc38 ]--- resource map sanity check conflict: 0x9e000 0x9efff 0x10000 0x9e7ff System RAM ------------[ cut here ]------------ WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6() Modules linked in: Pid: 8805, comm: x86info Tainted: G M W 2.6.27-git8 #110 Call Trace: [<ffffffff80236ba1>] warn_on_slowpath+0x58/0x75 [<ffffffff8021db80>] ? do_flush_tlb_all+0x0/0x37 [<ffffffff8023b058>] ? on_each_cpu+0x21/0x2c [<ffffffff8023bc80>] ? iomem_map_sanity_check+0x61/0x89 [<ffffffff8022467b>] __ioremap_caller+0xf2/0x2d6 [<ffffffff803c0648>] ? read_mem+0x5a/0xca [<ffffffff802248e4>] xlate_dev_mem_ptr+0x73/0x9e [<ffffffff803c0648>] read_mem+0x5a/0xca [<ffffffff8028ed19>] vfs_read+0xab/0x134 [<ffffffff8028f01e>] sys_read+0x47/0x70 [<ffffffff8020b27b>] system_call_fastpath+0x16/0x1b ---[ end trace 8262d1d3f66bcc38 ]--- resource map sanity check conflict: 0x9e000 0x9efff 0x10000 0x9e7ff System RAM ------------[ cut here ]------------ WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6() Modules linked in: Pid: 9236, comm: x86info Tainted: G M W 2.6.27-git8 #110 Call Trace: [<ffffffff80236ba1>] warn_on_slowpath+0x58/0x75 [<ffffffff8021db80>] ? do_flush_tlb_all+0x0/0x37 [<ffffffff8023b058>] ? on_each_cpu+0x21/0x2c [<ffffffff8023bc80>] ? iomem_map_sanity_check+0x61/0x89 [<ffffffff8022467b>] __ioremap_caller+0xf2/0x2d6 [<ffffffff803c0648>] ? read_mem+0x5a/0xca [<ffffffff802248e4>] xlate_dev_mem_ptr+0x73/0x9e [<ffffffff803c0648>] read_mem+0x5a/0xca [<ffffffff8028ed19>] vfs_read+0xab/0x134 [<ffffffff8028f01e>] sys_read+0x47/0x70 [<ffffffff8020b27b>] system_call_fastpath+0x16/0x1b ---[ end trace 8262d1d3f66bcc38 ]---
resource map sanity check conflict: 0x9e000 0x9efff 0x10000 0x9e7ff System RAM
... more of them ...
-Andi
Signature · 1 line
[email protected]
Quoted 15 lines · Andi Kleen
When running x86info on a 2.6.27-git8 system I get
(the M taint is harmless in this case, came from other testing)
resource map sanity check conflict:
0x9e0000x9efff0x100000x9e7ffSystem RAM------------[ cut here ]------------ WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6() Modules linked in: Pid: 8805, comm: x86info Tainted: G M 2.6.27-git8 #110 Call Trace: [<ffffffff80236ba1>] warn_on_slowpath+0x58/0x75 [<ffffffff8021db80>] ? do_flush_tlb_all+0x0/0x37 [<ffffffff8023b058>] ? on_each_cpu+0x21/0x2c [<ffffffff8023bc80>] ? iomem_map_sanity_check+0x61/0x89
Quoted 8 lines
[<ffffffff8022467b>] __ioremap_caller+0xf2/0x2d6 [<ffffffff803c0648>] ? read_mem+0x5a/0xca [<ffffffff802248e4>] xlate_dev_mem_ptr+0x73/0x9e [<ffffffff803c0648>] read_mem+0x5a/0xca [<ffffffff8028ed19>] vfs_read+0xab/0x134 [<ffffffff8028f01e>] sys_read+0x47/0x70 [<ffffffff8020b27b>] system_call_fastpath+0x16/0x1b ---[ end trace 8262d1d3f66bcc38 ]---
Andi, Appended patch fixes this issue. Thanks.
---
From: Suresh Siddha <[email protected]>
Subject: fix x86info ioremap sanity check warnings
Andi Kleen reported:
Quoted 6 lines
When running x86info on a 2.6.27-git8 system I get
resource map sanity check conflict:
0x9e0000x9efff0x100000x9e7ffSystem RAM------------[ cut here ]------------ WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6()...
Some of the pages below the 1MB ISA addresses will be shared typically by both BIOS and system usable RAM. For example:
BIOS-e820: 0000000000000000 - 000000000009f800 (usable) BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
x86info reads the low physical address using /dev/mem, which internally uses ioremap() for accessing non RAM pages. ioremap() of such low pages conflicts with multiple resource entities leading to the above warning.
Fix the warning by skipping the map conflict checks for low addresses below 1MB. No PCI BAR's reside in this region anyway.
---
arch/x86/mm/ioremap.c +8 -2
@@ -221,9 +221,15 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,/* * Check if the request spans more than any BAR in the iomem resource -* tree. +* tree. Skip this check for physical addresses below ISA_END_ADDRESS, +* as typically some of the pages below these addresses will be shared +* by both BIOS and system RAM(as reported by e820) and it will +* result in a conflict if some app (through /dev/mem mapping) +* is trying to accesses these pages. +* NO PCI BAR's reside in this region anyway. */ -WARN_ON (iomem_map_sanity_check (phys_addr, size)); +WARN_ON (last_addr >=ISA_END_ADDRESS && +iomem_map_sanity_check (phys_addr, size));/* * Don't allow anybody to remap normal RAM that we're using..
Quoted 16 lines · Suresh B
From: Suresh Siddha <[email protected]>
Subject: fix x86info ioremap sanity check warningsAndi Kleen reported:
Quoted 6 lines
When running x86info on a 2.6.27-git8 system I get
resource map sanity check conflict:
0x9e0000x9efff0x100000x9e7ffSystem RAM------------[ cut here ]------------ WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6()...
Some of the pages below the 1MB ISA addresses will be shared typically by both BIOS and system usable RAM. For example:
BIOS-e820: 0000000000000000 - 000000000009f800 (usable) BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
Quoted 7 lines
x86info reads the low physical address using
/dev/mem, which internally usesioremap()for accessing non RAM pages.ioremap()of such low pages conflicts with multiple resource entities leading to the above warning.Fix the warning by skipping the map conflict checks for low addresses below 1MB. No PCI BAR's reside in this region anyway.
More cleaner patch(which fixes the issue in a generic fashion) for this is appended. Ingo, please consider this for inclusion instead.
thanks,
suresh
---
From: Suresh Siddha <[email protected]>
Subject: fix x86info ioremap sanity check warnings
Andi Kleen reported:
Quoted 6 lines
When running x86info on a 2.6.27-git8 system I get
resource map sanity check conflict:
0x9e0000x9efff0x100000x9e7ffSystem RAM------------[ cut here ]------------ WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6()...
Some of the pages below the 1MB ISA addresses will be shared typically by both BIOS and system usable RAM. For example:
BIOS-e820: 0000000000000000 - 000000000009f800 (usable) BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
x86info reads the low physical address using /dev/mem, which internally uses ioremap() for accessing non RAM pages. ioremap() of such low pages conflicts with multiple resource entities leading to the above warning.
Change the iomem_map_sanity_check() to allow mapping a page spanning multiple resource entities (minimum granularity that one can map is a page anyhow).
---
kernel/resource.c +3 -1
@@ -17,6 +17,7 @@#include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/device.h> +#include <linux/pfn.h> #include <asm/io.h>
@@ -849,7 +850,8 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)continue ;if (p->end < addr)continue ; -if (p->start <= addr && (p->end >= addr + size -1 )) +if (PFN_DOWN (p->start) <=PFN_DOWN (addr) && +PFN_DOWN (p->end) >=PFN_DOWN (addr + size -1 ))continue ; printk(KERN_WARNING "resource map sanity check conflict: " "0x%llx 0x%llx 0x%llx 0x%llx %s\n",
Ingo Molnar
AppliedQuoted 5 lines · Suresh Siddha
Quoted 2 lines
Fix the warning by skipping the map conflict checks for low addresses below 1MB. No PCI BAR's reside in this region anyway.
More cleaner patch(which fixes the issue in a generic fashion) for this is appended. Ingo, please consider this for inclusion instead.
applied to tip/core/urgent, thanks Suresh!
Ingo