anolis: arm64: add extra protective code for kunpeng mpam
ANBZ: #11194 In order to thoroughly distinguish kunpeng-mpam from yitian-mpam, add some secure check in entrance of kunpeng-mpam. Signed-off-by: Min Li <gumi@linux.alibaba.com> Reviewed-by: Guanghui Feng <guanghuifeng@linux.alibaba.com> Reviewed-by: Jay Chen <jkchen@linux.alibaba.com> Reviewed-by: Guixin Liu <kanie@linux.alibaba.com> Reviewed-by: Xunlei Pang <xlpang@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/4258
This commit is contained in:
parent
e1ccf88ee9
commit
8fc08e6442
|
@ -230,7 +230,11 @@ int __init acpi_mpam_parse_version(void)
|
|||
status = acpi_get_table(ACPI_SIG_MPAM, 0, &mpam);
|
||||
if (ACPI_FAILURE(status))
|
||||
return -ENOENT;
|
||||
|
||||
/* Only pass for hisi */
|
||||
if (strncmp(mpam->oem_id, "HISI", 4)) {
|
||||
acpi_put_table(mpam);
|
||||
return 0;
|
||||
}
|
||||
/* PPTT is optional, there may be no mpam cache controls */
|
||||
acpi_get_table(ACPI_SIG_PPTT, 0, &pptt);
|
||||
if (ACPI_FAILURE(status))
|
||||
|
|
|
@ -2175,7 +2175,7 @@ struct rdt_domain *mpam_find_domain(struct resctrl_resource *r, int id,
|
|||
}
|
||||
|
||||
enum mpam_enable_type __read_mostly kunpeng_mpam_enabled;
|
||||
static int __init mpam_setup(char *str)
|
||||
static int __init kunpeng_mpam_setup(char *str)
|
||||
{
|
||||
if (!strcmp(str, "=acpi"))
|
||||
kunpeng_mpam_enabled = MPAM_ENABLE_ACPI;
|
||||
|
@ -2184,7 +2184,7 @@ static int __init mpam_setup(char *str)
|
|||
|
||||
return 1;
|
||||
}
|
||||
__setup("mpam", mpam_setup);
|
||||
__setup("kpmpam", kunpeng_mpam_setup);
|
||||
|
||||
int mpam_resctrl_init(void)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue