diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-07-21 00:42:31 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-08-05 01:41:52 -0400 |
commit | 5ca27efbd8b4579ef1e54e6c0a4a73dbf7f56a4a (patch) | |
tree | 79d704449cff143010ebd198d1e202f093ede756 | |
parent | 262af557dd750e94adcee3f450782c743f9a92d6 (diff) |
powerpc/powernv: Allow to freeze PE
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>
-rw-r--r-- | arch/powerpc/include/asm/opal.h | 9 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-wrappers.S | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 44e5083bf01a..7f5fd5396261 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h | |||
@@ -147,6 +147,7 @@ struct opal_sg_list { | |||
147 | #define OPAL_SET_PARAM 90 | 147 | #define OPAL_SET_PARAM 90 |
148 | #define OPAL_DUMP_RESEND 91 | 148 | #define OPAL_DUMP_RESEND 91 |
149 | #define OPAL_DUMP_INFO2 94 | 149 | #define OPAL_DUMP_INFO2 94 |
150 | #define OPAL_PCI_EEH_FREEZE_SET 97 | ||
150 | 151 | ||
151 | #ifndef __ASSEMBLY__ | 152 | #ifndef __ASSEMBLY__ |
152 | 153 | ||
@@ -170,7 +171,11 @@ enum OpalFreezeState { | |||
170 | enum OpalEehFreezeActionToken { | 171 | enum OpalEehFreezeActionToken { |
171 | OPAL_EEH_ACTION_CLEAR_FREEZE_MMIO = 1, | 172 | OPAL_EEH_ACTION_CLEAR_FREEZE_MMIO = 1, |
172 | OPAL_EEH_ACTION_CLEAR_FREEZE_DMA = 2, | 173 | OPAL_EEH_ACTION_CLEAR_FREEZE_DMA = 2, |
173 | OPAL_EEH_ACTION_CLEAR_FREEZE_ALL = 3 | 174 | OPAL_EEH_ACTION_CLEAR_FREEZE_ALL = 3, |
175 | |||
176 | OPAL_EEH_ACTION_SET_FREEZE_MMIO = 1, | ||
177 | OPAL_EEH_ACTION_SET_FREEZE_DMA = 2, | ||
178 | OPAL_EEH_ACTION_SET_FREEZE_ALL = 3 | ||
174 | }; | 179 | }; |
175 | 180 | ||
176 | enum OpalPciStatusToken { | 181 | enum OpalPciStatusToken { |
@@ -764,6 +769,8 @@ int64_t opal_pci_eeh_freeze_status(uint64_t phb_id, uint64_t pe_number, | |||
764 | __be64 *phb_status); | 769 | __be64 *phb_status); |
765 | int64_t opal_pci_eeh_freeze_clear(uint64_t phb_id, uint64_t pe_number, | 770 | int64_t opal_pci_eeh_freeze_clear(uint64_t phb_id, uint64_t pe_number, |
766 | uint64_t eeh_action_token); | 771 | uint64_t eeh_action_token); |
772 | int64_t opal_pci_eeh_freeze_set(uint64_t phb_id, uint64_t pe_number, | ||
773 | uint64_t eeh_action_token); | ||
767 | int64_t opal_pci_shpc(uint64_t phb_id, uint64_t shpc_action, uint8_t *state); | 774 | int64_t opal_pci_shpc(uint64_t phb_id, uint64_t shpc_action, uint8_t *state); |
768 | 775 | ||
769 | 776 | ||
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S index 27c40bcf9d12..3dda49957158 100644 --- a/arch/powerpc/platforms/powernv/opal-wrappers.S +++ b/arch/powerpc/platforms/powernv/opal-wrappers.S | |||
@@ -183,6 +183,7 @@ OPAL_CALL(opal_get_xive, OPAL_GET_XIVE); | |||
183 | OPAL_CALL(opal_register_exception_handler, OPAL_REGISTER_OPAL_EXCEPTION_HANDLER); | 183 | OPAL_CALL(opal_register_exception_handler, OPAL_REGISTER_OPAL_EXCEPTION_HANDLER); |
184 | OPAL_CALL(opal_pci_eeh_freeze_status, OPAL_PCI_EEH_FREEZE_STATUS); | 184 | OPAL_CALL(opal_pci_eeh_freeze_status, OPAL_PCI_EEH_FREEZE_STATUS); |
185 | OPAL_CALL(opal_pci_eeh_freeze_clear, OPAL_PCI_EEH_FREEZE_CLEAR); | 185 | OPAL_CALL(opal_pci_eeh_freeze_clear, OPAL_PCI_EEH_FREEZE_CLEAR); |
186 | OPAL_CALL(opal_pci_eeh_freeze_set, OPAL_PCI_EEH_FREEZE_SET); | ||
186 | OPAL_CALL(opal_pci_shpc, OPAL_PCI_SHPC); | 187 | OPAL_CALL(opal_pci_shpc, OPAL_PCI_SHPC); |
187 | OPAL_CALL(opal_pci_phb_mmio_enable, OPAL_PCI_PHB_MMIO_ENABLE); | 188 | OPAL_CALL(opal_pci_phb_mmio_enable, OPAL_PCI_PHB_MMIO_ENABLE); |
188 | OPAL_CALL(opal_pci_set_phb_mem_window, OPAL_PCI_SET_PHB_MEM_WINDOW); | 189 | OPAL_CALL(opal_pci_set_phb_mem_window, OPAL_PCI_SET_PHB_MEM_WINDOW); |