diff mbox series

[037/110] Remove remnants of OPAL_PCI_SET_PHB_TCE_MEMORY

Message ID 20190531061351.22973-38-stewart@linux.ibm.com
State Accepted
Headers show
Series Big documentation cleanup/expansion | expand

Commit Message

Stewart Smith May 31, 2019, 6:12 a.m. UTC
There's no reason we need remnants hanging around that aren't used, so
remove them and save a handful of bytes at runtime.

Simultaneously, document the OPAL call removal.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 core/pci-opal.c        | 12 +++---------
 doc/opal-api/index.rst | 32 ++++++++++++++++++++++++++++++--
 include/pci.h          |  6 ------
 3 files changed, 33 insertions(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/core/pci-opal.c b/core/pci-opal.c
index d7abb15b2bad..a52b02a9d845 100644
--- a/core/pci-opal.c
+++ b/core/pci-opal.c
@@ -861,21 +861,15 @@  static int64_t opal_pci_set_power_state(uint64_t async_token,
 opal_call(OPAL_PCI_SET_POWER_STATE, opal_pci_set_power_state, 3);
 
 static int64_t opal_pci_set_phb_tce_memory(uint64_t phb_id,
-					   uint64_t tce_mem_addr,
-					   uint64_t tce_mem_size)
+					   uint64_t tce_mem_addr __unused,
+					   uint64_t tce_mem_size __unused)
 {
 	struct phb *phb = pci_get_phb(phb_id);
-	int64_t rc;
 
 	if (!phb)
 		return OPAL_PARAMETER;
-	if (!phb->ops->set_phb_tce_memory)
-		return OPAL_UNSUPPORTED;
-	phb_lock(phb);
-	rc = phb->ops->set_phb_tce_memory(phb, tce_mem_addr, tce_mem_size);
-	phb_unlock(phb);
 
-	return rc;
+	return OPAL_UNSUPPORTED;
 }
 opal_call(OPAL_PCI_SET_PHB_TCE_MEMORY, opal_pci_set_phb_tce_memory, 3);
 
diff --git a/doc/opal-api/index.rst b/doc/opal-api/index.rst
index f17d2f59eef6..65dcf10a870f 100644
--- a/doc/opal-api/index.rst
+++ b/doc/opal-api/index.rst
@@ -37,7 +37,10 @@  The OPAL API is the interface between an Operating System and OPAL.
 |                                             |              | internal systems.      |          | No use outside  |
 |                                             |              |                        |          | IBM development |
 +---------------------------------------------+--------------+------------------------+----------+-----------------+
-| :ref:`OPAL_PCI_SET_PHB_TCE_MEMORY`          |  12          | v1.0 (Initial Release) | POWER8   |                 |
+| :ref:`OPAL_PCI_SET_PHB_TCE_MEMORY`          |  12          | N/A                    |          | Was POWER7      |
+|                                             |              | Present only on        |          | p5ioc specific. |
+|                                             |              | internal systems.      |          | No use outside  |
+|                                             |              |                        |          | IBM development |
 +---------------------------------------------+--------------+------------------------+----------+-----------------+
 | :ref:`OPAL_PCI_CONFIG_READ_BYTE`            |  13          | v1.0 (Initial Release) | POWER8   |                 |
 +---------------------------------------------+--------------+------------------------+----------+-----------------+
@@ -384,7 +387,8 @@  removed and no longer supported.
 +---------------------------------------------+-------+-----------------------+-----------------------+
 | :ref:`OPAL_PCI_SET_HUB_TCE_MEMORY`          |  11   | pre-v1.0              | :ref:`skiboot-5.2.0`  |
 +---------------------------------------------+-------+-----------------------+-----------------------+
-
+| :ref:`OPAL_PCI_SET_PHB_TCE_MEMORY`          |  12   | pre-v1.0              | :ref:`skiboot-5.2.0`  |
++---------------------------------------------+-------+-----------------------+-----------------------+
 
 .. _OPAL_GET_COMPLETION_TOKEN_STATUS:
 
@@ -424,6 +428,30 @@  OPAL_PCI_SET_HUB_TCE_MEMORY
 		                       uint64_t tce_mem_addr __unused,
                                        uint64_t tce_mem_size __unused);
 
+This call was only ever relevant for p5ioc based POWER7 systems. These were
+never available with OPAL outside of IBM development.
+
+Support for POWER7 systems with p5ioc was dropped in :ref:`skiboot-5.2.0`,
+and these systems were only ever used with OPAL inside IBM for development
+and bring-up purposes.
+
+Support for p5ioc was removed from the Linux kernel in v4.6-rc1.
+
+.. _OPAL_PCI_SET_PHB_TCE_MEMORY:
+
+OPAL_PCI_SET_PHB_TCE_MEMORY
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: c
+
+   #define OPAL_PCI_SET_PHB_TCE_MEMORY		12
+
+   int64_t opal_pci_set_phb_tce_memory(uint64_t phb_id,
+                                       uint64_t tce_mem_addr,
+                                       uint64_t tce_mem_size);
+
+This call was only ever relevant for p5ioc based POWER7 systems. These were
+never available with OPAL outside of IBM development.
 
 Support for POWER7 systems with p5ioc was dropped in :ref:`skiboot-5.2.0`,
 and these systems were only ever used with OPAL inside IBM for development
diff --git a/include/pci.h b/include/pci.h
index b49641ca17a5..cf06dc36b723 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -336,12 +336,6 @@  struct phb_ops {
 
 	int64_t (*papr_errinjct_reset)(struct phb *phb);
 
-	/*
-	 * P5IOC2 only
-	 */
-	int64_t (*set_phb_tce_memory)(struct phb *phb, uint64_t tce_mem_addr,
-				      uint64_t tce_mem_size);
-
 	/*
 	 * IODA2 PCI interfaces
 	 */