diff options
author | Jonathan Corbet <corbet@lwn.net> | 2019-07-22 15:51:20 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2019-07-22 15:51:20 -0400 |
commit | 48ffc3d12b55bed8d9452a89bc13de4864dc3106 (patch) | |
tree | c84a70ad0f1391f483c5bde738155be8fff6a692 | |
parent | 143134ba498327e3d389e10f55f56e9c37257c7c (diff) | |
parent | d6f0f2f19a9e41bd0bcd5757f68500ed29352509 (diff) |
Merge branch 'pdf_fixes_v1' of https://git.linuxtv.org/mchehab/experimental into mauro
Bring in a set of post-thrashup fixes from Mauro.
62 files changed, 738 insertions, 678 deletions
diff --git a/Documentation/PCI/pci-error-recovery.rst b/Documentation/PCI/pci-error-recovery.rst index 83db42092935..e5d450df06b4 100644 --- a/Documentation/PCI/pci-error-recovery.rst +++ b/Documentation/PCI/pci-error-recovery.rst | |||
@@ -403,7 +403,7 @@ That is, the recovery API only requires that: | |||
403 | .. note:: | 403 | .. note:: |
404 | 404 | ||
405 | Implementation details for the powerpc platform are discussed in | 405 | 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 |
407 | 407 | ||
408 | As of this writing, there is a growing list of device drivers with | 408 | As of this writing, there is a growing list of device drivers with |
409 | patches implementing error recovery. Not all of these patches are in | 409 | patches implementing error recovery. Not all of these patches are in |
@@ -422,3 +422,6 @@ That is, the recovery API only requires that: | |||
422 | - drivers/net/cxgb3 | 422 | - drivers/net/cxgb3 |
423 | - drivers/net/s2io.c | 423 | - drivers/net/s2io.c |
424 | - drivers/net/qlge | 424 | - drivers/net/qlge |
425 | |||
426 | The End | ||
427 | ------- | ||
diff --git a/Documentation/RCU/rculist_nulls.txt b/Documentation/RCU/rculist_nulls.txt index 8151f0195f76..23f115dc87cf 100644 --- a/Documentation/RCU/rculist_nulls.txt +++ b/Documentation/RCU/rculist_nulls.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | Using hlist_nulls to protect read-mostly linked lists and | 1 | Using hlist_nulls to protect read-mostly linked lists and |
2 | objects using SLAB_TYPESAFE_BY_RCU allocations. | 2 | objects using SLAB_TYPESAFE_BY_RCU allocations. |
3 | 3 | ||
4 | Please read the basics in Documentation/RCU/listRCU.txt | 4 | Please read the basics in Documentation/RCU/listRCU.rst |
5 | 5 | ||
6 | Using special makers (called 'nulls') is a convenient way | 6 | Using special makers (called 'nulls') is a convenient way |
7 | to solve following problem : | 7 | to solve following problem : |
diff --git a/Documentation/admin-guide/conf.py b/Documentation/admin-guide/conf.py deleted file mode 100644 index 86f738953799..000000000000 --- a/Documentation/admin-guide/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = 'Linux Kernel User Documentation' | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'linux-user.tex', 'Linux Kernel User Documentation', | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/conf.py b/Documentation/conf.py index 3b2397bcb565..a8fe845832bc 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py | |||
@@ -16,6 +16,8 @@ import sys | |||
16 | import os | 16 | import os |
17 | import sphinx | 17 | import sphinx |
18 | 18 | ||
19 | from subprocess import check_output | ||
20 | |||
19 | # Get Sphinx version | 21 | # Get Sphinx version |
20 | major, minor, patch = sphinx.version_info[:3] | 22 | major, minor, patch = sphinx.version_info[:3] |
21 | 23 | ||
@@ -276,10 +278,21 @@ latex_elements = { | |||
276 | \\setsansfont{DejaVu Sans} | 278 | \\setsansfont{DejaVu Sans} |
277 | \\setromanfont{DejaVu Serif} | 279 | \\setromanfont{DejaVu Serif} |
278 | \\setmonofont{DejaVu Sans Mono} | 280 | \\setmonofont{DejaVu Sans Mono} |
279 | |||
280 | ''' | 281 | ''' |
281 | } | 282 | } |
282 | 283 | ||
284 | # At least one book (translations) may have Asian characters | ||
285 | # with are only displayed if xeCJK is used | ||
286 | |||
287 | cjk_cmd = check_output(['fc-list', '--format="%{family[0]}\n"']).decode('utf-8', 'ignore') | ||
288 | if cjk_cmd.find("Noto Sans CJK SC") >= 0: | ||
289 | print ("enabling CJK for LaTeX builder") | ||
290 | latex_elements['preamble'] += ''' | ||
291 | % This is needed for translations | ||
292 | \\usepackage{xeCJK} | ||
293 | \\setCJKmainfont{Noto Sans CJK SC} | ||
294 | ''' | ||
295 | |||
283 | # Fix reference escape troubles with Sphinx 1.4.x | 296 | # Fix reference escape troubles with Sphinx 1.4.x |
284 | if major == 1 and minor > 3: | 297 | if major == 1 and minor > 3: |
285 | latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n' | 298 | latex_elements['preamble'] += '\\renewcommand*{\\DUrole}[2]{ #2 }\n' |
@@ -410,6 +423,21 @@ latex_documents = [ | |||
410 | 'The kernel development community', 'manual'), | 423 | 'The kernel development community', 'manual'), |
411 | ] | 424 | ] |
412 | 425 | ||
426 | # Add all other index files from Documentation/ subdirectories | ||
427 | for fn in os.listdir('.'): | ||
428 | doc = os.path.join(fn, "index") | ||
429 | if os.path.exists(doc + ".rst"): | ||
430 | has = False | ||
431 | for l in latex_documents: | ||
432 | if l[0] == doc: | ||
433 | has = True | ||
434 | break | ||
435 | if not has: | ||
436 | latex_documents.append((doc, fn + '.tex', | ||
437 | 'Linux %s Documentation' % fn.capitalize(), | ||
438 | 'The kernel development community', | ||
439 | 'manual')) | ||
440 | |||
413 | # The name of an image file (relative to this directory) to place at the top of | 441 | # The name of an image file (relative to this directory) to place at the top of |
414 | # the title page. | 442 | # the title page. |
415 | #latex_logo = None | 443 | #latex_logo = None |
diff --git a/Documentation/core-api/conf.py b/Documentation/core-api/conf.py deleted file mode 100644 index db1f7659f3da..000000000000 --- a/Documentation/core-api/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Core-API Documentation" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'core-api.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/crypto/conf.py b/Documentation/crypto/conf.py deleted file mode 100644 index 4335d251ddf3..000000000000 --- a/Documentation/crypto/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = 'Linux Kernel Crypto API' | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'crypto-api.tex', 'Linux Kernel Crypto API manual', | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/dev-tools/conf.py b/Documentation/dev-tools/conf.py deleted file mode 100644 index 7faafa3f7888..000000000000 --- a/Documentation/dev-tools/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Development tools for the kernel" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'dev-tools.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/devicetree/bindings/arm/idle-states.txt b/Documentation/devicetree/bindings/arm/idle-states.txt index 326f29b270ad..2d325bed37e5 100644 --- a/Documentation/devicetree/bindings/arm/idle-states.txt +++ b/Documentation/devicetree/bindings/arm/idle-states.txt | |||
@@ -703,4 +703,4 @@ cpus { | |||
703 | https://www.devicetree.org/specifications/ | 703 | https://www.devicetree.org/specifications/ |
704 | 704 | ||
705 | [6] ARM Linux Kernel documentation - Booting AArch64 Linux | 705 | [6] ARM Linux Kernel documentation - Booting AArch64 Linux |
706 | Documentation/arm64/booting.txt | 706 | Documentation/arm64/booting.rst |
diff --git a/Documentation/doc-guide/conf.py b/Documentation/doc-guide/conf.py deleted file mode 100644 index fd3731182d5a..000000000000 --- a/Documentation/doc-guide/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = 'Linux Kernel Documentation Guide' | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'kernel-doc-guide.tex', 'Linux Kernel Documentation Guide', | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/driver-api/80211/conf.py b/Documentation/driver-api/80211/conf.py deleted file mode 100644 index 4424b4b0b9c3..000000000000 --- a/Documentation/driver-api/80211/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Linux 802.11 Driver Developer's Guide" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', '80211.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/driver-api/conf.py b/Documentation/driver-api/conf.py deleted file mode 100644 index 202726d20088..000000000000 --- a/Documentation/driver-api/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "The Linux driver implementer's API guide" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'driver-api.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/driver-api/pm/conf.py b/Documentation/driver-api/pm/conf.py deleted file mode 100644 index a89fac11272f..000000000000 --- a/Documentation/driver-api/pm/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Device Power Management" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'pm.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/filesystems/conf.py b/Documentation/filesystems/conf.py deleted file mode 100644 index ea44172af5c4..000000000000 --- a/Documentation/filesystems/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Linux Filesystems API" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'filesystems.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/gpu/conf.py b/Documentation/gpu/conf.py deleted file mode 100644 index 1757b040fb32..000000000000 --- a/Documentation/gpu/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Linux GPU Driver Developer's Guide" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'gpu.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/index.rst b/Documentation/index.rst index 70ae148ec980..2df5a3da563c 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst | |||
@@ -111,9 +111,11 @@ needed). | |||
111 | netlabel/index | 111 | netlabel/index |
112 | networking/index | 112 | networking/index |
113 | pcmcia/index | 113 | pcmcia/index |
114 | power/index | ||
114 | target/index | 115 | target/index |
115 | timers/index | 116 | timers/index |
116 | watchdog/index | 117 | watchdog/index |
118 | virtual/index | ||
117 | input/index | 119 | input/index |
118 | hwmon/index | 120 | hwmon/index |
119 | gpu/index | 121 | gpu/index |
@@ -143,6 +145,7 @@ implementation. | |||
143 | arm64/index | 145 | arm64/index |
144 | ia64/index | 146 | ia64/index |
145 | m68k/index | 147 | m68k/index |
148 | powerpc/index | ||
146 | riscv/index | 149 | riscv/index |
147 | s390/index | 150 | s390/index |
148 | sh/index | 151 | sh/index |
diff --git a/Documentation/input/conf.py b/Documentation/input/conf.py deleted file mode 100644 index d2352fdc92ed..000000000000 --- a/Documentation/input/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "The Linux input driver subsystem" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'linux-input.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/kernel-hacking/conf.py b/Documentation/kernel-hacking/conf.py deleted file mode 100644 index 3d8acf0f33ad..000000000000 --- a/Documentation/kernel-hacking/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Kernel Hacking Guides" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'kernel-hacking.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/locking/spinlocks.rst b/Documentation/locking/spinlocks.rst index 098107fb7d86..e93ec6645238 100644 --- a/Documentation/locking/spinlocks.rst +++ b/Documentation/locking/spinlocks.rst | |||
@@ -82,7 +82,7 @@ itself. The read lock allows many concurrent readers. Anything that | |||
82 | **changes** the list will have to get the write lock. | 82 | **changes** the list will have to get the write lock. |
83 | 83 | ||
84 | NOTE! RCU is better for list traversal, but requires careful | 84 | NOTE! RCU is better for list traversal, but requires careful |
85 | attention to design detail (see Documentation/RCU/listRCU.txt). | 85 | attention to design detail (see Documentation/RCU/listRCU.rst). |
86 | 86 | ||
87 | Also, you cannot "upgrade" a read-lock to a write-lock, so if you at _any_ | 87 | Also, you cannot "upgrade" a read-lock to a write-lock, so if you at _any_ |
88 | time need to do any changes (even if you don't do it every time), you have | 88 | time need to do any changes (even if you don't do it every time), you have |
@@ -90,7 +90,7 @@ to get the write-lock at the very beginning. | |||
90 | 90 | ||
91 | NOTE! We are working hard to remove reader-writer spinlocks in most | 91 | NOTE! We are working hard to remove reader-writer spinlocks in most |
92 | cases, so please don't add a new one without consensus. (Instead, see | 92 | cases, so please don't add a new one without consensus. (Instead, see |
93 | Documentation/RCU/rcu.txt for complete information.) | 93 | Documentation/RCU/rcu.rst for complete information.) |
94 | 94 | ||
95 | ---- | 95 | ---- |
96 | 96 | ||
diff --git a/Documentation/maintainer/conf.py b/Documentation/maintainer/conf.py deleted file mode 100644 index 81e9eb7a7884..000000000000 --- a/Documentation/maintainer/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = 'Linux Kernel Development Documentation' | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'maintainer.tex', 'Linux Kernel Development Documentation', | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/media/conf.py b/Documentation/media/conf.py deleted file mode 100644 index 1f194fcd2cae..000000000000 --- a/Documentation/media/conf.py +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | # SPDX-License-Identifier: GPL-2.0 | ||
4 | |||
5 | project = 'Linux Media Subsystem Documentation' | ||
6 | |||
7 | tags.add("subproject") | ||
8 | |||
9 | latex_documents = [ | ||
10 | ('index', 'media.tex', 'Linux Media Subsystem Documentation', | ||
11 | 'The kernel development community', 'manual'), | ||
12 | ] | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 045bb8148fe9..1adbb8a371c7 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -548,7 +548,7 @@ There are certain things that the Linux kernel memory barriers do not guarantee: | |||
548 | 548 | ||
549 | [*] For information on bus mastering DMA and coherency please read: | 549 | [*] For information on bus mastering DMA and coherency please read: |
550 | 550 | ||
551 | Documentation/PCI/pci.rst | 551 | Documentation/driver-api/pci/pci.rst |
552 | Documentation/DMA-API-HOWTO.txt | 552 | Documentation/DMA-API-HOWTO.txt |
553 | Documentation/DMA-API.txt | 553 | Documentation/DMA-API.txt |
554 | 554 | ||
diff --git a/Documentation/networking/conf.py b/Documentation/networking/conf.py deleted file mode 100644 index 40f69e67a883..000000000000 --- a/Documentation/networking/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Linux Networking Documentation" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'networking.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/power/index.rst b/Documentation/power/index.rst index 20415f21e48a..002e42745263 100644 --- a/Documentation/power/index.rst +++ b/Documentation/power/index.rst | |||
@@ -1,4 +1,4 @@ | |||
1 | :orphan: | 1 | .. SPDX-License-Identifier: GPL-2.0 |
2 | 2 | ||
3 | ================ | 3 | ================ |
4 | Power Management | 4 | Power Management |
diff --git a/Documentation/powerpc/bootwrapper.txt b/Documentation/powerpc/bootwrapper.rst index d60fced5e1cc..a6292afba573 100644 --- a/Documentation/powerpc/bootwrapper.txt +++ b/Documentation/powerpc/bootwrapper.rst | |||
@@ -1,5 +1,7 @@ | |||
1 | ======================== | ||
1 | The PowerPC boot wrapper | 2 | The PowerPC boot wrapper |
2 | ------------------------ | 3 | ======================== |
4 | |||
3 | Copyright (C) Secret Lab Technologies Ltd. | 5 | Copyright (C) Secret Lab Technologies Ltd. |
4 | 6 | ||
5 | PowerPC image targets compresses and wraps the kernel image (vmlinux) with | 7 | 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 | |||
21 | image. The details of the build system is discussed in the next section. | 23 | image. The details of the build system is discussed in the next section. |
22 | Currently, the following image format targets exist: | 24 | Currently, the following image format targets exist: |
23 | 25 | ||
26 | ==================== ======================================================== | ||
24 | cuImage.%: Backwards compatible uImage for older version of | 27 | cuImage.%: Backwards compatible uImage for older version of |
25 | U-Boot (for versions that don't understand the device | 28 | U-Boot (for versions that don't understand the device |
26 | tree). This image embeds a device tree blob inside | 29 | tree). This image embeds a device tree blob inside |
@@ -29,31 +32,36 @@ Currently, the following image format targets exist: | |||
29 | with boot wrapper code that extracts data from the old | 32 | with boot wrapper code that extracts data from the old |
30 | bd_info structure and loads the data into the device | 33 | bd_info structure and loads the data into the device |
31 | tree before jumping into the kernel. | 34 | 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 | ||
33 | bd_info structure used in the old U-Boot interfaces, | 37 | bd_info structure used in the old U-Boot interfaces, |
34 | cuImages are platform specific. Each specific | 38 | cuImages are platform specific. Each specific |
35 | U-Boot platform has a different platform init file | 39 | U-Boot platform has a different platform init file |
36 | which populates the embedded device tree with data | 40 | which populates the embedded device tree with data |
37 | from the platform specific bd_info file. The platform | 41 | from the platform specific bd_info file. The platform |
38 | specific cuImage platform init code can be found in | 42 | 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 |
40 | cuImage init code for a specific board can be found in | 44 | cuImage init code for a specific board can be found in |
41 | the wrapper structure. | 45 | the wrapper structure. |
46 | |||
42 | dtbImage.%: Similar to zImage, except device tree blob is embedded | 47 | dtbImage.%: Similar to zImage, except device tree blob is embedded |
43 | inside the image instead of provided by firmware. The | 48 | inside the image instead of provided by firmware. The |
44 | output image file can be either an elf file or a flat | 49 | output image file can be either an elf file or a flat |
45 | binary depending on the platform. | 50 | 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 | ||
47 | interface for passing a device tree directly. | 53 | interface for passing a device tree directly. |
48 | dtbImages are similar to simpleImages except that | 54 | dtbImages are similar to simpleImages except that |
49 | dtbImages have platform specific code for extracting | 55 | dtbImages have platform specific code for extracting |
50 | data from the board firmware, but simpleImages do not | 56 | data from the board firmware, but simpleImages do not |
51 | talk to the firmware at all. | 57 | 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 | ||
53 | Planet boards using the PlanetCore firmware. Board | 60 | Planet boards using the PlanetCore firmware. Board |
54 | specific initialization code is typically found in a | 61 | specific initialization code is typically found in a |
55 | file named arch/powerpc/boot/<platform>.c; but this | 62 | file named arch/powerpc/boot/<platform>.c; but this |
56 | can be overridden by the wrapper script. | 63 | can be overridden by the wrapper script. |
64 | |||
57 | simpleImage.%: Firmware independent compressed image that does not | 65 | simpleImage.%: Firmware independent compressed image that does not |
58 | depend on any particular firmware interface and embeds | 66 | depend on any particular firmware interface and embeds |
59 | a device tree blob. This image is a flat binary that | 67 | a device tree blob. This image is a flat binary that |
@@ -61,14 +69,16 @@ Currently, the following image format targets exist: | |||
61 | Firmware cannot pass any configuration data to the | 69 | Firmware cannot pass any configuration data to the |
62 | kernel with this image type and it depends entirely on | 70 | kernel with this image type and it depends entirely on |
63 | the embedded device tree for all information. | 71 | 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 | ||
65 | an unknown firmware interface or for booting from | 74 | an unknown firmware interface or for booting from |
66 | a debugger when no firmware is present (such as on | 75 | a debugger when no firmware is present (such as on |
67 | the Xilinx Virtex platform). The only assumption that | 76 | the Xilinx Virtex platform). The only assumption that |
68 | simpleImage makes is that RAM is correctly initialized | 77 | simpleImage makes is that RAM is correctly initialized |
69 | and that the MMU is either off or has RAM mapped to | 78 | and that the MMU is either off or has RAM mapped to |
70 | base address 0. | 79 | base address 0. |
71 | simpleImage also supports inserting special platform | 80 | |
81 | simpleImage also supports inserting special platform | ||
72 | specific initialization code to the start of the bootup | 82 | specific initialization code to the start of the bootup |
73 | sequence. The virtex405 platform uses this feature to | 83 | sequence. The virtex405 platform uses this feature to |
74 | ensure that the cache is invalidated before caching | 84 | ensure that the cache is invalidated before caching |
@@ -81,9 +91,11 @@ Currently, the following image format targets exist: | |||
81 | named (virtex405-<board>.dts). Search the wrapper | 91 | named (virtex405-<board>.dts). Search the wrapper |
82 | script for 'virtex405' and see the file | 92 | script for 'virtex405' and see the file |
83 | arch/powerpc/boot/virtex405-head.S for details. | 93 | arch/powerpc/boot/virtex405-head.S for details. |
94 | |||
84 | treeImage.%; Image format for used with OpenBIOS firmware found | 95 | treeImage.%; Image format for used with OpenBIOS firmware found |
85 | on some ppc4xx hardware. This image embeds a device | 96 | on some ppc4xx hardware. This image embeds a device |
86 | tree blob inside the image. | 97 | tree blob inside the image. |
98 | |||
87 | uImage: Native image format used by U-Boot. The uImage target | 99 | uImage: Native image format used by U-Boot. The uImage target |
88 | does not add any boot code. It just wraps a compressed | 100 | does not add any boot code. It just wraps a compressed |
89 | vmlinux in the uImage data structure. This image | 101 | vmlinux in the uImage data structure. This image |
@@ -91,12 +103,14 @@ Currently, the following image format targets exist: | |||
91 | a device tree to the kernel at boot. If using an older | 103 | a device tree to the kernel at boot. If using an older |
92 | version of U-Boot, then you need to use a cuImage | 104 | version of U-Boot, then you need to use a cuImage |
93 | instead. | 105 | instead. |
106 | |||
94 | zImage.%: Image format which does not embed a device tree. | 107 | zImage.%: Image format which does not embed a device tree. |
95 | Used by OpenFirmware and other firmware interfaces | 108 | Used by OpenFirmware and other firmware interfaces |
96 | which are able to supply a device tree. This image | 109 | which are able to supply a device tree. This image |
97 | expects firmware to provide the device tree at boot. | 110 | expects firmware to provide the device tree at boot. |
98 | Typically, if you have general purpose PowerPC | 111 | Typically, if you have general purpose PowerPC |
99 | hardware then you want this image format. | 112 | hardware then you want this image format. |
113 | ==================== ======================================================== | ||
100 | 114 | ||
101 | Image types which embed a device tree blob (simpleImage, dtbImage, treeImage, | 115 | Image types which embed a device tree blob (simpleImage, dtbImage, treeImage, |
102 | and cuImage) all generate the device tree blob from a file in the | 116 | and cuImage) all generate the device tree blob from a file in the |
diff --git a/Documentation/powerpc/cpu_families.txt b/Documentation/powerpc/cpu_families.rst index fc08e22feb1a..1e063c5440c3 100644 --- a/Documentation/powerpc/cpu_families.txt +++ b/Documentation/powerpc/cpu_families.rst | |||
@@ -1,3 +1,4 @@ | |||
1 | ============ | ||
1 | CPU Families | 2 | CPU Families |
2 | ============ | 3 | ============ |
3 | 4 | ||
@@ -8,8 +9,8 @@ and are supported by arch/powerpc. | |||
8 | Book3S (aka sPAPR) | 9 | Book3S (aka sPAPR) |
9 | ------------------ | 10 | ------------------ |
10 | 11 | ||
11 | - Hash MMU | 12 | - Hash MMU |
12 | - Mix of 32 & 64 bit | 13 | - Mix of 32 & 64 bit:: |
13 | 14 | ||
14 | +--------------+ +----------------+ | 15 | +--------------+ +----------------+ |
15 | | Old POWER | --------------> | RS64 (threads) | | 16 | | Old POWER | --------------> | RS64 (threads) | |
@@ -108,8 +109,8 @@ Book3S (aka sPAPR) | |||
108 | IBM BookE | 109 | IBM BookE |
109 | --------- | 110 | --------- |
110 | 111 | ||
111 | - Software loaded TLB. | 112 | - Software loaded TLB. |
112 | - All 32 bit | 113 | - All 32 bit:: |
113 | 114 | ||
114 | +--------------+ | 115 | +--------------+ |
115 | | 401 | | 116 | | 401 | |
@@ -155,8 +156,8 @@ IBM BookE | |||
155 | Motorola/Freescale 8xx | 156 | Motorola/Freescale 8xx |
156 | ---------------------- | 157 | ---------------------- |
157 | 158 | ||
158 | - Software loaded with hardware assist. | 159 | - Software loaded with hardware assist. |
159 | - All 32 bit | 160 | - All 32 bit:: |
160 | 161 | ||
161 | +-------------+ | 162 | +-------------+ |
162 | | MPC8xx Core | | 163 | | MPC8xx Core | |
@@ -166,9 +167,9 @@ Motorola/Freescale 8xx | |||
166 | Freescale BookE | 167 | Freescale BookE |
167 | --------------- | 168 | --------------- |
168 | 169 | ||
169 | - Software loaded TLB. | 170 | - Software loaded TLB. |
170 | - e6500 adds HW loaded indirect TLB entries. | 171 | - e6500 adds HW loaded indirect TLB entries. |
171 | - Mix of 32 & 64 bit | 172 | - Mix of 32 & 64 bit:: |
172 | 173 | ||
173 | +--------------+ | 174 | +--------------+ |
174 | | e200 | | 175 | | e200 | |
@@ -207,8 +208,8 @@ Freescale BookE | |||
207 | IBM A2 core | 208 | IBM A2 core |
208 | ----------- | 209 | ----------- |
209 | 210 | ||
210 | - Book3E, software loaded TLB + HW loaded indirect TLB entries. | 211 | - Book3E, software loaded TLB + HW loaded indirect TLB entries. |
211 | - 64 bit | 212 | - 64 bit:: |
212 | 213 | ||
213 | +--------------+ +----------------+ | 214 | +--------------+ +----------------+ |
214 | | A2 core | --> | WSP | | 215 | | A2 core | --> | WSP | |
diff --git a/Documentation/powerpc/cpu_features.txt b/Documentation/powerpc/cpu_features.rst index ae09df8722c8..b7bcdd2f41bb 100644 --- a/Documentation/powerpc/cpu_features.txt +++ b/Documentation/powerpc/cpu_features.rst | |||
@@ -1,3 +1,7 @@ | |||
1 | ============ | ||
2 | CPU Features | ||
3 | ============ | ||
4 | |||
1 | Hollis Blanchard <hollis@austin.ibm.com> | 5 | Hollis Blanchard <hollis@austin.ibm.com> |
2 | 5 Jun 2002 | 6 | 5 Jun 2002 |
3 | 7 | ||
@@ -32,7 +36,7 @@ anyways). | |||
32 | After detecting the processor type, the kernel patches out sections of code | 36 | After detecting the processor type, the kernel patches out sections of code |
33 | that shouldn't be used by writing nop's over it. Using cpufeatures requires | 37 | that shouldn't be used by writing nop's over it. Using cpufeatures requires |
34 | just 2 macros (found in arch/powerpc/include/asm/cputable.h), as seen in head.S | 38 | just 2 macros (found in arch/powerpc/include/asm/cputable.h), as seen in head.S |
35 | transfer_to_handler: | 39 | transfer_to_handler:: |
36 | 40 | ||
37 | #ifdef CONFIG_ALTIVEC | 41 | #ifdef CONFIG_ALTIVEC |
38 | BEGIN_FTR_SECTION | 42 | BEGIN_FTR_SECTION |
diff --git a/Documentation/powerpc/cxl.txt b/Documentation/powerpc/cxl.rst index c5e8d5098ed3..920546d81326 100644 --- a/Documentation/powerpc/cxl.txt +++ b/Documentation/powerpc/cxl.rst | |||
@@ -1,3 +1,4 @@ | |||
1 | ==================================== | ||
1 | Coherent Accelerator Interface (CXL) | 2 | Coherent Accelerator Interface (CXL) |
2 | ==================================== | 3 | ==================================== |
3 | 4 | ||
@@ -21,6 +22,8 @@ Introduction | |||
21 | Hardware overview | 22 | Hardware overview |
22 | ================= | 23 | ================= |
23 | 24 | ||
25 | :: | ||
26 | |||
24 | POWER8/9 FPGA | 27 | POWER8/9 FPGA |
25 | +----------+ +---------+ | 28 | +----------+ +---------+ |
26 | | | | | | 29 | | | | | |
@@ -59,14 +62,16 @@ Hardware overview | |||
59 | the fault. The context to which this fault is serviced is based on | 62 | the fault. The context to which this fault is serviced is based on |
60 | who owns that acceleration function. | 63 | who owns that acceleration function. |
61 | 64 | ||
62 | POWER8 <-----> PSL Version 8 is compliant to the CAIA Version 1.0. | 65 | - POWER8 and PSL Version 8 are compliant to the CAIA Version 1.0. |
63 | POWER9 <-----> PSL Version 9 is compliant to the CAIA Version 2.0. | 66 | - POWER9 and PSL Version 9 are compliant to the CAIA Version 2.0. |
67 | |||
64 | This PSL Version 9 provides new features such as: | 68 | This PSL Version 9 provides new features such as: |
69 | |||
65 | * Interaction with the nest MMU on the P9 chip. | 70 | * Interaction with the nest MMU on the P9 chip. |
66 | * Native DMA support. | 71 | * Native DMA support. |
67 | * Supports sending ASB_Notify messages for host thread wakeup. | 72 | * Supports sending ASB_Notify messages for host thread wakeup. |
68 | * Supports Atomic operations. | 73 | * Supports Atomic operations. |
69 | * .... | 74 | * etc. |
70 | 75 | ||
71 | Cards with a PSL9 won't work on a POWER8 system and cards with a | 76 | Cards with a PSL9 won't work on a POWER8 system and cards with a |
72 | PSL8 won't work on a POWER9 system. | 77 | PSL8 won't work on a POWER9 system. |
@@ -147,7 +152,9 @@ User API | |||
147 | master devices. | 152 | master devices. |
148 | 153 | ||
149 | A userspace library libcxl is available here: | 154 | A userspace library libcxl is available here: |
155 | |||
150 | https://github.com/ibm-capi/libcxl | 156 | https://github.com/ibm-capi/libcxl |
157 | |||
151 | This provides a C interface to this kernel API. | 158 | This provides a C interface to this kernel API. |
152 | 159 | ||
153 | open | 160 | open |
@@ -165,7 +172,8 @@ open | |||
165 | When all available contexts are allocated the open call will fail | 172 | When all available contexts are allocated the open call will fail |
166 | and return -ENOSPC. | 173 | and return -ENOSPC. |
167 | 174 | ||
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 | ||
169 | the number of contexts that can be created, and therefore | 177 | the number of contexts that can be created, and therefore |
170 | how many times the device can be opened. The POWER8 CAPP | 178 | how many times the device can be opened. The POWER8 CAPP |
171 | supports 2040 IRQs and 3 are used by the kernel, so 2037 are | 179 | supports 2040 IRQs and 3 are used by the kernel, so 2037 are |
@@ -186,7 +194,9 @@ ioctl | |||
186 | updated as userspace allocates and frees memory. This ioctl | 194 | updated as userspace allocates and frees memory. This ioctl |
187 | returns once the AFU context is started. | 195 | returns once the AFU context is started. |
188 | 196 | ||
189 | Takes a pointer to a struct cxl_ioctl_start_work: | 197 | Takes a pointer to a struct cxl_ioctl_start_work |
198 | |||
199 | :: | ||
190 | 200 | ||
191 | struct cxl_ioctl_start_work { | 201 | struct cxl_ioctl_start_work { |
192 | __u64 flags; | 202 | __u64 flags; |
@@ -269,7 +279,7 @@ read | |||
269 | The buffer passed to read() must be at least 4K bytes. | 279 | The buffer passed to read() must be at least 4K bytes. |
270 | 280 | ||
271 | The result of the read will be a buffer of one or more events, | 281 | 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:: |
273 | 283 | ||
274 | struct cxl_event { | 284 | struct cxl_event { |
275 | struct cxl_event_header header; | 285 | struct cxl_event_header header; |
@@ -280,7 +290,9 @@ read | |||
280 | }; | 290 | }; |
281 | }; | 291 | }; |
282 | 292 | ||
283 | The struct cxl_event_header is defined as: | 293 | The struct cxl_event_header is defined as |
294 | |||
295 | :: | ||
284 | 296 | ||
285 | struct cxl_event_header { | 297 | struct cxl_event_header { |
286 | __u16 type; | 298 | __u16 type; |
@@ -307,7 +319,9 @@ read | |||
307 | For future extensions and padding. | 319 | For future extensions and padding. |
308 | 320 | ||
309 | If the event type is CXL_EVENT_AFU_INTERRUPT then the event | 321 | If the event type is CXL_EVENT_AFU_INTERRUPT then the event |
310 | structure is defined as: | 322 | structure is defined as |
323 | |||
324 | :: | ||
311 | 325 | ||
312 | struct cxl_event_afu_interrupt { | 326 | struct cxl_event_afu_interrupt { |
313 | __u16 flags; | 327 | __u16 flags; |
@@ -326,7 +340,9 @@ read | |||
326 | For future extensions and padding. | 340 | For future extensions and padding. |
327 | 341 | ||
328 | If the event type is CXL_EVENT_DATA_STORAGE then the event | 342 | If the event type is CXL_EVENT_DATA_STORAGE then the event |
329 | structure is defined as: | 343 | structure is defined as |
344 | |||
345 | :: | ||
330 | 346 | ||
331 | struct cxl_event_data_storage { | 347 | struct cxl_event_data_storage { |
332 | __u16 flags; | 348 | __u16 flags; |
@@ -356,7 +372,9 @@ read | |||
356 | For future extensions | 372 | For future extensions |
357 | 373 | ||
358 | If the event type is CXL_EVENT_AFU_ERROR then the event structure | 374 | If the event type is CXL_EVENT_AFU_ERROR then the event structure |
359 | is defined as: | 375 | is defined as |
376 | |||
377 | :: | ||
360 | 378 | ||
361 | struct cxl_event_afu_error { | 379 | struct cxl_event_afu_error { |
362 | __u16 flags; | 380 | __u16 flags; |
@@ -393,15 +411,15 @@ open | |||
393 | ioctl | 411 | ioctl |
394 | ----- | 412 | ----- |
395 | 413 | ||
396 | CXL_IOCTL_DOWNLOAD_IMAGE: | 414 | CXL_IOCTL_DOWNLOAD_IMAGE / CXL_IOCTL_VALIDATE_IMAGE: |
397 | CXL_IOCTL_VALIDATE_IMAGE: | ||
398 | Starts and controls flashing a new FPGA image. Partial | 415 | Starts and controls flashing a new FPGA image. Partial |
399 | reconfiguration is not supported (yet), so the image must contain | 416 | reconfiguration is not supported (yet), so the image must contain |
400 | a copy of the PSL and AFU(s). Since an image can be quite large, | 417 | a copy of the PSL and AFU(s). Since an image can be quite large, |
401 | the caller may have to iterate, splitting the image in smaller | 418 | the caller may have to iterate, splitting the image in smaller |
402 | chunks. | 419 | chunks. |
403 | 420 | ||
404 | Takes a pointer to a struct cxl_adapter_image: | 421 | Takes a pointer to a struct cxl_adapter_image:: |
422 | |||
405 | struct cxl_adapter_image { | 423 | struct cxl_adapter_image { |
406 | __u64 flags; | 424 | __u64 flags; |
407 | __u64 data; | 425 | __u64 data; |
@@ -442,7 +460,7 @@ Udev rules | |||
442 | The following udev rules could be used to create a symlink to the | 460 | The following udev rules could be used to create a symlink to the |
443 | most logical chardev to use in any programming mode (afuX.Yd for | 461 | most logical chardev to use in any programming mode (afuX.Yd for |
444 | dedicated, afuX.Ys for afu directed), since the API is virtually | 462 | dedicated, afuX.Ys for afu directed), since the API is virtually |
445 | identical for each: | 463 | identical for each:: |
446 | 464 | ||
447 | SUBSYSTEM=="cxl", ATTRS{mode}=="dedicated_process", SYMLINK="cxl/%b" | 465 | SUBSYSTEM=="cxl", ATTRS{mode}=="dedicated_process", SYMLINK="cxl/%b" |
448 | SUBSYSTEM=="cxl", ATTRS{mode}=="afu_directed", \ | 466 | SUBSYSTEM=="cxl", ATTRS{mode}=="afu_directed", \ |
diff --git a/Documentation/powerpc/cxlflash.txt b/Documentation/powerpc/cxlflash.rst index a64bdaa0a1cf..cea67931b3b9 100644 --- a/Documentation/powerpc/cxlflash.txt +++ b/Documentation/powerpc/cxlflash.rst | |||
@@ -1,3 +1,7 @@ | |||
1 | ================================ | ||
2 | Coherent Accelerator (CXL) Flash | ||
3 | ================================ | ||
4 | |||
1 | Introduction | 5 | Introduction |
2 | ============ | 6 | ============ |
3 | 7 | ||
@@ -28,7 +32,7 @@ Introduction | |||
28 | responsible for the initialization of the adapter, setting up the | 32 | responsible for the initialization of the adapter, setting up the |
29 | special path for user space access, and performing error recovery. It | 33 | special path for user space access, and performing error recovery. It |
30 | communicates directly the Flash Accelerator Functional Unit (AFU) | 34 | communicates directly the Flash Accelerator Functional Unit (AFU) |
31 | as described in Documentation/powerpc/cxl.txt. | 35 | as described in Documentation/powerpc/cxl.rst. |
32 | 36 | ||
33 | The cxlflash driver supports two, mutually exclusive, modes of | 37 | The cxlflash driver supports two, mutually exclusive, modes of |
34 | operation at the device (LUN) level: | 38 | operation at the device (LUN) level: |
@@ -58,7 +62,7 @@ Overview | |||
58 | 62 | ||
59 | The CXL Flash Adapter Driver establishes a master context with the | 63 | The CXL Flash Adapter Driver establishes a master context with the |
60 | AFU. It uses memory mapped I/O (MMIO) for this control and setup. The | 64 | 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:: |
62 | 66 | ||
63 | +-------------------------------+ | 67 | +-------------------------------+ |
64 | | 512 * 64 KB User MMIO | | 68 | | 512 * 64 KB User MMIO | |
@@ -375,7 +379,7 @@ CXL Flash Driver Host IOCTLs | |||
375 | Each host adapter instance that is supported by the cxlflash driver | 379 | Each host adapter instance that is supported by the cxlflash driver |
376 | has a special character device associated with it to enable a set of | 380 | has a special character device associated with it to enable a set of |
377 | host management function. These character devices are hosted in a | 381 | 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/*`. |
379 | 383 | ||
380 | Applications can be written to perform various functions using the | 384 | Applications can be written to perform various functions using the |
381 | host ioctl APIs below. | 385 | host ioctl APIs below. |
diff --git a/Documentation/powerpc/DAWR-POWER9.txt b/Documentation/powerpc/dawr-power9.rst index ecdbb076438c..c96ab6befd9c 100644 --- a/Documentation/powerpc/DAWR-POWER9.txt +++ b/Documentation/powerpc/dawr-power9.rst | |||
@@ -1,10 +1,11 @@ | |||
1 | ===================== | ||
1 | DAWR issues on POWER9 | 2 | DAWR issues on POWER9 |
2 | ============================ | 3 | ===================== |
3 | 4 | ||
4 | On POWER9 the Data Address Watchpoint Register (DAWR) can cause a checkstop | 5 | On POWER9 the Data Address Watchpoint Register (DAWR) can cause a checkstop |
5 | if it points to cache inhibited (CI) memory. Currently Linux has no way to | 6 | if it points to cache inhibited (CI) memory. Currently Linux has no way to |
6 | disinguish CI memory when configuring the DAWR, so (for now) the DAWR is | 7 | disinguish CI memory when configuring the DAWR, so (for now) the DAWR is |
7 | disabled by this commit: | 8 | disabled by this commit:: |
8 | 9 | ||
9 | commit 9654153158d3e0684a1bdb76dbababdb7111d5a0 | 10 | commit 9654153158d3e0684a1bdb76dbababdb7111d5a0 |
10 | Author: Michael Neuling <mikey@neuling.org> | 11 | Author: Michael Neuling <mikey@neuling.org> |
@@ -12,7 +13,7 @@ disabled by this commit: | |||
12 | powerpc: Disable DAWR in the base POWER9 CPU features | 13 | powerpc: Disable DAWR in the base POWER9 CPU features |
13 | 14 | ||
14 | Technical Details: | 15 | Technical Details: |
15 | ============================ | 16 | ================== |
16 | 17 | ||
17 | DAWR has 6 different ways of being set. | 18 | DAWR has 6 different ways of being set. |
18 | 1) ptrace | 19 | 1) ptrace |
@@ -37,7 +38,7 @@ DAWR on the migration. | |||
37 | For xmon, the 'bd' command will return an error on P9. | 38 | For xmon, the 'bd' command will return an error on P9. |
38 | 39 | ||
39 | Consequences for users | 40 | Consequences for users |
40 | ============================ | 41 | ====================== |
41 | 42 | ||
42 | For GDB watchpoints (ie 'watch' command) on POWER9 bare metal , GDB | 43 | For GDB watchpoints (ie 'watch' command) on POWER9 bare metal , GDB |
43 | will accept the command. Unfortunately since there is no hardware | 44 | will accept the command. Unfortunately since there is no hardware |
@@ -57,8 +58,8 @@ trapped in GDB. The watchpoint is remembered, so if the guest is | |||
57 | migrated back to the POWER8 host, it will start working again. | 58 | migrated back to the POWER8 host, it will start working again. |
58 | 59 | ||
59 | Force enabling the DAWR | 60 | Force enabling the DAWR |
60 | ============================= | 61 | ======================= |
61 | Kernels (since ~v5.2) have an option to force enable the DAWR via: | 62 | Kernels (since ~v5.2) have an option to force enable the DAWR via:: |
62 | 63 | ||
63 | echo Y > /sys/kernel/debug/powerpc/dawr_enable_dangerous | 64 | echo Y > /sys/kernel/debug/powerpc/dawr_enable_dangerous |
64 | 65 | ||
@@ -86,5 +87,7 @@ dawr_enable_dangerous file will fail if the hypervisor doesn't support | |||
86 | writing the DAWR. | 87 | writing the DAWR. |
87 | 88 | ||
88 | To double check the DAWR is working, run this kernel selftest: | 89 | To double check the DAWR is working, run this kernel selftest: |
90 | |||
89 | tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c | 91 | tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c |
92 | |||
90 | Any errors/failures/skips mean something is wrong. | 93 | Any errors/failures/skips mean something is wrong. |
diff --git a/Documentation/powerpc/dscr.txt b/Documentation/powerpc/dscr.rst index ece300c64f76..2ab99006014c 100644 --- a/Documentation/powerpc/dscr.txt +++ b/Documentation/powerpc/dscr.rst | |||
@@ -1,5 +1,6 @@ | |||
1 | DSCR (Data Stream Control Register) | 1 | =================================== |
2 | ================================================ | 2 | DSCR (Data Stream Control Register) |
3 | =================================== | ||
3 | 4 | ||
4 | DSCR register in powerpc allows user to have some control of prefetch of data | 5 | DSCR register in powerpc allows user to have some control of prefetch of data |
5 | stream in the processor. Please refer to the ISA documents or related manual | 6 | stream in the processor. Please refer to the ISA documents or related manual |
@@ -10,14 +11,17 @@ user interface. | |||
10 | 11 | ||
11 | (A) Data Structures: | 12 | (A) Data Structures: |
12 | 13 | ||
13 | (1) thread_struct: | 14 | (1) thread_struct:: |
15 | |||
14 | dscr /* Thread DSCR value */ | 16 | dscr /* Thread DSCR value */ |
15 | dscr_inherit /* Thread has changed default DSCR */ | 17 | dscr_inherit /* Thread has changed default DSCR */ |
16 | 18 | ||
17 | (2) PACA: | 19 | (2) PACA:: |
20 | |||
18 | dscr_default /* per-CPU DSCR default value */ | 21 | dscr_default /* per-CPU DSCR default value */ |
19 | 22 | ||
20 | (3) sysfs.c: | 23 | (3) sysfs.c:: |
24 | |||
21 | dscr_default /* System DSCR default value */ | 25 | dscr_default /* System DSCR default value */ |
22 | 26 | ||
23 | (B) Scheduler Changes: | 27 | (B) Scheduler Changes: |
@@ -35,8 +39,8 @@ user interface. | |||
35 | 39 | ||
36 | (C) SYSFS Interface: | 40 | (C) SYSFS Interface: |
37 | 41 | ||
38 | Global DSCR default: /sys/devices/system/cpu/dscr_default | 42 | - Global DSCR default: /sys/devices/system/cpu/dscr_default |
39 | CPU specific DSCR default: /sys/devices/system/cpu/cpuN/dscr | 43 | - CPU specific DSCR default: /sys/devices/system/cpu/cpuN/dscr |
40 | 44 | ||
41 | Changing the global DSCR default in the sysfs will change all the CPU | 45 | Changing the global DSCR default in the sysfs will change all the CPU |
42 | specific DSCR defaults immediately in their PACA structures. Again if | 46 | specific DSCR defaults immediately in their PACA structures. Again if |
diff --git a/Documentation/powerpc/eeh-pci-error-recovery.txt b/Documentation/powerpc/eeh-pci-error-recovery.rst index 678189280bb4..438a87ebc095 100644 --- a/Documentation/powerpc/eeh-pci-error-recovery.txt +++ b/Documentation/powerpc/eeh-pci-error-recovery.rst | |||
@@ -1,10 +1,10 @@ | |||
1 | ========================== | ||
2 | PCI Bus EEH Error Recovery | ||
3 | ========================== | ||
1 | 4 | ||
5 | Linas Vepstas <linas@austin.ibm.com> | ||
2 | 6 | ||
3 | PCI Bus EEH Error Recovery | 7 | 12 January 2005 |
4 | -------------------------- | ||
5 | Linas Vepstas | ||
6 | <linas@austin.ibm.com> | ||
7 | 12 January 2005 | ||
8 | 8 | ||
9 | 9 | ||
10 | Overview: | 10 | Overview: |
@@ -143,17 +143,17 @@ seen in /proc/ppc64/eeh (subject to change). Normally, almost | |||
143 | all of these occur during boot, when the PCI bus is scanned, where | 143 | all of these occur during boot, when the PCI bus is scanned, where |
144 | a large number of 0xff reads are part of the bus scan procedure. | 144 | a large number of 0xff reads are part of the bus scan procedure. |
145 | 145 | ||
146 | If a frozen slot is detected, code in | 146 | If a frozen slot is detected, code in |
147 | arch/powerpc/platforms/pseries/eeh.c will print a stack trace to | 147 | arch/powerpc/platforms/pseries/eeh.c will print a stack trace to |
148 | syslog (/var/log/messages). This stack trace has proven to be very | 148 | syslog (/var/log/messages). This stack trace has proven to be very |
149 | useful to device-driver authors for finding out at what point the EEH | 149 | useful to device-driver authors for finding out at what point the EEH |
150 | error was detected, as the error itself usually occurs slightly | 150 | error was detected, as the error itself usually occurs slightly |
151 | beforehand. | 151 | beforehand. |
152 | 152 | ||
153 | Next, it uses the Linux kernel notifier chain/work queue mechanism to | 153 | Next, it uses the Linux kernel notifier chain/work queue mechanism to |
154 | allow any interested parties to find out about the failure. Device | 154 | allow any interested parties to find out about the failure. Device |
155 | drivers, or other parts of the kernel, can use | 155 | drivers, or other parts of the kernel, can use |
156 | eeh_register_notifier(struct notifier_block *) to find out about EEH | 156 | `eeh_register_notifier(struct notifier_block *)` to find out about EEH |
157 | events. The event will include a pointer to the pci device, the | 157 | events. The event will include a pointer to the pci device, the |
158 | device node and some state info. Receivers of the event can "do as | 158 | device node and some state info. Receivers of the event can "do as |
159 | they wish"; the default handler will be described further in this | 159 | they wish"; the default handler will be described further in this |
@@ -162,10 +162,13 @@ section. | |||
162 | To assist in the recovery of the device, eeh.c exports the | 162 | To assist in the recovery of the device, eeh.c exports the |
163 | following functions: | 163 | following functions: |
164 | 164 | ||
165 | rtas_set_slot_reset() -- assert the PCI #RST line for 1/8th of a second | 165 | rtas_set_slot_reset() |
166 | rtas_configure_bridge() -- ask firmware to configure any PCI bridges | 166 | assert the PCI #RST line for 1/8th of a second |
167 | rtas_configure_bridge() | ||
168 | ask firmware to configure any PCI bridges | ||
167 | located topologically under the pci slot. | 169 | located topologically under the pci slot. |
168 | eeh_save_bars() and eeh_restore_bars(): save and restore the PCI | 170 | eeh_save_bars() and eeh_restore_bars(): |
171 | save and restore the PCI | ||
169 | config-space info for a device and any devices under it. | 172 | config-space info for a device and any devices under it. |
170 | 173 | ||
171 | 174 | ||
@@ -191,7 +194,7 @@ events get delivered to user-space scripts. | |||
191 | 194 | ||
192 | Following is an example sequence of events that cause a device driver | 195 | Following is an example sequence of events that cause a device driver |
193 | close function to be called during the first phase of an EEH reset. | 196 | close function to be called during the first phase of an EEH reset. |
194 | The following sequence is an example of the pcnet32 device driver. | 197 | The following sequence is an example of the pcnet32 device driver:: |
195 | 198 | ||
196 | rpa_php_unconfig_pci_adapter (struct slot *) // in rpaphp_pci.c | 199 | rpa_php_unconfig_pci_adapter (struct slot *) // in rpaphp_pci.c |
197 | { | 200 | { |
@@ -241,53 +244,54 @@ The following sequence is an example of the pcnet32 device driver. | |||
241 | }}}}}} | 244 | }}}}}} |
242 | 245 | ||
243 | 246 | ||
244 | in drivers/pci/pci_driver.c, | 247 | in drivers/pci/pci_driver.c, |
245 | struct device_driver->remove() is just pci_device_remove() | 248 | struct device_driver->remove() is just pci_device_remove() |
246 | which calls struct pci_driver->remove() which is pcnet32_remove_one() | 249 | which calls struct pci_driver->remove() which is pcnet32_remove_one() |
247 | which calls unregister_netdev() (in net/core/dev.c) | 250 | which calls unregister_netdev() (in net/core/dev.c) |
248 | which calls dev_close() (in net/core/dev.c) | 251 | which calls dev_close() (in net/core/dev.c) |
249 | which calls dev->stop() which is pcnet32_close() | 252 | which calls dev->stop() which is pcnet32_close() |
250 | which then does the appropriate shutdown. | 253 | which then does the appropriate shutdown. |
251 | 254 | ||
252 | --- | 255 | --- |
256 | |||
253 | Following is the analogous stack trace for events sent to user-space | 257 | Following is the analogous stack trace for events sent to user-space |
254 | when the pci device is unconfigured. | 258 | when the pci device is unconfigured:: |
255 | 259 | ||
256 | rpa_php_unconfig_pci_adapter() { // in rpaphp_pci.c | 260 | rpa_php_unconfig_pci_adapter() { // in rpaphp_pci.c |
257 | calls | ||
258 | pci_remove_bus_device (struct pci_dev *) { // in /drivers/pci/remove.c | ||
259 | calls | 261 | calls |
260 | pci_destroy_dev (struct pci_dev *) { | 262 | pci_remove_bus_device (struct pci_dev *) { // in /drivers/pci/remove.c |
261 | calls | 263 | calls |
262 | device_unregister (&dev->dev) { // in /drivers/base/core.c | 264 | pci_destroy_dev (struct pci_dev *) { |
263 | calls | 265 | calls |
264 | device_del(struct device * dev) { // in /drivers/base/core.c | 266 | device_unregister (&dev->dev) { // in /drivers/base/core.c |
265 | calls | 267 | calls |
266 | kobject_del() { //in /libs/kobject.c | 268 | device_del(struct device * dev) { // in /drivers/base/core.c |
267 | calls | 269 | calls |
268 | kobject_uevent() { // in /libs/kobject.c | 270 | kobject_del() { //in /libs/kobject.c |
269 | calls | 271 | calls |
270 | kset_uevent() { // in /lib/kobject.c | 272 | kobject_uevent() { // in /libs/kobject.c |
271 | calls | 273 | calls |
272 | kset->uevent_ops->uevent() // which is really just | 274 | kset_uevent() { // in /lib/kobject.c |
273 | a call to | ||
274 | dev_uevent() { // in /drivers/base/core.c | ||
275 | calls | 275 | calls |
276 | dev->bus->uevent() which is really just a call to | 276 | kset->uevent_ops->uevent() // which is really just |
277 | pci_uevent () { // in drivers/pci/hotplug.c | 277 | a call to |
278 | which prints device name, etc.... | 278 | dev_uevent() { // in /drivers/base/core.c |
279 | calls | ||
280 | dev->bus->uevent() which is really just a call to | ||
281 | pci_uevent () { // in drivers/pci/hotplug.c | ||
282 | which prints device name, etc.... | ||
283 | } | ||
279 | } | 284 | } |
280 | } | 285 | then kobject_uevent() sends a netlink uevent to userspace |
281 | then kobject_uevent() sends a netlink uevent to userspace | 286 | --> userspace uevent |
282 | --> userspace uevent | 287 | (during early boot, nobody listens to netlink events and |
283 | (during early boot, nobody listens to netlink events and | 288 | kobject_uevent() executes uevent_helper[], which runs the |
284 | kobject_uevent() executes uevent_helper[], which runs the | 289 | event process /sbin/hotplug) |
285 | event process /sbin/hotplug) | 290 | } |
286 | } | 291 | } |
287 | } | 292 | kobject_del() then calls sysfs_remove_dir(), which would |
288 | kobject_del() then calls sysfs_remove_dir(), which would | 293 | trigger any user-space daemon that was watching /sysfs, |
289 | trigger any user-space daemon that was watching /sysfs, | 294 | and notice the delete event. |
290 | and notice the delete event. | ||
291 | 295 | ||
292 | 296 | ||
293 | Pro's and Con's of the Current Design | 297 | Pro's and Con's of the Current Design |
@@ -299,12 +303,12 @@ individual device drivers, so that the current design throws a wide net. | |||
299 | The biggest negative of the design is that it potentially disturbs | 303 | The biggest negative of the design is that it potentially disturbs |
300 | network daemons and file systems that didn't need to be disturbed. | 304 | network daemons and file systems that didn't need to be disturbed. |
301 | 305 | ||
302 | -- A minor complaint is that resetting the network card causes | 306 | - A minor complaint is that resetting the network card causes |
303 | user-space back-to-back ifdown/ifup burps that potentially disturb | 307 | user-space back-to-back ifdown/ifup burps that potentially disturb |
304 | network daemons, that didn't need to even know that the pci | 308 | network daemons, that didn't need to even know that the pci |
305 | card was being rebooted. | 309 | card was being rebooted. |
306 | 310 | ||
307 | -- A more serious concern is that the same reset, for SCSI devices, | 311 | - A more serious concern is that the same reset, for SCSI devices, |
308 | causes havoc to mounted file systems. Scripts cannot post-facto | 312 | causes havoc to mounted file systems. Scripts cannot post-facto |
309 | unmount a file system without flushing pending buffers, but this | 313 | unmount a file system without flushing pending buffers, but this |
310 | is impossible, because I/O has already been stopped. Thus, | 314 | is impossible, because I/O has already been stopped. Thus, |
@@ -322,7 +326,7 @@ network daemons and file systems that didn't need to be disturbed. | |||
322 | from the block layer. It would be very natural to add an EEH | 326 | from the block layer. It would be very natural to add an EEH |
323 | reset into this chain of events. | 327 | reset into this chain of events. |
324 | 328 | ||
325 | -- If a SCSI error occurs for the root device, all is lost unless | 329 | - If a SCSI error occurs for the root device, all is lost unless |
326 | the sysadmin had the foresight to run /bin, /sbin, /etc, /var | 330 | the sysadmin had the foresight to run /bin, /sbin, /etc, /var |
327 | and so on, out of ramdisk/tmpfs. | 331 | and so on, out of ramdisk/tmpfs. |
328 | 332 | ||
@@ -330,5 +334,3 @@ network daemons and file systems that didn't need to be disturbed. | |||
330 | Conclusions | 334 | Conclusions |
331 | ----------- | 335 | ----------- |
332 | There's forward progress ... | 336 | There's forward progress ... |
333 | |||
334 | |||
diff --git a/Documentation/powerpc/firmware-assisted-dump.txt b/Documentation/powerpc/firmware-assisted-dump.rst index 10e7f4d16c14..9ca12830a48e 100644 --- a/Documentation/powerpc/firmware-assisted-dump.txt +++ b/Documentation/powerpc/firmware-assisted-dump.rst | |||
@@ -1,7 +1,8 @@ | |||
1 | ====================== | ||
2 | Firmware-Assisted Dump | ||
3 | ====================== | ||
1 | 4 | ||
2 | Firmware-Assisted Dump | 5 | July 2011 |
3 | ------------------------ | ||
4 | July 2011 | ||
5 | 6 | ||
6 | The goal of firmware-assisted dump is to enable the dump of | 7 | The goal of firmware-assisted dump is to enable the dump of |
7 | a crashed system, and to do so from a fully-reset system, and | 8 | a crashed system, and to do so from a fully-reset system, and |
@@ -27,11 +28,11 @@ in production use. | |||
27 | Comparing with kdump or other strategies, firmware-assisted | 28 | Comparing with kdump or other strategies, firmware-assisted |
28 | dump offers several strong, practical advantages: | 29 | dump offers several strong, practical advantages: |
29 | 30 | ||
30 | -- Unlike kdump, the system has been reset, and loaded | 31 | - Unlike kdump, the system has been reset, and loaded |
31 | with a fresh copy of the kernel. In particular, | 32 | with a fresh copy of the kernel. In particular, |
32 | PCI and I/O devices have been reinitialized and are | 33 | PCI and I/O devices have been reinitialized and are |
33 | in a clean, consistent state. | 34 | in a clean, consistent state. |
34 | -- Once the dump is copied out, the memory that held the dump | 35 | - Once the dump is copied out, the memory that held the dump |
35 | is immediately available to the running kernel. And therefore, | 36 | is immediately available to the running kernel. And therefore, |
36 | unlike kdump, fadump doesn't need a 2nd reboot to get back | 37 | unlike kdump, fadump doesn't need a 2nd reboot to get back |
37 | the system to the production configuration. | 38 | the system to the production configuration. |
@@ -40,17 +41,18 @@ The above can only be accomplished by coordination with, | |||
40 | and assistance from the Power firmware. The procedure is | 41 | and assistance from the Power firmware. The procedure is |
41 | as follows: | 42 | as follows: |
42 | 43 | ||
43 | -- The first kernel registers the sections of memory with the | 44 | - The first kernel registers the sections of memory with the |
44 | Power firmware for dump preservation during OS initialization. | 45 | Power firmware for dump preservation during OS initialization. |
45 | These registered sections of memory are reserved by the first | 46 | These registered sections of memory are reserved by the first |
46 | kernel during early boot. | 47 | kernel during early boot. |
47 | 48 | ||
48 | -- When a system crashes, the Power firmware will save | 49 | - When a system crashes, the Power firmware will save |
49 | the low memory (boot memory of size larger of 5% of system RAM | 50 | the low memory (boot memory of size larger of 5% of system RAM |
50 | or 256MB) of RAM to the previous registered region. It will | 51 | or 256MB) of RAM to the previous registered region. It will |
51 | also save system registers, and hardware PTE's. | 52 | also save system registers, and hardware PTE's. |
52 | 53 | ||
53 | NOTE: The term 'boot memory' means size of the low memory chunk | 54 | NOTE: |
55 | The term 'boot memory' means size of the low memory chunk | ||
54 | that is required for a kernel to boot successfully when | 56 | that is required for a kernel to boot successfully when |
55 | booted with restricted memory. By default, the boot memory | 57 | booted with restricted memory. By default, the boot memory |
56 | size will be the larger of 5% of system RAM or 256MB. | 58 | size will be the larger of 5% of system RAM or 256MB. |
@@ -64,12 +66,12 @@ as follows: | |||
64 | as fadump uses a predefined offset to reserve memory | 66 | as fadump uses a predefined offset to reserve memory |
65 | for boot memory dump preservation in case of a crash. | 67 | for boot memory dump preservation in case of a crash. |
66 | 68 | ||
67 | -- After the low memory (boot memory) area has been saved, the | 69 | - After the low memory (boot memory) area has been saved, the |
68 | firmware will reset PCI and other hardware state. It will | 70 | firmware will reset PCI and other hardware state. It will |
69 | *not* clear the RAM. It will then launch the bootloader, as | 71 | *not* clear the RAM. It will then launch the bootloader, as |
70 | normal. | 72 | normal. |
71 | 73 | ||
72 | -- The freshly booted kernel will notice that there is a new | 74 | - The freshly booted kernel will notice that there is a new |
73 | node (ibm,dump-kernel) in the device tree, indicating that | 75 | node (ibm,dump-kernel) in the device tree, indicating that |
74 | there is crash data available from a previous boot. During | 76 | there is crash data available from a previous boot. During |
75 | the early boot OS will reserve rest of the memory above | 77 | the early boot OS will reserve rest of the memory above |
@@ -77,17 +79,18 @@ as follows: | |||
77 | size. This will make sure that the second kernel will not | 79 | size. This will make sure that the second kernel will not |
78 | touch any of the dump memory area. | 80 | touch any of the dump memory area. |
79 | 81 | ||
80 | -- User-space tools will read /proc/vmcore to obtain the contents | 82 | - User-space tools will read /proc/vmcore to obtain the contents |
81 | of memory, which holds the previous crashed kernel dump in ELF | 83 | of memory, which holds the previous crashed kernel dump in ELF |
82 | format. The userspace tools may copy this info to disk, or | 84 | format. The userspace tools may copy this info to disk, or |
83 | network, nas, san, iscsi, etc. as desired. | 85 | network, nas, san, iscsi, etc. as desired. |
84 | 86 | ||
85 | -- Once the userspace tool is done saving dump, it will echo | 87 | - Once the userspace tool is done saving dump, it will echo |
86 | '1' to /sys/kernel/fadump_release_mem to release the reserved | 88 | '1' to /sys/kernel/fadump_release_mem to release the reserved |
87 | memory back to general use, except the memory required for | 89 | memory back to general use, except the memory required for |
88 | next firmware-assisted dump registration. | 90 | next firmware-assisted dump registration. |
89 | 91 | ||
90 | e.g. | 92 | e.g.:: |
93 | |||
91 | # echo 1 > /sys/kernel/fadump_release_mem | 94 | # echo 1 > /sys/kernel/fadump_release_mem |
92 | 95 | ||
93 | Please note that the firmware-assisted dump feature | 96 | Please note that the firmware-assisted dump feature |
@@ -95,7 +98,7 @@ is only available on Power6 and above systems with recent | |||
95 | firmware versions. | 98 | firmware versions. |
96 | 99 | ||
97 | Implementation details: | 100 | Implementation details: |
98 | ---------------------- | 101 | ----------------------- |
99 | 102 | ||
100 | During boot, a check is made to see if firmware supports | 103 | During boot, a check is made to see if firmware supports |
101 | this feature on that particular machine. If it does, then | 104 | this feature on that particular machine. If it does, then |
@@ -121,7 +124,7 @@ Allocator (CMA) for memory reservation if CMA is configured for kernel. | |||
121 | With CMA reservation this memory will be available for applications to | 124 | With CMA reservation this memory will be available for applications to |
122 | use it, while kernel is prevented from using it. With this fadump will | 125 | use it, while kernel is prevented from using it. With this fadump will |
123 | still be able to capture all of the kernel memory and most of the user | 126 | still be able to capture all of the kernel memory and most of the user |
124 | space memory except the user pages that were present in CMA region. | 127 | space memory except the user pages that were present in CMA region:: |
125 | 128 | ||
126 | o Memory Reservation during first kernel | 129 | o Memory Reservation during first kernel |
127 | 130 | ||
@@ -166,7 +169,7 @@ The tools to examine the dump will be same as the ones | |||
166 | used for kdump. | 169 | used for kdump. |
167 | 170 | ||
168 | How to enable firmware-assisted dump (fadump): | 171 | How to enable firmware-assisted dump (fadump): |
169 | ------------------------------------- | 172 | ---------------------------------------------- |
170 | 173 | ||
171 | 1. Set config option CONFIG_FA_DUMP=y and build kernel. | 174 | 1. Set config option CONFIG_FA_DUMP=y and build kernel. |
172 | 2. Boot into linux kernel with 'fadump=on' kernel cmdline option. | 175 | 2. Boot into linux kernel with 'fadump=on' kernel cmdline option. |
@@ -177,19 +180,20 @@ How to enable firmware-assisted dump (fadump): | |||
177 | to specify size of the memory to reserve for boot memory dump | 180 | to specify size of the memory to reserve for boot memory dump |
178 | preservation. | 181 | preservation. |
179 | 182 | ||
180 | NOTE: 1. 'fadump_reserve_mem=' parameter has been deprecated. Instead | 183 | NOTE: |
181 | use 'crashkernel=' to specify size of the memory to reserve | 184 | 1. 'fadump_reserve_mem=' parameter has been deprecated. Instead |
182 | for boot memory dump preservation. | 185 | use 'crashkernel=' to specify size of the memory to reserve |
183 | 2. If firmware-assisted dump fails to reserve memory then it | 186 | for boot memory dump preservation. |
184 | will fallback to existing kdump mechanism if 'crashkernel=' | 187 | 2. If firmware-assisted dump fails to reserve memory then it |
185 | option is set at kernel cmdline. | 188 | will fallback to existing kdump mechanism if 'crashkernel=' |
186 | 3. if user wants to capture all of user space memory and ok with | 189 | option is set at kernel cmdline. |
187 | reserved memory not available to production system, then | 190 | 3. if user wants to capture all of user space memory and ok with |
188 | 'fadump=nocma' kernel parameter can be used to fallback to | 191 | reserved memory not available to production system, then |
189 | old behaviour. | 192 | 'fadump=nocma' kernel parameter can be used to fallback to |
193 | old behaviour. | ||
190 | 194 | ||
191 | Sysfs/debugfs files: | 195 | Sysfs/debugfs files: |
192 | ------------ | 196 | -------------------- |
193 | 197 | ||
194 | Firmware-assisted dump feature uses sysfs file system to hold | 198 | Firmware-assisted dump feature uses sysfs file system to hold |
195 | the control files and debugfs file to display memory reserved region. | 199 | the control files and debugfs file to display memory reserved region. |
@@ -197,20 +201,20 @@ the control files and debugfs file to display memory reserved region. | |||
197 | Here is the list of files under kernel sysfs: | 201 | Here is the list of files under kernel sysfs: |
198 | 202 | ||
199 | /sys/kernel/fadump_enabled | 203 | /sys/kernel/fadump_enabled |
200 | |||
201 | This is used to display the fadump status. | 204 | This is used to display the fadump status. |
202 | 0 = fadump is disabled | 205 | |
203 | 1 = fadump is enabled | 206 | - 0 = fadump is disabled |
207 | - 1 = fadump is enabled | ||
204 | 208 | ||
205 | This interface can be used by kdump init scripts to identify if | 209 | This interface can be used by kdump init scripts to identify if |
206 | fadump is enabled in the kernel and act accordingly. | 210 | fadump is enabled in the kernel and act accordingly. |
207 | 211 | ||
208 | /sys/kernel/fadump_registered | 212 | /sys/kernel/fadump_registered |
209 | |||
210 | This is used to display the fadump registration status as well | 213 | This is used to display the fadump registration status as well |
211 | as to control (start/stop) the fadump registration. | 214 | as to control (start/stop) the fadump registration. |
212 | 0 = fadump is not registered. | 215 | |
213 | 1 = fadump is registered and ready to handle system crash. | 216 | - 0 = fadump is not registered. |
217 | - 1 = fadump is registered and ready to handle system crash. | ||
214 | 218 | ||
215 | To register fadump echo 1 > /sys/kernel/fadump_registered and | 219 | To register fadump echo 1 > /sys/kernel/fadump_registered and |
216 | echo 0 > /sys/kernel/fadump_registered for un-register and stop the | 220 | echo 0 > /sys/kernel/fadump_registered for un-register and stop the |
@@ -219,13 +223,12 @@ Here is the list of files under kernel sysfs: | |||
219 | easily integrated with kdump service start/stop. | 223 | easily integrated with kdump service start/stop. |
220 | 224 | ||
221 | /sys/kernel/fadump_release_mem | 225 | /sys/kernel/fadump_release_mem |
222 | |||
223 | This file is available only when fadump is active during | 226 | This file is available only when fadump is active during |
224 | second kernel. This is used to release the reserved memory | 227 | second kernel. This is used to release the reserved memory |
225 | region that are held for saving crash dump. To release the | 228 | region that are held for saving crash dump. To release the |
226 | reserved memory echo 1 to it: | 229 | reserved memory echo 1 to it:: |
227 | 230 | ||
228 | echo 1 > /sys/kernel/fadump_release_mem | 231 | echo 1 > /sys/kernel/fadump_release_mem |
229 | 232 | ||
230 | After echo 1, the content of the /sys/kernel/debug/powerpc/fadump_region | 233 | After echo 1, the content of the /sys/kernel/debug/powerpc/fadump_region |
231 | file will change to reflect the new memory reservations. | 234 | file will change to reflect the new memory reservations. |
@@ -238,38 +241,39 @@ Here is the list of files under powerpc debugfs: | |||
238 | (Assuming debugfs is mounted on /sys/kernel/debug directory.) | 241 | (Assuming debugfs is mounted on /sys/kernel/debug directory.) |
239 | 242 | ||
240 | /sys/kernel/debug/powerpc/fadump_region | 243 | /sys/kernel/debug/powerpc/fadump_region |
241 | |||
242 | This file shows the reserved memory regions if fadump is | 244 | This file shows the reserved memory regions if fadump is |
243 | enabled otherwise this file is empty. The output format | 245 | enabled otherwise this file is empty. The output format |
244 | is: | 246 | is:: |
245 | <region>: [<start>-<end>] <reserved-size> bytes, Dumped: <dump-size> | 247 | |
248 | <region>: [<start>-<end>] <reserved-size> bytes, Dumped: <dump-size> | ||
246 | 249 | ||
247 | e.g. | 250 | e.g. |
248 | Contents when fadump is registered during first kernel | 251 | Contents when fadump is registered during first kernel:: |
249 | 252 | ||
250 | # cat /sys/kernel/debug/powerpc/fadump_region | 253 | # cat /sys/kernel/debug/powerpc/fadump_region |
251 | CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x0 | 254 | CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x0 |
252 | HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x0 | 255 | HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x0 |
253 | DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x0 | 256 | DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x0 |
254 | 257 | ||
255 | Contents when fadump is active during second kernel | 258 | Contents when fadump is active during second kernel:: |
256 | 259 | ||
257 | # cat /sys/kernel/debug/powerpc/fadump_region | 260 | # cat /sys/kernel/debug/powerpc/fadump_region |
258 | CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x40020 | 261 | CPU : [0x0000006ffb0000-0x0000006fff001f] 0x40020 bytes, Dumped: 0x40020 |
259 | HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x1000 | 262 | HPTE: [0x0000006fff0020-0x0000006fff101f] 0x1000 bytes, Dumped: 0x1000 |
260 | DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x10000000 | 263 | DUMP: [0x0000006fff1020-0x0000007fff101f] 0x10000000 bytes, Dumped: 0x10000000 |
261 | : [0x00000010000000-0x0000006ffaffff] 0x5ffb0000 bytes, Dumped: 0x5ffb0000 | 264 | : [0x00000010000000-0x0000006ffaffff] 0x5ffb0000 bytes, Dumped: 0x5ffb0000 |
262 | 265 | ||
263 | NOTE: Please refer to Documentation/filesystems/debugfs.txt on | 266 | NOTE: |
267 | Please refer to Documentation/filesystems/debugfs.txt on | ||
264 | how to mount the debugfs filesystem. | 268 | how to mount the debugfs filesystem. |
265 | 269 | ||
266 | 270 | ||
267 | TODO: | 271 | TODO: |
268 | ----- | 272 | ----- |
269 | o Need to come up with the better approach to find out more | 273 | - Need to come up with the better approach to find out more |
270 | accurate boot memory size that is required for a kernel to | 274 | accurate boot memory size that is required for a kernel to |
271 | boot successfully when booted with restricted memory. | 275 | boot successfully when booted with restricted memory. |
272 | o The fadump implementation introduces a fadump crash info structure | 276 | - The fadump implementation introduces a fadump crash info structure |
273 | in the scratch area before the ELF core header. The idea of introducing | 277 | in the scratch area before the ELF core header. The idea of introducing |
274 | this structure is to pass some important crash info data to the second | 278 | this structure is to pass some important crash info data to the second |
275 | kernel which will help second kernel to populate ELF core header with | 279 | kernel which will help second kernel to populate ELF core header with |
@@ -277,7 +281,9 @@ TODO: | |||
277 | design implementation does not address a possibility of introducing | 281 | design implementation does not address a possibility of introducing |
278 | additional fields (in future) to this structure without affecting | 282 | additional fields (in future) to this structure without affecting |
279 | compatibility. Need to come up with the better approach to address this. | 283 | compatibility. Need to come up with the better approach to address this. |
284 | |||
280 | The possible approaches are: | 285 | The possible approaches are: |
286 | |||
281 | 1. Introduce version field for version tracking, bump up the version | 287 | 1. Introduce version field for version tracking, bump up the version |
282 | whenever a new field is added to the structure in future. The version | 288 | whenever a new field is added to the structure in future. The version |
283 | field can be used to find out what fields are valid for the current | 289 | field can be used to find out what fields are valid for the current |
@@ -285,8 +291,11 @@ TODO: | |||
285 | 2. Reserve the area of predefined size (say PAGE_SIZE) for this | 291 | 2. Reserve the area of predefined size (say PAGE_SIZE) for this |
286 | structure and have unused area as reserved (initialized to zero) | 292 | structure and have unused area as reserved (initialized to zero) |
287 | for future field additions. | 293 | for future field additions. |
294 | |||
288 | The advantage of approach 1 over 2 is we don't need to reserve extra space. | 295 | The advantage of approach 1 over 2 is we don't need to reserve extra space. |
289 | --- | 296 | |
290 | Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> | 297 | Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> |
298 | |||
291 | This document is based on the original documentation written for phyp | 299 | This document is based on the original documentation written for phyp |
300 | |||
292 | assisted dump by Linas Vepstas and Manish Ahuja. | 301 | assisted dump by Linas Vepstas and Manish Ahuja. |
diff --git a/Documentation/powerpc/hvcs.txt b/Documentation/powerpc/hvcs.rst index a730ca5a07f8..6808acde672f 100644 --- a/Documentation/powerpc/hvcs.txt +++ b/Documentation/powerpc/hvcs.rst | |||
@@ -1,19 +1,22 @@ | |||
1 | =========================================================================== | 1 | =============================================================== |
2 | HVCS | 2 | HVCS IBM "Hypervisor Virtual Console Server" Installation Guide |
3 | IBM "Hypervisor Virtual Console Server" Installation Guide | 3 | =============================================================== |
4 | for Linux Kernel 2.6.4+ | ||
5 | Copyright (C) 2004 IBM Corporation | ||
6 | 4 | ||
7 | =========================================================================== | 5 | for Linux Kernel 2.6.4+ |
8 | NOTE:Eight space tabs are the optimum editor setting for reading this file. | ||
9 | =========================================================================== | ||
10 | 6 | ||
11 | Author(s) : Ryan S. Arnold <rsa@us.ibm.com> | 7 | Copyright (C) 2004 IBM Corporation |
12 | Date Created: March, 02, 2004 | ||
13 | Last Changed: August, 24, 2004 | ||
14 | 8 | ||
15 | --------------------------------------------------------------------------- | 9 | .. =========================================================================== |
16 | Table of contents: | 10 | .. NOTE:Eight space tabs are the optimum editor setting for reading this file. |
11 | .. =========================================================================== | ||
12 | |||
13 | |||
14 | Author(s): Ryan S. Arnold <rsa@us.ibm.com> | ||
15 | |||
16 | Date Created: March, 02, 2004 | ||
17 | Last Changed: August, 24, 2004 | ||
18 | |||
19 | .. Table of contents: | ||
17 | 20 | ||
18 | 1. Driver Introduction: | 21 | 1. Driver Introduction: |
19 | 2. System Requirements | 22 | 2. System Requirements |
@@ -27,8 +30,8 @@ Table of contents: | |||
27 | 8. Questions & Answers: | 30 | 8. Questions & Answers: |
28 | 9. Reporting Bugs: | 31 | 9. Reporting Bugs: |
29 | 32 | ||
30 | --------------------------------------------------------------------------- | ||
31 | 1. Driver Introduction: | 33 | 1. Driver Introduction: |
34 | ======================= | ||
32 | 35 | ||
33 | This is the device driver for the IBM Hypervisor Virtual Console Server, | 36 | This is the device driver for the IBM Hypervisor Virtual Console Server, |
34 | "hvcs". The IBM hvcs provides a tty driver interface to allow Linux user | 37 | "hvcs". The IBM hvcs provides a tty driver interface to allow Linux user |
@@ -38,8 +41,8 @@ ppc64 system. Physical hardware consoles per partition are not practical | |||
38 | on this hardware so system consoles are accessed by this driver using | 41 | on this hardware so system consoles are accessed by this driver using |
39 | firmware interfaces to virtual terminal devices. | 42 | firmware interfaces to virtual terminal devices. |
40 | 43 | ||
41 | --------------------------------------------------------------------------- | ||
42 | 2. System Requirements: | 44 | 2. System Requirements: |
45 | ======================= | ||
43 | 46 | ||
44 | This device driver was written using 2.6.4 Linux kernel APIs and will only | 47 | This device driver was written using 2.6.4 Linux kernel APIs and will only |
45 | build and run on kernels of this version or later. | 48 | build and run on kernels of this version or later. |
@@ -52,8 +55,8 @@ Sysfs must be mounted on the system so that the user can determine which | |||
52 | major and minor numbers are associated with each vty-server. Directions | 55 | major and minor numbers are associated with each vty-server. Directions |
53 | for sysfs mounting are outside the scope of this document. | 56 | for sysfs mounting are outside the scope of this document. |
54 | 57 | ||
55 | --------------------------------------------------------------------------- | ||
56 | 3. Build Options: | 58 | 3. Build Options: |
59 | ================= | ||
57 | 60 | ||
58 | The hvcs driver registers itself as a tty driver. The tty layer | 61 | The hvcs driver registers itself as a tty driver. The tty layer |
59 | dynamically allocates a block of major and minor numbers in a quantity | 62 | dynamically allocates a block of major and minor numbers in a quantity |
@@ -65,11 +68,11 @@ If the default number of device entries is adequate then this driver can be | |||
65 | built into the kernel. If not, the default can be over-ridden by inserting | 68 | built into the kernel. If not, the default can be over-ridden by inserting |
66 | the driver as a module with insmod parameters. | 69 | the driver as a module with insmod parameters. |
67 | 70 | ||
68 | --------------------------------------------------------------------------- | ||
69 | 3.1 Built-in: | 71 | 3.1 Built-in: |
72 | ------------- | ||
70 | 73 | ||
71 | The following menuconfig example demonstrates selecting to build this | 74 | The following menuconfig example demonstrates selecting to build this |
72 | driver into the kernel. | 75 | driver into the kernel:: |
73 | 76 | ||
74 | Device Drivers ---> | 77 | Device Drivers ---> |
75 | Character devices ---> | 78 | Character devices ---> |
@@ -77,11 +80,11 @@ driver into the kernel. | |||
77 | 80 | ||
78 | Begin the kernel make process. | 81 | Begin the kernel make process. |
79 | 82 | ||
80 | --------------------------------------------------------------------------- | ||
81 | 3.2 Module: | 83 | 3.2 Module: |
84 | ----------- | ||
82 | 85 | ||
83 | The following menuconfig example demonstrates selecting to build this | 86 | The following menuconfig example demonstrates selecting to build this |
84 | driver as a kernel module. | 87 | driver as a kernel module:: |
85 | 88 | ||
86 | Device Drivers ---> | 89 | Device Drivers ---> |
87 | Character devices ---> | 90 | Character devices ---> |
@@ -89,11 +92,11 @@ driver as a kernel module. | |||
89 | 92 | ||
90 | The make process will build the following kernel modules: | 93 | The make process will build the following kernel modules: |
91 | 94 | ||
92 | hvcs.ko | 95 | - hvcs.ko |
93 | hvcserver.ko | 96 | - hvcserver.ko |
94 | 97 | ||
95 | To insert the module with the default allocation execute the following | 98 | To insert the module with the default allocation execute the following |
96 | commands in the order they appear: | 99 | commands in the order they appear:: |
97 | 100 | ||
98 | insmod hvcserver.ko | 101 | insmod hvcserver.ko |
99 | insmod hvcs.ko | 102 | insmod hvcs.ko |
@@ -103,7 +106,7 @@ be inserted first, otherwise the hvcs module will not find some of the | |||
103 | symbols it expects. | 106 | symbols it expects. |
104 | 107 | ||
105 | To override the default use an insmod parameter as follows (requesting 4 | 108 | To override the default use an insmod parameter as follows (requesting 4 |
106 | tty devices as an example): | 109 | tty devices as an example):: |
107 | 110 | ||
108 | insmod hvcs.ko hvcs_parm_num_devs=4 | 111 | insmod hvcs.ko hvcs_parm_num_devs=4 |
109 | 112 | ||
@@ -115,31 +118,31 @@ source file before building. | |||
115 | NOTE: The length of time it takes to insmod the driver seems to be related | 118 | NOTE: The length of time it takes to insmod the driver seems to be related |
116 | to the number of tty interfaces the registering driver requests. | 119 | to the number of tty interfaces the registering driver requests. |
117 | 120 | ||
118 | In order to remove the driver module execute the following command: | 121 | In order to remove the driver module execute the following command:: |
119 | 122 | ||
120 | rmmod hvcs.ko | 123 | rmmod hvcs.ko |
121 | 124 | ||
122 | The recommended method for installing hvcs as a module is to use depmod to | 125 | The recommended method for installing hvcs as a module is to use depmod to |
123 | build a current modules.dep file in /lib/modules/`uname -r` and then | 126 | build a current modules.dep file in /lib/modules/`uname -r` and then |
124 | execute: | 127 | execute:: |
125 | 128 | ||
126 | modprobe hvcs hvcs_parm_num_devs=4 | 129 | modprobe hvcs hvcs_parm_num_devs=4 |
127 | 130 | ||
128 | The modules.dep file indicates that hvcserver.ko needs to be inserted | 131 | The modules.dep file indicates that hvcserver.ko needs to be inserted |
129 | before hvcs.ko and modprobe uses this file to smartly insert the modules in | 132 | before hvcs.ko and modprobe uses this file to smartly insert the modules in |
130 | the proper order. | 133 | the proper order. |
131 | 134 | ||
132 | The following modprobe command is used to remove hvcs and hvcserver in the | 135 | The following modprobe command is used to remove hvcs and hvcserver in the |
133 | proper order: | 136 | proper order:: |
134 | 137 | ||
135 | modprobe -r hvcs | 138 | modprobe -r hvcs |
136 | 139 | ||
137 | --------------------------------------------------------------------------- | ||
138 | 4. Installation: | 140 | 4. Installation: |
141 | ================ | ||
139 | 142 | ||
140 | The tty layer creates sysfs entries which contain the major and minor | 143 | The tty layer creates sysfs entries which contain the major and minor |
141 | numbers allocated for the hvcs driver. The following snippet of "tree" | 144 | numbers allocated for the hvcs driver. The following snippet of "tree" |
142 | output of the sysfs directory shows where these numbers are presented: | 145 | output of the sysfs directory shows where these numbers are presented:: |
143 | 146 | ||
144 | sys/ | 147 | sys/ |
145 | |-- *other sysfs base dirs* | 148 | |-- *other sysfs base dirs* |
@@ -164,7 +167,7 @@ output of the sysfs directory shows where these numbers are presented: | |||
164 | |-- *other sysfs base dirs* | 167 | |-- *other sysfs base dirs* |
165 | 168 | ||
166 | For the above examples the following output is a result of cat'ing the | 169 | For the above examples the following output is a result of cat'ing the |
167 | "dev" entry in the hvcs directory: | 170 | "dev" entry in the hvcs directory:: |
168 | 171 | ||
169 | Pow5:/sys/class/tty/hvcs0/ # cat dev | 172 | Pow5:/sys/class/tty/hvcs0/ # cat dev |
170 | 254:0 | 173 | 254:0 |
@@ -184,7 +187,7 @@ systems running hvcs will already have the device entries created or udev | |||
184 | will do it automatically. | 187 | will do it automatically. |
185 | 188 | ||
186 | Given the example output above, to manually create a /dev/hvcs* node entry | 189 | Given the example output above, to manually create a /dev/hvcs* node entry |
187 | mknod can be used as follows: | 190 | mknod can be used as follows:: |
188 | 191 | ||
189 | mknod /dev/hvcs0 c 254 0 | 192 | mknod /dev/hvcs0 c 254 0 |
190 | mknod /dev/hvcs1 c 254 1 | 193 | mknod /dev/hvcs1 c 254 1 |
@@ -195,15 +198,15 @@ Using mknod to manually create the device entries makes these device nodes | |||
195 | persistent. Once created they will exist prior to the driver insmod. | 198 | persistent. Once created they will exist prior to the driver insmod. |
196 | 199 | ||
197 | Attempting to connect an application to /dev/hvcs* prior to insertion of | 200 | Attempting to connect an application to /dev/hvcs* prior to insertion of |
198 | the hvcs module will result in an error message similar to the following: | 201 | the hvcs module will result in an error message similar to the following:: |
199 | 202 | ||
200 | "/dev/hvcs*: No such device". | 203 | "/dev/hvcs*: No such device". |
201 | 204 | ||
202 | NOTE: Just because there is a device node present doesn't mean that there | 205 | NOTE: Just because there is a device node present doesn't mean that there |
203 | is a vty-server device configured for that node. | 206 | is a vty-server device configured for that node. |
204 | 207 | ||
205 | --------------------------------------------------------------------------- | ||
206 | 5. Connection | 208 | 5. Connection |
209 | ============= | ||
207 | 210 | ||
208 | Since this driver controls devices that provide a tty interface a user can | 211 | Since this driver controls devices that provide a tty interface a user can |
209 | interact with the device node entries using any standard tty-interactive | 212 | interact with the device node entries using any standard tty-interactive |
@@ -249,7 +252,7 @@ vty-server adapter is associated with which /dev/hvcs* node a special sysfs | |||
249 | attribute has been added to each vty-server sysfs entry. This entry is | 252 | attribute has been added to each vty-server sysfs entry. This entry is |
250 | called "index" and showing it reveals an integer that refers to the | 253 | called "index" and showing it reveals an integer that refers to the |
251 | /dev/hvcs* entry to use to connect to that device. For instance cating the | 254 | /dev/hvcs* entry to use to connect to that device. For instance cating the |
252 | index attribute of vty-server adapter 30000004 shows the following. | 255 | index attribute of vty-server adapter 30000004 shows the following:: |
253 | 256 | ||
254 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat index | 257 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat index |
255 | 2 | 258 | 2 |
@@ -262,8 +265,8 @@ system the /dev/hvcs* entry that interacts with a particular vty-server | |||
262 | adapter is not guaranteed to remain the same across system reboots. Look | 265 | adapter is not guaranteed to remain the same across system reboots. Look |
263 | in the Q & A section for more on this issue. | 266 | in the Q & A section for more on this issue. |
264 | 267 | ||
265 | --------------------------------------------------------------------------- | ||
266 | 6. Disconnection | 268 | 6. Disconnection |
269 | ================ | ||
267 | 270 | ||
268 | As a security feature to prevent the delivery of stale data to an | 271 | As a security feature to prevent the delivery of stale data to an |
269 | unintended target the Power5 system firmware disables the fetching of data | 272 | unintended target the Power5 system firmware disables the fetching of data |
@@ -305,7 +308,7 @@ connection between the vty-server and target vty ONLY if the vterm_state | |||
305 | previously read '1'. The write directive is ignored if the vterm_state | 308 | previously read '1'. The write directive is ignored if the vterm_state |
306 | read '0' or if any value other than '0' was written to the vterm_state | 309 | read '0' or if any value other than '0' was written to the vterm_state |
307 | attribute. The following example will show the method used for verifying | 310 | attribute. The following example will show the method used for verifying |
308 | the vty-server connection status and disconnecting a vty-server connection. | 311 | the vty-server connection status and disconnecting a vty-server connection:: |
309 | 312 | ||
310 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat vterm_state | 313 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat vterm_state |
311 | 1 | 314 | 1 |
@@ -318,12 +321,12 @@ the vty-server connection status and disconnecting a vty-server connection. | |||
318 | All vty-server connections are automatically terminated when the device is | 321 | All vty-server connections are automatically terminated when the device is |
319 | hotplug removed and when the module is removed. | 322 | hotplug removed and when the module is removed. |
320 | 323 | ||
321 | --------------------------------------------------------------------------- | ||
322 | 7. Configuration | 324 | 7. Configuration |
325 | ================ | ||
323 | 326 | ||
324 | Each vty-server has a sysfs entry in the /sys/devices/vio directory, which | 327 | Each vty-server has a sysfs entry in the /sys/devices/vio directory, which |
325 | is symlinked in several other sysfs tree directories, notably under the | 328 | is symlinked in several other sysfs tree directories, notably under the |
326 | hvcs driver entry, which looks like the following example: | 329 | hvcs driver entry, which looks like the following example:: |
327 | 330 | ||
328 | Pow5:/sys/bus/vio/drivers/hvcs # ls | 331 | Pow5:/sys/bus/vio/drivers/hvcs # ls |
329 | . .. 30000003 30000004 rescan | 332 | . .. 30000003 30000004 rescan |
@@ -344,7 +347,7 @@ completed or was never executed. | |||
344 | 347 | ||
345 | Vty-server entries in this directory are a 32 bit partition unique unit | 348 | Vty-server entries in this directory are a 32 bit partition unique unit |
346 | address that is created by firmware. An example vty-server sysfs entry | 349 | address that is created by firmware. An example vty-server sysfs entry |
347 | looks like the following: | 350 | looks like the following:: |
348 | 351 | ||
349 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # ls | 352 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # ls |
350 | . current_vty devspec name partner_vtys | 353 | . current_vty devspec name partner_vtys |
@@ -352,21 +355,21 @@ looks like the following: | |||
352 | 355 | ||
353 | Each entry is provided, by default with a "name" attribute. Reading the | 356 | Each entry is provided, by default with a "name" attribute. Reading the |
354 | "name" attribute will reveal the device type as shown in the following | 357 | "name" attribute will reveal the device type as shown in the following |
355 | example: | 358 | example:: |
356 | 359 | ||
357 | Pow5:/sys/bus/vio/drivers/hvcs/30000003 # cat name | 360 | Pow5:/sys/bus/vio/drivers/hvcs/30000003 # cat name |
358 | vty-server | 361 | vty-server |
359 | 362 | ||
360 | Each entry is also provided, by default, with a "devspec" attribute which | 363 | Each entry is also provided, by default, with a "devspec" attribute which |
361 | reveals the full device specification when read, as shown in the following | 364 | reveals the full device specification when read, as shown in the following |
362 | example: | 365 | example:: |
363 | 366 | ||
364 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat devspec | 367 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat devspec |
365 | /vdevice/vty-server@30000004 | 368 | /vdevice/vty-server@30000004 |
366 | 369 | ||
367 | Each vty-server sysfs dir is provided with two read-only attributes that | 370 | Each vty-server sysfs dir is provided with two read-only attributes that |
368 | provide lists of easily parsed partner vty data: "partner_vtys" and | 371 | provide lists of easily parsed partner vty data: "partner_vtys" and |
369 | "partner_clcs". | 372 | "partner_clcs":: |
370 | 373 | ||
371 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat partner_vtys | 374 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # cat partner_vtys |
372 | 30000000 | 375 | 30000000 |
@@ -396,7 +399,7 @@ A vty-server can only be connected to a single vty at a time. The entry, | |||
396 | read. | 399 | read. |
397 | 400 | ||
398 | The current_vty can be changed by writing a valid partner clc to the entry | 401 | The current_vty can be changed by writing a valid partner clc to the entry |
399 | as in the following example: | 402 | as in the following example:: |
400 | 403 | ||
401 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # echo U5112.428.10304 | 404 | Pow5:/sys/bus/vio/drivers/hvcs/30000004 # echo U5112.428.10304 |
402 | 8A-V4-C0 > current_vty | 405 | 8A-V4-C0 > current_vty |
@@ -408,9 +411,9 @@ currently open connection is freed. | |||
408 | Information on the "vterm_state" attribute was covered earlier on the | 411 | Information on the "vterm_state" attribute was covered earlier on the |
409 | chapter entitled "disconnection". | 412 | chapter entitled "disconnection". |
410 | 413 | ||
411 | --------------------------------------------------------------------------- | ||
412 | 8. Questions & Answers: | 414 | 8. Questions & Answers: |
413 | =========================================================================== | 415 | ======================= |
416 | |||
414 | Q: What are the security concerns involving hvcs? | 417 | Q: What are the security concerns involving hvcs? |
415 | 418 | ||
416 | A: There are three main security concerns: | 419 | A: There are three main security concerns: |
@@ -429,6 +432,7 @@ A: There are three main security concerns: | |||
429 | partition) will experience the previously logged in session. | 432 | partition) will experience the previously logged in session. |
430 | 433 | ||
431 | --------------------------------------------------------------------------- | 434 | --------------------------------------------------------------------------- |
435 | |||
432 | Q: How do I multiplex a console that I grab through hvcs so that other | 436 | Q: How do I multiplex a console that I grab through hvcs so that other |
433 | people can see it: | 437 | people can see it: |
434 | 438 | ||
@@ -440,6 +444,7 @@ term type "screen" to others. This means that curses based programs may | |||
440 | not display properly in screen sessions. | 444 | not display properly in screen sessions. |
441 | 445 | ||
442 | --------------------------------------------------------------------------- | 446 | --------------------------------------------------------------------------- |
447 | |||
443 | Q: Why are the colors all messed up? | 448 | Q: Why are the colors all messed up? |
444 | Q: Why are the control characters acting strange or not working? | 449 | Q: Why are the control characters acting strange or not working? |
445 | Q: Why is the console output all strange and unintelligible? | 450 | Q: Why is the console output all strange and unintelligible? |
@@ -455,6 +460,7 @@ disconnect from the console. This will ensure that the next user gets | |||
455 | their own TERM type set when they login. | 460 | their own TERM type set when they login. |
456 | 461 | ||
457 | --------------------------------------------------------------------------- | 462 | --------------------------------------------------------------------------- |
463 | |||
458 | Q: When I try to CONNECT kermit to an hvcs device I get: | 464 | Q: When I try to CONNECT kermit to an hvcs device I get: |
459 | "Sorry, can't open connection: /dev/hvcs*"What is happening? | 465 | "Sorry, can't open connection: /dev/hvcs*"What is happening? |
460 | 466 | ||
@@ -490,6 +496,7 @@ A: There is not a corresponding vty-server device that maps to an existing | |||
490 | /dev/hvcs* entry. | 496 | /dev/hvcs* entry. |
491 | 497 | ||
492 | --------------------------------------------------------------------------- | 498 | --------------------------------------------------------------------------- |
499 | |||
493 | Q: When I try to CONNECT kermit to an hvcs device I get: | 500 | Q: When I try to CONNECT kermit to an hvcs device I get: |
494 | "Sorry, write access to UUCP lockfile directory denied." | 501 | "Sorry, write access to UUCP lockfile directory denied." |
495 | 502 | ||
@@ -497,6 +504,7 @@ A: The /dev/hvcs* entry you have specified doesn't exist where you said it | |||
497 | does? Maybe you haven't inserted the module (on systems with udev). | 504 | does? Maybe you haven't inserted the module (on systems with udev). |
498 | 505 | ||
499 | --------------------------------------------------------------------------- | 506 | --------------------------------------------------------------------------- |
507 | |||
500 | Q: If I already have one Linux partition installed can I use hvcs on said | 508 | Q: If I already have one Linux partition installed can I use hvcs on said |
501 | partition to provide the console for the install of a second Linux | 509 | partition to provide the console for the install of a second Linux |
502 | partition? | 510 | partition? |
@@ -505,6 +513,7 @@ A: Yes granted that your are connected to the /dev/hvcs* device using | |||
505 | kermit or cu or some other program that doesn't provide terminal emulation. | 513 | kermit or cu or some other program that doesn't provide terminal emulation. |
506 | 514 | ||
507 | --------------------------------------------------------------------------- | 515 | --------------------------------------------------------------------------- |
516 | |||
508 | Q: Can I connect to more than one partition's console at a time using this | 517 | Q: Can I connect to more than one partition's console at a time using this |
509 | driver? | 518 | driver? |
510 | 519 | ||
@@ -512,6 +521,7 @@ A: Yes. Of course this means that there must be more than one vty-server | |||
512 | configured for this partition and each must point to a disconnected vty. | 521 | configured for this partition and each must point to a disconnected vty. |
513 | 522 | ||
514 | --------------------------------------------------------------------------- | 523 | --------------------------------------------------------------------------- |
524 | |||
515 | Q: Does the hvcs driver support dynamic (hotplug) addition of devices? | 525 | Q: Does the hvcs driver support dynamic (hotplug) addition of devices? |
516 | 526 | ||
517 | A: Yes, if you have dlpar and hotplug enabled for your system and it has | 527 | A: Yes, if you have dlpar and hotplug enabled for your system and it has |
@@ -519,6 +529,7 @@ been built into the kernel the hvcs drivers is configured to dynamically | |||
519 | handle additions of new devices and removals of unused devices. | 529 | handle additions of new devices and removals of unused devices. |
520 | 530 | ||
521 | --------------------------------------------------------------------------- | 531 | --------------------------------------------------------------------------- |
532 | |||
522 | Q: For some reason /dev/hvcs* doesn't map to the same vty-server adapter | 533 | Q: For some reason /dev/hvcs* doesn't map to the same vty-server adapter |
523 | after a reboot. What happened? | 534 | after a reboot. What happened? |
524 | 535 | ||
@@ -533,6 +544,7 @@ on how to determine which vty-server goes with which /dev/hvcs* node. | |||
533 | Hint; look at the sysfs "index" attribute for the vty-server. | 544 | Hint; look at the sysfs "index" attribute for the vty-server. |
534 | 545 | ||
535 | --------------------------------------------------------------------------- | 546 | --------------------------------------------------------------------------- |
547 | |||
536 | Q: Can I use /dev/hvcs* as a conduit to another partition and use a tty | 548 | Q: Can I use /dev/hvcs* as a conduit to another partition and use a tty |
537 | device on that partition as the other end of the pipe? | 549 | device on that partition as the other end of the pipe? |
538 | 550 | ||
@@ -554,7 +566,9 @@ read or write to /dev/hvcs*. Now you have a tty conduit between two | |||
554 | partitions. | 566 | partitions. |
555 | 567 | ||
556 | --------------------------------------------------------------------------- | 568 | --------------------------------------------------------------------------- |
569 | |||
557 | 9. Reporting Bugs: | 570 | 9. Reporting Bugs: |
571 | ================== | ||
558 | 572 | ||
559 | The proper channel for reporting bugs is either through the Linux OS | 573 | The proper channel for reporting bugs is either through the Linux OS |
560 | distribution company that provided your OS or by posting issues to the | 574 | distribution company that provided your OS or by posting issues to the |
diff --git a/Documentation/powerpc/index.rst b/Documentation/powerpc/index.rst new file mode 100644 index 000000000000..549b1cdd77ae --- /dev/null +++ b/Documentation/powerpc/index.rst | |||
@@ -0,0 +1,34 @@ | |||
1 | .. SPDX-License-Identifier: GPL-2.0 | ||
2 | |||
3 | ======= | ||
4 | powerpc | ||
5 | ======= | ||
6 | |||
7 | .. toctree:: | ||
8 | :maxdepth: 1 | ||
9 | |||
10 | bootwrapper | ||
11 | cpu_families | ||
12 | cpu_features | ||
13 | cxl | ||
14 | cxlflash | ||
15 | dawr-power9 | ||
16 | dscr | ||
17 | eeh-pci-error-recovery | ||
18 | firmware-assisted-dump | ||
19 | hvcs | ||
20 | isa-versions | ||
21 | mpc52xx | ||
22 | pci_iov_resource_on_powernv | ||
23 | pmu-ebb | ||
24 | ptrace | ||
25 | qe_firmware | ||
26 | syscall64-abi | ||
27 | transactional_memory | ||
28 | |||
29 | .. only:: subproject and html | ||
30 | |||
31 | Indices | ||
32 | ======= | ||
33 | |||
34 | * :ref:`genindex` | ||
diff --git a/Documentation/powerpc/isa-versions.rst b/Documentation/powerpc/isa-versions.rst index 66c24140ebf1..a363d8c1603c 100644 --- a/Documentation/powerpc/isa-versions.rst +++ b/Documentation/powerpc/isa-versions.rst | |||
@@ -1,13 +1,12 @@ | |||
1 | :orphan: | 1 | ========================== |
2 | |||
3 | CPU to ISA Version Mapping | 2 | CPU to ISA Version Mapping |
4 | ========================== | 3 | ========================== |
5 | 4 | ||
6 | Mapping of some CPU versions to relevant ISA versions. | 5 | Mapping of some CPU versions to relevant ISA versions. |
7 | 6 | ||
8 | ========= ==================== | 7 | ========= ==================================================================== |
9 | CPU Architecture version | 8 | CPU Architecture version |
10 | ========= ==================== | 9 | ========= ==================================================================== |
11 | Power9 Power ISA v3.0B | 10 | Power9 Power ISA v3.0B |
12 | Power8 Power ISA v2.07 | 11 | Power8 Power ISA v2.07 |
13 | Power7 Power ISA v2.06 | 12 | Power7 Power ISA v2.06 |
@@ -24,7 +23,7 @@ PPC970 - PowerPC User Instruction Set Architecture Book I v2.01 | |||
24 | - PowerPC Virtual Environment Architecture Book II v2.01 | 23 | - PowerPC Virtual Environment Architecture Book II v2.01 |
25 | - PowerPC Operating Environment Architecture Book III v2.01 | 24 | - PowerPC Operating Environment Architecture Book III v2.01 |
26 | - Plus Altivec/VMX ~= 2.03 | 25 | - Plus Altivec/VMX ~= 2.03 |
27 | ========= ==================== | 26 | ========= ==================================================================== |
28 | 27 | ||
29 | 28 | ||
30 | Key Features | 29 | Key Features |
@@ -60,9 +59,9 @@ Power5 No | |||
60 | PPC970 No | 59 | PPC970 No |
61 | ========== ==== | 60 | ========== ==== |
62 | 61 | ||
63 | ========== ==================== | 62 | ========== ==================================== |
64 | CPU Transactional Memory | 63 | CPU Transactional Memory |
65 | ========== ==================== | 64 | ========== ==================================== |
66 | Power9 Yes (* see transactional_memory.txt) | 65 | Power9 Yes (* see transactional_memory.txt) |
67 | Power8 Yes | 66 | Power8 Yes |
68 | Power7 No | 67 | Power7 No |
@@ -73,4 +72,4 @@ Power5++ No | |||
73 | Power5+ No | 72 | Power5+ No |
74 | Power5 No | 73 | Power5 No |
75 | PPC970 No | 74 | PPC970 No |
76 | ========== ==================== | 75 | ========== ==================================== |
diff --git a/Documentation/powerpc/mpc52xx.txt b/Documentation/powerpc/mpc52xx.rst index 0d540a31ea1a..8676ac63e077 100644 --- a/Documentation/powerpc/mpc52xx.txt +++ b/Documentation/powerpc/mpc52xx.rst | |||
@@ -1,11 +1,13 @@ | |||
1 | ============================= | ||
1 | Linux 2.6.x on MPC52xx family | 2 | Linux 2.6.x on MPC52xx family |
2 | ----------------------------- | 3 | ============================= |
3 | 4 | ||
4 | For the latest info, go to http://www.246tNt.com/mpc52xx/ | 5 | For the latest info, go to http://www.246tNt.com/mpc52xx/ |
5 | 6 | ||
6 | To compile/use : | 7 | To compile/use : |
7 | 8 | ||
8 | - U-Boot: | 9 | - U-Boot:: |
10 | |||
9 | # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION | 11 | # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION |
10 | if you wish to ). | 12 | if you wish to ). |
11 | # make lite5200_defconfig | 13 | # make lite5200_defconfig |
@@ -16,7 +18,8 @@ To compile/use : | |||
16 | => tftpboot 400000 pRamdisk | 18 | => tftpboot 400000 pRamdisk |
17 | => bootm 200000 400000 | 19 | => bootm 200000 400000 |
18 | 20 | ||
19 | - DBug: | 21 | - DBug:: |
22 | |||
20 | # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION | 23 | # <edit Makefile to set ARCH=ppc & CROSS_COMPILE=... ( also EXTRAVERSION |
21 | if you wish to ). | 24 | if you wish to ). |
22 | # make lite5200_defconfig | 25 | # make lite5200_defconfig |
@@ -28,7 +31,8 @@ To compile/use : | |||
28 | DBug> dn -i zImage.initrd.lite5200 | 31 | DBug> dn -i zImage.initrd.lite5200 |
29 | 32 | ||
30 | 33 | ||
31 | Some remarks : | 34 | Some remarks: |
35 | |||
32 | - The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT5100 | 36 | - The port is named mpc52xxx, and config options are PPC_MPC52xx. The MGT5100 |
33 | is not supported, and I'm not sure anyone is interesting in working on it | 37 | is not supported, and I'm not sure anyone is interesting in working on it |
34 | so. I didn't took 5xxx because there's apparently a lot of 5xxx that have | 38 | so. I didn't took 5xxx because there's apparently a lot of 5xxx that have |
diff --git a/Documentation/powerpc/pci_iov_resource_on_powernv.txt b/Documentation/powerpc/pci_iov_resource_on_powernv.rst index b55c5cd83f8d..f5a5793e1613 100644 --- a/Documentation/powerpc/pci_iov_resource_on_powernv.txt +++ b/Documentation/powerpc/pci_iov_resource_on_powernv.rst | |||
@@ -1,6 +1,13 @@ | |||
1 | =================================================== | ||
2 | PCI Express I/O Virtualization Resource on Powerenv | ||
3 | =================================================== | ||
4 | |||
1 | Wei Yang <weiyang@linux.vnet.ibm.com> | 5 | Wei Yang <weiyang@linux.vnet.ibm.com> |
6 | |||
2 | Benjamin Herrenschmidt <benh@au1.ibm.com> | 7 | Benjamin Herrenschmidt <benh@au1.ibm.com> |
8 | |||
3 | Bjorn Helgaas <bhelgaas@google.com> | 9 | Bjorn Helgaas <bhelgaas@google.com> |
10 | |||
4 | 26 Aug 2014 | 11 | 26 Aug 2014 |
5 | 12 | ||
6 | This document describes the requirement from hardware for PCI MMIO resource | 13 | This document describes the requirement from hardware for PCI MMIO resource |
@@ -10,6 +17,7 @@ Endpoints and the implementation on P8 (IODA2). The next two sections talks | |||
10 | about considerations on enabling SRIOV on IODA2. | 17 | about considerations on enabling SRIOV on IODA2. |
11 | 18 | ||
12 | 1. Introduction to Partitionable Endpoints | 19 | 1. Introduction to Partitionable Endpoints |
20 | ========================================== | ||
13 | 21 | ||
14 | A Partitionable Endpoint (PE) is a way to group the various resources | 22 | A Partitionable Endpoint (PE) is a way to group the various resources |
15 | associated with a device or a set of devices to provide isolation between | 23 | associated with a device or a set of devices to provide isolation between |
@@ -35,6 +43,7 @@ is a completely separate HW entity that replicates the entire logic, so has | |||
35 | its own set of PEs, etc. | 43 | its own set of PEs, etc. |
36 | 44 | ||
37 | 2. Implementation of Partitionable Endpoints on P8 (IODA2) | 45 | 2. Implementation of Partitionable Endpoints on P8 (IODA2) |
46 | ========================================================== | ||
38 | 47 | ||
39 | P8 supports up to 256 Partitionable Endpoints per PHB. | 48 | P8 supports up to 256 Partitionable Endpoints per PHB. |
40 | 49 | ||
@@ -149,6 +158,7 @@ P8 supports up to 256 Partitionable Endpoints per PHB. | |||
149 | sense, but we haven't done it yet. | 158 | sense, but we haven't done it yet. |
150 | 159 | ||
151 | 3. Considerations for SR-IOV on PowerKVM | 160 | 3. Considerations for SR-IOV on PowerKVM |
161 | ======================================== | ||
152 | 162 | ||
153 | * SR-IOV Background | 163 | * SR-IOV Background |
154 | 164 | ||
@@ -224,7 +234,7 @@ P8 supports up to 256 Partitionable Endpoints per PHB. | |||
224 | IODA supports 256 PEs, so segmented windows contain 256 segments, so if | 234 | IODA supports 256 PEs, so segmented windows contain 256 segments, so if |
225 | total_VFs is less than 256, we have the situation in Figure 1.0, where | 235 | total_VFs is less than 256, we have the situation in Figure 1.0, where |
226 | segments [total_VFs, 255] of the M64 window may map to some MMIO range on | 236 | segments [total_VFs, 255] of the M64 window may map to some MMIO range on |
227 | other devices: | 237 | other devices:: |
228 | 238 | ||
229 | 0 1 total_VFs - 1 | 239 | 0 1 total_VFs - 1 |
230 | +------+------+- -+------+------+ | 240 | +------+------+- -+------+------+ |
@@ -243,7 +253,7 @@ P8 supports up to 256 Partitionable Endpoints per PHB. | |||
243 | Figure 1.0 Direct map VF(n) BAR space | 253 | Figure 1.0 Direct map VF(n) BAR space |
244 | 254 | ||
245 | Our current solution is to allocate 256 segments even if the VF(n) BAR | 255 | Our current solution is to allocate 256 segments even if the VF(n) BAR |
246 | space doesn't need that much, as shown in Figure 1.1: | 256 | space doesn't need that much, as shown in Figure 1.1:: |
247 | 257 | ||
248 | 0 1 total_VFs - 1 255 | 258 | 0 1 total_VFs - 1 255 |
249 | +------+------+- -+------+------+- -+------+------+ | 259 | +------+------+- -+------+------+- -+------+------+ |
@@ -269,6 +279,7 @@ P8 supports up to 256 Partitionable Endpoints per PHB. | |||
269 | responds to segments [total_VFs, 255]. | 279 | responds to segments [total_VFs, 255]. |
270 | 280 | ||
271 | 4. Implications for the Generic PCI Code | 281 | 4. Implications for the Generic PCI Code |
282 | ======================================== | ||
272 | 283 | ||
273 | The PCIe SR-IOV spec requires that the base of the VF(n) BAR space be | 284 | The PCIe SR-IOV spec requires that the base of the VF(n) BAR space be |
274 | aligned to the size of an individual VF BAR. | 285 | aligned to the size of an individual VF BAR. |
diff --git a/Documentation/powerpc/pmu-ebb.txt b/Documentation/powerpc/pmu-ebb.rst index 73cd163dbfb8..4f474758eb55 100644 --- a/Documentation/powerpc/pmu-ebb.txt +++ b/Documentation/powerpc/pmu-ebb.rst | |||
@@ -1,3 +1,4 @@ | |||
1 | ======================== | ||
1 | PMU Event Based Branches | 2 | PMU Event Based Branches |
2 | ======================== | 3 | ======================== |
3 | 4 | ||
diff --git a/Documentation/powerpc/ptrace.rst b/Documentation/powerpc/ptrace.rst new file mode 100644 index 000000000000..864d4b6dddd1 --- /dev/null +++ b/Documentation/powerpc/ptrace.rst | |||
@@ -0,0 +1,156 @@ | |||
1 | ====== | ||
2 | Ptrace | ||
3 | ====== | ||
4 | |||
5 | GDB intends to support the following hardware debug features of BookE | ||
6 | processors: | ||
7 | |||
8 | 4 hardware breakpoints (IAC) | ||
9 | 2 hardware watchpoints (read, write and read-write) (DAC) | ||
10 | 2 value conditions for the hardware watchpoints (DVC) | ||
11 | |||
12 | For that, we need to extend ptrace so that GDB can query and set these | ||
13 | resources. Since we're extending, we're trying to create an interface | ||
14 | that's extendable and that covers both BookE and server processors, so | ||
15 | that GDB doesn't need to special-case each of them. We added the | ||
16 | following 3 new ptrace requests. | ||
17 | |||
18 | 1. PTRACE_PPC_GETHWDEBUGINFO | ||
19 | ============================ | ||
20 | |||
21 | Query for GDB to discover the hardware debug features. The main info to | ||
22 | be returned here is the minimum alignment for the hardware watchpoints. | ||
23 | BookE processors don't have restrictions here, but server processors have | ||
24 | an 8-byte alignment restriction for hardware watchpoints. We'd like to avoid | ||
25 | adding special cases to GDB based on what it sees in AUXV. | ||
26 | |||
27 | Since we're at it, we added other useful info that the kernel can return to | ||
28 | GDB: this query will return the number of hardware breakpoints, hardware | ||
29 | watchpoints and whether it supports a range of addresses and a condition. | ||
30 | The query will fill the following structure provided by the requesting process:: | ||
31 | |||
32 | struct ppc_debug_info { | ||
33 | unit32_t version; | ||
34 | unit32_t num_instruction_bps; | ||
35 | unit32_t num_data_bps; | ||
36 | unit32_t num_condition_regs; | ||
37 | unit32_t data_bp_alignment; | ||
38 | unit32_t sizeof_condition; /* size of the DVC register */ | ||
39 | uint64_t features; /* bitmask of the individual flags */ | ||
40 | }; | ||
41 | |||
42 | features will have bits indicating whether there is support for:: | ||
43 | |||
44 | #define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x1 | ||
45 | #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x2 | ||
46 | #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x4 | ||
47 | #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x8 | ||
48 | #define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x10 | ||
49 | |||
50 | 2. PTRACE_SETHWDEBUG | ||
51 | |||
52 | Sets a hardware breakpoint or watchpoint, according to the provided structure:: | ||
53 | |||
54 | struct ppc_hw_breakpoint { | ||
55 | uint32_t version; | ||
56 | #define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x1 | ||
57 | #define PPC_BREAKPOINT_TRIGGER_READ 0x2 | ||
58 | #define PPC_BREAKPOINT_TRIGGER_WRITE 0x4 | ||
59 | uint32_t trigger_type; /* only some combinations allowed */ | ||
60 | #define PPC_BREAKPOINT_MODE_EXACT 0x0 | ||
61 | #define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x1 | ||
62 | #define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x2 | ||
63 | #define PPC_BREAKPOINT_MODE_MASK 0x3 | ||
64 | uint32_t addr_mode; /* address match mode */ | ||
65 | |||
66 | #define PPC_BREAKPOINT_CONDITION_MODE 0x3 | ||
67 | #define PPC_BREAKPOINT_CONDITION_NONE 0x0 | ||
68 | #define PPC_BREAKPOINT_CONDITION_AND 0x1 | ||
69 | #define PPC_BREAKPOINT_CONDITION_EXACT 0x1 /* different name for the same thing as above */ | ||
70 | #define PPC_BREAKPOINT_CONDITION_OR 0x2 | ||
71 | #define PPC_BREAKPOINT_CONDITION_AND_OR 0x3 | ||
72 | #define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 /* byte enable bits */ | ||
73 | #define PPC_BREAKPOINT_CONDITION_BE(n) (1<<((n)+16)) | ||
74 | uint32_t condition_mode; /* break/watchpoint condition flags */ | ||
75 | |||
76 | uint64_t addr; | ||
77 | uint64_t addr2; | ||
78 | uint64_t condition_value; | ||
79 | }; | ||
80 | |||
81 | A request specifies one event, not necessarily just one register to be set. | ||
82 | For instance, if the request is for a watchpoint with a condition, both the | ||
83 | DAC and DVC registers will be set in the same request. | ||
84 | |||
85 | With this GDB can ask for all kinds of hardware breakpoints and watchpoints | ||
86 | that the BookE supports. COMEFROM breakpoints available in server processors | ||
87 | are not contemplated, but that is out of the scope of this work. | ||
88 | |||
89 | ptrace will return an integer (handle) uniquely identifying the breakpoint or | ||
90 | watchpoint just created. This integer will be used in the PTRACE_DELHWDEBUG | ||
91 | request to ask for its removal. Return -ENOSPC if the requested breakpoint | ||
92 | can't be allocated on the registers. | ||
93 | |||
94 | Some examples of using the structure to: | ||
95 | |||
96 | - set a breakpoint in the first breakpoint register:: | ||
97 | |||
98 | p.version = PPC_DEBUG_CURRENT_VERSION; | ||
99 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE; | ||
100 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
101 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
102 | p.addr = (uint64_t) address; | ||
103 | p.addr2 = 0; | ||
104 | p.condition_value = 0; | ||
105 | |||
106 | - set a watchpoint which triggers on reads in the second watchpoint register:: | ||
107 | |||
108 | p.version = PPC_DEBUG_CURRENT_VERSION; | ||
109 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ; | ||
110 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
111 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
112 | p.addr = (uint64_t) address; | ||
113 | p.addr2 = 0; | ||
114 | p.condition_value = 0; | ||
115 | |||
116 | - set a watchpoint which triggers only with a specific value:: | ||
117 | |||
118 | p.version = PPC_DEBUG_CURRENT_VERSION; | ||
119 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ; | ||
120 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
121 | p.condition_mode = PPC_BREAKPOINT_CONDITION_AND | PPC_BREAKPOINT_CONDITION_BE_ALL; | ||
122 | p.addr = (uint64_t) address; | ||
123 | p.addr2 = 0; | ||
124 | p.condition_value = (uint64_t) condition; | ||
125 | |||
126 | - set a ranged hardware breakpoint:: | ||
127 | |||
128 | p.version = PPC_DEBUG_CURRENT_VERSION; | ||
129 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE; | ||
130 | p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE; | ||
131 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
132 | p.addr = (uint64_t) begin_range; | ||
133 | p.addr2 = (uint64_t) end_range; | ||
134 | p.condition_value = 0; | ||
135 | |||
136 | - set a watchpoint in server processors (BookS):: | ||
137 | |||
138 | p.version = 1; | ||
139 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW; | ||
140 | p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE; | ||
141 | or | ||
142 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
143 | |||
144 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
145 | p.addr = (uint64_t) begin_range; | ||
146 | /* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where | ||
147 | * addr2 - addr <= 8 Bytes. | ||
148 | */ | ||
149 | p.addr2 = (uint64_t) end_range; | ||
150 | p.condition_value = 0; | ||
151 | |||
152 | 3. PTRACE_DELHWDEBUG | ||
153 | |||
154 | Takes an integer which identifies an existing breakpoint or watchpoint | ||
155 | (i.e., the value returned from PTRACE_SETHWDEBUG), and deletes the | ||
156 | corresponding breakpoint or watchpoint.. | ||
diff --git a/Documentation/powerpc/ptrace.txt b/Documentation/powerpc/ptrace.txt deleted file mode 100644 index 99c5ce88d0fe..000000000000 --- a/Documentation/powerpc/ptrace.txt +++ /dev/null | |||
@@ -1,151 +0,0 @@ | |||
1 | GDB intends to support the following hardware debug features of BookE | ||
2 | processors: | ||
3 | |||
4 | 4 hardware breakpoints (IAC) | ||
5 | 2 hardware watchpoints (read, write and read-write) (DAC) | ||
6 | 2 value conditions for the hardware watchpoints (DVC) | ||
7 | |||
8 | For that, we need to extend ptrace so that GDB can query and set these | ||
9 | resources. Since we're extending, we're trying to create an interface | ||
10 | that's extendable and that covers both BookE and server processors, so | ||
11 | that GDB doesn't need to special-case each of them. We added the | ||
12 | following 3 new ptrace requests. | ||
13 | |||
14 | 1. PTRACE_PPC_GETHWDEBUGINFO | ||
15 | |||
16 | Query for GDB to discover the hardware debug features. The main info to | ||
17 | be returned here is the minimum alignment for the hardware watchpoints. | ||
18 | BookE processors don't have restrictions here, but server processors have | ||
19 | an 8-byte alignment restriction for hardware watchpoints. We'd like to avoid | ||
20 | adding special cases to GDB based on what it sees in AUXV. | ||
21 | |||
22 | Since we're at it, we added other useful info that the kernel can return to | ||
23 | GDB: this query will return the number of hardware breakpoints, hardware | ||
24 | watchpoints and whether it supports a range of addresses and a condition. | ||
25 | The query will fill the following structure provided by the requesting process: | ||
26 | |||
27 | struct ppc_debug_info { | ||
28 | unit32_t version; | ||
29 | unit32_t num_instruction_bps; | ||
30 | unit32_t num_data_bps; | ||
31 | unit32_t num_condition_regs; | ||
32 | unit32_t data_bp_alignment; | ||
33 | unit32_t sizeof_condition; /* size of the DVC register */ | ||
34 | uint64_t features; /* bitmask of the individual flags */ | ||
35 | }; | ||
36 | |||
37 | features will have bits indicating whether there is support for: | ||
38 | |||
39 | #define PPC_DEBUG_FEATURE_INSN_BP_RANGE 0x1 | ||
40 | #define PPC_DEBUG_FEATURE_INSN_BP_MASK 0x2 | ||
41 | #define PPC_DEBUG_FEATURE_DATA_BP_RANGE 0x4 | ||
42 | #define PPC_DEBUG_FEATURE_DATA_BP_MASK 0x8 | ||
43 | #define PPC_DEBUG_FEATURE_DATA_BP_DAWR 0x10 | ||
44 | |||
45 | 2. PTRACE_SETHWDEBUG | ||
46 | |||
47 | Sets a hardware breakpoint or watchpoint, according to the provided structure: | ||
48 | |||
49 | struct ppc_hw_breakpoint { | ||
50 | uint32_t version; | ||
51 | #define PPC_BREAKPOINT_TRIGGER_EXECUTE 0x1 | ||
52 | #define PPC_BREAKPOINT_TRIGGER_READ 0x2 | ||
53 | #define PPC_BREAKPOINT_TRIGGER_WRITE 0x4 | ||
54 | uint32_t trigger_type; /* only some combinations allowed */ | ||
55 | #define PPC_BREAKPOINT_MODE_EXACT 0x0 | ||
56 | #define PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE 0x1 | ||
57 | #define PPC_BREAKPOINT_MODE_RANGE_EXCLUSIVE 0x2 | ||
58 | #define PPC_BREAKPOINT_MODE_MASK 0x3 | ||
59 | uint32_t addr_mode; /* address match mode */ | ||
60 | |||
61 | #define PPC_BREAKPOINT_CONDITION_MODE 0x3 | ||
62 | #define PPC_BREAKPOINT_CONDITION_NONE 0x0 | ||
63 | #define PPC_BREAKPOINT_CONDITION_AND 0x1 | ||
64 | #define PPC_BREAKPOINT_CONDITION_EXACT 0x1 /* different name for the same thing as above */ | ||
65 | #define PPC_BREAKPOINT_CONDITION_OR 0x2 | ||
66 | #define PPC_BREAKPOINT_CONDITION_AND_OR 0x3 | ||
67 | #define PPC_BREAKPOINT_CONDITION_BE_ALL 0x00ff0000 /* byte enable bits */ | ||
68 | #define PPC_BREAKPOINT_CONDITION_BE(n) (1<<((n)+16)) | ||
69 | uint32_t condition_mode; /* break/watchpoint condition flags */ | ||
70 | |||
71 | uint64_t addr; | ||
72 | uint64_t addr2; | ||
73 | uint64_t condition_value; | ||
74 | }; | ||
75 | |||
76 | A request specifies one event, not necessarily just one register to be set. | ||
77 | For instance, if the request is for a watchpoint with a condition, both the | ||
78 | DAC and DVC registers will be set in the same request. | ||
79 | |||
80 | With this GDB can ask for all kinds of hardware breakpoints and watchpoints | ||
81 | that the BookE supports. COMEFROM breakpoints available in server processors | ||
82 | are not contemplated, but that is out of the scope of this work. | ||
83 | |||
84 | ptrace will return an integer (handle) uniquely identifying the breakpoint or | ||
85 | watchpoint just created. This integer will be used in the PTRACE_DELHWDEBUG | ||
86 | request to ask for its removal. Return -ENOSPC if the requested breakpoint | ||
87 | can't be allocated on the registers. | ||
88 | |||
89 | Some examples of using the structure to: | ||
90 | |||
91 | - set a breakpoint in the first breakpoint register | ||
92 | |||
93 | p.version = PPC_DEBUG_CURRENT_VERSION; | ||
94 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE; | ||
95 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
96 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
97 | p.addr = (uint64_t) address; | ||
98 | p.addr2 = 0; | ||
99 | p.condition_value = 0; | ||
100 | |||
101 | - set a watchpoint which triggers on reads in the second watchpoint register | ||
102 | |||
103 | p.version = PPC_DEBUG_CURRENT_VERSION; | ||
104 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ; | ||
105 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
106 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
107 | p.addr = (uint64_t) address; | ||
108 | p.addr2 = 0; | ||
109 | p.condition_value = 0; | ||
110 | |||
111 | - set a watchpoint which triggers only with a specific value | ||
112 | |||
113 | p.version = PPC_DEBUG_CURRENT_VERSION; | ||
114 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_READ; | ||
115 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
116 | p.condition_mode = PPC_BREAKPOINT_CONDITION_AND | PPC_BREAKPOINT_CONDITION_BE_ALL; | ||
117 | p.addr = (uint64_t) address; | ||
118 | p.addr2 = 0; | ||
119 | p.condition_value = (uint64_t) condition; | ||
120 | |||
121 | - set a ranged hardware breakpoint | ||
122 | |||
123 | p.version = PPC_DEBUG_CURRENT_VERSION; | ||
124 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_EXECUTE; | ||
125 | p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE; | ||
126 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
127 | p.addr = (uint64_t) begin_range; | ||
128 | p.addr2 = (uint64_t) end_range; | ||
129 | p.condition_value = 0; | ||
130 | |||
131 | - set a watchpoint in server processors (BookS) | ||
132 | |||
133 | p.version = 1; | ||
134 | p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW; | ||
135 | p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE; | ||
136 | or | ||
137 | p.addr_mode = PPC_BREAKPOINT_MODE_EXACT; | ||
138 | |||
139 | p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE; | ||
140 | p.addr = (uint64_t) begin_range; | ||
141 | /* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where | ||
142 | * addr2 - addr <= 8 Bytes. | ||
143 | */ | ||
144 | p.addr2 = (uint64_t) end_range; | ||
145 | p.condition_value = 0; | ||
146 | |||
147 | 3. PTRACE_DELHWDEBUG | ||
148 | |||
149 | Takes an integer which identifies an existing breakpoint or watchpoint | ||
150 | (i.e., the value returned from PTRACE_SETHWDEBUG), and deletes the | ||
151 | corresponding breakpoint or watchpoint.. | ||
diff --git a/Documentation/powerpc/qe_firmware.txt b/Documentation/powerpc/qe_firmware.rst index e7ac24aec4ff..42f5103140c9 100644 --- a/Documentation/powerpc/qe_firmware.txt +++ b/Documentation/powerpc/qe_firmware.rst | |||
@@ -1,23 +1,23 @@ | |||
1 | Freescale QUICC Engine Firmware Uploading | 1 | ========================================= |
2 | ----------------------------------------- | 2 | Freescale QUICC Engine Firmware Uploading |
3 | ========================================= | ||
3 | 4 | ||
4 | (c) 2007 Timur Tabi <timur at freescale.com>, | 5 | (c) 2007 Timur Tabi <timur at freescale.com>, |
5 | Freescale Semiconductor | 6 | Freescale Semiconductor |
6 | 7 | ||
7 | Table of Contents | 8 | .. Table of Contents |
8 | ================= | ||
9 | 9 | ||
10 | I - Software License for Firmware | 10 | I - Software License for Firmware |
11 | 11 | ||
12 | II - Microcode Availability | 12 | II - Microcode Availability |
13 | 13 | ||
14 | III - Description and Terminology | 14 | III - Description and Terminology |
15 | 15 | ||
16 | IV - Microcode Programming Details | 16 | IV - Microcode Programming Details |
17 | 17 | ||
18 | V - Firmware Structure Layout | 18 | V - Firmware Structure Layout |
19 | 19 | ||
20 | VI - Sample Code for Creating Firmware Files | 20 | VI - Sample Code for Creating Firmware Files |
21 | 21 | ||
22 | Revision Information | 22 | Revision Information |
23 | ==================== | 23 | ==================== |
@@ -39,7 +39,7 @@ http://opensource.freescale.com. For other firmware files, please contact | |||
39 | your Freescale representative or your operating system vendor. | 39 | your Freescale representative or your operating system vendor. |
40 | 40 | ||
41 | III - Description and Terminology | 41 | III - Description and Terminology |
42 | ================================ | 42 | ================================= |
43 | 43 | ||
44 | In this document, the term 'microcode' refers to the sequence of 32-bit | 44 | In this document, the term 'microcode' refers to the sequence of 32-bit |
45 | integers that compose the actual QE microcode. | 45 | integers that compose the actual QE microcode. |
@@ -89,7 +89,7 @@ being fixed in the RAM package utilizing they should be activated. This data | |||
89 | structure signals the microcode which of these virtual traps is active. | 89 | structure signals the microcode which of these virtual traps is active. |
90 | 90 | ||
91 | This structure contains 6 words that the application should copy to some | 91 | This structure contains 6 words that the application should copy to some |
92 | specific been defined. This table describes the structure. | 92 | specific been defined. This table describes the structure:: |
93 | 93 | ||
94 | --------------------------------------------------------------- | 94 | --------------------------------------------------------------- |
95 | | Offset in | | Destination Offset | Size of | | 95 | | Offset in | | Destination Offset | Size of | |
@@ -119,7 +119,7 @@ Extended Modes | |||
119 | This is a double word bit array (64 bits) that defines special functionality | 119 | This is a double word bit array (64 bits) that defines special functionality |
120 | which has an impact on the software drivers. Each bit has its own impact | 120 | which has an impact on the software drivers. Each bit has its own impact |
121 | and has special instructions for the s/w associated with it. This structure is | 121 | and has special instructions for the s/w associated with it. This structure is |
122 | described in this table: | 122 | described in this table:: |
123 | 123 | ||
124 | ----------------------------------------------------------------------- | 124 | ----------------------------------------------------------------------- |
125 | | Bit # | Name | Description | | 125 | | Bit # | Name | Description | |
@@ -220,7 +220,8 @@ The 'model' field is a 16-bit number that matches the actual SOC. The | |||
220 | 'major' and 'minor' fields are the major and minor revision numbers, | 220 | 'major' and 'minor' fields are the major and minor revision numbers, |
221 | respectively, of the SOC. | 221 | respectively, of the SOC. |
222 | 222 | ||
223 | For example, to match the 8323, revision 1.0: | 223 | For example, to match the 8323, revision 1.0:: |
224 | |||
224 | soc.model = 8323 | 225 | soc.model = 8323 |
225 | soc.major = 1 | 226 | soc.major = 1 |
226 | soc.minor = 0 | 227 | soc.minor = 0 |
@@ -273,10 +274,10 @@ library and available to any driver that calles qe_get_firmware_info(). | |||
273 | 'reserved'. | 274 | 'reserved'. |
274 | 275 | ||
275 | After the last microcode is a 32-bit CRC. It can be calculated using | 276 | After the last microcode is a 32-bit CRC. It can be calculated using |
276 | this algorithm: | 277 | this algorithm:: |
277 | 278 | ||
278 | u32 crc32(const u8 *p, unsigned int len) | 279 | u32 crc32(const u8 *p, unsigned int len) |
279 | { | 280 | { |
280 | unsigned int i; | 281 | unsigned int i; |
281 | u32 crc = 0; | 282 | u32 crc = 0; |
282 | 283 | ||
@@ -286,7 +287,7 @@ u32 crc32(const u8 *p, unsigned int len) | |||
286 | crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0); | 287 | crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0); |
287 | } | 288 | } |
288 | return crc; | 289 | return crc; |
289 | } | 290 | } |
290 | 291 | ||
291 | VI - Sample Code for Creating Firmware Files | 292 | VI - Sample Code for Creating Firmware Files |
292 | ============================================ | 293 | ============================================ |
diff --git a/Documentation/powerpc/syscall64-abi.txt b/Documentation/powerpc/syscall64-abi.rst index fa716a0d88bd..e49f69f941b9 100644 --- a/Documentation/powerpc/syscall64-abi.txt +++ b/Documentation/powerpc/syscall64-abi.rst | |||
@@ -5,12 +5,12 @@ Power Architecture 64-bit Linux system call ABI | |||
5 | syscall | 5 | syscall |
6 | ======= | 6 | ======= |
7 | 7 | ||
8 | syscall calling sequence[*] matches the Power Architecture 64-bit ELF ABI | 8 | syscall calling sequence\ [1]_ matches the Power Architecture 64-bit ELF ABI |
9 | specification C function calling sequence, including register preservation | 9 | specification C function calling sequence, including register preservation |
10 | rules, with the following differences. | 10 | rules, with the following differences. |
11 | 11 | ||
12 | [*] Some syscalls (typically low-level management functions) may have | 12 | .. [1] Some syscalls (typically low-level management functions) may have |
13 | different calling sequences (e.g., rt_sigreturn). | 13 | different calling sequences (e.g., rt_sigreturn). |
14 | 14 | ||
15 | Parameters and return value | 15 | Parameters and return value |
16 | --------------------------- | 16 | --------------------------- |
@@ -33,12 +33,14 @@ Register preservation rules | |||
33 | Register preservation rules match the ELF ABI calling sequence with the | 33 | Register preservation rules match the ELF ABI calling sequence with the |
34 | following differences: | 34 | following differences: |
35 | 35 | ||
36 | r0: Volatile. (System call number.) | 36 | =========== ============= ======================================== |
37 | r3: Volatile. (Parameter 1, and return value.) | 37 | r0 Volatile (System call number.) |
38 | r4-r8: Volatile. (Parameters 2-6.) | 38 | r3 Volatile (Parameter 1, and return value.) |
39 | cr0: Volatile (cr0.SO is the return error condition) | 39 | r4-r8 Volatile (Parameters 2-6.) |
40 | cr1, cr5-7: Nonvolatile. | 40 | cr0 Volatile (cr0.SO is the return error condition) |
41 | lr: Nonvolatile. | 41 | cr1, cr5-7 Nonvolatile |
42 | lr Nonvolatile | ||
43 | =========== ============= ======================================== | ||
42 | 44 | ||
43 | All floating point and vector data registers as well as control and status | 45 | All floating point and vector data registers as well as control and status |
44 | registers are nonvolatile. | 46 | registers are nonvolatile. |
@@ -90,9 +92,12 @@ The vsyscall may or may not use the caller's stack frame save areas. | |||
90 | 92 | ||
91 | Register preservation rules | 93 | Register preservation rules |
92 | --------------------------- | 94 | --------------------------- |
93 | r0: Volatile. | 95 | |
94 | cr1, cr5-7: Volatile. | 96 | =========== ======== |
95 | lr: Volatile. | 97 | r0 Volatile |
98 | cr1, cr5-7 Volatile | ||
99 | lr Volatile | ||
100 | =========== ======== | ||
96 | 101 | ||
97 | Invocation | 102 | Invocation |
98 | ---------- | 103 | ---------- |
diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc/transactional_memory.rst index 52c023e14f26..09955103acb4 100644 --- a/Documentation/powerpc/transactional_memory.txt +++ b/Documentation/powerpc/transactional_memory.rst | |||
@@ -1,3 +1,4 @@ | |||
1 | ============================ | ||
1 | Transactional Memory support | 2 | Transactional Memory support |
2 | ============================ | 3 | ============================ |
3 | 4 | ||
@@ -17,29 +18,29 @@ instructions are presented to delimit transactions; transactions are | |||
17 | guaranteed to either complete atomically or roll back and undo any partial | 18 | guaranteed to either complete atomically or roll back and undo any partial |
18 | changes. | 19 | changes. |
19 | 20 | ||
20 | A simple transaction looks like this: | 21 | A simple transaction looks like this:: |
21 | 22 | ||
22 | begin_move_money: | 23 | begin_move_money: |
23 | tbegin | 24 | tbegin |
24 | beq abort_handler | 25 | beq abort_handler |
25 | 26 | ||
26 | ld r4, SAVINGS_ACCT(r3) | 27 | ld r4, SAVINGS_ACCT(r3) |
27 | ld r5, CURRENT_ACCT(r3) | 28 | ld r5, CURRENT_ACCT(r3) |
28 | subi r5, r5, 1 | 29 | subi r5, r5, 1 |
29 | addi r4, r4, 1 | 30 | addi r4, r4, 1 |
30 | std r4, SAVINGS_ACCT(r3) | 31 | std r4, SAVINGS_ACCT(r3) |
31 | std r5, CURRENT_ACCT(r3) | 32 | std r5, CURRENT_ACCT(r3) |
32 | 33 | ||
33 | tend | 34 | tend |
34 | 35 | ||
35 | b continue | 36 | b continue |
36 | 37 | ||
37 | abort_handler: | 38 | abort_handler: |
38 | ... test for odd failures ... | 39 | ... test for odd failures ... |
39 | 40 | ||
40 | /* Retry the transaction if it failed because it conflicted with | 41 | /* Retry the transaction if it failed because it conflicted with |
41 | * someone else: */ | 42 | * someone else: */ |
42 | b begin_move_money | 43 | b begin_move_money |
43 | 44 | ||
44 | 45 | ||
45 | The 'tbegin' instruction denotes the start point, and 'tend' the end point. | 46 | The 'tbegin' instruction denotes the start point, and 'tend' the end point. |
@@ -123,7 +124,7 @@ Transaction-aware signal handlers can read the transactional register state | |||
123 | from the second ucontext. This will be necessary for crash handlers to | 124 | from the second ucontext. This will be necessary for crash handlers to |
124 | determine, for example, the address of the instruction causing the SIGSEGV. | 125 | determine, for example, the address of the instruction causing the SIGSEGV. |
125 | 126 | ||
126 | Example signal handler: | 127 | Example signal handler:: |
127 | 128 | ||
128 | void crash_handler(int sig, siginfo_t *si, void *uc) | 129 | void crash_handler(int sig, siginfo_t *si, void *uc) |
129 | { | 130 | { |
@@ -133,9 +134,9 @@ Example signal handler: | |||
133 | if (ucp_link) { | 134 | if (ucp_link) { |
134 | u64 msr = ucp->uc_mcontext.regs->msr; | 135 | u64 msr = ucp->uc_mcontext.regs->msr; |
135 | /* May have transactional ucontext! */ | 136 | /* May have transactional ucontext! */ |
136 | #ifndef __powerpc64__ | 137 | #ifndef __powerpc64__ |
137 | msr |= ((u64)transactional_ucp->uc_mcontext.regs->msr) << 32; | 138 | msr |= ((u64)transactional_ucp->uc_mcontext.regs->msr) << 32; |
138 | #endif | 139 | #endif |
139 | if (MSR_TM_ACTIVE(msr)) { | 140 | if (MSR_TM_ACTIVE(msr)) { |
140 | /* Yes, we crashed during a transaction. Oops. */ | 141 | /* Yes, we crashed during a transaction. Oops. */ |
141 | fprintf(stderr, "Transaction to be restarted at 0x%llx, but " | 142 | fprintf(stderr, "Transaction to be restarted at 0x%llx, but " |
@@ -176,6 +177,7 @@ Failure cause codes used by kernel | |||
176 | These are defined in <asm/reg.h>, and distinguish different reasons why the | 177 | These are defined in <asm/reg.h>, and distinguish different reasons why the |
177 | kernel aborted a transaction: | 178 | kernel aborted a transaction: |
178 | 179 | ||
180 | ====================== ================================ | ||
179 | TM_CAUSE_RESCHED Thread was rescheduled. | 181 | TM_CAUSE_RESCHED Thread was rescheduled. |
180 | TM_CAUSE_TLBI Software TLB invalid. | 182 | TM_CAUSE_TLBI Software TLB invalid. |
181 | TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap. | 183 | TM_CAUSE_FAC_UNAV FP/VEC/VSX unavailable trap. |
@@ -184,6 +186,7 @@ kernel aborted a transaction: | |||
184 | TM_CAUSE_MISC Currently unused. | 186 | TM_CAUSE_MISC Currently unused. |
185 | TM_CAUSE_ALIGNMENT Alignment fault. | 187 | TM_CAUSE_ALIGNMENT Alignment fault. |
186 | TM_CAUSE_EMULATE Emulation that touched memory. | 188 | TM_CAUSE_EMULATE Emulation that touched memory. |
189 | ====================== ================================ | ||
187 | 190 | ||
188 | These can be checked by the user program's abort handler as TEXASR[0:7]. If | 191 | These can be checked by the user program's abort handler as TEXASR[0:7]. If |
189 | bit 7 is set, it indicates that the error is consider persistent. For example | 192 | bit 7 is set, it indicates that the error is consider persistent. For example |
@@ -203,7 +206,7 @@ POWER9 | |||
203 | ====== | 206 | ====== |
204 | 207 | ||
205 | TM on POWER9 has issues with storing the complete register state. This | 208 | TM on POWER9 has issues with storing the complete register state. This |
206 | is described in this commit: | 209 | is described in this commit:: |
207 | 210 | ||
208 | commit 4bb3c7a0208fc13ca70598efd109901a7cd45ae7 | 211 | commit 4bb3c7a0208fc13ca70598efd109901a7cd45ae7 |
209 | Author: Paul Mackerras <paulus@ozlabs.org> | 212 | Author: Paul Mackerras <paulus@ozlabs.org> |
diff --git a/Documentation/process/conf.py b/Documentation/process/conf.py deleted file mode 100644 index 1b01a80ad9ce..000000000000 --- a/Documentation/process/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = 'Linux Kernel Development Documentation' | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'process.tex', 'Linux Kernel Development Documentation', | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/sh/conf.py b/Documentation/sh/conf.py deleted file mode 100644 index 1eb684a13ac8..000000000000 --- a/Documentation/sh/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "SuperH architecture implementation manual" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'sh.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/sound/conf.py b/Documentation/sound/conf.py deleted file mode 100644 index 3f1fc5e74e7b..000000000000 --- a/Documentation/sound/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Linux Sound Subsystem Documentation" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'sound.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/sphinx/load_config.py b/Documentation/sphinx/load_config.py index 301a21aa4f63..eeb394b39e2c 100644 --- a/Documentation/sphinx/load_config.py +++ b/Documentation/sphinx/load_config.py | |||
@@ -21,6 +21,29 @@ def loadConfig(namespace): | |||
21 | and os.path.normpath(namespace["__file__"]) != os.path.normpath(config_file) ): | 21 | and os.path.normpath(namespace["__file__"]) != os.path.normpath(config_file) ): |
22 | config_file = os.path.abspath(config_file) | 22 | config_file = os.path.abspath(config_file) |
23 | 23 | ||
24 | # Let's avoid one conf.py file just due to latex_documents | ||
25 | start = config_file.find('Documentation/') | ||
26 | if start >= 0: | ||
27 | start = config_file.find('/', start + 1) | ||
28 | |||
29 | end = config_file.rfind('/') | ||
30 | if start >= 0 and end > 0: | ||
31 | dir = config_file[start + 1:end] | ||
32 | |||
33 | print("source directory: %s" % dir) | ||
34 | new_latex_docs = [] | ||
35 | latex_documents = namespace['latex_documents'] | ||
36 | |||
37 | for l in latex_documents: | ||
38 | if l[0].find(dir + '/') == 0: | ||
39 | has = True | ||
40 | fn = l[0][len(dir) + 1:] | ||
41 | new_latex_docs.append((fn, l[1], l[2], l[3], l[4])) | ||
42 | break | ||
43 | |||
44 | namespace['latex_documents'] = new_latex_docs | ||
45 | |||
46 | # If there is an extra conf.py file, load it | ||
24 | if os.path.isfile(config_file): | 47 | if os.path.isfile(config_file): |
25 | sys.stdout.write("load additional sphinx-config: %s\n" % config_file) | 48 | sys.stdout.write("load additional sphinx-config: %s\n" % config_file) |
26 | config = namespace.copy() | 49 | config = namespace.copy() |
@@ -29,4 +52,6 @@ def loadConfig(namespace): | |||
29 | del config['__file__'] | 52 | del config['__file__'] |
30 | namespace.update(config) | 53 | namespace.update(config) |
31 | else: | 54 | else: |
32 | sys.stderr.write("WARNING: additional sphinx-config not found: %s\n" % config_file) | 55 | config = namespace.copy() |
56 | config['tags'].add("subproject") | ||
57 | namespace.update(config) | ||
diff --git a/Documentation/translations/ko_KR/memory-barriers.txt b/Documentation/translations/ko_KR/memory-barriers.txt index a33c2a536542..2774624ee843 100644 --- a/Documentation/translations/ko_KR/memory-barriers.txt +++ b/Documentation/translations/ko_KR/memory-barriers.txt | |||
@@ -569,7 +569,7 @@ ACQUIRE 는 해당 오í¼ë ˆì´ì…˜ì˜ 로드 부분ì—ë§Œ ì ìš©ë˜ê³ RELEASE ë | |||
569 | 569 | ||
570 | [*] 버스 ë§ˆìŠ¤í„°ë§ DMA 와 ì¼ê´€ì„±ì— 대해서는 다ìŒì„ ì°¸ê³ í•˜ì‹œê¸° ë°”ëžë‹ˆë‹¤: | 570 | [*] 버스 ë§ˆìŠ¤í„°ë§ DMA 와 ì¼ê´€ì„±ì— 대해서는 다ìŒì„ ì°¸ê³ í•˜ì‹œê¸° ë°”ëžë‹ˆë‹¤: |
571 | 571 | ||
572 | Documentation/PCI/pci.rst | 572 | Documentation/driver-api/pci/pci.rst |
573 | Documentation/DMA-API-HOWTO.txt | 573 | Documentation/DMA-API-HOWTO.txt |
574 | Documentation/DMA-API.txt | 574 | Documentation/DMA-API.txt |
575 | 575 | ||
diff --git a/Documentation/userspace-api/conf.py b/Documentation/userspace-api/conf.py deleted file mode 100644 index 2eaf59f844e5..000000000000 --- a/Documentation/userspace-api/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "The Linux kernel user-space API guide" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'userspace-api.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/virtual/kvm/index.rst b/Documentation/virtual/kvm/index.rst index 0b206a06f5be..ada224a511fe 100644 --- a/Documentation/virtual/kvm/index.rst +++ b/Documentation/virtual/kvm/index.rst | |||
@@ -9,3 +9,4 @@ KVM | |||
9 | 9 | ||
10 | amd-memory-encryption | 10 | amd-memory-encryption |
11 | cpuid | 11 | cpuid |
12 | vcpu-requests | ||
diff --git a/Documentation/vm/conf.py b/Documentation/vm/conf.py deleted file mode 100644 index 3b0b601af558..000000000000 --- a/Documentation/vm/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "Linux Memory Management Documentation" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'memory-management.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/Documentation/watchdog/hpwdt.rst b/Documentation/watchdog/hpwdt.rst index c165d92cfd12..c824cd7f6e32 100644 --- a/Documentation/watchdog/hpwdt.rst +++ b/Documentation/watchdog/hpwdt.rst | |||
@@ -63,7 +63,7 @@ Last reviewed: 08/20/2018 | |||
63 | and loop forever. This is generally not what a watchdog user wants. | 63 | and loop forever. This is generally not what a watchdog user wants. |
64 | 64 | ||
65 | For those wishing to learn more please see: | 65 | For those wishing to learn more please see: |
66 | Documentation/kdump/kdump.rst | 66 | Documentation/admin-guide/kdump/kdump.rst |
67 | Documentation/admin-guide/kernel-parameters.txt (panic=) | 67 | Documentation/admin-guide/kernel-parameters.txt (panic=) |
68 | Your Linux Distribution specific documentation. | 68 | Your Linux Distribution specific documentation. |
69 | 69 | ||
diff --git a/Documentation/x86/conf.py b/Documentation/x86/conf.py deleted file mode 100644 index 33c5c3142e20..000000000000 --- a/Documentation/x86/conf.py +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # -*- coding: utf-8; mode: python -*- | ||
2 | |||
3 | project = "X86 architecture specific documentation" | ||
4 | |||
5 | tags.add("subproject") | ||
6 | |||
7 | latex_documents = [ | ||
8 | ('index', 'x86.tex', project, | ||
9 | 'The kernel development community', 'manual'), | ||
10 | ] | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 783569e3c4b4..ff3ae2be2746 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -899,7 +899,7 @@ L: linux-iio@vger.kernel.org | |||
899 | W: http://ez.analog.com/community/linux-device-drivers | 899 | W: http://ez.analog.com/community/linux-device-drivers |
900 | S: Supported | 900 | S: Supported |
901 | F: drivers/iio/adc/ad7124.c | 901 | F: drivers/iio/adc/ad7124.c |
902 | F: Documentation/devicetree/bindings/iio/adc/adi,ad7124.txt | 902 | F: Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml |
903 | 903 | ||
904 | ANALOG DEVICES INC AD7606 DRIVER | 904 | ANALOG DEVICES INC AD7606 DRIVER |
905 | M: Stefan Popa <stefan.popa@analog.com> | 905 | M: Stefan Popa <stefan.popa@analog.com> |
@@ -4190,7 +4190,7 @@ M: Jens Axboe <axboe@kernel.dk> | |||
4190 | L: cgroups@vger.kernel.org | 4190 | L: cgroups@vger.kernel.org |
4191 | L: linux-block@vger.kernel.org | 4191 | L: linux-block@vger.kernel.org |
4192 | T: git git://git.kernel.dk/linux-block | 4192 | T: git git://git.kernel.dk/linux-block |
4193 | F: Documentation/cgroup-v1/blkio-controller.rst | 4193 | F: Documentation/admin-guide/cgroup-v1/blkio-controller.rst |
4194 | F: block/blk-cgroup.c | 4194 | F: block/blk-cgroup.c |
4195 | F: include/linux/blk-cgroup.h | 4195 | F: include/linux/blk-cgroup.h |
4196 | F: block/blk-throttle.c | 4196 | F: block/blk-throttle.c |
@@ -4469,7 +4469,7 @@ F: arch/powerpc/platforms/powernv/pci-cxl.c | |||
4469 | F: drivers/misc/cxl/ | 4469 | F: drivers/misc/cxl/ |
4470 | F: include/misc/cxl* | 4470 | F: include/misc/cxl* |
4471 | F: include/uapi/misc/cxl.h | 4471 | F: include/uapi/misc/cxl.h |
4472 | F: Documentation/powerpc/cxl.txt | 4472 | F: Documentation/powerpc/cxl.rst |
4473 | F: Documentation/ABI/testing/sysfs-class-cxl | 4473 | F: Documentation/ABI/testing/sysfs-class-cxl |
4474 | 4474 | ||
4475 | CXLFLASH (IBM Coherent Accelerator Processor Interface CAPI Flash) SCSI DRIVER | 4475 | CXLFLASH (IBM Coherent Accelerator Processor Interface CAPI Flash) SCSI DRIVER |
@@ -4480,7 +4480,7 @@ L: linux-scsi@vger.kernel.org | |||
4480 | S: Supported | 4480 | S: Supported |
4481 | F: drivers/scsi/cxlflash/ | 4481 | F: drivers/scsi/cxlflash/ |
4482 | F: include/uapi/scsi/cxlflash_ioctl.h | 4482 | F: include/uapi/scsi/cxlflash_ioctl.h |
4483 | F: Documentation/powerpc/cxlflash.txt | 4483 | F: Documentation/powerpc/cxlflash.rst |
4484 | 4484 | ||
4485 | CYBERPRO FB DRIVER | 4485 | CYBERPRO FB DRIVER |
4486 | M: Russell King <linux@armlinux.org.uk> | 4486 | M: Russell King <linux@armlinux.org.uk> |
@@ -6856,7 +6856,7 @@ R: Sagi Shahar <sagis@google.com> | |||
6856 | R: Jon Olson <jonolson@google.com> | 6856 | R: Jon Olson <jonolson@google.com> |
6857 | L: netdev@vger.kernel.org | 6857 | L: netdev@vger.kernel.org |
6858 | S: Supported | 6858 | S: Supported |
6859 | F: Documentation/networking/device_drivers/google/gve.txt | 6859 | F: Documentation/networking/device_drivers/google/gve.rst |
6860 | F: drivers/net/ethernet/google | 6860 | F: drivers/net/ethernet/google |
6861 | 6861 | ||
6862 | GPD POCKET FAN DRIVER | 6862 | GPD POCKET FAN DRIVER |
@@ -12137,7 +12137,7 @@ M: Thomas Hellstrom <thellstrom@vmware.com> | |||
12137 | M: "VMware, Inc." <pv-drivers@vmware.com> | 12137 | M: "VMware, Inc." <pv-drivers@vmware.com> |
12138 | L: virtualization@lists.linux-foundation.org | 12138 | L: virtualization@lists.linux-foundation.org |
12139 | S: Supported | 12139 | S: Supported |
12140 | F: Documentation/virtual/paravirt_ops.txt | 12140 | F: Documentation/virtual/paravirt_ops.rst |
12141 | F: arch/*/kernel/paravirt* | 12141 | F: arch/*/kernel/paravirt* |
12142 | F: arch/*/include/asm/paravirt*.h | 12142 | F: arch/*/include/asm/paravirt*.h |
12143 | F: include/linux/hypervisor.h | 12143 | F: include/linux/hypervisor.h |
@@ -12394,7 +12394,7 @@ F: Documentation/PCI/pci-error-recovery.rst | |||
12394 | F: drivers/pci/pcie/aer.c | 12394 | F: drivers/pci/pcie/aer.c |
12395 | F: drivers/pci/pcie/dpc.c | 12395 | F: drivers/pci/pcie/dpc.c |
12396 | F: drivers/pci/pcie/err.c | 12396 | F: drivers/pci/pcie/err.c |
12397 | F: Documentation/powerpc/eeh-pci-error-recovery.txt | 12397 | F: Documentation/powerpc/eeh-pci-error-recovery.rst |
12398 | F: arch/powerpc/kernel/eeh*.c | 12398 | F: arch/powerpc/kernel/eeh*.c |
12399 | F: arch/powerpc/platforms/*/eeh*.c | 12399 | F: arch/powerpc/platforms/*/eeh*.c |
12400 | F: arch/powerpc/include/*/eeh*.h | 12400 | F: arch/powerpc/include/*/eeh*.h |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index eee5bef736c8..6ba3cc2ef8ab 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -1531,7 +1531,7 @@ EXC_COMMON(trap_0b_common, 0xb00, unknown_exception) | |||
1531 | * | 1531 | * |
1532 | * Call convention: | 1532 | * Call convention: |
1533 | * | 1533 | * |
1534 | * syscall register convention is in Documentation/powerpc/syscall64-abi.txt | 1534 | * syscall register convention is in Documentation/powerpc/syscall64-abi.rst |
1535 | * | 1535 | * |
1536 | * For hypercalls, the register convention is as follows: | 1536 | * For hypercalls, the register convention is as follows: |
1537 | * r0 volatile | 1537 | * r0 volatile |
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 74a5739df506..80fcd5dc1558 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c | |||
@@ -1686,7 +1686,7 @@ static int drm_mode_parse_cmdline_options(char *str, size_t len, | |||
1686 | * | 1686 | * |
1687 | * Additionals options can be provided following the mode, using a comma to | 1687 | * Additionals options can be provided following the mode, using a comma to |
1688 | * separate each option. Valid options can be found in | 1688 | * separate each option. Valid options can be found in |
1689 | * Documentation/fb/modedb.txt. | 1689 | * Documentation/fb/modedb.rst. |
1690 | * | 1690 | * |
1691 | * The intermediate drm_cmdline_mode structure is required to store additional | 1691 | * The intermediate drm_cmdline_mode structure is required to store additional |
1692 | * options from the command line modline like the force-enable/disable flag. | 1692 | * options from the command line modline like the force-enable/disable flag. |
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c index cfc76b5de726..5a1235fd86bb 100644 --- a/drivers/i2c/busses/i2c-nvidia-gpu.c +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c | |||
@@ -364,7 +364,7 @@ static void gpu_i2c_remove(struct pci_dev *pdev) | |||
364 | /* | 364 | /* |
365 | * We need gpu_i2c_suspend() even if it is stub, for runtime pm to work | 365 | * We need gpu_i2c_suspend() even if it is stub, for runtime pm to work |
366 | * correctly. Without it, lspci shows runtime pm status as "D0" for the card. | 366 | * correctly. Without it, lspci shows runtime pm status as "D0" for the card. |
367 | * Documentation/power/pci.txt also insists for driver to provide this. | 367 | * Documentation/power/pci.rst also insists for driver to provide this. |
368 | */ | 368 | */ |
369 | static __maybe_unused int gpu_i2c_suspend(struct device *dev) | 369 | static __maybe_unused int gpu_i2c_suspend(struct device *dev) |
370 | { | 370 | { |
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 43a6b5350775..eaf6177ac9ee 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -7798,7 +7798,7 @@ static void hpsa_free_pci_init(struct ctlr_info *h) | |||
7798 | hpsa_disable_interrupt_mode(h); /* pci_init 2 */ | 7798 | hpsa_disable_interrupt_mode(h); /* pci_init 2 */ |
7799 | /* | 7799 | /* |
7800 | * call pci_disable_device before pci_release_regions per | 7800 | * call pci_disable_device before pci_release_regions per |
7801 | * Documentation/PCI/pci.rst | 7801 | * Documentation/driver-api/pci/pci.rst |
7802 | */ | 7802 | */ |
7803 | pci_disable_device(h->pdev); /* pci_init 1 */ | 7803 | pci_disable_device(h->pdev); /* pci_init 1 */ |
7804 | pci_release_regions(h->pdev); /* pci_init 2 */ | 7804 | pci_release_regions(h->pdev); /* pci_init 2 */ |
@@ -7881,7 +7881,7 @@ clean2: /* intmode+region, pci */ | |||
7881 | clean1: | 7881 | clean1: |
7882 | /* | 7882 | /* |
7883 | * call pci_disable_device before pci_release_regions per | 7883 | * call pci_disable_device before pci_release_regions per |
7884 | * Documentation/PCI/pci.rst | 7884 | * Documentation/driver-api/pci/pci.rst |
7885 | */ | 7885 | */ |
7886 | pci_disable_device(h->pdev); | 7886 | pci_disable_device(h->pdev); |
7887 | pci_release_regions(h->pdev); | 7887 | pci_release_regions(h->pdev); |
diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 62c6ba17991a..c9519e62308c 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c | |||
@@ -419,7 +419,7 @@ static void qe_upload_microcode(const void *base, | |||
419 | /* | 419 | /* |
420 | * Upload a microcode to the I-RAM at a specific address. | 420 | * Upload a microcode to the I-RAM at a specific address. |
421 | * | 421 | * |
422 | * See Documentation/powerpc/qe_firmware.txt for information on QE microcode | 422 | * See Documentation/powerpc/qe_firmware.rst for information on QE microcode |
423 | * uploading. | 423 | * uploading. |
424 | * | 424 | * |
425 | * Currently, only version 1 is supported, so the 'version' field must be | 425 | * Currently, only version 1 is supported, so the 'version' field must be |
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index cb4db1b3ca3c..5fb214e67d73 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c | |||
@@ -47,7 +47,7 @@ | |||
47 | * using the 2.6 Linux kernel kref construct. | 47 | * using the 2.6 Linux kernel kref construct. |
48 | * | 48 | * |
49 | * For direction on installation and usage of this driver please reference | 49 | * For direction on installation and usage of this driver please reference |
50 | * Documentation/powerpc/hvcs.txt. | 50 | * Documentation/powerpc/hvcs.rst. |
51 | */ | 51 | */ |
52 | 52 | ||
53 | #include <linux/device.h> | 53 | #include <linux/device.h> |
diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h index 3f9d6b6a5691..c1036d16ed03 100644 --- a/include/soc/fsl/qe/qe.h +++ b/include/soc/fsl/qe/qe.h | |||
@@ -259,7 +259,7 @@ static inline int qe_alive_during_sleep(void) | |||
259 | 259 | ||
260 | /* Structure that defines QE firmware binary files. | 260 | /* Structure that defines QE firmware binary files. |
261 | * | 261 | * |
262 | * See Documentation/powerpc/qe_firmware.txt for a description of these | 262 | * See Documentation/powerpc/qe_firmware.rst for a description of these |
263 | * fields. | 263 | * fields. |
264 | */ | 264 | */ |
265 | struct qe_firmware { | 265 | struct qe_firmware { |
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index f230e65329a2..3b638c0e1a4f 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install | |||
@@ -83,6 +83,17 @@ sub check_missing(%) | |||
83 | foreach my $prog (sort keys %missing) { | 83 | foreach my $prog (sort keys %missing) { |
84 | my $is_optional = $missing{$prog}; | 84 | my $is_optional = $missing{$prog}; |
85 | 85 | ||
86 | # At least on some LTS distros like CentOS 7, texlive doesn't | ||
87 | # provide all packages we need. When such distros are | ||
88 | # detected, we have to disable PDF output. | ||
89 | # | ||
90 | # So, we need to ignore the packages that distros would | ||
91 | # need for LaTeX to work | ||
92 | if ($is_optional == 2 && !$pdf) { | ||
93 | $optional--; | ||
94 | next; | ||
95 | } | ||
96 | |||
86 | if ($is_optional) { | 97 | if ($is_optional) { |
87 | print "Warning: better to also install \"$prog\".\n"; | 98 | print "Warning: better to also install \"$prog\".\n"; |
88 | } else { | 99 | } else { |
@@ -333,10 +344,13 @@ sub give_debian_hints() | |||
333 | 344 | ||
334 | if ($pdf) { | 345 | if ($pdf) { |
335 | check_missing_file("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", | 346 | check_missing_file("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", |
336 | "fonts-dejavu", 1); | 347 | "fonts-dejavu", 2); |
348 | |||
349 | check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", | ||
350 | "fonts-noto-cjk", 2); | ||
337 | } | 351 | } |
338 | 352 | ||
339 | check_program("dvipng", 1) if ($pdf); | 353 | check_program("dvipng", 2) if ($pdf); |
340 | check_missing(\%map); | 354 | check_missing(\%map); |
341 | 355 | ||
342 | return if (!$need && !$optional); | 356 | return if (!$need && !$optional); |
@@ -363,6 +377,7 @@ sub give_redhat_hints() | |||
363 | my @fedora_tex_pkgs = ( | 377 | my @fedora_tex_pkgs = ( |
364 | "texlive-collection-fontsrecommended", | 378 | "texlive-collection-fontsrecommended", |
365 | "texlive-collection-latex", | 379 | "texlive-collection-latex", |
380 | "texlive-xecjk", | ||
366 | "dejavu-sans-fonts", | 381 | "dejavu-sans-fonts", |
367 | "dejavu-serif-fonts", | 382 | "dejavu-serif-fonts", |
368 | "dejavu-sans-mono-fonts", | 383 | "dejavu-sans-mono-fonts", |
@@ -371,22 +386,45 @@ sub give_redhat_hints() | |||
371 | # | 386 | # |
372 | # Checks valid for RHEL/CentOS version 7.x. | 387 | # Checks valid for RHEL/CentOS version 7.x. |
373 | # | 388 | # |
374 | if (! $system_release =~ /Fedora/) { | 389 | my $old = 0; |
390 | my $rel; | ||
391 | $rel = $1 if ($system_release =~ /release\s+(\d+)/); | ||
392 | |||
393 | if (!($system_release =~ /Fedora/)) { | ||
375 | $map{"virtualenv"} = "python-virtualenv"; | 394 | $map{"virtualenv"} = "python-virtualenv"; |
376 | } | ||
377 | 395 | ||
378 | my $release; | 396 | if ($rel && $rel < 8) { |
397 | $old = 1; | ||
398 | $pdf = 0; | ||
399 | |||
400 | printf("Note: texlive packages on RHEL/CENTOS <= 7 are incomplete. Can't support PDF output\n"); | ||
401 | printf("If you want to build PDF, please read:\n"); | ||
402 | printf("\thttps://www.systutorials.com/241660/how-to-install-tex-live-on-centos-7-linux/\n"); | ||
403 | } | ||
404 | } else { | ||
405 | if ($rel && $rel < 26) { | ||
406 | $old = 1; | ||
407 | } | ||
408 | } | ||
409 | if (!$rel) { | ||
410 | printf("Couldn't identify release number\n"); | ||
411 | $old = 1; | ||
412 | $pdf = 0; | ||
413 | } | ||
379 | 414 | ||
380 | $release = $1 if ($system_release =~ /Fedora\s+release\s+(\d+)/); | 415 | if ($pdf) { |
416 | check_missing_file("/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", | ||
417 | "google-noto-sans-cjk-ttc-fonts", 2); | ||
418 | } | ||
381 | 419 | ||
382 | check_rpm_missing(\@fedora26_opt_pkgs, 1) if ($pdf && $release >= 26); | 420 | check_rpm_missing(\@fedora26_opt_pkgs, 2) if ($pdf && !$old); |
383 | check_rpm_missing(\@fedora_tex_pkgs, 1) if ($pdf); | 421 | check_rpm_missing(\@fedora_tex_pkgs, 2) if ($pdf); |
384 | check_missing_tex(1) if ($pdf); | 422 | check_missing_tex(2) if ($pdf); |
385 | check_missing(\%map); | 423 | check_missing(\%map); |
386 | 424 | ||
387 | return if (!$need && !$optional); | 425 | return if (!$need && !$optional); |
388 | 426 | ||
389 | if ($release >= 18) { | 427 | if (!$old) { |
390 | # dnf, for Fedora 18+ | 428 | # dnf, for Fedora 18+ |
391 | printf("You should run:\n\n\tsudo dnf install -y $install\n"); | 429 | printf("You should run:\n\n\tsudo dnf install -y $install\n"); |
392 | } else { | 430 | } else { |
@@ -425,8 +463,15 @@ sub give_opensuse_hints() | |||
425 | "texlive-zapfding", | 463 | "texlive-zapfding", |
426 | ); | 464 | ); |
427 | 465 | ||
428 | check_rpm_missing(\@suse_tex_pkgs, 1) if ($pdf); | 466 | $map{"latexmk"} = "texlive-latexmk-bin"; |
429 | check_missing_tex(1) if ($pdf); | 467 | |
468 | # FIXME: add support for installing CJK fonts | ||
469 | # | ||
470 | # I tried hard, but was unable to find a way to install | ||
471 | # "Noto Sans CJK SC" on openSUSE | ||
472 | |||
473 | check_rpm_missing(\@suse_tex_pkgs, 2) if ($pdf); | ||
474 | check_missing_tex(2) if ($pdf); | ||
430 | check_missing(\%map); | 475 | check_missing(\%map); |
431 | 476 | ||
432 | return if (!$need && !$optional); | 477 | return if (!$need && !$optional); |
@@ -450,7 +495,14 @@ sub give_mageia_hints() | |||
450 | "texlive-fontsextra", | 495 | "texlive-fontsextra", |
451 | ); | 496 | ); |
452 | 497 | ||
453 | check_rpm_missing(\@tex_pkgs, 1) if ($pdf); | 498 | $map{"latexmk"} = "texlive-collection-basic"; |
499 | |||
500 | if ($pdf) { | ||
501 | check_missing_file("/usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc", | ||
502 | "google-noto-sans-cjk-ttc-fonts", 2); | ||
503 | } | ||
504 | |||
505 | check_rpm_missing(\@tex_pkgs, 2) if ($pdf); | ||
454 | check_missing(\%map); | 506 | check_missing(\%map); |
455 | 507 | ||
456 | return if (!$need && !$optional); | 508 | return if (!$need && !$optional); |
@@ -473,7 +525,13 @@ sub give_arch_linux_hints() | |||
473 | "texlive-latexextra", | 525 | "texlive-latexextra", |
474 | "ttf-dejavu", | 526 | "ttf-dejavu", |
475 | ); | 527 | ); |
476 | check_pacman_missing(\@archlinux_tex_pkgs, 1) if ($pdf); | 528 | check_pacman_missing(\@archlinux_tex_pkgs, 2) if ($pdf); |
529 | |||
530 | if ($pdf) { | ||
531 | check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc", | ||
532 | "noto-fonts-cjk", 2); | ||
533 | } | ||
534 | |||
477 | check_missing(\%map); | 535 | check_missing(\%map); |
478 | 536 | ||
479 | return if (!$need && !$optional); | 537 | return if (!$need && !$optional); |
@@ -492,15 +550,31 @@ sub give_gentoo_hints() | |||
492 | ); | 550 | ); |
493 | 551 | ||
494 | check_missing_file("/usr/share/fonts/dejavu/DejaVuSans.ttf", | 552 | check_missing_file("/usr/share/fonts/dejavu/DejaVuSans.ttf", |
495 | "media-fonts/dejavu", 1) if ($pdf); | 553 | "media-fonts/dejavu", 2) if ($pdf); |
554 | |||
555 | if ($pdf) { | ||
556 | check_missing_file("/usr/share/fonts/noto-cjk/NotoSansCJKsc-Regular.otf", | ||
557 | "media-fonts/noto-cjk", 2); | ||
558 | } | ||
496 | 559 | ||
497 | check_missing(\%map); | 560 | check_missing(\%map); |
498 | 561 | ||
499 | return if (!$need && !$optional); | 562 | return if (!$need && !$optional); |
500 | 563 | ||
501 | printf("You should run:\n\n"); | 564 | printf("You should run:\n\n"); |
502 | printf("\tsudo su -c 'echo \"media-gfx/imagemagick svg png\" > /etc/portage/package.use/imagemagick'\n"); | 565 | |
503 | printf("\tsudo su -c 'echo \"media-gfx/graphviz cairo pdf\" > /etc/portage/package.use/graphviz'\n"); | 566 | my $imagemagick = "media-gfx/imagemagick svg png"; |
567 | my $cairo = "media-gfx/graphviz cairo pdf"; | ||
568 | my $portage_imagemagick = "/etc/portage/package.use/imagemagick"; | ||
569 | my $portage_cairo = "/etc/portage/package.use/graphviz"; | ||
570 | |||
571 | if (qx(cat $portage_imagemagick) ne "$imagemagick\n") { | ||
572 | printf("\tsudo su -c 'echo \"$imagemagick\" > $portage_imagemagick'\n") | ||
573 | } | ||
574 | if (qx(cat $portage_cairo) ne "$cairo\n") { | ||
575 | printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n"); | ||
576 | } | ||
577 | |||
504 | printf("\tsudo emerge --ask $install\n"); | 578 | printf("\tsudo emerge --ask $install\n"); |
505 | 579 | ||
506 | } | 580 | } |
@@ -560,7 +634,7 @@ sub check_distros() | |||
560 | my %map = ( | 634 | my %map = ( |
561 | "sphinx-build" => "sphinx" | 635 | "sphinx-build" => "sphinx" |
562 | ); | 636 | ); |
563 | check_missing_tex(1) if ($pdf); | 637 | check_missing_tex(2) if ($pdf); |
564 | check_missing(\%map); | 638 | check_missing(\%map); |
565 | print "I don't know distro $system_release.\n"; | 639 | print "I don't know distro $system_release.\n"; |
566 | print "So, I can't provide you a hint with the install procedure.\n"; | 640 | print "So, I can't provide you a hint with the install procedure.\n"; |
@@ -589,11 +663,13 @@ sub check_needs() | |||
589 | check_program("make", 0); | 663 | check_program("make", 0); |
590 | check_program("gcc", 0); | 664 | check_program("gcc", 0); |
591 | check_python_module("sphinx_rtd_theme", 1) if (!$virtualenv); | 665 | check_python_module("sphinx_rtd_theme", 1) if (!$virtualenv); |
592 | check_program("xelatex", 1) if ($pdf); | ||
593 | check_program("dot", 1); | 666 | check_program("dot", 1); |
594 | check_program("convert", 1); | 667 | check_program("convert", 1); |
595 | check_program("rsvg-convert", 1) if ($pdf); | 668 | |
596 | check_program("latexmk", 1) if ($pdf); | 669 | # Extra PDF files - should use 2 for is_optional |
670 | check_program("xelatex", 2) if ($pdf); | ||
671 | check_program("rsvg-convert", 2) if ($pdf); | ||
672 | check_program("latexmk", 2) if ($pdf); | ||
597 | 673 | ||
598 | check_distros(); | 674 | check_distros(); |
599 | 675 | ||