[Skiboot] [PATCH 018/110] doc: prettify OPAL_PCI_TCE_KILL

Stewart Smith stewart at linux.ibm.com
Fri May 31 16:12:19 AEST 2019


Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 doc/opal-api/opal-pci-tce-kill-126.rst | 27 +++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/doc/opal-api/opal-pci-tce-kill-126.rst b/doc/opal-api/opal-pci-tce-kill-126.rst
index dc7ab6b12eb5..edd8706b9c9e 100644
--- a/doc/opal-api/opal-pci-tce-kill-126.rst
+++ b/doc/opal-api/opal-pci-tce-kill-126.rst
@@ -1,18 +1,23 @@
+.. _OPAL_PCI_TCE_KILL:
+
 OPAL_PCI_TCE_KILL
 =================
-::
+
+.. code-block:: c
 
    int64_t opal_pci_tce_kill(uint64_t phb_id,
 			  uint32_t kill_type,
 			  uint64_t pe_number,
 			  uint32_t tce_size,
 			  uint64_t dma_addr,
-			  uint32_t npages)
+			  uint32_t npages);
 
 An abstraction around TCE kill. This allows host OS kernels to use an OPAL
 call if they don't know the model specific invalidation method.
 
-Where kill_type is one of: ::
+Where kill_type is one of:
+
+.. code-block:: c
 
   enum {
      OPAL_PCI_TCE_KILL_PAGES,
@@ -25,16 +30,17 @@ PHB4, which means from POWER9 onwards it will be present.
 
 Returns
 -------
-OPAL_PARAMETER
-  if phb_id is invalid (or similar)
-
-OPAL_UNSUPPORTED
+:ref:`OPAL_PARAMETER`
+  if ``phb_id`` is invalid (or similar)
+:ref:`OPAL_UNSUPPORTED`
   if PHB model doesn't support this call. This is likely
   true for systems before POWER9/PHB4.
   Do *NOT* rely on this call existing for systems prior to
   POWER9 (i.e. PHB4).
 
-Example code (from linux/arch/powerpc/platforms/powernv/pci-ioda.c) ::
+Example code (from linux/arch/powerpc/platforms/powernv/pci-ioda.c)
+
+.. code-block:: c
 
   static inline void pnv_pci_ioda2_tce_invalidate_pe(struct pnv_ioda_pe *pe)
   {
@@ -47,10 +53,13 @@ Example code (from linux/arch/powerpc/platforms/powernv/pci-ioda.c) ::
 			     pe->pe_number, 0, 0, 0);
   }
 
-and ::
+and
+
+.. code-block:: c
 
   struct pnv_phb *phb = pe->phb;
   unsigned int shift = tbl->it_page_shift;
+
   if (phb->model == PNV_PHB_MODEL_PHB3 && phb->regs)
 	pnv_pci_phb3_tce_invalidate(pe, rm, shift,
 				    index, npages);
-- 
2.21.0



More information about the Skiboot mailing list