Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: powerpc: fix some issues at vas-api.rst

There are a few issues on this document, when built via the
building with ``make htmldocs``:

Documentation/powerpc/vas-api.rst:116: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:116: WARNING: Inline emphasis start-string without end-string.
Documentation/powerpc/vas-api.rst:117: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:117: WARNING: Inline emphasis start-string without end-string.
Documentation/powerpc/vas-api.rst:120: WARNING: Definition list ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:124: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:133: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:135: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:150: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:151: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:161: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:176: WARNING: Definition list ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:253: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:253: WARNING: Inline emphasis start-string without end-string.
Documentation/powerpc/vas-api.rst:259: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:261: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:266: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:267: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:270: WARNING: Definition list ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:271: WARNING: Definition list ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:273: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:274: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:277: WARNING: Definition list ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:278: WARNING: Definition list ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:280: WARNING: Unexpected indentation.
Documentation/powerpc/vas-api.rst:287: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/powerpc/vas-api.rst:289: WARNING: Block quote ends without a blank line; unexpected unindent.

Fixes: c12e38b1d52e ("Documentation/powerpc: VAS API")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/fc1138e563bc3a41a9e59b5dd1fe2f6a4bfad253.1592895969.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
cadcb83f 72a3e3e2

+18 -5
+18 -5
Documentation/powerpc/vas-api.rst
··· 87 87 the vas_id field in the VAS_TX_WIN_OPEN ioctl as detailed below. 88 88 89 89 A userspace library libnxz is available here but still in development: 90 + 90 91 https://github.com/abalib/power-gzip 91 92 92 93 Applications that use inflate / deflate calls can link with libnxz ··· 111 110 a connection with NX co-processor engine: 112 111 113 112 :: 113 + 114 114 struct vas_tx_win_open_attr { 115 115 __u32 version; 116 116 __s16 vas_id; /* specific instance of vas or -1 ··· 121 119 __u64 reserved2[6]; 122 120 }; 123 121 124 - version: The version field must be currently set to 1. 125 - vas_id: If '-1' is passed, kernel will make a best-effort attempt 122 + version: 123 + The version field must be currently set to 1. 124 + vas_id: 125 + If '-1' is passed, kernel will make a best-effort attempt 126 126 to assign an optimal instance of NX for the process. To 127 127 select the specific VAS instance, refer 128 128 "Discovery of available VAS engines" section below. ··· 133 129 and must be set to 0. 134 130 135 131 The attributes attr for the VAS_TX_WIN_OPEN ioctl are defined as 136 - follows: 132 + follows:: 133 + 137 134 #define VAS_MAGIC 'v' 138 135 #define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 1, 139 136 struct vas_tx_win_open_attr) ··· 146 141 returns -1 and sets the errno variable to indicate the error. 147 142 148 143 Error conditions: 144 + 145 + ====== ================================================ 149 146 EINVAL fd does not refer to a valid VAS device. 150 147 EINVAL Invalid vas ID 151 148 EINVAL version is not set with proper value ··· 156 149 ENOSPC System has too many active windows (connections) 157 150 opened 158 151 EINVAL reserved fields are not set to 0. 152 + ====== ================================================ 159 153 160 154 See the ioctl(2) man page for more details, error codes and 161 155 restrictions. ··· 166 158 167 159 The mmap() system call for a NX-GZIP device fd returns a paste_address 168 160 that the application can use to copy/paste its CRB to the hardware engines. 161 + 169 162 :: 170 163 171 164 paste_addr = mmap(addr, size, prot, flags, fd, offset); 172 165 173 166 Only restrictions on mmap for a NX-GZIP device fd are: 167 + 174 168 * size should be PAGE_SIZE 175 169 * offset parameter should be 0ULL 176 170 ··· 180 170 In addition to the error conditions listed on the mmap(2) man 181 171 page, can also fail with one of the following error codes: 182 172 173 + ====== ============================================= 183 174 EINVAL fd is not associated with an open window 184 175 (i.e mmap() does not follow a successful call 185 176 to the VAS_TX_WIN_OPEN ioctl). 186 177 EINVAL offset field is not 0ULL. 178 + ====== ============================================= 187 179 188 180 Discovery of available VAS engines 189 181 ================================== ··· 222 210 address or any request buffer, raises an interrupt on the CPU to handle the 223 211 fault. Page fault can happen if an application passes invalid addresses or 224 212 request buffers are not in memory. The operating system handles the fault by 225 - updating CSB with the following data: 213 + updating CSB with the following data:: 226 214 227 215 csb.flags = CSB_V; 228 216 csb.cc = CSB_CC_TRANSLATION; ··· 235 223 236 224 If the OS can not update CSB due to invalid CSB address, sends SEGV signal 237 225 to the process who opened the send window on which the original request was 238 - issued. This signal returns with the following siginfo struct: 226 + issued. This signal returns with the following siginfo struct:: 239 227 240 228 siginfo.si_signo = SIGSEGV; 241 229 siginfo.si_errno = EFAULT; ··· 260 248 ============== 261 249 262 250 :: 251 + 263 252 int use_nx_gzip() 264 253 { 265 254 int rc, fd;