Skip to contentSkip to conversation

riscv: mm: use bitmap_zero() API

PATCH Applied [email protected] 3 participants 3 messages May 6, 2023 – Aug 30, 2023 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: mm: use bitmap_zero() API

From: Ye Xingchen <[email protected]>

bitmap_zero() is faster than bitmap_clear(), so use bitmap_zero() instead of bitmap_clear().

---
 arch/riscv/mm/context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/mm/context.c +1 -1
index 12e22e7330e7..217fd4de6134 100644
@@ -67,7 +67,7 @@ static void __flush_context(void)
 	lockdep_assert_held(&context_lock);
 
 	/* Update the list of reserved ASIDs and the ASID bitmap. */
-	bitmap_clear(context_asid_map, 0, num_asids);
+	bitmap_zero(context_asid_map, num_asids);
 
 	/* Mark already active ASIDs as used */
 	for_each_possible_cpu(i) {
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · On Sat, May 6, 2023 at 2:42 PM <[email protected]> wrote:

From: Ye Xingchen <[email protected]>

bitmap_zero() is faster than bitmap_clear(), so use bitmap_zero() instead of bitmap_clear().

Looks good to me.

Regards,
Anup

Quoted 19 lines
---
 arch/riscv/mm/context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/mm/context.c +1 -2
index 12e22e7330e7..217fd4de6134 100644
@@ -67,7 +67,7 @@ static void __flush_context(void)
        lockdep_assert_held(&context_lock);
 
        /* Update the list of reserved ASIDs and the ASID bitmap. */
-       bitmap_clear(context_asid_map, 0, num_asids);
+       bitmap_zero(context_asid_map, num_asids);
 
        /* Mark already active ASIDs as used */
        for_each_possible_cpu(i) {
--

2.25.1

#2 lore raw
In reply to [email protected]
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:

Quoted 8 lines · On Sat, 6 May 2023 17:11:41 +0800 (CST) you wrote:

From: Ye Xingchen <[email protected]>

bitmap_zero() is faster than bitmap_clear(), so use bitmap_zero() instead of bitmap_clear().

[...]

Here is the summary with links:
- riscv: mm: use bitmap_zero() API

    https://git.kernel.org/riscv/c/88ba8c83bead

You are awesome, thank you!

Signature · 9 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv