powerpc/powernv: Allow to freeze PE
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Mon, 21 Jul 2014 04:42:31 +0000 (14:42 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 5 Aug 2014 05:41:52 +0000 (15:41 +1000)
The patch synchronizes header file with firmware to have new OPAL
API opal_pci_eeh_freeze_set(), which is used to freeze the specified
PE in order to support "compound" PE.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/opal.h
arch/powerpc/platforms/powernv/opal-wrappers.S

index 44e5083bf01acab60c6e830fedba1d3802b68a9a..7f5fd5396261b5877acbb62884568d644e6f58a9 100644 (file)
@@ -147,6 +147,7 @@ struct opal_sg_list {
 #define OPAL_SET_PARAM                         90
 #define OPAL_DUMP_RESEND                       91
 #define OPAL_DUMP_INFO2                                94
+#define OPAL_PCI_EEH_FREEZE_SET                        97
 
 #ifndef __ASSEMBLY__
 
@@ -170,7 +171,11 @@ enum OpalFreezeState {
 enum OpalEehFreezeActionToken {
        OPAL_EEH_ACTION_CLEAR_FREEZE_MMIO = 1,
        OPAL_EEH_ACTION_CLEAR_FREEZE_DMA = 2,
-       OPAL_EEH_ACTION_CLEAR_FREEZE_ALL = 3
+       OPAL_EEH_ACTION_CLEAR_FREEZE_ALL = 3,
+
+       OPAL_EEH_ACTION_SET_FREEZE_MMIO = 1,
+       OPAL_EEH_ACTION_SET_FREEZE_DMA  = 2,
+       OPAL_EEH_ACTION_SET_FREEZE_ALL  = 3
 };
 
 enum OpalPciStatusToken {
@@ -764,6 +769,8 @@ int64_t opal_pci_eeh_freeze_status(uint64_t phb_id, uint64_t pe_number,
                                   __be64 *phb_status);
 int64_t opal_pci_eeh_freeze_clear(uint64_t phb_id, uint64_t pe_number,
                                  uint64_t eeh_action_token);
+int64_t opal_pci_eeh_freeze_set(uint64_t phb_id, uint64_t pe_number,
+                               uint64_t eeh_action_token);
 int64_t opal_pci_shpc(uint64_t phb_id, uint64_t shpc_action, uint8_t *state);
 
 
index 27c40bcf9d1260be71042c57ad29c48a82028de5..3dda499571582dcf6518c8130f317e386d4d5efc 100644 (file)
@@ -183,6 +183,7 @@ OPAL_CALL(opal_get_xive,                    OPAL_GET_XIVE);
 OPAL_CALL(opal_register_exception_handler,     OPAL_REGISTER_OPAL_EXCEPTION_HANDLER);
 OPAL_CALL(opal_pci_eeh_freeze_status,          OPAL_PCI_EEH_FREEZE_STATUS);
 OPAL_CALL(opal_pci_eeh_freeze_clear,           OPAL_PCI_EEH_FREEZE_CLEAR);
+OPAL_CALL(opal_pci_eeh_freeze_set,             OPAL_PCI_EEH_FREEZE_SET);
 OPAL_CALL(opal_pci_shpc,                       OPAL_PCI_SHPC);
 OPAL_CALL(opal_pci_phb_mmio_enable,            OPAL_PCI_PHB_MMIO_ENABLE);
 OPAL_CALL(opal_pci_set_phb_mem_window,         OPAL_PCI_SET_PHB_MEM_WINDOW);