From 2f517747bd295fa801cb283240baf19b96a37299 Mon Sep 17 00:00:00 2001 From: Xie XiuQi Date: Fri, 20 Dec 2019 09:18:34 +0800 Subject: [PATCH] arm64/mpam: cleanup the source file's licence hulk inclusion category: bugfix bugzilla: 16633 CVE: NA Rewrite the source file's licence of mpam feature. Signed-off-by: Xie XiuQi Reviewed-by: Hanjun Guo Signed-off-by: Yang Yingliang --- arch/arm64/include/asm/mpam_resource.h | 3 +-- arch/arm64/include/asm/mpam_sched.h | 1 + arch/arm64/kernel/mpam.c | 20 +++++++++++++------- arch/arm64/kernel/mpam_ctrlmon.c | 19 +++++++++++++------ arch/arm64/kernel/mpam_mon.c | 17 ++++++++++------- fs/resctrlfs.c | 16 ++++++++++++---- include/linux/resctrlfs.h | 1 + 7 files changed, 51 insertions(+), 26 deletions(-) diff --git a/arch/arm64/include/asm/mpam_resource.h b/arch/arm64/include/asm/mpam_resource.h index 0ae205d250bc..beadd2c64c31 100644 --- a/arch/arm64/include/asm/mpam_resource.h +++ b/arch/arm64/include/asm/mpam_resource.h @@ -1,5 +1,4 @@ -/* mpam resource: like L3, memory */ - +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_ARM64_MPAM_RESOURCE_H #define _ASM_ARM64_MPAM_RESOURCE_H diff --git a/arch/arm64/include/asm/mpam_sched.h b/arch/arm64/include/asm/mpam_sched.h index 14638793e53e..f0552e6dc9bc 100644 --- a/arch/arm64/include/asm/mpam_sched.h +++ b/arch/arm64/include/asm/mpam_sched.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_ARM64_MPAM_SCHED_H #define _ASM_ARM64_MPAM_SCHED_H diff --git a/arch/arm64/kernel/mpam.c b/arch/arm64/kernel/mpam.c index 0067e21a65b0..9cd8ebc75872 100644 --- a/arch/arm64/kernel/mpam.c +++ b/arch/arm64/kernel/mpam.c @@ -1,13 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ /* - * Resource Director Technology(RDT) - * - Cache Allocation code. + * Common code for ARM v8 MPAM * * Copyright (C) 2016 Intel Corporation + * Copyright (C) 2018-2019 Huawei Technologies Co., Ltd * * Authors: - * Fenghua Yu - * Tony Luck - * Vikas Shivappa + * Fenghua Yu + * Tony Luck + * Vikas Shivappa + * Xie XiuQi + * + * Code was partially borrowed from arch/x86/kernel/cpu/intel_rdt*. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -18,8 +22,10 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * More information about RDT be found in the Intel (R) x86 Architecture - * Software Developer Manual June 2016, volume 3, section 17.17. + * More information about MPAM be found in the Arm Architecture Reference + * Manual. + * + * https://static.docs.arm.com/ddi0598/a/DDI0598_MPAM_supp_armv8a.pdf */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/arch/arm64/kernel/mpam_ctrlmon.c b/arch/arm64/kernel/mpam_ctrlmon.c index 86e50fd19309..c9d306a93b24 100644 --- a/arch/arm64/kernel/mpam_ctrlmon.c +++ b/arch/arm64/kernel/mpam_ctrlmon.c @@ -1,12 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ /* - * Resource Director Technology(RDT) - * - Cache Allocation code. + * Common code for ARM v8 MPAM + * - allocation and monitor management * * Copyright (C) 2016 Intel Corporation + * Copyright (C) 2018-2019 Huawei Technologies Co., Ltd * * Authors: - * Fenghua Yu - * Tony Luck + * Fenghua Yu + * Tony Luck + * Xie XiuQi + * + * Code was partially borrowed from arch/x86/kernel/cpu/intel_rdt*. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -17,8 +22,10 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * More information about RDT be found in the Intel (R) x86 Architecture - * Software Developer Manual June 2016, volume 3, section 17.17. + * More information about MPAM be found in the Arm Architecture Reference + * Manual. + * + * https://static.docs.arm.com/ddi0598/a/DDI0598_MPAM_supp_armv8a.pdf */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/arch/arm64/kernel/mpam_mon.c b/arch/arm64/kernel/mpam_mon.c index 407da95ae927..4ff0f7e1f9d2 100644 --- a/arch/arm64/kernel/mpam_mon.c +++ b/arch/arm64/kernel/mpam_mon.c @@ -1,14 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0+ /* - * Resource Director Technology(RDT) - * - Monitoring code + * Common code for ARM v8 MPAM * * Copyright (C) 2017 Intel Corporation + * Copyright (C) 2018-2019 Huawei Technologies Co., Ltd * * Author: - * Vikas Shivappa + * Vikas Shivappa + * Xie XiuQi * - * This replaces the cqm.c based on perf but we reuse a lot of - * code and datastructures originally from Peter Zijlstra and Matt Fleming. + * Code was partially borrowed from arch/x86/kernel/cpu/intel_rdt*. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -19,8 +20,10 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * More information about RDT be found in the Intel (R) x86 Architecture - * Software Developer Manual June 2016, volume 3, section 17.17. + * More information about MPAM be found in the Arm Architecture Reference + * Manual. + * + * https://static.docs.arm.com/ddi0598/a/DDI0598_MPAM_supp_armv8a.pdf */ #include diff --git a/fs/resctrlfs.c b/fs/resctrlfs.c index fa6bbe0f1c26..4d3fa5da0379 100644 --- a/fs/resctrlfs.c +++ b/fs/resctrlfs.c @@ -1,9 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0+ /* - * User interface for Resource Alloction in Resource Director Technology(RDT) + * User interface for ARM v8 MPAM * * Copyright (C) 2016 Intel Corporation + * Copyright (C) 2018-2019 Huawei Technologies Co., Ltd * - * Author: Fenghua Yu + * Author: + * Fenghua Yu + * Xie XiuQi + * + * Code was partially borrowed from arch/x86/kernel/cpu/intel_rdt*. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -14,8 +20,10 @@ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * - * More information about RDT be found in the Intel (R) x86 Architecture - * Software Developer Manual. + * More information about MPAM be found in the Arm Architecture Reference + * Manual. + * + * https://static.docs.arm.com/ddi0598/a/DDI0598_MPAM_supp_armv8a.pdf */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt diff --git a/include/linux/resctrlfs.h b/include/linux/resctrlfs.h index 6650f8c7672a..e192fd55c316 100644 --- a/include/linux/resctrlfs.h +++ b/include/linux/resctrlfs.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _RESCTRLFS_H #define _RESCTRLFS_H -- GitLab