powerpc/xive: Fix compile when !CONFIG_PPC_POWERNV.

The automatic "save & restore" of interrupt context is a POWER10/XIVE2
feature exploited by KVM under the PowerNV platform. It is not
available under pSeries and the associated toggle should not be
exposed under the XIVE debugfs directory.

Introduce a platform handler for debugfs initialization and move the
'save-restore' entry under the native (PowerNV) backend to fix compile
when !CONFIG_PPC_POWERNV.

Fixes: 1e7684dc4f ("powerpc/xive: Add a debugfs toggle for save-restore")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211201165418.1041842-1-clg@kaod.org
This commit is contained in:
Cédric Le Goater
2021-12-01 17:54:18 +01:00
committed by Michael Ellerman
parent 62ea67e319
commit 2a2ac8a701
3 changed files with 15 additions and 1 deletions

View File

@@ -1847,7 +1847,9 @@ static void xive_core_debugfs_create(void)
&xive_eq_debug_fops);
}
debugfs_create_bool("store-eoi", 0600, xive_dir, &xive_store_eoi);
debugfs_create_bool("save-restore", 0600, xive_dir, &xive_has_save_restore);
if (xive_ops->debug_create)
xive_ops->debug_create(xive_dir);
}
#else
static inline void xive_core_debugfs_create(void) { }