]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/xmon: Check before calling xive functions
authorBreno Leitao <leitao@debian.org>
Tue, 17 Oct 2017 18:20:18 +0000 (16:20 -0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 22 Oct 2017 10:08:31 +0000 (12:08 +0200)
commit7cb2e61f49ec26e41677240cddc4fe9b09de7d01
treef441068833c65225faa134006b5a45053b77eda0
parent2ca4f6801a3c924b8449d3ad12b9e6f3adb7a23b
powerpc/xmon: Check before calling xive functions

Currently xmon could call XIVE functions from OPAL even if the XIVE is
disabled or does not exist in the system, as in POWER8 machines. This
causes the following exception:

 1:mon> dx
 cpu 0x1: Vector: 700 (Program Check) at [c000000423c93450]
     pc: c00000000009cfa4: opal_xive_dump+0x50/0x68
     lr: c0000000000997b8: opal_return+0x0/0x50

This patch simply checks if XIVE is enabled before calling XIVE
functions.

Fixes: 4e9a0fc0cbad ("powerpc/xive: Native exploitation of the XIVE interrupt controller")
Suggested-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/xmon/xmon.c