All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
@ 2024-03-12  8:50 ` Dawei Li
  0 siblings, 0 replies; 6+ messages in thread
From: Dawei Li @ 2024-03-12  8:50 UTC (permalink / raw
  To: paul.walmsley, palmer, aou
  Cc: linux-riscv, linux-kernel, set_pte_at, Dawei Li

IS_ENABLED(CONFIG_64BIT) in assignment of pgtable_l{4,5}_enabled is
redundant, remove it.

While at it, annotate pgtable_l{4,5}_enabled with __ro_after_init.

Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
---
 arch/riscv/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index fa34cf55037b..204cdf5b829d 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -50,8 +50,8 @@ u64 satp_mode __ro_after_init = SATP_MODE_32;
 EXPORT_SYMBOL(satp_mode);
 
 #ifdef CONFIG_64BIT
-bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
-bool pgtable_l5_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
+bool pgtable_l4_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
+bool pgtable_l5_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
 EXPORT_SYMBOL(pgtable_l4_enabled);
 EXPORT_SYMBOL(pgtable_l5_enabled);
 #endif
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
@ 2024-03-12  8:50 ` Dawei Li
  0 siblings, 0 replies; 6+ messages in thread
From: Dawei Li @ 2024-03-12  8:50 UTC (permalink / raw
  To: paul.walmsley, palmer, aou
  Cc: linux-riscv, linux-kernel, set_pte_at, Dawei Li

IS_ENABLED(CONFIG_64BIT) in assignment of pgtable_l{4,5}_enabled is
redundant, remove it.

While at it, annotate pgtable_l{4,5}_enabled with __ro_after_init.

Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
---
 arch/riscv/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index fa34cf55037b..204cdf5b829d 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -50,8 +50,8 @@ u64 satp_mode __ro_after_init = SATP_MODE_32;
 EXPORT_SYMBOL(satp_mode);
 
 #ifdef CONFIG_64BIT
-bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
-bool pgtable_l5_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
+bool pgtable_l4_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
+bool pgtable_l5_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
 EXPORT_SYMBOL(pgtable_l4_enabled);
 EXPORT_SYMBOL(pgtable_l5_enabled);
 #endif
-- 
2.27.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
  2024-03-12  8:50 ` Dawei Li
@ 2024-03-19 12:36   ` Alexandre Ghiti
  -1 siblings, 0 replies; 6+ messages in thread
From: Alexandre Ghiti @ 2024-03-19 12:36 UTC (permalink / raw
  To: Dawei Li, paul.walmsley, palmer, aou
  Cc: linux-riscv, linux-kernel, set_pte_at

Hi Dawei,

On 12/03/2024 09:50, Dawei Li wrote:
> IS_ENABLED(CONFIG_64BIT) in assignment of pgtable_l{4,5}_enabled is
> redundant, remove it.
>
> While at it, annotate pgtable_l{4,5}_enabled with __ro_after_init.


I guess this comment ^ implies that you need to split this patch into 2 :)

Feel free to add on both:

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Thanks,

Alex


>
> Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
> ---
>   arch/riscv/mm/init.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index fa34cf55037b..204cdf5b829d 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -50,8 +50,8 @@ u64 satp_mode __ro_after_init = SATP_MODE_32;
>   EXPORT_SYMBOL(satp_mode);
>   
>   #ifdef CONFIG_64BIT
> -bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> -bool pgtable_l5_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> +bool pgtable_l4_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
> +bool pgtable_l5_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
>   EXPORT_SYMBOL(pgtable_l4_enabled);
>   EXPORT_SYMBOL(pgtable_l5_enabled);
>   #endif

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
@ 2024-03-19 12:36   ` Alexandre Ghiti
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Ghiti @ 2024-03-19 12:36 UTC (permalink / raw
  To: Dawei Li, paul.walmsley, palmer, aou
  Cc: linux-riscv, linux-kernel, set_pte_at

Hi Dawei,

On 12/03/2024 09:50, Dawei Li wrote:
> IS_ENABLED(CONFIG_64BIT) in assignment of pgtable_l{4,5}_enabled is
> redundant, remove it.
>
> While at it, annotate pgtable_l{4,5}_enabled with __ro_after_init.


I guess this comment ^ implies that you need to split this patch into 2 :)

Feel free to add on both:

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>

Thanks,

Alex


>
> Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
> ---
>   arch/riscv/mm/init.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> index fa34cf55037b..204cdf5b829d 100644
> --- a/arch/riscv/mm/init.c
> +++ b/arch/riscv/mm/init.c
> @@ -50,8 +50,8 @@ u64 satp_mode __ro_after_init = SATP_MODE_32;
>   EXPORT_SYMBOL(satp_mode);
>   
>   #ifdef CONFIG_64BIT
> -bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> -bool pgtable_l5_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> +bool pgtable_l4_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
> +bool pgtable_l5_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
>   EXPORT_SYMBOL(pgtable_l4_enabled);
>   EXPORT_SYMBOL(pgtable_l5_enabled);
>   #endif

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
  2024-03-19 12:36   ` Alexandre Ghiti
@ 2024-03-20  3:49     ` Dawei Li
  -1 siblings, 0 replies; 6+ messages in thread
From: Dawei Li @ 2024-03-20  3:49 UTC (permalink / raw
  To: Alexandre Ghiti
  Cc: paul.walmsley, palmer, aou, linux-riscv, linux-kernel, set_pte_at

Hi Alex,

Thanks for review.

On Tue, Mar 19, 2024 at 01:36:13PM +0100, Alexandre Ghiti wrote:
> Hi Dawei,
> 
> On 12/03/2024 09:50, Dawei Li wrote:
> > IS_ENABLED(CONFIG_64BIT) in assignment of pgtable_l{4,5}_enabled is
> > redundant, remove it.
> > 
> > While at it, annotate pgtable_l{4,5}_enabled with __ro_after_init.
> 
> 
> I guess this comment ^ implies that you need to split this patch into 2 :)

Indeed. I Will respin v2 as you suggested.

> 
> Feel free to add on both:
> 
> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> 
> Thanks,
> 
> Alex

Thanks,

	Dawei
> 
> 
> > 
> > Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
> > ---
> >   arch/riscv/mm/init.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> > index fa34cf55037b..204cdf5b829d 100644
> > --- a/arch/riscv/mm/init.c
> > +++ b/arch/riscv/mm/init.c
> > @@ -50,8 +50,8 @@ u64 satp_mode __ro_after_init = SATP_MODE_32;
> >   EXPORT_SYMBOL(satp_mode);
> >   #ifdef CONFIG_64BIT
> > -bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> > -bool pgtable_l5_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> > +bool pgtable_l4_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
> > +bool pgtable_l5_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
> >   EXPORT_SYMBOL(pgtable_l4_enabled);
> >   EXPORT_SYMBOL(pgtable_l5_enabled);
> >   #endif
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
@ 2024-03-20  3:49     ` Dawei Li
  0 siblings, 0 replies; 6+ messages in thread
From: Dawei Li @ 2024-03-20  3:49 UTC (permalink / raw
  To: Alexandre Ghiti
  Cc: paul.walmsley, palmer, aou, linux-riscv, linux-kernel, set_pte_at

Hi Alex,

Thanks for review.

On Tue, Mar 19, 2024 at 01:36:13PM +0100, Alexandre Ghiti wrote:
> Hi Dawei,
> 
> On 12/03/2024 09:50, Dawei Li wrote:
> > IS_ENABLED(CONFIG_64BIT) in assignment of pgtable_l{4,5}_enabled is
> > redundant, remove it.
> > 
> > While at it, annotate pgtable_l{4,5}_enabled with __ro_after_init.
> 
> 
> I guess this comment ^ implies that you need to split this patch into 2 :)

Indeed. I Will respin v2 as you suggested.

> 
> Feel free to add on both:
> 
> Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
> 
> Thanks,
> 
> Alex

Thanks,

	Dawei
> 
> 
> > 
> > Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
> > ---
> >   arch/riscv/mm/init.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
> > index fa34cf55037b..204cdf5b829d 100644
> > --- a/arch/riscv/mm/init.c
> > +++ b/arch/riscv/mm/init.c
> > @@ -50,8 +50,8 @@ u64 satp_mode __ro_after_init = SATP_MODE_32;
> >   EXPORT_SYMBOL(satp_mode);
> >   #ifdef CONFIG_64BIT
> > -bool pgtable_l4_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> > -bool pgtable_l5_enabled = IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_XIP_KERNEL);
> > +bool pgtable_l4_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
> > +bool pgtable_l5_enabled __ro_after_init = !IS_ENABLED(CONFIG_XIP_KERNEL);
> >   EXPORT_SYMBOL(pgtable_l4_enabled);
> >   EXPORT_SYMBOL(pgtable_l5_enabled);
> >   #endif
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
> 

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-20  3:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-12  8:50 [PATCH] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled Dawei Li
2024-03-12  8:50 ` Dawei Li
2024-03-19 12:36 ` Alexandre Ghiti
2024-03-19 12:36   ` Alexandre Ghiti
2024-03-20  3:49   ` Dawei Li
2024-03-20  3:49     ` Dawei Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.