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>
                                   pud_val(new_pud)))
                return 0;
 
-       BUG_ON(phys & ~PUD_MASK);
+       VM_BUG_ON(phys & ~PUD_MASK);
        set_pud(pudp, new_pud);
        return 1;
 }
                                   pmd_val(new_pmd)))
                return 0;
 
-       BUG_ON(phys & ~PMD_MASK);
+       VM_BUG_ON(phys & ~PMD_MASK);
        set_pmd(pmdp, new_pmd);
        return 1;
 }