[PATCH 1/8] Documentation: kvx: Convert to reST

Bagas Sanjaya
2023-01-09T09:53:18Z

Convert kvx documentation to reST format. While at it, fix constructs
that cause Sphinx to confuse with section markup.

Note that 101 warnings are generated due to markup syntax issues. These
will be addressed in subsequent patches.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
Documentation/arch.rst | 1 +
Documentation/kvx/index.rst | 12 ++++++++
...{kvx-exceptions.txt => kvx-exceptions.rst} | 10 +++----
.../kvx/{kvx-iommu.txt => kvx-iommu.rst} | 0
.../kvx/{kvx-mmu.txt => kvx-mmu.rst} | 28 +++++++++++--------
.../kvx/{kvx-smp.txt => kvx-smp.rst} | 0
Documentation/kvx/{kvx.txt => kvx.rst} | 0
7 files changed, 35 insertions(+), 16 deletions(-)
create mode 100644 Documentation/kvx/index.rst
rename Documentation/kvx/{kvx-exceptions.txt => kvx-exceptions.rst} (98%)
rename Documentation/kvx/{kvx-iommu.txt => kvx-iommu.rst} (100%)
rename Documentation/kvx/{kvx-mmu.txt => kvx-mmu.rst} (88%)
rename Documentation/kvx/{kvx-smp.txt => kvx-smp.rst} (100%)
rename Documentation/kvx/{kvx.txt => kvx.rst} (100%)

diff --git a/Documentation/arch.rst b/Documentation/arch.rst
index 41a66a8b38e424..1ccda8ef6eefb3 100644
--- a/Documentation/arch.rst
+++ b/Documentation/arch.rst
@@ -13,6 +13,7 @@ implementation.
arm/index
arm64/index
ia64/index
+ kvx/index
loongarch/index
m68k/index
mips/index
diff --git a/Documentation/kvx/index.rst b/Documentation/kvx/index.rst
new file mode 100644
index 00000000000000..19a8e0865c82f3
--- /dev/null
+++ b/Documentation/kvx/index.rst
@@ -0,0 +1,12 @@
+================
+KVX Architecture
+================
+
+.. toctree::
+ :maxdepth: 1
+
+ kvx-exceptions
+ kvx-iommu
+ kvx-mmu
+ kvx-smp
+ kvx
diff --git a/Documentation/kvx/kvx-exceptions.txt b/Documentation/kvx/kvx-exceptions.rst
similarity index 98%
rename from Documentation/kvx/kvx-exceptions.txt
rename to Documentation/kvx/kvx-exceptions.rst
index 11368287bd4895..d3e52f30285223 100644
--- a/Documentation/kvx/kvx-exceptions.txt
+++ b/Documentation/kvx/kvx-exceptions.rst
@@ -12,19 +12,19 @@ The offset depends on which exception vector the cpu wants to jump to:

Then, handlers are laid in the following order:

- _____________
+ +-------------+
| |
| Syscall |
- |_____________|
+ +-------------+
| |
| Interrupts |
- |_____________|
+ +-------------+
| |
| Traps |
- |_____________|
+ +-------------+
| | ^
| Debug | | Stride
-BASE -> |_____________| v
+BASE -> +-------------+ v

Interrupts, and traps are serviced similarly, ie:
diff --git a/Documentation/kvx/kvx-iommu.txt b/Documentation/kvx/kvx-iommu.rst
similarity index 100%
rename from Documentation/kvx/kvx-iommu.txt
rename to Documentation/kvx/kvx-iommu.rst
diff --git a/Documentation/kvx/kvx-mmu.txt b/Documentation/kvx/kvx-mmu.rst
similarity index 88%
rename from Documentation/kvx/kvx-mmu.txt
rename to Documentation/kvx/kvx-mmu.rst
index a3ebbef3698129..59bda2afc9abde 100644
--- a/Documentation/kvx/kvx-mmu.txt
+++ b/Documentation/kvx/kvx-mmu.rst
@@ -24,17 +24,23 @@ only one ZONE_NORMAL. This will be updated if DMA cannot access all memory.

Currently, the memory mapping is the following for 4KB page:

-+-----------------------+-----------------------+------+-------+--------------+
-| Start | End | Attr | Size | Name |
-+-----------------------+-----------------------+------+-------+--------------+
-| 0000 0000 0000 0000 | 0000 003F FFFF FFFF | --- | 256GB | User |
-| 0000 0040 0000 0000 | 0000 007F FFFF FFFF | --- | 256GB | MMAP |
-| 0000 0080 0000 0000 | FFFF FF7F FFFF FFFF | --- | --- | Gap |
-| FFFF FF80 0000 0000 | FFFF FFFF FFFF FFFF | --- | 512GB | Kernel |
-| FFFF FF80 0000 0000 | FFFF FF8F FFFF FFFF | RWX | 64GB | Direct Map |
-| FFFF FF90 0000 0000 | FFFF FF90 3FFF FFFF | RWX | 1GB | Vmalloc |
-| FFFF FF90 4000 0000 | FFFF FFFF FFFF FFFF | RW | 447GB | Free area |
-+-----------------------+-----------------------+------+-------+--------------+
++-----------------------+-----------------------+---------+----------+--------------+
+| Start | End | Attr | Size | Name |
++=======================+=======================+=========+==========+==============+
+| 0000 0000 0000 0000 | 0000 003F FFFF FFFF | \-\-\- | 256GB | User |
++-----------------------+-----------------------+---------+----------+--------------+
+| 0000 0040 0000 0000 | 0000 007F FFFF FFFF | \-\-\- | 256GB | MMAP |
++-----------------------+-----------------------+---------+----------+--------------+
+| 0000 0080 0000 0000 | FFFF FF7F FFFF FFFF | \-\-\- | \-\-\- | Gap |
++-----------------------+-----------------------+---------+----------+--------------+
+| FFFF FF80 0000 0000 | FFFF FFFF FFFF FFFF | \-\-\- | 512GB | Kernel |
++-----------------------+-----------------------+---------+----------+--------------+
+| FFFF FF80 0000 0000 | FFFF FF8F FFFF FFFF | RWX | 64GB | Direct Map |
++-----------------------+-----------------------+---------+----------+--------------+
+| FFFF FF90 0000 0000 | FFFF FF90 3FFF FFFF | RWX | 1GB | Vmalloc |
++-----------------------+-----------------------+---------+----------+--------------+
+| FFFF FF90 4000 0000 | FFFF FFFF FFFF FFFF | RW | 447GB | Free area |
++-----------------------+-----------------------+---------+----------+--------------+

Enable the MMU
==============
diff --git a/Documentation/kvx/kvx-smp.txt b/Documentation/kvx/kvx-smp.rst
similarity index 100%
rename from Documentation/kvx/kvx-smp.txt
rename to Documentation/kvx/kvx-smp.rst
diff --git a/Documentation/kvx/kvx.txt b/Documentation/kvx/kvx.rst
similarity index 100%
rename from Documentation/kvx/kvx.txt
rename to Documentation/kvx/kvx.rst
--
An old man doll... just what I always wanted! - Clara