summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/perf_regs.c
AgeCommit message (Collapse)AuthorFilesLines
2018-07-02s390/perf: fix gcc 8 array-bounds warningVasily Gorbik1-4/+2
arch/s390/kernel/perf_regs.c:36:19: warning: array subscript 16 is above array bounds of 'long unsigned int[16]' [-Warray-bounds] return regs->gprs[idx]; gcc tries to be smart here and since there is a condition: if (idx >= PERF_REG_S390_R0 && idx <= PERF_REG_S390_R15) return regs->gprs[idx]; which covers all possible array subscripts, it gives the warning for the last function return statement: return regs->gprs[idx]; which in presence of that condition does not really make sense and should be replaced with "return 0;" Also move WARN_ON_ONCE((u32)idx >= PERF_REG_S390_MAX) to the end of the function. Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-12-05s390: add a few more SPDX identifiersMartin Schwidefsky1-0/+1
Add the correct SPDX license to a few more files under arch/s390 and drivers/s390 which have been missed to far. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-11-16s390/perf: extend perf_regs support to include floating-point registersHendrik Brueckner1-0/+21
Extend the perf register support to also export floating-point register contents for user space tasks. Floating-point registers might be used in leaf functions to contain the return address. Hence, they are required for proper DWARF unwinding. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Reviewed-and-tested-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-11-16s390/perf: add perf_regs support and user stack dumpHeiko Carstens1-0/+49
Add s390 support to dump user stack to user space for DWARF stack unwinding. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Reviewed-and-tested-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>