Skip to content

Commit 5def442

Browse files
Kefeng Wangpalmer-dabbelt
authored andcommitted
riscv: mm: Use better bitmap_zalloc()
Use better bitmap_zalloc() to allocate bitmap. Signed-off-by: Kefeng Wang <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent ff76e3d commit 5def442

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/riscv/mm/context.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ static int __init asids_init(void)
243243
if (num_asids > (2 * num_possible_cpus())) {
244244
atomic_long_set(&current_version, num_asids);
245245

246-
context_asid_map = kcalloc(BITS_TO_LONGS(num_asids),
247-
sizeof(*context_asid_map), GFP_KERNEL);
246+
context_asid_map = bitmap_zalloc(num_asids, GFP_KERNEL);
248247
if (!context_asid_map)
249248
panic("Failed to allocate bitmap for %lu ASIDs\n",
250249
num_asids);

0 commit comments

Comments
 (0)