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:
parent
d2d73e0a5a
commit
d575f032bb
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue