* [PATCH] arm64/mm: Drop BUG_ON() from [pmd|pud]_set_huge()
@ 2019-05-27 4:02 Anshuman Khandual
2019-05-27 6:37 ` Ard Biesheuvel
0 siblings, 1 reply; 3+ messages in thread
From: Anshuman Khandual @ 2019-05-27 4:02 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel
Cc: Anshuman Khandual, Catalin Marinas, Will Deacon, Mark Rutland
There are no callers for the functions which will pass unaligned physical
addresses. Hence just drop these BUG_ON() checks which are not required.
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
---
arch/arm64/mm/mmu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 22c2e4f0768f..629011c6238d 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -978,7 +978,6 @@ 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);
set_pud(pudp, new_pud);
return 1;
}
@@ -992,7 +991,6 @@ 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);
set_pmd(pmdp, new_pmd);
return 1;
}
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64/mm: Drop BUG_ON() from [pmd|pud]_set_huge()
2019-05-27 4:02 [PATCH] arm64/mm: Drop BUG_ON() from [pmd|pud]_set_huge() Anshuman Khandual
@ 2019-05-27 6:37 ` Ard Biesheuvel
2019-05-27 6:44 ` Anshuman Khandual
0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2019-05-27 6:37 UTC (permalink / raw)
To: Anshuman Khandual
Cc: linux-arm-kernel, Linux Kernel Mailing List, Mark Rutland,
Catalin Marinas, Will Deacon
On Mon, 27 May 2019 at 06:02, Anshuman Khandual
<anshuman.khandual@arm.com> wrote:
>
> There are no callers for the functions which will pass unaligned physical
> addresses. Hence just drop these BUG_ON() checks which are not required.
>
This might change in the future, right? Should we perhaps switch to
VM_BUG_ON() instead so they get compiled out unless CONFIG_VM_DEBUG is
enabled?
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> ---
> arch/arm64/mm/mmu.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index 22c2e4f0768f..629011c6238d 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -978,7 +978,6 @@ 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);
> set_pud(pudp, new_pud);
> return 1;
> }
> @@ -992,7 +991,6 @@ 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);
> set_pmd(pmdp, new_pmd);
> return 1;
> }
> --
> 2.20.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64/mm: Drop BUG_ON() from [pmd|pud]_set_huge()
2019-05-27 6:37 ` Ard Biesheuvel
@ 2019-05-27 6:44 ` Anshuman Khandual
0 siblings, 0 replies; 3+ messages in thread
From: Anshuman Khandual @ 2019-05-27 6:44 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: linux-arm-kernel, Linux Kernel Mailing List, Mark Rutland,
Catalin Marinas, Will Deacon
On 05/27/2019 12:07 PM, Ard Biesheuvel wrote:
> On Mon, 27 May 2019 at 06:02, Anshuman Khandual
> <anshuman.khandual@arm.com> wrote:
>> There are no callers for the functions which will pass unaligned physical
>> addresses. Hence just drop these BUG_ON() checks which are not required.
>>
> This might change in the future, right? Should we perhaps switch to
> VM_BUG_ON() instead so they get compiled out unless CONFIG_VM_DEBUG is
> enabled?
Sure we can do that. Will re-send.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-27 6:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 4:02 [PATCH] arm64/mm: Drop BUG_ON() from [pmd|pud]_set_huge() Anshuman Khandual
2019-05-27 6:37 ` Ard Biesheuvel
2019-05-27 6:44 ` Anshuman Khandual
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®