diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2007-03-30 12:34:05 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-03-30 12:37:41 -0400 |
commit | 9b50ffb0c0281bc5a08ccd56ae9bb84296c28f38 (patch) | |
tree | 85462c93df91c2fdd0c8fc31643158e9e5cf6734 /include | |
parent | c4add2e537e6f60048dce8dc518254e7e605301d (diff) |
[IA64] make ioremap avoid unsupported attributes
Example memory map (from HP sx1000 with VGA enabled):
0x00000 - 0x9FFFF supports only WB (cacheable) access
0xA0000 - 0xBFFFF supports only UC (uncacheable) access
0xC0000 - 0xFFFFF supports only WB (cacheable) access
pci_read_rom() indirectly uses ioremap(0xC0000) to read the shadow VGA option
ROM. ioremap() used to default to a 16MB or 64MB UC kernel identity mapping,
which would cause an MCA when reading 0xC0000 since only WB is supported there.
X uses reads the option ROM to initialize devices. A smaller test case is:
# echo 1 > /sys/bus/pci/devices/0000:aa:03.0/rom
# cp /sys/bus/pci/devices/0000:aa:03.0/rom x
To avoid this, we can use the same ioremap_page_range() strategy that most
architectures use for all ioremaps. These page table mappings come out of the
vmalloc area. On ia64, these are in region 5 (0xA... addresses) and typically
use 16KB or 64KB mappings instead of 16MB or 64MB mappings. The smaller
mappings give more flexibility to use the correct attributes.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ia64/io.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h index 6311e168cd34..eb17a8692967 100644 --- a/include/asm-ia64/io.h +++ b/include/asm-ia64/io.h | |||
@@ -421,11 +421,7 @@ __writeq (unsigned long val, volatile void __iomem *addr) | |||
421 | 421 | ||
422 | extern void __iomem * ioremap(unsigned long offset, unsigned long size); | 422 | extern void __iomem * ioremap(unsigned long offset, unsigned long size); |
423 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); | 423 | extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size); |
424 | 424 | extern void iounmap (volatile void __iomem *addr); | |
425 | static inline void | ||
426 | iounmap (volatile void __iomem *addr) | ||
427 | { | ||
428 | } | ||
429 | 425 | ||
430 | /* Use normal IO mappings for DMI */ | 426 | /* Use normal IO mappings for DMI */ |
431 | #define dmi_ioremap ioremap | 427 | #define dmi_ioremap ioremap |