s390/cpum_sf: Rework attribute definition for diagnostic sampling
authorThomas Richter <tmricht@linux.ibm.com>
Thu, 25 Oct 2018 08:04:05 +0000 (09:04 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 2 Nov 2018 07:31:56 +0000 (08:31 +0100)
commitc43e1c5a801fdde1aad0a2f9ed948753b5275d56
treee55e13d0102127478bea85a4049b7ae8dd3a09a5
parente12e4044aede97974f2222eb7f0ed726a5179a32
s390/cpum_sf: Rework attribute definition for diagnostic sampling

Previously, the attribute entry for diagnostic sampling was added
if authorized.  Otherwise, the array of struct attribute contains
two NULL values.

Change this logic and reserve space for the attribute for diagnostic
sampling. If diagnostic sampling is authorized, add an entry in the
respective position in the array of struct attribute.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Suggested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/perf_cpum_sf.c