soc: rockchip: cma_procfs: fix build error for kernel 6.1

Change-Id: I53a19847d07969e7cec36eacfe0b57c556f5016a
Signed-off-by: Simon Xue <xxm@rock-chips.com>
This commit is contained in:
Simon Xue 2023-05-25 09:25:19 +08:00 committed by Tao Huang
commit d575f032bb

View file

@ -47,11 +47,12 @@ static void cma_procfs_show_bitmap(struct seq_file *s, struct cma *cma)
static u64 cma_procfs_used_get(struct cma *cma)
{
unsigned long flags;
unsigned long used;
mutex_lock(&cma->lock);
spin_lock_irqsave(&cma->lock, flags);
used = bitmap_weight(cma->bitmap, (int)cma_bitmap_maxno(cma));
mutex_unlock(&cma->lock);
spin_unlock_irqrestore(&cma->lock, flags);
return (u64)used << cma->order_per_bit;
}