mbox series

[00/11] powerpc/xive: Improve diagnostic and activate StoreEOI on P10 PowerNV

Message ID 20211105102636.1016378-1-clg@kaod.org (mailing list archive)
Headers show
Series powerpc/xive: Improve diagnostic and activate StoreEOI on P10 PowerNV | expand

Message

Cédric Le Goater Nov. 5, 2021, 10:26 a.m. UTC
Hello,

This series tries to improve diagnostic support in the XIVE driver. It
adds pr_debug() primitives that can be activated at run-time and changes
the debugfs xive entry to expose more information :

  /sys/kernel/debug/powerpc/xive/
    ├── eqs/
    │   ├── cpu0
    │   ├── cpu1
    │   ├── cpu2
    .   .
    │   └── cpu99
    ├── interrupts
    ├── ipis
    ├── save-restore
    └── store-eoi

It also introduces 2 new kernel parameters :

    xive.store-eoi=off   to deactivate StoreEOI at boot but it still be
    			 reactivated through sysfs.
			 
    doorbell=off         to deactivate doorbells for CPU IPIs
                         and XIVE instead

The first is a workaround in case of a FW advertising the wrong
feature. It can be used to check performance also. The second is for
PowerVM development and tests when the LP-per-thread mode is
activated. Doorbells cannot be used in that case.

Finally, it activates StoreEOI support for the PowerNV platform. OPAL
for P10 has been released and we are free to use this extension.

Thanks,

C.


Cédric Le Goater (11):
  powerpc/xive: Replace pr_devel() by pr_debug() to ease debug
  powerpc/xive: Introduce an helper to print out interrupt
    characteristics
  powerpc/xive: Activate StoreEOI on P10
  powerpc/xive: Introduce xive_core_debugfs_create()
  powerpc/xive: Change the debugfs file 'xive' into a directory
  powerpc/xive: Rename the 'cpus' debugfs file to 'ipis'
  powerpc/xive: Add a debugfs file to dump EQs
  powerpc/xive: Add a debugfs toggle for StoreEOI
  powerpc/xive: Add a kernel parameter for StoreEOI
  powerpc/xive: Add a debugfs toggle for save-restore
  powerpc/smp: Add a doorbell=off kernel parameter

 arch/powerpc/include/asm/dbell.h              |   1 +
 arch/powerpc/include/asm/opal-api.h           |   1 +
 arch/powerpc/sysdev/xive/xive-internal.h      |   1 +
 arch/powerpc/kernel/dbell.c                   |  17 ++
 arch/powerpc/platforms/powernv/smp.c          |   7 +-
 arch/powerpc/platforms/pseries/smp.c          |   3 +
 arch/powerpc/sysdev/xive/common.c             | 211 ++++++++++++------
 arch/powerpc/sysdev/xive/native.c             |   4 +-
 arch/powerpc/sysdev/xive/spapr.c              |  38 ++--
 .../admin-guide/kernel-parameters.txt         |  16 ++
 10 files changed, 209 insertions(+), 90 deletions(-)

Comments

Michael Ellerman Nov. 25, 2021, 9:36 a.m. UTC | #1
On Fri, 5 Nov 2021 11:26:25 +0100, Cédric Le Goater wrote:
> This series tries to improve diagnostic support in the XIVE driver. It
> adds pr_debug() primitives that can be activated at run-time and changes
> the debugfs xive entry to expose more information :
> 
>   /sys/kernel/debug/powerpc/xive/
>     ├── eqs/
>     │   ├── cpu0
>     │   ├── cpu1
>     │   ├── cpu2
>     .   .
>     │   └── cpu99
>     ├── interrupts
>     ├── ipis
>     ├── save-restore
>     └── store-eoi
> 
> [...]

Patches 1-10 applied to powerpc/next.

[01/11] powerpc/xive: Replace pr_devel() by pr_debug() to ease debug
        https://git.kernel.org/powerpc/c/44b9c8ddcbc351d47ead974f0870d09bfc74b3f7
[02/11] powerpc/xive: Introduce an helper to print out interrupt characteristics
        https://git.kernel.org/powerpc/c/bd5b00c6cf0c37fce1bcd94390044d7e1dd638e7
[03/11] powerpc/xive: Activate StoreEOI on P10
        https://git.kernel.org/powerpc/c/756c52c632f5c2b054bb54b1ea9177329e4b8ce5
[04/11] powerpc/xive: Introduce xive_core_debugfs_create()
        https://git.kernel.org/powerpc/c/412877dfae3dc12733bc711ccbd3d02338803865
[05/11] powerpc/xive: Change the debugfs file 'xive' into a directory
        https://git.kernel.org/powerpc/c/baed14de78b5ee3ca04eae43c5b16e3eeb6e33a8
[06/11] powerpc/xive: Rename the 'cpus' debugfs file to 'ipis'
        https://git.kernel.org/powerpc/c/33e1d4a152ce55272b54a16884461218d12d4f1b
[07/11] powerpc/xive: Add a debugfs file to dump EQs
        https://git.kernel.org/powerpc/c/08f3f610214f395561bbda03344e641579f6e917
[08/11] powerpc/xive: Add a debugfs toggle for StoreEOI
        https://git.kernel.org/powerpc/c/d7bc1e376cb786e9e8483455584d89cad4b5808f
[09/11] powerpc/xive: Add a kernel parameter for StoreEOI
        https://git.kernel.org/powerpc/c/c21ee04f11ae068aa132cce56d09f618d4a66259
[10/11] powerpc/xive: Add a debugfs toggle for save-restore
        https://git.kernel.org/powerpc/c/1e7684dc4fc70271c8bf86d397bd4fbfb3581e65

cheers