Commit 5a541e41 authored by Guangwei Zhou's avatar Guangwei Zhou Committed by JangShui Yang
Browse files

drivers: misc: uacce: bugfix for MAX_ORDER

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAZFI4
CVE: NA

----------------------------------------------------------------------

kernel have one patch to fix confusion around MAX_ORDER,
the range of orders user can ask from buddy allocator is
0..MAX_ORDER instead of between 0 and MAX_ORDER-1 now.
https://lore.kernel.org/all/20230316232144.b7ic4cif4kjiabws@box.shutemov.name/T/#u


uacce driver need to match the modification.

Fixes: 23baf831 ("mm, treewide: redefine MAX_ORDER sanely")
Signed-off-by: default avatarleisen <leisen1@huawei.com>
Signed-off-by: default avatarGuangwei Zhou <zhouguangwei5@huawei.com>
parent 83e13e44
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -478,7 +478,7 @@ static int uacce_alloc_dma_buffers(struct uacce_queue *q,
{
	struct uacce_qfile_region *qfr = q->qfrs[UACCE_QFRT_SS];
	unsigned long size = vma->vm_end - vma->vm_start;
	unsigned long max_size = PAGE_SIZE << (MAX_ORDER - 1);
	unsigned long max_size = PAGE_SIZE << MAX_ORDER;
	struct device *pdev = q->uacce->parent;
	struct uacce_device *uacce = q->uacce;
	unsigned long start = vma->vm_start;