Skip to content

Commit e4f5714

Browse files
author
Ingo Molnar
committed
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2 parents 754fe00 + 6e948c6 commit e4f5714

File tree

16 files changed

+467
-287
lines changed

16 files changed

+467
-287
lines changed

arch/x86/events/intel/core.c

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3734,6 +3734,19 @@ EVENT_ATTR_STR(cycles-t, cycles_t, "event=0x3c,in_tx=1");
37343734
EVENT_ATTR_STR(cycles-ct, cycles_ct, "event=0x3c,in_tx=1,in_tx_cp=1");
37353735

37363736
static struct attribute *hsw_events_attrs[] = {
3737+
EVENT_PTR(mem_ld_hsw),
3738+
EVENT_PTR(mem_st_hsw),
3739+
EVENT_PTR(td_slots_issued),
3740+
EVENT_PTR(td_slots_retired),
3741+
EVENT_PTR(td_fetch_bubbles),
3742+
EVENT_PTR(td_total_slots),
3743+
EVENT_PTR(td_total_slots_scale),
3744+
EVENT_PTR(td_recovery_bubbles),
3745+
EVENT_PTR(td_recovery_bubbles_scale),
3746+
NULL
3747+
};
3748+
3749+
static struct attribute *hsw_tsx_events_attrs[] = {
37373750
EVENT_PTR(tx_start),
37383751
EVENT_PTR(tx_commit),
37393752
EVENT_PTR(tx_abort),
@@ -3746,18 +3759,16 @@ static struct attribute *hsw_events_attrs[] = {
37463759
EVENT_PTR(el_conflict),
37473760
EVENT_PTR(cycles_t),
37483761
EVENT_PTR(cycles_ct),
3749-
EVENT_PTR(mem_ld_hsw),
3750-
EVENT_PTR(mem_st_hsw),
3751-
EVENT_PTR(td_slots_issued),
3752-
EVENT_PTR(td_slots_retired),
3753-
EVENT_PTR(td_fetch_bubbles),
3754-
EVENT_PTR(td_total_slots),
3755-
EVENT_PTR(td_total_slots_scale),
3756-
EVENT_PTR(td_recovery_bubbles),
3757-
EVENT_PTR(td_recovery_bubbles_scale),
37583762
NULL
37593763
};
37603764

3765+
static __init struct attribute **get_hsw_events_attrs(void)
3766+
{
3767+
return boot_cpu_has(X86_FEATURE_RTM) ?
3768+
merge_attr(hsw_events_attrs, hsw_tsx_events_attrs) :
3769+
hsw_events_attrs;
3770+
}
3771+
37613772
static ssize_t freeze_on_smi_show(struct device *cdev,
37623773
struct device_attribute *attr,
37633774
char *buf)
@@ -4186,7 +4197,7 @@ __init int intel_pmu_init(void)
41864197

41874198
x86_pmu.hw_config = hsw_hw_config;
41884199
x86_pmu.get_event_constraints = hsw_get_event_constraints;
4189-
x86_pmu.cpu_events = hsw_events_attrs;
4200+
x86_pmu.cpu_events = get_hsw_events_attrs();
41904201
x86_pmu.lbr_double_abort = true;
41914202
extra_attr = boot_cpu_has(X86_FEATURE_RTM) ?
41924203
hsw_format_attr : nhm_format_attr;
@@ -4225,7 +4236,7 @@ __init int intel_pmu_init(void)
42254236

42264237
x86_pmu.hw_config = hsw_hw_config;
42274238
x86_pmu.get_event_constraints = hsw_get_event_constraints;
4228-
x86_pmu.cpu_events = hsw_events_attrs;
4239+
x86_pmu.cpu_events = get_hsw_events_attrs();
42294240
x86_pmu.limit_period = bdw_limit_period;
42304241
extra_attr = boot_cpu_has(X86_FEATURE_RTM) ?
42314242
hsw_format_attr : nhm_format_attr;
@@ -4283,7 +4294,7 @@ __init int intel_pmu_init(void)
42834294
extra_attr = boot_cpu_has(X86_FEATURE_RTM) ?
42844295
hsw_format_attr : nhm_format_attr;
42854296
extra_attr = merge_attr(extra_attr, skl_format_attr);
4286-
x86_pmu.cpu_events = hsw_events_attrs;
4297+
x86_pmu.cpu_events = get_hsw_events_attrs();
42874298
intel_pmu_pebs_data_source_skl(
42884299
boot_cpu_data.x86_model == INTEL_FAM6_SKYLAKE_X);
42894300
pr_cont("Skylake events, ");

kernel/events/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6680,6 +6680,7 @@ static void perf_fill_ns_link_info(struct perf_ns_link_info *ns_link_info,
66806680
ns_inode = ns_path.dentry->d_inode;
66816681
ns_link_info->dev = new_encode_dev(ns_inode->i_sb->s_dev);
66826682
ns_link_info->ino = ns_inode->i_ino;
6683+
path_put(&ns_path);
66836684
}
66846685
}
66856686

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ struct kvm_arch_memory_slot {
152152
(__ARM_CP15_REG(op1, 0, crm, 0) | KVM_REG_SIZE_U64)
153153
#define ARM_CP15_REG64(...) __ARM_CP15_REG64(__VA_ARGS__)
154154

155+
/* PL1 Physical Timer Registers */
156+
#define KVM_REG_ARM_PTIMER_CTL ARM_CP15_REG32(0, 14, 2, 1)
157+
#define KVM_REG_ARM_PTIMER_CNT ARM_CP15_REG64(0, 14)
158+
#define KVM_REG_ARM_PTIMER_CVAL ARM_CP15_REG64(2, 14)
159+
160+
/* Virtual Timer Registers */
155161
#define KVM_REG_ARM_TIMER_CTL ARM_CP15_REG32(0, 14, 3, 1)
156162
#define KVM_REG_ARM_TIMER_CNT ARM_CP15_REG64(1, 14)
157163
#define KVM_REG_ARM_TIMER_CVAL ARM_CP15_REG64(3, 14)
@@ -216,6 +222,7 @@ struct kvm_arch_memory_slot {
216222
#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
217223
#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
218224
#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
225+
#define KVM_DEV_ARM_ITS_CTRL_RESET 4
219226

220227
/* KVM_IRQ_LINE irq field index values */
221228
#define KVM_ARM_IRQ_TYPE_SHIFT 24

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ struct kvm_arch_memory_slot {
196196

197197
#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64)
198198

199+
/* Physical Timer EL0 Registers */
200+
#define KVM_REG_ARM_PTIMER_CTL ARM64_SYS_REG(3, 3, 14, 2, 1)
201+
#define KVM_REG_ARM_PTIMER_CVAL ARM64_SYS_REG(3, 3, 14, 2, 2)
202+
#define KVM_REG_ARM_PTIMER_CNT ARM64_SYS_REG(3, 3, 14, 0, 1)
203+
204+
/* EL0 Virtual Timer Registers */
199205
#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1)
200206
#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2)
201207
#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2)
@@ -228,6 +234,7 @@ struct kvm_arch_memory_slot {
228234
#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
229235
#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
230236
#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3
237+
#define KVM_DEV_ARM_ITS_CTRL_RESET 4
231238

232239
/* Device Control API on vcpu fd */
233240
#define KVM_ARM_VCPU_PMU_V3_CTRL 0

0 commit comments

Comments
 (0)