From: Weilong Chen chenweilong@huawei.com
ascend inclusion category: feature bugzilla: NA CVE: NA
-------------------------------------------------
The ascend memory feature depends on the large page feature, but it is not associated. When CONFIG_HUGETLBFS is turned off, the compilation will fail.
This patch add dependencies in configs.
Acked-by: Hanjun Guo guohanjun@huawei.com Signed-off-by: Weilong Chen chenweilong@huawei.com Reviewed-by: Ding Tianhong dingtianhong@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com Signed-off-by: Cheng Jian cj.chengjian@huawei.com --- arch/arm64/Kconfig | 2 ++ drivers/char/Kconfig | 2 +- include/linux/hugetlb.h | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index e6f0170e2872..d8917873f549 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1361,6 +1361,7 @@ config ASCEND_IOPF_HIPRI
config ASCEND_CHARGE_MIGRATE_HUGEPAGES bool "Enable support for migrate hugepages" + depends on HUGETLBFS default y help When reseved hugepages are used up, we attempts to apply for migrate @@ -1382,6 +1383,7 @@ config ASCEND_WATCHDOG_SYSFS_CONFIGURE
config ASCEND_AUTO_TUNING_HUGEPAGE bool "Enable support for the auto-tuning hugepage" + depends on HUGETLBFS default y help The hugepage auto-tuning means the kernel dynamically manages the number of diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 0c25d37ca1be..60e05b27b2a3 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -554,7 +554,7 @@ config ADI
config HISI_SVM bool "Hisilicon svm driver" - depends on ARM64 && ARM_SMMU_V3 && MMU_NOTIFIER + depends on ARM64 && ARM_SMMU_V3 && MMU_NOTIFIER && HUGETLBFS default y help This driver provides character-level access to Hisilicon diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 32f2837a6075..9cd938bb24fe 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -629,6 +629,13 @@ static inline void set_huge_swap_pte_at(struct mm_struct *mm, unsigned long addr pte_t *ptep, pte_t pte, unsigned long sz) { } + +static inline int hugetlb_insert_hugepage_pte_by_pa(struct mm_struct *mm, + unsigned long vir_addr, + pgprot_t prot, unsigned long phy_addr) +{ + return 0; +} #endif /* CONFIG_HUGETLB_PAGE */
static inline spinlock_t *huge_pte_lock(struct hstate *h,