projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff76e3d
)
riscv: mm: Use better bitmap_zalloc()
author
Kefeng Wang
<wangkefeng.wang@huawei.com>
Sat, 29 May 2021 11:15:34 +0000
(19:15 +0800)
committer
Palmer Dabbelt
<palmerdabbelt@google.com>
Wed, 9 Jun 2021 00:12:30 +0000
(17:12 -0700)
Use better bitmap_zalloc() to allocate bitmap.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/context.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/riscv/mm/context.c
b/arch/riscv/mm/context.c
index 9bc46ab01c25a67ff56d8ef4bbbd2d7a4e245570..25cb406737d4d20ff8282421d10c5ea86725f3b9 100644
(file)
--- a/
arch/riscv/mm/context.c
+++ b/
arch/riscv/mm/context.c
@@
-243,8
+243,7
@@
static int __init asids_init(void)
if (num_asids > (2 * num_possible_cpus())) {
atomic_long_set(¤t_version, num_asids);
- context_asid_map = kcalloc(BITS_TO_LONGS(num_asids),
- sizeof(*context_asid_map), GFP_KERNEL);
+ context_asid_map = bitmap_zalloc(num_asids, GFP_KERNEL);
if (!context_asid_map)
panic("Failed to allocate bitmap for %lu ASIDs\n",
num_asids);