diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2021-05-29 14:15:34 +0300 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-06-09 03:12:30 +0300 |
commit | 5def4429aefe65b494816d9ba8ae7f971d522251 (patch) | |
tree | 05adb914ee4acb212cecd98c486ceeab47a90dd6 /arch/riscv/mm/context.c | |
parent | ff76e3d7c3c958b51f095dfdb7d451177312896b (diff) | |
download | linux-5def4429aefe65b494816d9ba8ae7f971d522251.tar.xz |
riscv: mm: Use better bitmap_zalloc()
Use better bitmap_zalloc() to allocate bitmap.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/mm/context.c')
-rw-r--r-- | arch/riscv/mm/context.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/riscv/mm/context.c b/arch/riscv/mm/context.c index 9bc46ab01c25..25cb406737d4 100644 --- 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); |