Skip to content

Commit 4d2e26a

Browse files
committed
docs: powerpc: convert docs to ReST and rename to *.rst
Convert docs to ReST and add them to the arch-specific book. The conversion here was trivial, as almost every file there was already using an elegant format close to ReST standard. The changes were mostly to mark literal blocks and add a few missing section title identifiers. One note with regards to "--": on Sphinx, this can't be used to identify a list, as it will format it badly. This can be used, however, to identify a long hyphen - and "---" is an even longer one. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> # cxl
1 parent 0a8ad0f commit 4d2e26a

27 files changed

Lines changed: 567 additions & 427 deletions

‎Documentation/PCI/pci-error-recovery.rst‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ That is, the recovery API only requires that:
403403
.. note::
404404

405405
Implementation details for the powerpc platform are discussed in
406-
the file Documentation/powerpc/eeh-pci-error-recovery.txt
406+
the file Documentation/powerpc/eeh-pci-error-recovery.rst
407407

408408
As of this writing, there is a growing list of device drivers with
409409
patches implementing error recovery. Not all of these patches are in
@@ -422,3 +422,6 @@ That is, the recovery API only requires that:
422422
- drivers/net/cxgb3
423423
- drivers/net/s2io.c
424424
- drivers/net/qlge
425+
426+
The End
427+
-------

‎Documentation/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ implementation.
143143
arm64/index
144144
ia64/index
145145
m68k/index
146+
powerpc/index
146147
riscv/index
147148
s390/index
148149
sh/index
Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
========================
12
The PowerPC boot wrapper
2-
------------------------
3+
========================
4+
35
Copyright (C) Secret Lab Technologies Ltd.
46

57
PowerPC image targets compresses and wraps the kernel image (vmlinux) with
@@ -21,6 +23,7 @@ it uses the wrapper script (arch/powerpc/boot/wrapper) to generate target
2123
image. The details of the build system is discussed in the next section.
2224
Currently, the following image format targets exist:
2325

26+
==================== ========================================================
2427
cuImage.%: Backwards compatible uImage for older version of
2528
U-Boot (for versions that don't understand the device
2629
tree). This image embeds a device tree blob inside
@@ -29,46 +32,53 @@ Currently, the following image format targets exist:
2932
with boot wrapper code that extracts data from the old
3033
bd_info structure and loads the data into the device
3134
tree before jumping into the kernel.
32-
Because of the series of #ifdefs found in the
35+
36+
Because of the series of #ifdefs found in the
3337
bd_info structure used in the old U-Boot interfaces,
3438
cuImages are platform specific. Each specific
3539
U-Boot platform has a different platform init file
3640
which populates the embedded device tree with data
3741
from the platform specific bd_info file. The platform
3842
specific cuImage platform init code can be found in
39-
arch/powerpc/boot/cuboot.*.c. Selection of the correct
43+
`arch/powerpc/boot/cuboot.*.c`. Selection of the correct
4044
cuImage init code for a specific board can be found in
4145
the wrapper structure.
46+
4247
dtbImage.%: Similar to zImage, except device tree blob is embedded
4348
inside the image instead of provided by firmware. The
4449
output image file can be either an elf file or a flat
4550
binary depending on the platform.
46-
dtbImages are used on systems which do not have an
51+
52+
dtbImages are used on systems which do not have an
4753
interface for passing a device tree directly.
4854
dtbImages are similar to simpleImages except that
4955
dtbImages have platform specific code for extracting
5056
data from the board firmware, but simpleImages do not
5157
talk to the firmware at all.
52-
PlayStation 3 support uses dtbImage. So do Embedded
58+
59+
PlayStation 3 support uses dtbImage. So do Embedded
5360
Planet boards using the PlanetCore firmware. Board
5461
specific initialization code is typically found in a
5562
file named arch/powerpc/boot/<platform>.c; but this
5663
can be overridden by the wrapper script.
64+
5765
simpleImage.%: Firmware independent compressed image that does not
5866
depend on any particular firmware interface and embeds
5967
a device tree blob. This image is a flat binary that
6068
can be loaded to any location in RAM and jumped to.
6169
Firmware cannot pass any configuration data to the
6270
kernel with this image type and it depends entirely on
6371
the embedded device tree for all information.
64-
The simpleImage is useful for booting systems with
72+
73+
The simpleImage is useful for booting systems with
6574
an unknown firmware interface or for booting from
6675
a debugger when no firmware is present (such as on
6776
the Xilinx Virtex platform). The only assumption that
6877
simpleImage makes is that RAM is correctly initialized
6978
and that the MMU is either off or has RAM mapped to
7079
base address 0.
71-
simpleImage also supports inserting special platform
80+
81+
simpleImage also supports inserting special platform
7282
specific initialization code to the start of the bootup
7383
sequence. The virtex405 platform uses this feature to
7484
ensure that the cache is invalidated before caching
@@ -81,22 +91,26 @@ Currently, the following image format targets exist:
8191
named (virtex405-<board>.dts). Search the wrapper
8292
script for 'virtex405' and see the file
8393
arch/powerpc/boot/virtex405-head.S for details.
94+
8495
treeImage.%; Image format for used with OpenBIOS firmware found
8596
on some ppc4xx hardware. This image embeds a device
8697
tree blob inside the image.
98+
8799
uImage: Native image format used by U-Boot. The uImage target
88100
does not add any boot code. It just wraps a compressed
89101
vmlinux in the uImage data structure. This image
90102
requires a version of U-Boot that is able to pass
91103
a device tree to the kernel at boot. If using an older
92104
version of U-Boot, then you need to use a cuImage
93105
instead.
106+
94107
zImage.%: Image format which does not embed a device tree.
95108
Used by OpenFirmware and other firmware interfaces
96109
which are able to supply a device tree. This image
97110
expects firmware to provide the device tree at boot.
98111
Typically, if you have general purpose PowerPC
99112
hardware then you want this image format.
113+
==================== ========================================================
100114

101115
Image types which embed a device tree blob (simpleImage, dtbImage, treeImage,
102116
and cuImage) all generate the device tree blob from a file in the
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
============
12
CPU Families
23
============
34

@@ -8,8 +9,8 @@ and are supported by arch/powerpc.
89
Book3S (aka sPAPR)
910
------------------
1011

11-
- Hash MMU
12-
- Mix of 32 & 64 bit
12+
- Hash MMU
13+
- Mix of 32 & 64 bit::
1314

1415
+--------------+ +----------------+
1516
| Old POWER | --------------> | RS64 (threads) |
@@ -108,8 +109,8 @@ Book3S (aka sPAPR)
108109
IBM BookE
109110
---------
110111

111-
- Software loaded TLB.
112-
- All 32 bit
112+
- Software loaded TLB.
113+
- All 32 bit::
113114

114115
+--------------+
115116
| 401 |
@@ -155,8 +156,8 @@ IBM BookE
155156
Motorola/Freescale 8xx
156157
----------------------
157158

158-
- Software loaded with hardware assist.
159-
- All 32 bit
159+
- Software loaded with hardware assist.
160+
- All 32 bit::
160161

161162
+-------------+
162163
| MPC8xx Core |
@@ -166,9 +167,9 @@ Motorola/Freescale 8xx
166167
Freescale BookE
167168
---------------
168169

169-
- Software loaded TLB.
170-
- e6500 adds HW loaded indirect TLB entries.
171-
- Mix of 32 & 64 bit
170+
- Software loaded TLB.
171+
- e6500 adds HW loaded indirect TLB entries.
172+
- Mix of 32 & 64 bit::
172173

173174
+--------------+
174175
| e200 |
@@ -207,8 +208,8 @@ Freescale BookE
207208
IBM A2 core
208209
-----------
209210

210-
- Book3E, software loaded TLB + HW loaded indirect TLB entries.
211-
- 64 bit
211+
- Book3E, software loaded TLB + HW loaded indirect TLB entries.
212+
- 64 bit::
212213

213214
+--------------+ +----------------+
214215
| A2 core | --> | WSP |
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
============
2+
CPU Features
3+
============
4+
15
Hollis Blanchard <hollis@austin.ibm.com>
26
5 Jun 2002
37

@@ -32,7 +36,7 @@ anyways).
3236
After detecting the processor type, the kernel patches out sections of code
3337
that shouldn't be used by writing nop's over it. Using cpufeatures requires
3438
just 2 macros (found in arch/powerpc/include/asm/cputable.h), as seen in head.S
35-
transfer_to_handler:
39+
transfer_to_handler::
3640

3741
#ifdef CONFIG_ALTIVEC
3842
BEGIN_FTR_SECTION
Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
====================================
12
Coherent Accelerator Interface (CXL)
23
====================================
34

@@ -21,6 +22,8 @@ Introduction
2122
Hardware overview
2223
=================
2324

25+
::
26+
2427
POWER8/9 FPGA
2528
+----------+ +---------+
2629
| | | |
@@ -59,14 +62,16 @@ Hardware overview
5962
the fault. The context to which this fault is serviced is based on
6063
who owns that acceleration function.
6164

62-
POWER8 <-----> PSL Version 8 is compliant to the CAIA Version 1.0.
63-
POWER9 <-----> PSL Version 9 is compliant to the CAIA Version 2.0.
65+
- POWER8 and PSL Version 8 are compliant to the CAIA Version 1.0.
66+
- POWER9 and PSL Version 9 are compliant to the CAIA Version 2.0.
67+
6468
This PSL Version 9 provides new features such as:
69+
6570
* Interaction with the nest MMU on the P9 chip.
6671
* Native DMA support.
6772
* Supports sending ASB_Notify messages for host thread wakeup.
6873
* Supports Atomic operations.
69-
* ....
74+
* etc.
7075

7176
Cards with a PSL9 won't work on a POWER8 system and cards with a
7277
PSL8 won't work on a POWER9 system.
@@ -147,7 +152,9 @@ User API
147152
master devices.
148153

149154
A userspace library libcxl is available here:
155+
150156
https://github.com/ibm-capi/libcxl
157+
151158
This provides a C interface to this kernel API.
152159

153160
open
@@ -165,7 +172,8 @@ open
165172
When all available contexts are allocated the open call will fail
166173
and return -ENOSPC.
167174

168-
Note: IRQs need to be allocated for each context, which may limit
175+
Note:
176+
IRQs need to be allocated for each context, which may limit
169177
the number of contexts that can be created, and therefore
170178
how many times the device can be opened. The POWER8 CAPP
171179
supports 2040 IRQs and 3 are used by the kernel, so 2037 are
@@ -186,7 +194,9 @@ ioctl
186194
updated as userspace allocates and frees memory. This ioctl
187195
returns once the AFU context is started.
188196

189-
Takes a pointer to a struct cxl_ioctl_start_work:
197+
Takes a pointer to a struct cxl_ioctl_start_work
198+
199+
::
190200

191201
struct cxl_ioctl_start_work {
192202
__u64 flags;
@@ -269,7 +279,7 @@ read
269279
The buffer passed to read() must be at least 4K bytes.
270280

271281
The result of the read will be a buffer of one or more events,
272-
each event is of type struct cxl_event, of varying size.
282+
each event is of type struct cxl_event, of varying size::
273283

274284
struct cxl_event {
275285
struct cxl_event_header header;
@@ -280,7 +290,9 @@ read
280290
};
281291
};
282292

283-
The struct cxl_event_header is defined as:
293+
The struct cxl_event_header is defined as
294+
295+
::
284296

285297
struct cxl_event_header {
286298
__u16 type;
@@ -307,7 +319,9 @@ read
307319
For future extensions and padding.
308320

309321
If the event type is CXL_EVENT_AFU_INTERRUPT then the event
310-
structure is defined as:
322+
structure is defined as
323+
324+
::
311325

312326
struct cxl_event_afu_interrupt {
313327
__u16 flags;
@@ -326,7 +340,9 @@ read
326340
For future extensions and padding.
327341

328342
If the event type is CXL_EVENT_DATA_STORAGE then the event
329-
structure is defined as:
343+
structure is defined as
344+
345+
::
330346

331347
struct cxl_event_data_storage {
332348
__u16 flags;
@@ -356,7 +372,9 @@ read
356372
For future extensions
357373

358374
If the event type is CXL_EVENT_AFU_ERROR then the event structure
359-
is defined as:
375+
is defined as
376+
377+
::
360378

361379
struct cxl_event_afu_error {
362380
__u16 flags;
@@ -393,15 +411,15 @@ open
393411
ioctl
394412
-----
395413

396-
CXL_IOCTL_DOWNLOAD_IMAGE:
397-
CXL_IOCTL_VALIDATE_IMAGE:
414+
CXL_IOCTL_DOWNLOAD_IMAGE / CXL_IOCTL_VALIDATE_IMAGE:
398415
Starts and controls flashing a new FPGA image. Partial
399416
reconfiguration is not supported (yet), so the image must contain
400417
a copy of the PSL and AFU(s). Since an image can be quite large,
401418
the caller may have to iterate, splitting the image in smaller
402419
chunks.
403420

404-
Takes a pointer to a struct cxl_adapter_image:
421+
Takes a pointer to a struct cxl_adapter_image::
422+
405423
struct cxl_adapter_image {
406424
__u64 flags;
407425
__u64 data;
@@ -442,7 +460,7 @@ Udev rules
442460
The following udev rules could be used to create a symlink to the
443461
most logical chardev to use in any programming mode (afuX.Yd for
444462
dedicated, afuX.Ys for afu directed), since the API is virtually
445-
identical for each:
463+
identical for each::
446464

447465
SUBSYSTEM=="cxl", ATTRS{mode}=="dedicated_process", SYMLINK="cxl/%b"
448466
SUBSYSTEM=="cxl", ATTRS{mode}=="afu_directed", \
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
================================
2+
Coherent Accelerator (CXL) Flash
3+
================================
4+
15
Introduction
26
============
37

@@ -28,7 +32,7 @@ Introduction
2832
responsible for the initialization of the adapter, setting up the
2933
special path for user space access, and performing error recovery. It
3034
communicates directly the Flash Accelerator Functional Unit (AFU)
31-
as described in Documentation/powerpc/cxl.txt.
35+
as described in Documentation/powerpc/cxl.rst.
3236

3337
The cxlflash driver supports two, mutually exclusive, modes of
3438
operation at the device (LUN) level:
@@ -58,7 +62,7 @@ Overview
5862

5963
The CXL Flash Adapter Driver establishes a master context with the
6064
AFU. It uses memory mapped I/O (MMIO) for this control and setup. The
61-
Adapter Problem Space Memory Map looks like this:
65+
Adapter Problem Space Memory Map looks like this::
6266

6367
+-------------------------------+
6468
| 512 * 64 KB User MMIO |
@@ -375,7 +379,7 @@ CXL Flash Driver Host IOCTLs
375379
Each host adapter instance that is supported by the cxlflash driver
376380
has a special character device associated with it to enable a set of
377381
host management function. These character devices are hosted in a
378-
class dedicated for cxlflash and can be accessed via /dev/cxlflash/*.
382+
class dedicated for cxlflash and can be accessed via `/dev/cxlflash/*`.
379383

380384
Applications can be written to perform various functions using the
381385
host ioctl APIs below.

0 commit comments

Comments
 (0)