linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/14] powerpc/powernv: Add XICS emulation APIs
@ 2016-07-08  6:37 Benjamin Herrenschmidt
  2016-07-08  6:37 ` [PATCH 02/14] powerpc/irq: Add support for HV virtualization interrupts Benjamin Herrenschmidt
                   ` (14 more replies)
  0 siblings, 15 replies; 20+ messages in thread
From: Benjamin Herrenschmidt @ 2016-07-08  6:37 UTC (permalink / raw)
  To: linuxppc-dev

OPAL provides an emulated XICS interrupt controller to
use as a fallback on newer processors that don't have a
XICS. It's meant as a way to provide backward compatibility
with future processors. Add the corresponding interfaces.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/opal-api.h            | 6 +++++-
 arch/powerpc/include/asm/opal.h                | 5 +++++
 arch/powerpc/platforms/powernv/opal-wrappers.S | 4 ++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h
index 72b5f27..170ba0c 100644
--- a/arch/powerpc/include/asm/opal-api.h
+++ b/arch/powerpc/include/asm/opal-api.h
@@ -162,7 +162,11 @@
 #define OPAL_PCI_GET_PRESENCE_STATE		119
 #define OPAL_PCI_GET_POWER_STATE		120
 #define OPAL_PCI_SET_POWER_STATE		121
-#define OPAL_LAST				121
+#define OPAL_INT_GET_XIRR			122
+#define	OPAL_INT_SET_CPPR			123
+#define OPAL_INT_EOI				124
+#define OPAL_INT_SET_MFRR			125
+#define OPAL_LAST				125
 
 /* Device tree flags */
 
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index 3b369e9..42f0c95 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -218,6 +218,11 @@ int64_t opal_pci_set_power_state(uint64_t async_token, uint64_t id,
 				 uint64_t data);
 int64_t opal_pci_poll2(uint64_t id, uint64_t data);
 
+int64_t opal_int_get_xirr(uint32_t *out_xirr, bool just_poll);
+int64_t opal_int_set_cppr(uint8_t cppr);
+int64_t opal_int_eoi(uint32_t xirr);
+int64_t opal_int_set_mfrr(uint32_t cpu, uint8_t mfrr);
+
 /* Internal functions */
 extern int early_init_dt_scan_opal(unsigned long node, const char *uname,
 				   int depth, void *data);
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
index 7979d6d..c7764f9 100644
--- a/arch/powerpc/platforms/powernv/opal-wrappers.S
+++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
@@ -307,3 +307,7 @@ OPAL_CALL(opal_get_device_tree,			OPAL_GET_DEVICE_TREE);
 OPAL_CALL(opal_pci_get_presence_state,		OPAL_PCI_GET_PRESENCE_STATE);
 OPAL_CALL(opal_pci_get_power_state,		OPAL_PCI_GET_POWER_STATE);
 OPAL_CALL(opal_pci_set_power_state,		OPAL_PCI_SET_POWER_STATE);
+OPAL_CALL(opal_int_get_xirr,			OPAL_INT_GET_XIRR);
+OPAL_CALL(opal_int_set_cppr,			OPAL_INT_SET_CPPR);
+OPAL_CALL(opal_int_eoi,				OPAL_INT_EOI);
+OPAL_CALL(opal_int_set_mfrr,			OPAL_INT_SET_MFRR);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-07-17 10:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-08  6:37 [PATCH 01/14] powerpc/powernv: Add XICS emulation APIs Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 02/14] powerpc/irq: Add support for HV virtualization interrupts Benjamin Herrenschmidt
2016-07-16 10:40   ` Michael Ellerman
2016-07-16 21:33     ` Benjamin Herrenschmidt
2016-07-16 22:55       ` Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 03/14] powerpc/irq: Add mechanism to force a replay of interrupts Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 04/14] powerpc/xics: Add ICP OPAL backend Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 05/14] powerpc/powernv: Discover IODA3 PHBs Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 06/14] powerpc/pseries/pci: Remove obsolete SW invalidate Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 07/14] powerpc/opal: Add real mode call wrappers Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 08/14] powerpc/powernv/pci: Rename TCE invalidation calls Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 09/14] powerpc/powernv/pci: Remove SWINV constants and obsolete TCE code Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 10/14] powerpc/powernv/pci: Rework accessing the TCE invalidate register Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 11/14] powerpc/powernv/pci: Fallback to OPAL for TCE invalidations Benjamin Herrenschmidt
2016-07-08  8:28   ` [PATCH v2 " Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 12/14] powerpc/powernv/pci: Use the device-tree to get available range of M64's Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 13/14] powerpc/powernv/pci: Check status of a PHB before using it Benjamin Herrenschmidt
2016-07-08  6:37 ` [PATCH 14/14] powerpc/pci: Don't try to allocate resources that will be reassigned Benjamin Herrenschmidt
2016-07-12  6:52 ` [PATCH 01/14] powerpc/powernv: Add XICS emulation APIs Stewart Smith
2016-07-17 10:28 ` [01/14] " Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).