diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2019-05-31 16:13:21 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-06-03 10:20:00 +1000 |
commit | a98ca2e80d49e398ecf17168e0211c1887b5c1c3 (patch) | |
tree | 2ff97a811d95e1f1c0a745ad7ee6910515a9e00d | |
parent | fb0bd9be4132271376f60ac5e434553b593ac481 (diff) | |
download | skiboot-a98ca2e80d49e398ecf17168e0211c1887b5c1c3.zip skiboot-a98ca2e80d49e398ecf17168e0211c1887b5c1c3.tar.gz skiboot-a98ca2e80d49e398ecf17168e0211c1887b5c1c3.tar.bz2 |
Remove unused OPAL_GET_XIVE_SOURCE
While this call was technically implemented by skiboot, no code has ever called
it, and it was only ever implemented for the p7ioc-phb back-end (i.e. POWER7).
Since this call was unused in Linux, and that POWER7 with OPAL was only ever
available internally, so it should be safe to remove the call.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r-- | core/pci-opal.c | 21 | ||||
-rw-r--r-- | doc/opal-api/index.rst | 16 | ||||
-rw-r--r-- | doc/opal-api/opal-get-xive-source-38.rst | 32 | ||||
-rw-r--r-- | hw/p7ioc-phb.c | 14 | ||||
-rw-r--r-- | include/pci.h | 3 |
5 files changed, 15 insertions, 71 deletions
diff --git a/core/pci-opal.c b/core/pci-opal.c index 2d21786..043d948 100644 --- a/core/pci-opal.c +++ b/core/pci-opal.c @@ -378,27 +378,6 @@ static int64_t opal_pci_set_xive_pe(uint64_t phb_id, uint64_t pe_number, } opal_call(OPAL_PCI_SET_XIVE_PE, opal_pci_set_xive_pe, 3); -static int64_t opal_get_xive_source(uint64_t phb_id, uint32_t xive_num, - int32_t *interrupt_source_number) -{ - struct phb *phb = pci_get_phb(phb_id); - int64_t rc; - - if (!opal_addr_valid(interrupt_source_number)) - return OPAL_PARAMETER; - - if (!phb) - return OPAL_PARAMETER; - if (!phb->ops->get_xive_source) - return OPAL_UNSUPPORTED; - phb_lock(phb); - rc = phb->ops->get_xive_source(phb, xive_num, interrupt_source_number); - phb_unlock(phb); - - return rc; -} -opal_call(OPAL_GET_XIVE_SOURCE, opal_get_xive_source, 3); - static int64_t opal_get_msi_32(uint64_t phb_id, uint32_t mve_number, uint32_t xive_num, uint8_t msi_range, uint32_t *msi_address, uint32_t *message_data) diff --git a/doc/opal-api/index.rst b/doc/opal-api/index.rst index 1c9af39..d0e6483 100644 --- a/doc/opal-api/index.rst +++ b/doc/opal-api/index.rst @@ -97,7 +97,8 @@ The OPAL API is the interface between an Operating System and OPAL. +---------------------------------------------+--------------+------------------------+----------+-----------------+ | :ref:`OPAL_PCI_SET_XIVE_PE` | 37 | v1.0 (Initial Release) | POWER8 | | +---------------------------------------------+--------------+------------------------+----------+-----------------+ -| :ref:`OPAL_GET_XIVE_SOURCE` | 38 | v1.0 (Initial Release) | POWER8 | | +| :ref:`OPAL_GET_XIVE_SOURCE` | 38 | v1.0 (Initial Release) | POWER8 | Never used, | +| | | | | now removed. | +---------------------------------------------+--------------+------------------------+----------+-----------------+ | :ref:`OPAL_GET_MSI_32` | 39 | v1.0 (Initial Release) | POWER8 | | +---------------------------------------------+--------------+------------------------+----------+-----------------+ @@ -396,6 +397,8 @@ removed and no longer supported. +---------------------------------------------+-------+-----------------------+-----------------------+ | :ref:`OPAL_PCI_GET_XIVE_REISSUE` | 36 | Never | | +---------------------------------------------+-------+-----------------------+-----------------------+ +| :ref:`OPAL_GET_XIVE_SOURCE` | 38 | v1.0 Initial Release | :ref:`skiboot-6.4` | ++---------------------------------------------+-------+-----------------------+-----------------------+ | :ref:`OPAL_WRITE_OPPANEL` | 43 | pre-v1.0 | pre-v1.0 | +---------------------------------------------+-------+-----------------------+-----------------------+ | :ref:`OPAL_OLD_I2C_REQUEST` | 106 | v4.0 | v4.0 | @@ -454,6 +457,17 @@ A remnant of something prior to OPALv3. Never implemented in skiboot and never used by anyone. Returend :ref:`OPAL_UNSUPPORTED` until :ref:`skiboot-6.4`, where it was removed. +.. _OPAL_GET_XIVE_SOURCE: + +OPAL_GET_XIVE_SOURCE +^^^^^^^^^^^^^^^^^^^^ + +While this call was technically implemented by skiboot, no code has ever called +it, and it was only ever implemented for the p7ioc-phb back-end (i.e. POWER7). +Since this call was unused in Linux, and that POWER7 with OPAL was only ever +available internally, it was determined that it was safe to remove this call as +of :ref:`skiboot-6.4`. + .. _OPAL_WRITE_OPPANEL: OPAL_WRITE_OPPANEL diff --git a/doc/opal-api/opal-get-xive-source-38.rst b/doc/opal-api/opal-get-xive-source-38.rst deleted file mode 100644 index 2989c80..0000000 --- a/doc/opal-api/opal-get-xive-source-38.rst +++ /dev/null @@ -1,32 +0,0 @@ -OPAL_GET_XIVE_SOURCE -==================== -:: - - This function validates the given ``xive_num`` and sets the - ``interrupt_source_number``. Then returns the proper return code. - -Parameters ----------- - -``phb_id`` - The ``phb_id`` parameter is the value from the PHB node ``ibm,opal-phbid`` - property. - -``xive_num`` - The ``xive_num`` is the index of an XIVE that corresponds to a particular - interrupt. - -``interrupt_source_number`` - The ``interrupt_source_number`` is a value formed by the combination of the - device tree MSI property base BUID and ``xive_num`` - -Return Codes ------------- -``OPAL_PARAMETER`` - The indicated ``phb_id`` not found - -``OPAL_UNSUPPORTED`` - Presence retrieval not supported on the ``phb_id`` - -``OPAL_SUCCESS`` - Indicates Success! diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c index 47f4f3c..97730a0 100644 --- a/hw/p7ioc-phb.c +++ b/hw/p7ioc-phb.c @@ -1312,19 +1312,6 @@ static int64_t p7ioc_set_xive_pe(struct phb *phb, uint64_t pe_number, return OPAL_SUCCESS; } -static int64_t p7ioc_get_xive_source(struct phb *phb, uint32_t xive_num, - int32_t *interrupt_source_number) -{ - struct p7ioc_phb *p = phb_to_p7ioc_phb(phb); - - if (xive_num > 255 || !interrupt_source_number) - return OPAL_PARAMETER; - - *interrupt_source_number = (p->buid_msi << 4) | xive_num; - - return OPAL_SUCCESS; -} - static int64_t p7ioc_get_msi_32(struct phb *phb __unused, uint64_t mve_number, uint32_t xive_num, uint8_t msi_range, uint32_t *msi_address, uint32_t *message_data) @@ -2330,7 +2317,6 @@ static const struct phb_ops p7ioc_phb_ops = { .set_mve = p7ioc_set_mve, .set_mve_enable = p7ioc_set_mve_enable, .set_xive_pe = p7ioc_set_xive_pe, - .get_xive_source = p7ioc_get_xive_source, .get_msi_32 = p7ioc_get_msi_32, .get_msi_64 = p7ioc_get_msi_64, .ioda_reset = p7ioc_ioda_reset, diff --git a/include/pci.h b/include/pci.h index cf06dc3..b63b119 100644 --- a/include/pci.h +++ b/include/pci.h @@ -321,9 +321,6 @@ struct phb_ops { int64_t (*set_xive_pe)(struct phb *phb, uint64_t pe_number, uint32_t xive_num); - int64_t (*get_xive_source)(struct phb *phb, uint32_t xive_num, - int32_t *interrupt_source_number); - int64_t (*get_msi_32)(struct phb *phb, uint64_t mve_number, uint32_t xive_num, uint8_t msi_range, uint32_t *msi_address, uint32_t *message_data); |