[2/3] arm64: mmu: early_pgtable_alloc: remove unnecessary comments
diff mbox series

Message ID 20190213094831.7292-2-peng.fan@nxp.com
State New
Headers show
Series
  • [1/3] arm64: mmu: update paging_init comments
Related show

Commit Message

Peng Fan Feb. 13, 2019, 9:37 a.m. UTC
The empty zero page has been moved to bss area by
commit 5227cfa71f9e ("arm64: mm: place empty_zero_page in bss"),
and it alreay added "dsb     ishst" in head.S to make sure the empty
zero page visible to PTW.

There is no code to reflect the comment, so remove it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/mm/mmu.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Mark Rutland Feb. 13, 2019, 11:21 a.m. UTC | #1
On Wed, Feb 13, 2019 at 09:37:29AM +0000, Peng Fan wrote:
> The empty zero page has been moved to bss area by
> commit 5227cfa71f9e ("arm64: mm: place empty_zero_page in bss"),
> and it alreay added "dsb     ishst" in head.S to make sure the empty
> zero page visible to PTW.
> 
> There is no code to reflect the comment, so remove it.

The comment below refers to the memory pointed to by ptr, which is
zeroed by the memset. The comment does not refer to the generic
empty_zero_page.

This comment is correct, and should stay. Please drop this patch.

Thanks,
Mark.

> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm64/mm/mmu.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
> index 065202da3ad2..f61fa7c8fd2e 100644
> --- a/arch/arm64/mm/mmu.c
> +++ b/arch/arm64/mm/mmu.c
> @@ -113,10 +113,6 @@ static phys_addr_t __init early_pgtable_alloc(void)
>  
>  	memset(ptr, 0, PAGE_SIZE);
>  
> -	/*
> -	 * Implicit barriers also ensure the zeroed page is visible to the page
> -	 * table walker
> -	 */
>  	pte_clear_fixmap();
>  
>  	return phys;
> -- 
> 2.16.4
>
Peng Fan Feb. 13, 2019, 11:50 a.m. UTC | #2
Hi Mark,

> -----Original Message-----
> From: Mark Rutland [mailto:mark.rutland@arm.com]
> Sent: 2019年2月13日 19:22
> To: Peng Fan <peng.fan@nxp.com>
> Cc: catalin.marinas@arm.com; will.deacon@arm.com;
> ard.biesheuvel@linaro.org; yaojun8558363@gmail.com;
> cpandya@codeaurora.org; robin.murphy@arm.com;
> linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org;
> van.freenix@gmail.com
> Subject: Re: [PATCH 2/3] arm64: mmu: early_pgtable_alloc: remove
> unnecessary comments
> 
> On Wed, Feb 13, 2019 at 09:37:29AM +0000, Peng Fan wrote:
> > The empty zero page has been moved to bss area by commit 5227cfa71f9e
> > ("arm64: mm: place empty_zero_page in bss"),
> > and it alreay added "dsb     ishst" in head.S to make sure the empty
> > zero page visible to PTW.
> >
> > There is no code to reflect the comment, so remove it.
> 
> The comment below refers to the memory pointed to by ptr, which is zeroed
> by the memset. The comment does not refer to the generic
> empty_zero_page.
> 
> This comment is correct, and should stay. Please drop this patch.

I understand wrong. You are right.

Thanks,
Peng.

> 
> Thanks,
> Mark.
> 
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  arch/arm64/mm/mmu.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index
> > 065202da3ad2..f61fa7c8fd2e 100644
> > --- a/arch/arm64/mm/mmu.c
> > +++ b/arch/arm64/mm/mmu.c
> > @@ -113,10 +113,6 @@ static phys_addr_t __init
> > early_pgtable_alloc(void)
> >
> >  	memset(ptr, 0, PAGE_SIZE);
> >
> > -	/*
> > -	 * Implicit barriers also ensure the zeroed page is visible to the page
> > -	 * table walker
> > -	 */
> >  	pte_clear_fixmap();
> >
> >  	return phys;
> > --
> > 2.16.4
> >

Patch
diff mbox series

diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 065202da3ad2..f61fa7c8fd2e 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -113,10 +113,6 @@  static phys_addr_t __init early_pgtable_alloc(void)
 
 	memset(ptr, 0, PAGE_SIZE);
 
-	/*
-	 * Implicit barriers also ensure the zeroed page is visible to the page
-	 * table walker
-	 */
 	pte_clear_fixmap();
 
 	return phys;