diff options
author | Anshuman Khandual <anshuman.khandual@arm.com> | 2019-05-27 09:03:29 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2019-06-04 15:53:18 +0200 |
commit | 87dedf7c61ab07d7fe53bcf93103d2d845d804d8 (patch) | |
tree | c43b8b2250c9b0ed0e58b632ee82d3c14a1b6051 /arch/arm64/mm | |
parent | arm64: kernel: use aff3 instead of aff2 in comment (diff) | |
download | linux-87dedf7c61ab07d7fe53bcf93103d2d845d804d8.tar.xz linux-87dedf7c61ab07d7fe53bcf93103d2d845d804d8.zip |
arm64/mm: Change BUG_ON() to VM_BUG_ON() in [pmd|pud]_set_huge()
There are no callers for the functions which will pass unaligned physical
addresses. Hence just change these BUG_ON() checks into VM_BUG_ON() which
gets compiled out unless CONFIG_VM_DEBUG is enabled.
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r-- | arch/arm64/mm/mmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 22c2e4f0768f..69e65b6585e6 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -978,7 +978,7 @@ int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) pud_val(new_pud))) return 0; - BUG_ON(phys & ~PUD_MASK); + VM_BUG_ON(phys & ~PUD_MASK); set_pud(pudp, new_pud); return 1; } @@ -992,7 +992,7 @@ int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) pmd_val(new_pmd))) return 0; - BUG_ON(phys & ~PMD_MASK); + VM_BUG_ON(phys & ~PMD_MASK); set_pmd(pmdp, new_pmd); return 1; } |