* [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled
@ 2024-03-20 6:47 Dawei Li
2024-03-20 6:47 ` [PATCH 1/2] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled Dawei Li
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dawei Li @ 2024-03-20 6:47 UTC (permalink / raw
To: paul.walmsley, palmer, aou; +Cc: alexghiti, linux-riscv, linux-kernel, Dawei Li
Hi,
This is a trivial series of minor cleanup of pgtable_l{4,5}_enabled.
Change since v1:
- Split into 2 patches, as suggested by Alex.
- Add Reviewed-by from Alex.
v1:
https://lore.kernel.org/all/20240312085005.298657-1-dawei.li@shingroup.cn/
Dawei Li (2):
riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init
arch/riscv/mm/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.27.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
2024-03-20 6:47 [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled Dawei Li
@ 2024-03-20 6:47 ` Dawei Li
2024-03-20 6:47 ` [PATCH 2/2] riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init Dawei Li
2024-04-28 22:00 ` [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled patchwork-bot+linux-riscv
2 siblings, 0 replies; 4+ messages in thread
From: Dawei Li @ 2024-03-20 6:47 UTC (permalink / raw
To: paul.walmsley, palmer, aou; +Cc: alexghiti, linux-riscv, linux-kernel, Dawei Li
IS_ENABLED(CONFIG_64BIT) in initialization of pgtable_l{4,5}_enabled is
redundant, remove it.
Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
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..bab3e9943bb5 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 = !IS_ENABLED(CONFIG_XIP_KERNEL);
+bool pgtable_l5_enabled = !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] 4+ messages in thread
* [PATCH 2/2] riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init
2024-03-20 6:47 [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled Dawei Li
2024-03-20 6:47 ` [PATCH 1/2] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled Dawei Li
@ 2024-03-20 6:47 ` Dawei Li
2024-04-28 22:00 ` [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled patchwork-bot+linux-riscv
2 siblings, 0 replies; 4+ messages in thread
From: Dawei Li @ 2024-03-20 6:47 UTC (permalink / raw
To: paul.walmsley, palmer, aou; +Cc: alexghiti, linux-riscv, linux-kernel, Dawei Li
pgtable_l{4,5}_enabled are read only after initialization, make explicit
annotation of __ro_after_init on them.
Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
---
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 bab3e9943bb5..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_XIP_KERNEL);
-bool pgtable_l5_enabled = !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] 4+ messages in thread
* Re: [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled
2024-03-20 6:47 [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled Dawei Li
2024-03-20 6:47 ` [PATCH 1/2] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled Dawei Li
2024-03-20 6:47 ` [PATCH 2/2] riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init Dawei Li
@ 2024-04-28 22:00 ` patchwork-bot+linux-riscv
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-riscv @ 2024-04-28 22:00 UTC (permalink / raw
To: Dawei Li; +Cc: linux-riscv, paul.walmsley, palmer, aou, alexghiti, linux-kernel
Hello:
This series was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:
On Wed, 20 Mar 2024 14:47:10 +0800 you wrote:
> Hi,
>
> This is a trivial series of minor cleanup of pgtable_l{4,5}_enabled.
>
> Change since v1:
> - Split into 2 patches, as suggested by Alex.
> - Add Reviewed-by from Alex.
>
> [...]
Here is the summary with links:
- [1/2] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled
https://git.kernel.org/riscv/c/3a0dc44899d4
- [2/2] riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init
https://git.kernel.org/riscv/c/7a04dd8fd75b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-28 22:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20 6:47 [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled Dawei Li
2024-03-20 6:47 ` [PATCH 1/2] riscv: Remove redundant CONFIG_64BIT from pgtable_l{4,5}_enabled Dawei Li
2024-03-20 6:47 ` [PATCH 2/2] riscv: Annotate pgtable_l{4,5}_enabled with __ro_after_init Dawei Li
2024-04-28 22:00 ` [PATCH 0/2] Minor cleanup of pgtable_l{4,5}_enabled patchwork-bot+linux-riscv
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).