OSDN Git Service

UPSTREAM: arm64: mm: allow sections for unaligned bases
authorMark Rutland <mark.rutland@arm.com>
Mon, 23 Nov 2015 13:26:20 +0000 (13:26 +0000)
committerJeff Vander Stoep <jeffv@google.com>
Thu, 15 Sep 2016 23:17:10 +0000 (16:17 -0700)
commitab8158d22085047097653a799fc9bae6e9920edf
tree4fe9c96d5e5373a1777c39c3693ec488b1462f56
parent5b432907fedfa6413bfe5971068853a786c4be16
UPSTREAM: arm64: mm: allow sections for unaligned bases

Callees of __create_mapping may decide to create section mappings if
sufficient low bits of the physical and virtual addresses they were
passed are zero. While __create_mapping rounds the virtual base address
down, it does not similarly round the physical base address down, and
hence non-zero bits in the physical address can prevent use of a section
mapping, even where a whole next-level table would be used instead.

Round down the physical base address in __create_mapping to enable all
callees to always create section mappings when such a mapping is
possible.

Cc: Laura Abbott <labbott@fedoraproject.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Bug: 30369029
Patchset: __create_mapping-fixes

(cherry picked from commit 9c4e08a3022b6df90d31ef4007291faabfce5431)
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Change-Id: Ic447350efdba3cd9f9e101c72183e04e39dd28d2
arch/arm64/mm/mmu.c