mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
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>
This commit is contained in:
parent
ff76e3d7c3
commit
5def4429ae
1 changed files with 1 additions and 2 deletions
|
@ -243,8 +243,7 @@ static int __init asids_init(void)
|
||||||
if (num_asids > (2 * num_possible_cpus())) {
|
if (num_asids > (2 * num_possible_cpus())) {
|
||||||
atomic_long_set(¤t_version, num_asids);
|
atomic_long_set(¤t_version, num_asids);
|
||||||
|
|
||||||
context_asid_map = kcalloc(BITS_TO_LONGS(num_asids),
|
context_asid_map = bitmap_zalloc(num_asids, GFP_KERNEL);
|
||||||
sizeof(*context_asid_map), GFP_KERNEL);
|
|
||||||
if (!context_asid_map)
|
if (!context_asid_map)
|
||||||
panic("Failed to allocate bitmap for %lu ASIDs\n",
|
panic("Failed to allocate bitmap for %lu ASIDs\n",
|
||||||
num_asids);
|
num_asids);
|
||||||
|
|
Loading…
Add table
Reference in a new issue