提交 66ae8ddd 编写于 作者: W Wang Wensheng 提交者: Jian Zhang

ascend/arm64: Add ascend_enable_all kernel parameter

ascend inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG
CVE: NA

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

This kernel parameter is used for ascend scene and would open all the
options needed at once.
Signed-off-by: NWang Wensheng <wangwensheng4@huawei.com>
上级 f7cf91c9
......@@ -1729,7 +1729,7 @@ static void cpu_enable_e0pd(struct arm64_cpu_capabilities const *cap)
#endif /* CONFIG_ARM64_E0PD */
#ifdef CONFIG_ARM64_PSEUDO_NMI
static bool enable_pseudo_nmi;
bool enable_pseudo_nmi;
static int __init early_enable_pseudo_nmi(char *p)
{
......
......@@ -31,6 +31,8 @@
#include <linux/hugetlb.h>
#include <linux/acpi_iort.h>
#include <linux/pin_mem.h>
#include <linux/suspend.h>
#include <linux/nmi.h>
#include <asm/boot.h>
#include <asm/fixmap.h>
......@@ -724,3 +726,37 @@ void dump_mem_limit(void)
pr_emerg("Memory Limit: none\n");
}
}
void ascend_enable_all_features(void)
{
if (IS_ENABLED(CONFIG_ASCEND_DVPP_MMAP))
enable_mmap_dvpp = 1;
#ifdef CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES
extern int enable_charge_mighp;
enable_charge_mighp = 1;
#endif
#ifdef CONFIG_SUSPEND
mem_sleep_current = PM_SUSPEND_ON;
#endif
#ifdef CONFIG_ARM64_PSEUDO_NMI
extern bool enable_pseudo_nmi;
enable_pseudo_nmi = true;
#endif
#ifdef CONFIG_CORELOCKUP_DETECTOR
enable_corelockup_detector = true;
#endif
}
static int __init ascend_enable_setup(char *__unused)
{
ascend_enable_all_features();
return 0;
}
early_param("ascend_enable_all", ascend_enable_setup);
......@@ -6226,7 +6226,7 @@ void __init hugetlb_cma_check(void)
#endif /* CONFIG_CMA */
#ifdef CONFIG_ASCEND_FEATURES
static int enable_charge_mighp __read_mostly;
int enable_charge_mighp __read_mostly;
const struct hstate *hugetlb_get_hstate(void)
{
......
......@@ -84,7 +84,7 @@ DEFINE_PER_CPU(struct mem_cgroup *, int_active_memcg);
static bool cgroup_memory_nosocket;
/* Kernel memory accounting disabled */
static bool cgroup_memory_nokmem = true;
bool cgroup_memory_nokmem = true;
/* Whether the swap controller is active */
#ifdef CONFIG_MEMCG_SWAP
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册