提交 0c40cea7 编写于 作者: X Xu Qiang 提交者: Yang Yingliang

NMI: Enable arm-pmu interrupt as NMI in Acensed.

ascend inclusion
category: feature
bugzilla: NA
CVE: NA

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

For Ascend platform,automatically opens enable_pseudo_nmi
and pmu_nmi_enable.
Signed-off-by: NXu Qiang <xuqiang36@huawei.com>
Reviewed-by: NDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 05a6fc26
......@@ -91,6 +91,10 @@ extern struct arm64_ftr_reg arm64_ftr_reg_ctrel0;
int arm64_cpu_ftr_regs_traverse(int (*op)(u32, u64, void *), void *argp);
#ifdef CONFIG_ARM64_PSEUDO_NMI
extern bool enable_pseudo_nmi;
#endif
/*
* CPU capabilities:
*
......
......@@ -1230,7 +1230,7 @@ ssize_t cpu_show_meltdown(struct device *dev, struct device_attribute *attr,
}
#ifdef CONFIG_ARM64_PSEUDO_NMI
static bool enable_pseudo_nmi;
bool enable_pseudo_nmi;
static int __init early_enable_pseudo_nmi(char *p)
{
......
......@@ -769,6 +769,9 @@ __setup("keepinitrd", keepinitrd_setup);
#endif
#ifdef CONFIG_ASCEND_FEATURES
#include <linux/perf/arm_pmu.h>
void ascend_enable_all_features(void)
{
if (IS_ENABLED(CONFIG_ASCEND_DVPP_MMAP))
......@@ -782,6 +785,13 @@ void ascend_enable_all_features(void)
if (IS_ENABLED(CONFIG_SUSPEND))
mem_sleep_current = PM_SUSPEND_ON;
if (IS_ENABLED(CONFIG_PMU_WATCHDOG))
pmu_nmi_enable = true;
#ifdef CONFIG_ARM64_PSEUDO_NMI
enable_pseudo_nmi = true;
#endif
}
static int __init ascend_enable_setup(char *__unused)
......@@ -791,7 +801,7 @@ static int __init ascend_enable_setup(char *__unused)
return 1;
}
__setup("ascend_enable_all", ascend_enable_setup);
early_param("ascend_enable_all", ascend_enable_setup);
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册