diff options
author | Greg Ungerer <gerg@uclinux.org> | 2012-07-19 15:42:45 +1000 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-09-29 14:58:05 +0100 |
commit | 08a3c4bc23e2b71191ed95d4fd3177c23660e34f (patch) | |
tree | 28ad927712efd7bc736630b9f6981426e4adfc84 /drivers/mtd/maps/Kconfig | |
parent | f938bc563b4ca04013d02961dd423be10eee418a (diff) | |
download | linux-08a3c4bc23e2b71191ed95d4fd3177c23660e34f.tar.gz linux-08a3c4bc23e2b71191ed95d4fd3177c23660e34f.tar.bz2 linux-08a3c4bc23e2b71191ed95d4fd3177c23660e34f.zip |
mtd: fix wrong usage of ioremap_nocache() in uclinux.c map driver
The uclinux.c mapping driver uses ioremap_nocache() to map its physical
mapping address to a system virtual address. Problem is that the region
it is mapping is not device memory. It is ordinary system RAM. On most
non-MMU systems this doesn't matter, and the mapping is always a 1:1
translation of the address. On paged memory systems on some architectures
the page table mappings are not compatible between normal RAM and device
memory.
If we want to use the uclinux.c mapping driver on real MMU enabled systems
we should be using the kernel virtual address that the mapping is at. For
architectures that support the traditional initrd they use phys_to_virt or
__va to convert the physical start initrd address to a kernel usable virtual
address. The uclinux filesystem mapping is even more restrictive than the
typical initrd, it always follows the kernels own bss section (so always in
directly mapped memory). Therefore we can use the usual phys_to_virt to
translate the physical start address to a virtual address.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/Kconfig')
0 files changed, 0 insertions, 0 deletions