From 4183a749ada259c422e003028bebba11ba17ce08 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Tue, 25 Jul 2023 15:06:11 +0930 Subject: pci: Remove MVE opal calls These callbacks were used by the p7ioc code that was removed a long time ago. Add them to the list of removed calls and delete the dead code. Linux has removed the code that called these functions in v6.5-rc1. Signed-off-by: Joel Stanley Signed-off-by: Reza Arbab --- core/pci-opal.c | 36 ----------------------- doc/opal-api/index.rst | 23 ++++++++++++--- doc/opal-api/opal-pci-set-mve-33.rst | 43 ---------------------------- doc/opal-api/opal-pci-set-mve-enable-34.rst | 44 ----------------------------- doc/release-notes/skiboot-7.1.rst | 12 ++++++++ include/pci.h | 6 ---- 6 files changed, 31 insertions(+), 133 deletions(-) delete mode 100644 doc/opal-api/opal-pci-set-mve-33.rst delete mode 100644 doc/opal-api/opal-pci-set-mve-enable-34.rst create mode 100644 doc/release-notes/skiboot-7.1.rst diff --git a/core/pci-opal.c b/core/pci-opal.c index acbcd2a..28b2c84 100644 --- a/core/pci-opal.c +++ b/core/pci-opal.c @@ -307,42 +307,6 @@ static int64_t opal_pci_set_peltv(uint64_t phb_id, uint32_t parent_pe, } opal_call(OPAL_PCI_SET_PELTV, opal_pci_set_peltv, 4); -static int64_t opal_pci_set_mve(uint64_t phb_id, uint32_t mve_number, - uint64_t pe_number) -{ - struct phb *phb = pci_get_phb(phb_id); - int64_t rc; - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->set_mve) - return OPAL_UNSUPPORTED; - phb_lock(phb); - rc = phb->ops->set_mve(phb, mve_number, pe_number); - phb_unlock(phb); - - return rc; -} -opal_call(OPAL_PCI_SET_MVE, opal_pci_set_mve, 3); - -static int64_t opal_pci_set_mve_enable(uint64_t phb_id, uint32_t mve_number, - uint32_t state) -{ - struct phb *phb = pci_get_phb(phb_id); - int64_t rc; - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->set_mve_enable) - return OPAL_UNSUPPORTED; - phb_lock(phb); - rc = phb->ops->set_mve_enable(phb, mve_number, state); - phb_unlock(phb); - - return rc; -} -opal_call(OPAL_PCI_SET_MVE_ENABLE, opal_pci_set_mve_enable, 3); - static int64_t opal_pci_msi_eoi(uint64_t phb_id, uint32_t hwirq) { diff --git a/doc/opal-api/index.rst b/doc/opal-api/index.rst index 6631088..e8196f1 100644 --- a/doc/opal-api/index.rst +++ b/doc/opal-api/index.rst @@ -85,10 +85,6 @@ The OPAL API is the interface between an Operating System and OPAL. +---------------------------------------------+--------------+------------------------+----------+-----------------+ | :ref:`OPAL_PCI_SET_PELTV` | 32 | v1.0 (Initial Release) | POWER8 | | +---------------------------------------------+--------------+------------------------+----------+-----------------+ -| :ref:`OPAL_PCI_SET_MVE` | 33 | v1.0 (Initial Release) | POWER8 | | -+---------------------------------------------+--------------+------------------------+----------+-----------------+ -| :ref:`OPAL_PCI_SET_MVE_ENABLE` | 34 | v1.0 (Initial Release) | POWER8 | | -+---------------------------------------------+--------------+------------------------+----------+-----------------+ | :ref:`OPAL_PCI_GET_XIVE_REISSUE` | 35 | Never | | Never used or | | | | | | Implemented | +---------------------------------------------+--------------+------------------------+----------+-----------------+ @@ -454,6 +450,10 @@ removed and no longer supported. +---------------------------------------------+-------+-----------------------+-----------------------+ | :ref:`OPAL_PCI_EEH_FREEZE_STATUS2` | 61 | v1.0 Initial Release | :ref:`skiboot-6.4` | +---------------------------------------------+-------+-----------------------+-----------------------+ +| :ref:`OPAL_PCI_SET_MVE` | 33 | v1.0 Initial Release | :ref:`skiboot-7.1` | ++---------------------------------------------+--------------+------------------------+----------+----+ +| :ref:`OPAL_PCI_SET_MVE_ENABLE` | 34 | v1.0 Initial Release | :ref:`skiboot-7.1` | ++---------------------------------------------+--------------+------------------------+----------+----+ .. _OPAL_GET_COMPLETION_TOKEN_STATUS: @@ -664,6 +664,21 @@ and bring-up purposes. Support for p5ioc was removed from the Linux kernel in v4.6-rc1. +.. _OPAL_PCI_SET_MVE: + +OPAL_PCI_SET_MVE +^^^^^^^^^^^^^^^^ + +Dead code, as the callback did nothing after the P7IOC code was removed in +skiboot 6.4. Removed in :ref:`skiboot-7.1`. + +.. _OPAL_PCI_SET_MVE_ENABLE: + +OPAL_PCI_SET_MVE_ENABLE +^^^^^^^^^^^^^^^^^^^^^^^ + +Dead code, as the callback did nothing after the P7IOC code was removed in +skiboot 6.4. Removed in :ref:`skiboot-7.1`. Future Calls ------------ diff --git a/doc/opal-api/opal-pci-set-mve-33.rst b/doc/opal-api/opal-pci-set-mve-33.rst deleted file mode 100644 index b0c7e61..0000000 --- a/doc/opal-api/opal-pci-set-mve-33.rst +++ /dev/null @@ -1,43 +0,0 @@ -.. _OPAL_PCI_SET_MVE: - -OPAL_PCI_SET_MVE -================ - -.. code-block:: c - - #define OPAL_PCI_SET_MVE 33 - - int64_t opal_pci_set_mve(uint64_t phb_id, uint32_t mve_number, uint64_t pe_number); - -**WARNING:** following documentation is from old sources, and is possibly -not representative of OPALv3 as implemented by skiboot. This should be -used as a starting point for full documentation. - -The host calls this function to bind a PE to an MSI Validation Table Entry -(MVE) in the PHB. The MVE compares the MSI requester (RID) to a PE RID, -including within the XIVE, to validate that the requester is authorized to -signal an interrupt to the associated DMA address for a message value that -selects a particular XIVE. - -``phb_id`` - is the value from the PHB node ibm,opal-phbid property. - -``mve_number`` - is the index, from 0 to ibm,opal,ibm-num-msi-ports minus1 - -``pe_number`` - is the index of a PE, from 0 to ibm,opal-num-pes minus 1. - -This call maps an MVE to a PE and PE RID domain. OPAL uses the PELT to -determine the PE domain. OPAL treats this call as a NOP for IODA2 PHBs -and returns a status of OPAL_SUCCESS. - - -Return value: - -.. code-block:: c - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->set_mve) - return OPAL_UNSUPPORTED; diff --git a/doc/opal-api/opal-pci-set-mve-enable-34.rst b/doc/opal-api/opal-pci-set-mve-enable-34.rst deleted file mode 100644 index 55bf10a..0000000 --- a/doc/opal-api/opal-pci-set-mve-enable-34.rst +++ /dev/null @@ -1,44 +0,0 @@ -.. _OPAL_PCI_SET_MVE_ENABLE: - -OPAL_PCI_SET_MVE_ENABLE -======================= - - -.. code-block:: c - - #define OPAL_PCI_SET_MVE_ENABLE 34 - - int64_t opal_pci_set_mve_enable(uint64_t phb_id, uint32_t mve_number, uint32_t state); - - enum OpalMveEnableAction { - OPAL_DISABLE_MVE = 0, - OPAL_ENABLE_MVE = 1 - }; - -**WARNING:** following documentation is from old sources, and is possibly -not representative of OPALv3 as implemented by skiboot. This should be -used as a starting point for full documentation. - -The host calls this function to enable or disable an MVE to respond to an MSI -DMA address and message data value. - -``phb_id`` - is the value from the PHB node ibm,opal-phbid property. - -``mve_number`` - is the index, from 0 to ibm,opal,ibm-num-msi-ports minus1 - -``state`` - A '1' value of the state parameter indicates to enable the MVE and a '0' - value indicates to disable the MVE. - -This call sets the MVE to an enabled (1) or disabled (0) state. - -Return value: - -.. code-block:: c - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->set_mve_enable) - return OPAL_UNSUPPORTED; diff --git a/doc/release-notes/skiboot-7.1.rst b/doc/release-notes/skiboot-7.1.rst new file mode 100644 index 0000000..8e37450 --- /dev/null +++ b/doc/release-notes/skiboot-7.1.rst @@ -0,0 +1,12 @@ +.. _skiboot-7.1: + +skiboot-7.1 +=========== + +New Features +------------ +Removed OPAL calls +^^^^^^^^^^^^^^^^^^ +The OPAL_PCI_SET_MVE_ENABLE and OPAL_PCI_SET_MVE calls were removed, as they +were noops. Support for IODA1 and both calls was removed from the Linux kernel +in v6.5-rc1. diff --git a/include/pci.h b/include/pci.h index caae744..59f9fcc 100644 --- a/include/pci.h +++ b/include/pci.h @@ -296,12 +296,6 @@ struct phb_ops { int64_t (*get_option)(struct phb *phb, enum OpalPhbOption opt, __be64 *setting); - int64_t (*set_mve)(struct phb *phb, uint32_t mve_number, - uint64_t pe_number); - - int64_t (*set_mve_enable)(struct phb *phb, uint32_t mve_number, - uint32_t state); - int64_t (*set_xive_pe)(struct phb *phb, uint64_t pe_number, uint32_t xive_num); -- cgit v1.1