Skip to content

Commit 745f5d2

Browse files
Thomas Richterhcahca
authored andcommitted
s390/cpumf: Support for CPU Measurement Sampling Facility LS bit
Adds support for the CPU Measurement Sampling Facility limit sampling bit in the sampling device driver. Limited samples have no valueable information are not collected. Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent a87b0fd commit 745f5d2

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

arch/s390/include/asm/cpu_mf.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ struct hws_basic_entry {
109109
unsigned int AS:2; /* 29-30 PSW address-space control */
110110
unsigned int I:1; /* 31 entry valid or invalid */
111111
unsigned int CL:2; /* 32-33 Configuration Level */
112-
unsigned int:14;
112+
unsigned int H:1; /* 34 Host Indicator */
113+
unsigned int LS:1; /* 35 Limited Sampling */
114+
unsigned int:12;
113115
unsigned int prim_asn:16; /* primary ASN */
114116
unsigned long long ia; /* Instruction Address */
115117
unsigned long long gpp; /* Guest Program Parameter */

arch/s390/kernel/perf_cpum_sf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ static void hw_collect_samples(struct perf_event *event, unsigned long *sdbt,
11791179
sample = (struct hws_basic_entry *) *sdbt;
11801180
while ((unsigned long *) sample < (unsigned long *) te) {
11811181
/* Check for an empty sample */
1182-
if (!sample->def)
1182+
if (!sample->def || sample->LS)
11831183
break;
11841184

11851185
/* Update perf event period */

0 commit comments

Comments
 (0)