提交 342049dc 编写于 作者: D Ding Tianhong 提交者: Yang Yingliang

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: NDing Tianhong <dingtianhong@huawei.com>
Reviewed-by: NZefan Li <lizefan@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 e1625662
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/kexec.h> #include <linux/kexec.h>
#include <linux/crash_dump.h> #include <linux/crash_dump.h>
#include <linux/iommu.h>
#include <asm/boot.h> #include <asm/boot.h>
#include <asm/fixmap.h> #include <asm/fixmap.h>
...@@ -766,6 +767,25 @@ static int __init keepinitrd_setup(char *__unused) ...@@ -766,6 +767,25 @@ static int __init keepinitrd_setup(char *__unused)
__setup("keepinitrd", keepinitrd_setup); __setup("keepinitrd", keepinitrd_setup);
#endif #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. * Dump out memory limit information on panic.
*/ */
......
...@@ -48,7 +48,7 @@ struct iopf_group { ...@@ -48,7 +48,7 @@ struct iopf_group {
struct work_struct work; 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, static int iopf_complete(struct device *dev, struct iommu_fault_event *evt,
enum page_response_code status) enum page_response_code status)
......
...@@ -1125,4 +1125,6 @@ void iommu_debugfs_setup(void); ...@@ -1125,4 +1125,6 @@ void iommu_debugfs_setup(void);
static inline void iommu_debugfs_setup(void) {} static inline void iommu_debugfs_setup(void) {}
#endif #endif
extern int enable_iopf_hipri __read_mostly;
#endif /* __LINUX_IOMMU_H */ #endif /* __LINUX_IOMMU_H */
...@@ -2856,5 +2856,7 @@ void __init setup_nr_node_ids(void); ...@@ -2856,5 +2856,7 @@ void __init setup_nr_node_ids(void);
static inline void setup_nr_node_ids(void) {} static inline void setup_nr_node_ids(void) {}
#endif #endif
extern int enable_charge_mighp __read_mostly;
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */ #endif /* _LINUX_MM_H */
...@@ -54,7 +54,7 @@ static struct hstate * __initdata parsed_hstate; ...@@ -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_max_huge_pages;
static unsigned long __initdata default_hstate_size; static unsigned long __initdata default_hstate_size;
static bool __initdata parsed_valid_hugepagesz = true; 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, * Protects updates to hugepage_freelists, hugepage_activelist, nr_huge_pages,
......
...@@ -3747,7 +3747,7 @@ subsys_initcall(init_reserve_notifier); ...@@ -3747,7 +3747,7 @@ subsys_initcall(init_reserve_notifier);
/* /*
* Enable the MAP_32BIT (mmaps and hugetlb). * 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 #ifdef CONFIG_ASCEND_DVPP_MMAP
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册