Skip to content
Snippets Groups Projects
Commit 342049dc authored by Ding Tianhong's avatar Ding Tianhong Committed by Yang Yingliang
Browse files

arm64/ascend: use ascend_enable_full to enable ascend platform


ascend inclusion
category: feature
bugzilla: NA
CVE: NA

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

There are too many ascend features enable flag, all of them is
used for all ascend soc till now, so use a new enable flag
to enable all of them for ascend platform by default, it would
clean and simplify the bootargs.

Also clean some code warning.

v2: modify the wrong config name.

v3: modify the wrong include head file.

Signed-off-by: default avatarDing Tianhong <dingtianhong@huawei.com>
Reviewed-by: default avatarZefan Li <lizefan@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent e1625662
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@
#include <linux/mm.h>
#include <linux/kexec.h>
#include <linux/crash_dump.h>
#include <linux/iommu.h>
#include <asm/boot.h>
#include <asm/fixmap.h>
......@@ -766,6 +767,25 @@ static int __init keepinitrd_setup(char *__unused)
__setup("keepinitrd", keepinitrd_setup);
#endif
#ifdef CONFIG_ASCEND_FEATURES
static int __init ascend_enable_setup(char *__unused)
{
if (IS_ENABLED(CONFIG_ASCEND_DVPP_MMAP))
enable_map_dvpp = 1;
if (IS_ENABLED(CONFIG_ASCEND_IOPF_HIPRI))
enable_iopf_hipri = 1;
if (IS_ENABLED(CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES))
enable_charge_mighp = 1;
return 1;
}
__setup("ascend_enable_all", ascend_enable_setup);
#endif
/*
* Dump out memory limit information on panic.
*/
......
......@@ -48,7 +48,7 @@ struct iopf_group {
struct work_struct work;
};
static int enable_iopf_hipri __read_mostly;
int enable_iopf_hipri __read_mostly;
static int iopf_complete(struct device *dev, struct iommu_fault_event *evt,
enum page_response_code status)
......
......@@ -1125,4 +1125,6 @@ void iommu_debugfs_setup(void);
static inline void iommu_debugfs_setup(void) {}
#endif
extern int enable_iopf_hipri __read_mostly;
#endif /* __LINUX_IOMMU_H */
......@@ -2856,5 +2856,7 @@ void __init setup_nr_node_ids(void);
static inline void setup_nr_node_ids(void) {}
#endif
extern int enable_charge_mighp __read_mostly;
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
......@@ -54,7 +54,7 @@ static struct hstate * __initdata parsed_hstate;
static unsigned long __initdata default_hstate_max_huge_pages;
static unsigned long __initdata default_hstate_size;
static bool __initdata parsed_valid_hugepagesz = true;
static int enable_charge_mighp __read_mostly;
int enable_charge_mighp __read_mostly;
/*
* Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,
......
......@@ -3747,7 +3747,7 @@ subsys_initcall(init_reserve_notifier);
/*
* Enable the MAP_32BIT (mmaps and hugetlb).
*/
int enable_map_dvpp __read_mostly = 0;
int enable_map_dvpp __read_mostly;
#ifdef CONFIG_ASCEND_DVPP_MMAP
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment