ARM: move FDT mapping out of linear region
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 21 repliesIn review
- v12 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- bump the start of the fixmap region by 512 KB so we still have a full guard region even on LPAE builds, which will use the entire 4 MB window for the read-only mapping of the DT
- update Documentation/arm/memory.rst accordingly
- add Linus's ack
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ARM: centralize phys-to-virt conversion of DT/ATAGS addressarch/ arch/ arch/ +3 more | +21 | 1 reply | |
| 2/2 | ARM: move device tree mapping out of linear regionDocumentation/ arch/ arch/ +5 more | +38 | 19 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Linus Walleij | Nicolas Pitre | Marek Szyprowski |
|---|---|---|---|
| 1/2 | T-b R-b | A-b | |
| 2/2 | T-b R-b | R-b | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/2] ARM: move FDT mapping out of linear region
For the ARM kernel, setting up the kernel's virtual address space at boot is tricky, given the risk of collision between 1:1 mapped regions and virtually remapped regions. There is also a concern regarding the exact mapping attributes that are needed for each region, which differs between ARM architecture revisions, UP vs SMP etc
For this reason, the kernel VA space is set up in two stages: at early boot, only the kernel itself and the DT are mapped using section mappings and later on, all existing mappings are torn down except the one covering the first memblock covering the kernel, and remapped again using the full fledged mapping routines that can map at page granularity and use all the right mapping attributes.
There are cases where this may result in the DT getting unmapped at this point, and not remapped again. For instance, if the first memblock is not PMD aligned, we will align it up, and mark the memory below it as MEMBLOCK_NOMAP, to avoid having to allocate page tables to create the mapping before we have a mapped memblock to allocate from. If the DT happens to reside in this region, it will not be mapped at all when the permanent kernel VA mappings are in place, resulting in crashes.
As we happen to have a 4 MB hole in the kernel VA space (between the end of the VMALLOC space and the start of the FIXMAP region), let's use it to create a permanent, read-only mapping of the DT that is not affected by any such issues.
Changes since v1:
- bump the start of the fixmap region by 512 KB so we still have a full guard region even on LPAE builds, which will use the entire 4 MB window for the read-only mapping of the DT
- update Documentation/arm/memory.rst accordingly
- add Linus's ack
Ard Biesheuvel (2):
ARM: centralize phys-to-virt conversion of DT/ATAGS address
ARM: move device tree mapping out of linear region
Documentation/arm/memory.rst | 7 ++++++- arch/arm/include/asm/fixmap.h | 2 +- arch/arm/include/asm/memory.h | 5 +++++ arch/arm/include/asm/prom.h | 4 ++-- arch/arm/kernel/atags.h | 4 ++-- arch/arm/kernel/atags_parse.c | 6 +++--- arch/arm/kernel/devtree.c | 6 +++--- arch/arm/kernel/head.S | 5 ++--- arch/arm/kernel/setup.c | 19 ++++++++++++++----- arch/arm/mm/init.c | 1 - arch/arm/mm/mmu.c | 20 ++++++++++++++------ arch/arm/mm/pv-fixup-asm.S | 4 ++-- 12 files changed, 54 insertions(+), 29 deletions(-)
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel