Unverified Commit c443c896 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2837 udma: solve two compile problem of hns3-udma driver

Merge Pull Request from: @zhaoweibo3 
 
drivers inclusion
category: bugfix
bugzilla: https://gitee.com/open_euler/dashboard?issue_id=I85R2F


CVE: NA

[Content]
1.Add mask in function of udma_reg_write. The gcc of an
eariler version can be compiled smoothly.
2.Add dependency by hns3 for driver of hns3-udms rely
on two function of hns3.

Fixes: c256e44d ("hns3 udma: support loading and unloading of udma driver.")
Signed-off-by: default avatarWeibo Zhao <zhaoweibo3@huawei.com>
 
Link:https://gitee.com/openeuler/kernel/pulls/2837

 

Reviewed-by: default avatarChunzhi Hu <huchunzhi@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 25785c02 c84eb7c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ config UB_UDMA_HNS3
        tristate "HNS3 UB UDMA Driver"
        depends on UB && UB_URMA
        depends on ARM64
        depends on UBL && PCI
        depends on HNS3 && UBL && PCI
        help
          This is a UB_UDMA_HNS3 driver for the Hisilicon UDMA engine.
          This driver depands on ubcore and uburma.
+2 −1
Original line number Diff line number Diff line
@@ -66,7 +66,8 @@
		_udma_reg_clear((ptr), field);          \
		*((uint32_t *)(ptr) + ((field) >> 32) / 32) |=                       \
			cpu_to_le32(FIELD_PREP(GENMASK(((field) >> 32) % 32,         \
				(((field) << 32) >> 32) % 32), _val));                       \
				(((field) << 32) >> 32) % 32), _val &                \
				GENMASK((((field) >> 32) - (((field) << 32) >> 32)), 0))); \
	})

#define udma_reg_write(ptr, field, val) _udma_reg_write(ptr, field, val)