fix memremap on ARM
Get series with b4
b4 am [email protected]Versions newest first
- v3 Latest0 of 4 patches 0 repliesNew
Patches in v3 No applies recorded yet
None of the 4 patches the cover letter announces are in this archive.
Reviews trailers per patch
| Patch | Brian Norris |
|---|---|
| Series | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/4] fix memremap on ARM
Quoted 54 lines · Ard Biesheuvel
Quoted 53 lines · Dan Williams
Quoted 42 lines · Ard Biesheuvel
This is something I ran into while working on support for the UEFI memory attributes and ESRT tables. In both cases, these tables are passed to the kernel in memory which is guaranteed to be below 4 GB, but may be outside of the kernel direct mapping. (UEFI typically attempts to allocate from the top down, which means such tables are highly likely to be in highmem for any system with more than 760 MB of system RAM)
The recently introduced
memremap()is a very useful abstraction for accessing such tables, because it is generic, and already attempts to do the right thing with respect to regions that may already have been mapped directly. However, it falls back toioremap_cache()for mapping high memory, which is not allowed on ARM for system RAM, and also results in the region to be mapped with different attributes depending on whether it is covered by lowmem or not.So instead, create an arch specific hook '
arch_memremap_wb(), and implement it for ARM using the same memory attributes used for the linear mapping. Note that memremap will only call this hook for regions that are not already mapped permanently.Since this change results in
memremap()to use attributes different from the ones used byioremap_cache(), revert the change to pxa2xx-flash that moved it to memremap.Changes since v2:
- add patch to bring backioremap_cached()on ARM
- switch pxa2xx-flash back toioremap_cached()notioremap_cache()
- usearch_ioremap_callernot__arm_ioremap_caller()in patch #4
- deal with__iomemannotation ofarch_ioremap_caller(patch #4)Changes since v1/rfc:
- new patch #1 that reverts theioremap_cache->memremapconversion for the pxa2xx-flash driver
- added Dan's ack to patch #2Ard Biesheuvel (4):
ARM: reintroduceioremap_cached()for creating cached I/O mappings
mtd: pxa2xx-flash: switch back from memremap toioremap_cached
memremap: add arch specific hook forMEMREMAP_WBmappings
ARM: memremap: implementarch_memremap_wb()Quoted 6 lines
arch/arm/include/asm/io.h | 12 ++++++++++++ arch/arm/mm/ioremap.c | 16 ++++++++++++++-- drivers/mtd/maps/pxa2xx-flash.c | 6 +++--- kernel/memremap.c | 11 ++++++++--- 4 files changed, 37 insertions(+), 8 deletions(-)For the series:
Quoted 8 lines
Quoted 1 line
Acked-by Dan Williams <[email protected]>Thanks Dan,
With the added patch #1, I think it now makes the most sense for Russell to take the whole series via the ARM tree.
@Brian, David: any objections?
Nope. For the MTD part:
Regards,
Brian