Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arm64: account for sparsemem section alignment when choosing vmemmap …
…offset Commit dfd55ad ("arm64: vmemmap: use virtual projection of linear region") fixed an issue where the struct page array would overflow into the adjacent virtual memory region if system RAM was placed so high up in physical memory that its addresses were not representable in the build time configured virtual address size. However, the fix failed to take into account that the vmemmap region needs to be relatively aligned with respect to the sparsemem section size, so that a sequence of page structs corresponding with a sparsemem section in the linear region appears naturally aligned in the vmemmap region. So round up vmemmap to sparsemem section size. Since this essentially moves the projection of the linear region up in memory, also revert the reduction of the size of the vmemmap region. Cc: <[email protected]> Fixes: dfd55ad ("arm64: vmemmap: use virtual projection of linear region") Tested-by: Mark Langsdorf <[email protected]> Tested-by: David Daney <[email protected]> Tested-by: Robert Richter <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Will Deacon <[email protected]>
- Loading branch information