Skip to contentSkip to conversation

genpt documentation fixes

PATCH Superseded Bagas Sanjaya 3 participants 8 messages Nov 6, 2025 – Nov 7, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover genpt documentation fixes

Hi,

Here are fixes for two htmldocs warnings in generic radix page table documentation. The first one is reported in linux-next [1], and the second one is also found when making htmldocs locally to reproduce the former.

Enjoy!

[1]: https://lore.kernel.org/linux-next/[email protected]/

Bagas Sanjaya (2):
Documentation: genpt: Don't use code block marker before iommu_amdv1.c
include listing
iommupt: Describe @bitnr parameter

 Documentation/driver-api/generic_pt.rst | 2 +-
 drivers/iommu/generic_pt/pt_common.h    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

base-commit: 75d9ef7cf1e694e5c0fb387be99f04acc7f864a4

Signature · 1 line
An old man doll... just what I always wanted! - Clara
#1 lore raw

PATCH 1/2 Documentation: genpt: Don't use code block marker before iommu_amdv1.c include listing

Stephen Rothwell reports htmldocs warning when merging iommu tree:

Documentation/driver-api/generic_pt.rst:32: WARNING: Literal block expected; none found. [docutils]

This is because of duplicate double colon code block markers: one after generic_pt/fmt/iommu_amdv1.c and the one in its preceding paragraph. The resulting htmldocs, however, only marks the include listing (after the former) up as it should be.

Drop the latter to fix the warning.

---
 Documentation/driver-api/generic_pt.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/driver-api/generic_pt.rst +1 -1
index 210d1229aa1c1f..7a9ca9f2878d4f 100644
@@ -27,7 +27,7 @@ compiled into a per-format IOMMU operations kernel module.
 For this to work the .c file for each compilation unit will include both the
 format headers and the generic code for the implementation. For instance in an
 implementation compilation unit the headers would normally be included as
-follows::
+follows:
 
 generic_pt/fmt/iommu_amdv1.c::
 
Signature · 1 line
An old man doll... just what I always wanted! - Clara
#3 lore raw

PATCH 2/2 iommupt: Describe @bitnr parameter

In reply to Bagas Sanjaya

Sphinx reports kernel-doc warnings when making htmldocs:

WARNING: ./drivers/iommu/generic_pt/pt_common.h:361 function parameter 'bitnr' not described in 'pt_test_sw_bit_acquire'
WARNING: ./drivers/iommu/generic_pt/pt_common.h:371 function parameter 'bitnr' not described in 'pt_set_sw_bit_release'

Describe @bitnr to squash them.

Fixes bcc64b57b48e ("iommupt: Add basic support for SW bits in the page table")
---
 drivers/iommu/generic_pt/pt_common.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/iommu/generic_pt/pt_common.h +2 -0
index b5628f47e0db40..54c16355be2842 100644
@@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common);
 /**
  * pt_test_sw_bit_acquire() - Read a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to set
  *
  * Software bits are ignored by HW and can be used for any purpose by the
  * software. This does a test bit and acquire operation.
@@ -364,6 +365,7 @@ static inline bool pt_test_sw_bit_acquire(struct pt_state *pts,
 /**
  * pt_set_sw_bit_release() - Set a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to set
  *
  * Software bits are ignored by HW and can be used for any purpose by the
  * software. This does a set bit and release operation.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Reviewed-by on the v1 series
#7 lore raw
In reply to Bagas Sanjaya
Quoted 11 lines · Bagas Sanjaya

Hi,

Here are fixes for two htmldocs warnings in generic radix page table documentation. The first one is reported in linux-next [1], and the second one is also found when making htmldocs locally to reproduce the former.

Enjoy!

[1]: https://lore.kernel.org/linux-next/[email protected]/

Quoted 8 lines

Bagas Sanjaya (2):
Documentation: genpt: Don't use code block marker before iommu_amdv1.c
include listing
iommupt: Describe @bitnr parameter

 Documentation/driver-api/generic_pt.rst | 2 +-
 drivers/iommu/generic_pt/pt_common.h    | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Thanks,
Jason

reviewer
#4 lore raw

Re: [PATCH 2/2] iommupt: Describe @bitnr parameter

In reply to Bagas Sanjaya
Quoted 18 lines · Bagas Sanjaya

Sphinx reports kernel-doc warnings when making htmldocs:

WARNING: ./drivers/iommu/generic_pt/pt_common.h:361 function parameter 'bitnr' not described in 'pt_test_sw_bit_acquire'
WARNING: ./drivers/iommu/generic_pt/pt_common.h:371 function parameter 'bitnr' not described in 'pt_set_sw_bit_release'

Describe @bitnr to squash them.

Fixes bcc64b57b48e ("iommupt: Add basic support for SW bits in the page table")
---
 drivers/iommu/generic_pt/pt_common.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/iommu/generic_pt/pt_common.h +0 -0
index b5628f47e0db40..54c16355be2842 100644

drivers/iommu/generic_pt/pt_common.h static inline unsigned int pt_max_sw_bit(struct pt_common *common); · line 357

Quoted 4 lines
drivers/iommu/generic_pt/pt_common.h +1 -0
@@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common);
 /**
  * pt_test_sw_bit_acquire() - Read a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to set

Shouldn't both of these (above) to "to read" instead of "to set"?

Quoted 11 lines
drivers/iommu/generic_pt/pt_common.h +1 -0
  *
  * Software bits are ignored by HW and can be used for any purpose by the
  * software. This does a test bit and acquire operation.
@@ -364,6 +365,7 @@ static inline bool pt_test_sw_bit_acquire(struct pt_state *pts,
 /**
  * pt_set_sw_bit_release() - Set a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to set
  *
  * Software bits are ignored by HW and can be used for any purpose by the
  * software. This does a set bit and release operation.
Signature · 1 line
~Randy
reviewer Acked-by Tested-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] Documentation: genpt: Don't use code block marker before iommu_amdv1.c include listing

In reply to Bagas Sanjaya
Quoted 24 lines · Bagas Sanjaya

Stephen Rothwell reports htmldocs warning when merging iommu tree:

Documentation/driver-api/generic_pt.rst:32: WARNING: Literal block expected; none found. [docutils]

This is because of duplicate double colon code block markers: one after generic_pt/fmt/iommu_amdv1.c and the one in its preceding paragraph. The resulting htmldocs, however, only marks the include listing (after the former) up as it should be.

Drop the latter to fix the warning.

---
 Documentation/driver-api/generic_pt.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/driver-api/generic_pt.rst +0 -0
index 210d1229aa1c1f..7a9ca9f2878d4f 100644

Documentation/driver-api/generic_pt.rst compiled into a per-format IOMMU operations kernel module. · line 33

Quoted 8 lines
Documentation/driver-api/generic_pt.rst +1 -1
@@ -27,7 +27,7 @@ compiled into a per-format IOMMU operations kernel module.
 For this to work the .c file for each compilation unit will include both the
 format headers and the generic code for the implementation. For instance in an
 implementation compilation unit the headers would normally be included as
-follows::
+follows:
 
 generic_pt/fmt/iommu_amdv1.c::
 
Signature · 1 line
~Randy
#5 lore raw

Re: [PATCH 2/2] iommupt: Describe @bitnr parameter

In reply to Randy Dunlap
Quoted 11 lines · Randy Dunlap

drivers/iommu/generic_pt/pt_common.h static inline unsigned int pt_max_sw_bit(struct pt_common *common); · line 357

Quoted 9 lines
drivers/iommu/generic_pt/pt_common.h +1 -0
index b5628f47e0db40..54c16355be2842 100644
@@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common);
 /**
  * pt_test_sw_bit_acquire() - Read a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to set

Shouldn't both of these (above) to "to read" instead of "to set"?

Yes, that's right, Bagas could you fold that into a v2?

Jason

#6 lore raw

Re: [PATCH 2/2] iommupt: Describe @bitnr parameter

Quoted 13 lines · Jason Gunthorpe
Quoted 11 lines · Randy Dunlap

drivers/iommu/generic_pt/pt_common.h static inline unsigned int pt_max_sw_bit(struct pt_common *common); · line 357

Quoted 9 lines
drivers/iommu/generic_pt/pt_common.h +1 -0
index b5628f47e0db40..54c16355be2842 100644
@@ -354,6 +354,7 @@ static inline unsigned int pt_max_sw_bit(struct pt_common *common);
 /**
  * pt_test_sw_bit_acquire() - Read a software bit in an item
  * @pts: Entry to set
+ * @bitnr: Bit to set

Shouldn't both of these (above) to "to read" instead of "to set"?

Quoted 1 line

Yes, that's right, Bagas could you fold that into a v2?

OK, thanks!

Signature · 1 line
An old man doll... just what I always wanted! - Clara