summaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2014-12-05 12:34:54 +0000
committerWill Deacon <will.deacon@arm.com>2014-12-11 12:08:07 +0000
commit35545f0ccbd5a8ee01ba6824a2c68c0dcb787180 (patch)
tree3f25e853e549dfbe3611d2d302adbf1fab3be6a0 /arch/arm64
parente5e62d475274a060803cd2c57996a7ebc97f3e60 (diff)
downloadblackbird-op-linux-35545f0ccbd5a8ee01ba6824a2c68c0dcb787180.tar.gz
blackbird-op-linux-35545f0ccbd5a8ee01ba6824a2c68c0dcb787180.zip
arm64: mm: dump: fix shift warning
When building with 48-bit VAs, it's possible to get the following warning when building the arm64 page table dumping code: arch/arm64/mm/dump.c: In function ‘walk_pgd’: arch/arm64/mm/dump.c:266:2: warning: right shift count >= width of type pgd_t *pgd = pgd_offset(mm, 0); ^ As pgd_offset is a macro and the second argument is not cast to any particular type, the zero will be given integer type by the compiler. As pgd_offset passes the pargument to pgd_index, we then try to shift the 32-bit integer by at least 39 bits (for 4k pages). Elsewhere the pgd_offset is passed a second argument of unsigned long type, so let's do the same here by passing '0UL' rather than '0'. Cc: Kees Cook <keescook@chromium.org> Acked-by: Laura Abbott <lauraa@codeaurora.org> Acked-by: Steve Capper <steve.capper@arm.com> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/mm/dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c
index bf69601be546..a546776264c4 100644
--- a/arch/arm64/mm/dump.c
+++ b/arch/arm64/mm/dump.c
@@ -272,7 +272,7 @@ static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start)
static void walk_pgd(struct pg_state *st, struct mm_struct *mm, unsigned long start)
{
- pgd_t *pgd = pgd_offset(mm, 0);
+ pgd_t *pgd = pgd_offset(mm, 0UL);
unsigned i;
unsigned long addr;
OpenPOWER on IntegriCloud