Commit 66ae8ddd authored by Wang Wensheng's avatar Wang Wensheng Committed by Jian Zhang
Browse files

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: default avatarWang Wensheng <wangwensheng4@huawei.com>
parent f7cf91c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
+36 −0
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
+1 −1
Original line number Diff line number Diff line
@@ -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