Skip to content

Commit aad611a

Browse files
committed
Merge tag 'perf-tools-fixes-for-v5.17-2022-03-12' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix event parser error for hybrid systems - Fix NULL check against wrong variable in 'perf bench' and in the parsing code - Update arm64 KVM headers from the kernel sources - Sync cpufeatures header with the kernel sources * tag 'perf-tools-fixes-for-v5.17-2022-03-12' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf parse: Fix event parser error for hybrid systems perf bench: Fix NULL check against wrong variable perf parse-events: Fix NULL check against wrong variable tools headers cpufeatures: Sync with the kernel sources tools kvm headers arm64: Update KVM headers from the kernel sources
2 parents 1518a4f + 91c9923 commit aad611a

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

tools/arch/arm64/include/uapi/asm/kvm.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ struct kvm_arm_copy_mte_tags {
281281
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3
282282
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4)
283283

284+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_3 KVM_REG_ARM_FW_REG(3)
285+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_3_NOT_AVAIL 0
286+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_3_AVAIL 1
287+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_3_NOT_REQUIRED 2
288+
284289
/* SVE registers */
285290
#define KVM_REG_ARM64_SVE (0x15 << KVM_REG_ARM_COPROC_SHIFT)
286291

tools/arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
/* FREE! ( 7*32+10) */
205205
#define X86_FEATURE_PTI ( 7*32+11) /* Kernel Page Table Isolation enabled */
206206
#define X86_FEATURE_RETPOLINE ( 7*32+12) /* "" Generic Retpoline mitigation for Spectre variant 2 */
207-
#define X86_FEATURE_RETPOLINE_LFENCE ( 7*32+13) /* "" Use LFENCEs for Spectre variant 2 */
207+
#define X86_FEATURE_RETPOLINE_LFENCE ( 7*32+13) /* "" Use LFENCE for Spectre variant 2 */
208208
#define X86_FEATURE_INTEL_PPIN ( 7*32+14) /* Intel Processor Inventory Number */
209209
#define X86_FEATURE_CDP_L2 ( 7*32+15) /* Code and Data Prioritization L2 */
210210
#define X86_FEATURE_MSR_SPEC_CTRL ( 7*32+16) /* "" MSR SPEC_CTRL is implemented */

tools/perf/bench/epoll-ctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static void nest_epollfd(void)
106106
printinfo("Nesting level(s): %d\n", nested);
107107

108108
epollfdp = calloc(nested, sizeof(int));
109-
if (!epollfd)
109+
if (!epollfdp)
110110
err(EXIT_FAILURE, "calloc");
111111

112112
for (i = 0; i < nested; i++) {

tools/perf/util/parse-events.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,7 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state,
16481648
{
16491649
struct parse_events_term *term;
16501650
struct list_head *list = NULL;
1651+
struct list_head *orig_head = NULL;
16511652
struct perf_pmu *pmu = NULL;
16521653
int ok = 0;
16531654
char *config;
@@ -1674,7 +1675,6 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state,
16741675
}
16751676
list_add_tail(&term->list, head);
16761677

1677-
16781678
/* Add it for all PMUs that support the alias */
16791679
list = malloc(sizeof(struct list_head));
16801680
if (!list)
@@ -1687,13 +1687,15 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state,
16871687

16881688
list_for_each_entry(alias, &pmu->aliases, list) {
16891689
if (!strcasecmp(alias->name, str)) {
1690+
parse_events_copy_term_list(head, &orig_head);
16901691
if (!parse_events_add_pmu(parse_state, list,
1691-
pmu->name, head,
1692+
pmu->name, orig_head,
16921693
true, true)) {
16931694
pr_debug("%s -> %s/%s/\n", str,
16941695
pmu->name, alias->str);
16951696
ok++;
16961697
}
1698+
parse_events_terms__delete(orig_head);
16971699
}
16981700
}
16991701
}
@@ -2193,7 +2195,7 @@ int perf_pmu__test_parse_init(void)
21932195
for (i = 0; i < ARRAY_SIZE(symbols); i++, tmp++) {
21942196
tmp->type = symbols[i].type;
21952197
tmp->symbol = strdup(symbols[i].symbol);
2196-
if (!list->symbol)
2198+
if (!tmp->symbol)
21972199
goto err_free;
21982200
}
21992201

0 commit comments

Comments
 (0)