powerpc/xics: Add ICP OPAL backend

This adds a new XICS backend that uses OPAL calls, which can be
used when we don't have native support for the platform interrupt
controller.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Benjamin Herrenschmidt
2016-07-08 16:37:08 +10:00
committed by Michael Ellerman
parent 1d607bb3bd
commit d74361881f
4 changed files with 155 additions and 2 deletions

View File

@@ -404,8 +404,11 @@ void __init xics_init(void)
/* Fist locate ICP */
if (firmware_has_feature(FW_FEATURE_LPAR))
rc = icp_hv_init();
if (rc < 0)
if (rc < 0) {
rc = icp_native_init();
if (rc == -ENODEV)
rc = icp_opal_init();
}
if (rc < 0) {
pr_warning("XICS: Cannot find a Presentation Controller !\n");
return;