[for 4.4 PATCH] memremap: fix highmem support

Dan Williams dan.j.williams at intel.com
Tue Oct 27 19:06:41 PDT 2015


On Wed, Oct 28, 2015 at 10:39 AM, Dan Williams <dan.j.williams at intel.com> wrote:
> Currently memremap checks if the range is "System RAM" and returns the
> kernel linear address.  This is broken for highmem platforms where a
> range may be "System RAM", but is not part of the kernel linear mapping.
> Similar to acpi_map(), use kmap() for PAGE_SIZE memremap() requests for
> highmem, and fall back to ioremap_cache() otherwise.
>
> The impact of this bug is low for now since the pmem driver is the only
> user of memremap(), but this is important to fix before more conversions
> to memremap arrive in 4.4.
>
> Cc: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
> Cc: Russell King <rmk+kernel at arm.linux.org.uk>
> Reported-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> Signed-off-by: Dan Williams <dan.j.williams at intel.com>
> ---
> Russell,
>
> I question whether the kmap fallback is needed.  This is borrowed from
> the current implementation of acpi_map(), and I added it since arm
> ioremap warns if passed pfn_valid() addresses.

I flubbed the subject line... this is for 4.3-final.



More information about the linux-arm-kernel mailing list