]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: Prohibit ioremap() on kernel managed RAM
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 21 Jun 2010 20:03:18 +0000 (21:03 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 21 Jun 2010 20:03:18 +0000 (21:03 +0100)
commit774e9329cb126b0ed0a90a0c2d8203d6482ee95f
tree7ade7d69461250a39fabcd8a79d885253c6fd299
parenta05552eb058caba6e4fae1ea274cb90883c6f8eb
ARM: Prohibit ioremap() on kernel managed RAM

ARMv6 and above have a restriction whereby aliasing virtual:physical
mappings must not have differing memory type and sharability
attributes.  Strictly, this covers the memory type (strongly ordered,
device, memory), cache attributes (uncached, write combine, write
through, write back read alloc, write back write alloc) and the
shared bit.

However, using ioremap() and its variants on system RAM results in
mappings which differ in these attributes from the main system RAM
mapping.  Other architectures which similar restrictions approch this
problem in the same way - they do not permit ioremap on main system
RAM.

Make ARM behave in the same way, with a WARN_ON() such that users can
be traced and an alternative approach found.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/ioremap.c