mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
arm64: mm: Use better bitmap_zalloc()
Use better bitmap_zalloc() to allocate bitmap. Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Signed-off-by: Kefeng Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
This commit is contained in:
1 parent
40221c7376
commit
5ae632ed35
1 file changed
+2
-4
@@ -402,14 +402,12 @@ static int asids_init(void)
|
||||
{
|
||||
asid_bits = get_cpu_asid_bits();
|
||||
atomic64_set(&asid_generation, ASID_FIRST_VERSION);
|
||||
asid_map = kcalloc(BITS_TO_LONGS(NUM_USER_ASIDS), sizeof(*asid_map),
|
||||
GFP_KERNEL);
|
||||
asid_map = bitmap_zalloc(NUM_USER_ASIDS, GFP_KERNEL);
|
||||
if (!asid_map)
|
||||
panic("Failed to allocate bitmap for %lu ASIDs\n",
|
||||
NUM_USER_ASIDS);
|
||||
|
||||
pinned_asid_map = kcalloc(BITS_TO_LONGS(NUM_USER_ASIDS),
|
||||
sizeof(*pinned_asid_map), GFP_KERNEL);
|
||||
pinned_asid_map = bitmap_zalloc(NUM_USER_ASIDS, GFP_KERNEL);
|
||||
nr_pinned_asids = 0;
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user