Skip to contentSkip to conversation

perf: fix invalid bit in diagnostic entry

PATCH In review Thomas Richter 2 participants 2 messages May 8, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: fix invalid bit in diagnostic entry

The s390 CPU measurement facility sampling mode
supports basic entries and diagnostic entries.
Each entry has a valid bit to indicate the
status of the entry as valid or invalid.

This bit is bit 31 in the diagnostic entry,
but the bit mask definition refers to bit 30.

Fix this by making the reserved field one
bit larger.

Cc [email protected] # v3.14+
Fixes 7e75fc3ff4cf ("s390/cpum_sf: Add raw data sampling to support the diagnostic-sampling function")
---
 arch/s390/include/asm/cpu_mf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/include/asm/cpu_mf.h +1 -1
index f58d17e9dd65..7093a27520ee 100644
@@ -113,7 +113,7 @@ struct hws_basic_entry {
 
 struct hws_diag_entry {
 	unsigned int def:16;	    /* 0-15  Data Entry Format		 */
-	unsigned int R:14;	    /* 16-19 and 20-30 reserved		 */
+	unsigned int R:15;	    /* 16-19 and 20-30 reserved		 */
 	unsigned int I:1;	    /* 31 entry valid or invalid	 */
 	u8	     data[];	    /* Machine-dependent sample data	 */
 } __packed;
Signature · 1 line
2.16.3
#1 lore raw
Quoted 8 lines · Thomas Richter

The s390 CPU measurement facility sampling mode
supports basic entries and diagnostic entries.
Each entry has a valid bit to indicate the
status of the entry as valid or invalid.

This bit is bit 31 in the diagnostic entry,
but the bit mask definition refers to bit 30.

Quoted 7 lines

Fix this by making the reserved field one
bit larger.

Cc [email protected] # v3.14+
Fixes 7e75fc3ff4cf ("s390/cpum_sf: Add raw data sampling to support the diagnostic-sampling function")
                                                  ^^^^

Please remove "vnet" and push to devel. Thanks.