]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.60/perf-fix-invalid-bit-in-diagnostic-entry.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / perf-fix-invalid-bit-in-diagnostic-entry.patch
1 From foo@baz Sat Jul 28 10:25:26 CEST 2018
2 From: Thomas Richter <tmricht@linux.ibm.com>
3 Date: Tue, 8 May 2018 07:53:39 +0200
4 Subject: perf: fix invalid bit in diagnostic entry
5
6 From: Thomas Richter <tmricht@linux.ibm.com>
7
8 [ Upstream commit 3c0a83b14ea71fef5ccc93a3bd2de5f892be3194 ]
9
10 The s390 CPU measurement facility sampling mode supports basic entries
11 and diagnostic entries. Each entry has a valid bit to indicate the
12 status of the entry as valid or invalid.
13
14 This bit is bit 31 in the diagnostic entry, but the bit mask definition
15 refers to bit 30.
16
17 Fix this by making the reserved field one bit larger.
18
19 Fixes: 7e75fc3ff4cf ("s390/cpum_sf: Add raw data sampling to support the diagnostic-sampling function")
20 Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
21 Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
22 Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
23 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 ---
26 arch/s390/include/asm/cpu_mf.h | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29 --- a/arch/s390/include/asm/cpu_mf.h
30 +++ b/arch/s390/include/asm/cpu_mf.h
31 @@ -116,7 +116,7 @@ struct hws_basic_entry {
32
33 struct hws_diag_entry {
34 unsigned int def:16; /* 0-15 Data Entry Format */
35 - unsigned int R:14; /* 16-19 and 20-30 reserved */
36 + unsigned int R:15; /* 16-19 and 20-30 reserved */
37 unsigned int I:1; /* 31 entry valid or invalid */
38 u8 data[]; /* Machine-dependent sample data */
39 } __packed;