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

Merge tag 'docs-5.9-2' of git://git.lwn.net/linux

Pull documentation fixes from Jonathan Corbet:
"A handful of obvious fixes that wandered in during the merge window"

* tag 'docs-5.9-2' of git://git.lwn.net/linux:
Documentation/locking/locktypes: fix the typo
doc/zh_CN: resolve undefined label warning in admin-guide index
doc/zh_CN: fix title heading markup in admin-guide cpu-load
docs: remove the 2.6 "Upgrading I2C Drivers" guide
docs: Correct the release date of 5.2 stable
mailmap: Update comments for with format and more detalis
docs: cdrom: Fix a typo and rst markup
Doc: admin-guide: use correct legends in kernel-parameters.txt
Documentation/features: refresh RISC-V arch support files
documentation: coccinelle: Improve command example for make C={1,2}
Core-api: Documentation: Replace deprecated :c:func: Usage
Dev-tools: Documentation: Replace deprecated :c:func: Usage
Filesystems: Documentation: Replace deprecated :c:func: Usage
docs: trace: fix a typo

+105 -379
+7 -2
.mailmap
··· 2 2 # This list is used by git-shortlog to fix a few botched name translations 3 3 # in the git archive, either because the author's full name was messed up 4 4 # and/or not always written the same way, making contributions from the 5 - # same person appearing not to be so or badly displayed. 5 + # same person appearing not to be so or badly displayed. Also allows for 6 + # old email addresses to map to new email addresses. 6 7 # 8 + # For format details, see "MAPPING AUTHORS" in "man git-shortlog". 9 + # 10 + # Please keep this list dictionary sorted. 11 + # 12 + # This comment is parsed by git-shortlog: 7 13 # repo-abbrev: /pub/scm/linux/kernel/git/ 8 14 # 9 - 10 15 Aaron Durbin <adurbin@google.com> 11 16 Adam Oldham <oldhamca@gmail.com> 12 17 Adam Radford <aradford@gmail.com>
+18 -18
Documentation/admin-guide/kernel-parameters.txt
··· 724 724 memory region [offset, offset + size] for that kernel 725 725 image. If '@offset' is omitted, then a suitable offset 726 726 is selected automatically. 727 - [KNL, x86_64] select a region under 4G first, and 727 + [KNL, X86-64] Select a region under 4G first, and 728 728 fall back to reserve region above 4G when '@offset' 729 729 hasn't been specified. 730 730 See Documentation/admin-guide/kdump/kdump.rst for further details. ··· 737 737 Documentation/admin-guide/kdump/kdump.rst for an example. 738 738 739 739 crashkernel=size[KMG],high 740 - [KNL, x86_64] range could be above 4G. Allow kernel 740 + [KNL, X86-64] range could be above 4G. Allow kernel 741 741 to allocate physical memory region from top, so could 742 742 be above 4G if system have more than 4G ram installed. 743 743 Otherwise memory region will be allocated below 4G, if 744 744 available. 745 745 It will be ignored if crashkernel=X is specified. 746 746 crashkernel=size[KMG],low 747 - [KNL, x86_64] range under 4G. When crashkernel=X,high 747 + [KNL, X86-64] range under 4G. When crashkernel=X,high 748 748 is passed, kernel could allocate physical memory region 749 749 above 4G, that cause second kernel crash on system 750 750 that require some amount of low memory, e.g. swiotlb ··· 1427 1427 1428 1428 gamma= [HW,DRM] 1429 1429 1430 - gart_fix_e820= [X86_64] disable the fix e820 for K8 GART 1430 + gart_fix_e820= [X86-64] disable the fix e820 for K8 GART 1431 1431 Format: off | on 1432 1432 default: on 1433 1433 ··· 1814 1814 Format: 0 | 1 1815 1815 Default set by CONFIG_INIT_ON_FREE_DEFAULT_ON. 1816 1816 1817 - init_pkru= [x86] Specify the default memory protection keys rights 1817 + init_pkru= [X86] Specify the default memory protection keys rights 1818 1818 register contents for all processes. 0x55555554 by 1819 1819 default (disallow access to all but pkey 0). Can 1820 1820 override in debugfs after boot. ··· 1822 1822 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver 1823 1823 Format: <irq> 1824 1824 1825 - int_pln_enable [x86] Enable power limit notification interrupt 1825 + int_pln_enable [X86] Enable power limit notification interrupt 1826 1826 1827 1827 integrity_audit=[IMA] 1828 1828 Format: { "0" | "1" } ··· 1840 1840 bypassed by not enabling DMAR with this option. In 1841 1841 this case, gfx device will use physical address for 1842 1842 DMA. 1843 - forcedac [x86_64] 1843 + forcedac [X86-64] 1844 1844 With this option iommu will not optimize to look 1845 1845 for io virtual address below 32-bit forcing dual 1846 1846 address cycle on pci bus for cards supporting greater ··· 1925 1925 strict regions from userspace. 1926 1926 relaxed 1927 1927 1928 - iommu= [x86] 1928 + iommu= [X86] 1929 1929 off 1930 1930 force 1931 1931 noforce ··· 1935 1935 merge 1936 1936 nomerge 1937 1937 soft 1938 - pt [x86] 1939 - nopt [x86] 1938 + pt [X86] 1939 + nopt [X86] 1940 1940 nobypass [PPC/POWERNV] 1941 1941 Disable IOMMU bypass, using IOMMU for PCI devices. 1942 1942 ··· 2079 2079 2080 2080 iucv= [HW,NET] 2081 2081 2082 - ivrs_ioapic [HW,X86_64] 2082 + ivrs_ioapic [HW,X86-64] 2083 2083 Provide an override to the IOAPIC-ID<->DEVICE-ID 2084 2084 mapping provided in the IVRS ACPI table. For 2085 2085 example, to map IOAPIC-ID decimal 10 to 2086 2086 PCI device 00:14.0 write the parameter as: 2087 2087 ivrs_ioapic[10]=00:14.0 2088 2088 2089 - ivrs_hpet [HW,X86_64] 2089 + ivrs_hpet [HW,X86-64] 2090 2090 Provide an override to the HPET-ID<->DEVICE-ID 2091 2091 mapping provided in the IVRS ACPI table. For 2092 2092 example, to map HPET-ID decimal 0 to 2093 2093 PCI device 00:14.0 write the parameter as: 2094 2094 ivrs_hpet[0]=00:14.0 2095 2095 2096 - ivrs_acpihid [HW,X86_64] 2096 + ivrs_acpihid [HW,X86-64] 2097 2097 Provide an override to the ACPI-HID:UID<->DEVICE-ID 2098 2098 mapping provided in the IVRS ACPI table. For 2099 2099 example, to map UART-HID:UID AMD0020:0 to ··· 2370 2370 lapic [X86-32,APIC] Enable the local APIC even if BIOS 2371 2371 disabled it. 2372 2372 2373 - lapic= [x86,APIC] "notscdeadline" Do not use TSC deadline 2373 + lapic= [X86,APIC] "notscdeadline" Do not use TSC deadline 2374 2374 value for LAPIC timer one-shot implementation. Default 2375 2375 back to the programmable timer unit in the LAPIC. 2376 2376 ··· 3188 3188 register save and restore. The kernel will only save 3189 3189 legacy floating-point registers on task switch. 3190 3190 3191 - nohugeiomap [KNL,x86,PPC] Disable kernel huge I/O mappings. 3191 + nohugeiomap [KNL,X86,PPC] Disable kernel huge I/O mappings. 3192 3192 3193 3193 nosmt [KNL,S390] Disable symmetric multithreading (SMT). 3194 3194 Equivalent to smt=1. 3195 3195 3196 - [KNL,x86] Disable symmetric multithreading (SMT). 3196 + [KNL,X86] Disable symmetric multithreading (SMT). 3197 3197 nosmt=force: Force disable SMT, cannot be undone 3198 3198 via the sysfs control file. 3199 3199 ··· 3955 3955 pt. [PARIDE] 3956 3956 See Documentation/admin-guide/blockdev/paride.rst. 3957 3957 3958 - pti= [X86_64] Control Page Table Isolation of user and 3958 + pti= [X86-64] Control Page Table Isolation of user and 3959 3959 kernel address spaces. Disabling this feature 3960 3960 removes hardening, but improves performance of 3961 3961 system calls and interrupts. ··· 3967 3967 3968 3968 Not specifying this option is equivalent to pti=auto. 3969 3969 3970 - nopti [X86_64] 3970 + nopti [X86-64] 3971 3971 Equivalent to pti=off 3972 3972 3973 3973 pty.legacy_count=
+2 -2
Documentation/cdrom/cdrom-standard.rst
··· 557 557 CDC_DRIVE_STATUS /* driver implements drive status */ 558 558 559 559 The capability flag is declared *const*, to prevent drivers from 560 - accidentally tampering with the contents. The capability fags actually 560 + accidentally tampering with the contents. The capability flags actually 561 561 inform `cdrom.c` of what the driver can do. If the drive found 562 562 by the driver does not have the capability, is can be masked out by 563 563 the *cdrom_device_info* variable *mask*. For instance, the SCSI CD-ROM ··· 736 736 737 737 Only a few routines in `cdrom.c` are exported to the drivers. In this 738 738 new section we will discuss these, as well as the functions that `take 739 - over' the CD-ROM interface to the kernel. The header file belonging 739 + over` the CD-ROM interface to the kernel. The header file belonging 740 740 to `cdrom.c` is called `cdrom.h`. Formerly, some of the contents of this 741 741 file were placed in the file `ucdrom.h`, but this file has now been 742 742 merged back into `cdrom.h`.
+16 -16
Documentation/core-api/idr.rst
··· 20 20 IDR usage 21 21 ========= 22 22 23 - Start by initialising an IDR, either with :c:func:`DEFINE_IDR` 24 - for statically allocated IDRs or :c:func:`idr_init` for dynamically 23 + Start by initialising an IDR, either with DEFINE_IDR() 24 + for statically allocated IDRs or idr_init() for dynamically 25 25 allocated IDRs. 26 26 27 - You can call :c:func:`idr_alloc` to allocate an unused ID. Look up 28 - the pointer you associated with the ID by calling :c:func:`idr_find` 29 - and free the ID by calling :c:func:`idr_remove`. 27 + You can call idr_alloc() to allocate an unused ID. Look up 28 + the pointer you associated with the ID by calling idr_find() 29 + and free the ID by calling idr_remove(). 30 30 31 31 If you need to change the pointer associated with an ID, you can call 32 - :c:func:`idr_replace`. One common reason to do this is to reserve an 32 + idr_replace(). One common reason to do this is to reserve an 33 33 ID by passing a ``NULL`` pointer to the allocation function; initialise the 34 34 object with the reserved ID and finally insert the initialised object 35 35 into the IDR. 36 36 37 37 Some users need to allocate IDs larger than ``INT_MAX``. So far all of 38 38 these users have been content with a ``UINT_MAX`` limit, and they use 39 - :c:func:`idr_alloc_u32`. If you need IDs that will not fit in a u32, 39 + idr_alloc_u32(). If you need IDs that will not fit in a u32, 40 40 we will work with you to address your needs. 41 41 42 42 If you need to allocate IDs sequentially, you can use 43 - :c:func:`idr_alloc_cyclic`. The IDR becomes less efficient when dealing 43 + idr_alloc_cyclic(). The IDR becomes less efficient when dealing 44 44 with larger IDs, so using this function comes at a slight cost. 45 45 46 46 To perform an action on all pointers used by the IDR, you can 47 - either use the callback-based :c:func:`idr_for_each` or the 48 - iterator-style :c:func:`idr_for_each_entry`. You may need to use 49 - :c:func:`idr_for_each_entry_continue` to continue an iteration. You can 50 - also use :c:func:`idr_get_next` if the iterator doesn't fit your needs. 47 + either use the callback-based idr_for_each() or the 48 + iterator-style idr_for_each_entry(). You may need to use 49 + idr_for_each_entry_continue() to continue an iteration. You can 50 + also use idr_get_next() if the iterator doesn't fit your needs. 51 51 52 - When you have finished using an IDR, you can call :c:func:`idr_destroy` 52 + When you have finished using an IDR, you can call idr_destroy() 53 53 to release the memory used by the IDR. This will not free the objects 54 54 pointed to from the IDR; if you want to do that, use one of the iterators 55 55 to do it. 56 56 57 - You can use :c:func:`idr_is_empty` to find out whether there are any 57 + You can use idr_is_empty() to find out whether there are any 58 58 IDs currently allocated. 59 59 60 60 If you need to take a lock while allocating a new ID from the IDR, 61 61 you may need to pass a restrictive set of GFP flags, which can lead 62 62 to the IDR being unable to allocate memory. To work around this, 63 - you can call :c:func:`idr_preload` before taking the lock, and then 64 - :c:func:`idr_preload_end` after the allocation. 63 + you can call idr_preload() before taking the lock, and then 64 + idr_preload_end() after the allocation. 65 65 66 66 .. kernel-doc:: include/linux/idr.h 67 67 :doc: idr sync
+11 -4
Documentation/dev-tools/coccinelle.rst
··· 175 175 make coccicheck M=drivers/net/wireless/ 176 176 177 177 To apply Coccinelle on a file basis, instead of a directory basis, the 178 - following command may be used:: 178 + C variable is used by the makefile to select which files to work with. 179 + This variable can be used to run scripts for the entire kernel, a 180 + specific directory, or for a single file. 179 181 180 - make C=1 CHECK="scripts/coccicheck" 182 + For example, to check drivers/bluetooth/bfusb.c, the value 1 is 183 + passed to the C variable to check files that make considers 184 + need to be compiled.:: 181 185 182 - To check only newly edited code, use the value 2 for the C flag, i.e.:: 186 + make C=1 CHECK=scripts/coccicheck drivers/bluetooth/bfusb.o 183 187 184 - make C=2 CHECK="scripts/coccicheck" 188 + The value 2 is passed to the C variable to check files regardless of 189 + whether they need to be compiled or not.:: 190 + 191 + make C=2 CHECK=scripts/coccicheck drivers/bluetooth/bfusb.o 185 192 186 193 In these modes, which work on a file basis, there is no information 187 194 about semantic patches displayed, and no commit message proposed.
+8 -8
Documentation/dev-tools/kgdb.rst
··· 316 316 Kernel parameter: ``kgdbcon`` 317 317 ----------------------------- 318 318 319 - The ``kgdbcon`` feature allows you to see :c:func:`printk` messages inside gdb 319 + The ``kgdbcon`` feature allows you to see printk() messages inside gdb 320 320 while gdb is connected to the kernel. Kdb does not make use of the kgdbcon 321 321 feature. 322 322 ··· 432 432 ``ps`` Displays only the active processes 433 433 ``ps A`` Shows all the processes 434 434 ``summary`` Shows kernel version info and memory usage 435 - ``bt`` Get a backtrace of the current process using :c:func:`dump_stack` 435 + ``bt`` Get a backtrace of the current process using dump_stack() 436 436 ``dmesg`` View the kernel syslog buffer 437 437 ``go`` Continue the system 438 438 =========== ================================================================= ··· 724 724 The arch-specific portion implements: 725 725 726 726 - contains an arch-specific trap catcher which invokes 727 - :c:func:`kgdb_handle_exception` to start kgdb about doing its work 727 + kgdb_handle_exception() to start kgdb about doing its work 728 728 729 729 - translation to and from gdb specific packet format to :c:type:`pt_regs` 730 730 ··· 769 769 config. Later run ``modprobe kdb_hello`` and the next time you 770 770 enter the kdb shell, you can run the ``hello`` command. 771 771 772 - - The implementation for :c:func:`kdb_printf` which emits messages directly 772 + - The implementation for kdb_printf() which emits messages directly 773 773 to I/O drivers, bypassing the kernel log. 774 774 775 775 - SW / HW breakpoint management for the kdb shell ··· 875 875 The core polled keyboard driver for PS/2 type keyboards is in 876 876 ``drivers/char/kdb_keyboard.c``. This driver is hooked into the debug core 877 877 when kgdboc populates the callback in the array called 878 - :c:type:`kdb_poll_funcs[]`. The :c:func:`kdb_get_kbd_char` is the top-level 878 + :c:type:`kdb_poll_funcs[]`. The kdb_get_kbd_char() is the top-level 879 879 function which polls hardware for single character input. 880 880 881 881 kgdboc and kms ··· 887 887 kernel mode setting support. 888 888 889 889 Every time the kernel debugger is entered it calls 890 - :c:func:`kgdboc_pre_exp_handler` which in turn calls :c:func:`con_debug_enter` 890 + kgdboc_pre_exp_handler() which in turn calls con_debug_enter() 891 891 in the virtual console layer. On resuming kernel execution, the kernel 892 - debugger calls :c:func:`kgdboc_post_exp_handler` which in turn calls 893 - :c:func:`con_debug_leave`. 892 + debugger calls kgdboc_post_exp_handler() which in turn calls 893 + con_debug_leave(). 894 894 895 895 Any video driver that wants to be compatible with the kernel debugger 896 896 and the atomic kms callbacks must implement the ``mode_set_base_atomic``,
+1 -1
Documentation/features/debug/kmemleak/arch-support.txt
··· 23 23 | openrisc: | TODO | 24 24 | parisc: | TODO | 25 25 | powerpc: | ok | 26 - | riscv: | TODO | 26 + | riscv: | ok | 27 27 | s390: | ok | 28 28 | sh: | ok | 29 29 | sparc: | ok |
+1 -1
Documentation/features/debug/stackprotector/arch-support.txt
··· 23 23 | openrisc: | TODO | 24 24 | parisc: | TODO | 25 25 | powerpc: | ok | 26 - | riscv: | TODO | 26 + | riscv: | ok | 27 27 | s390: | TODO | 28 28 | sh: | ok | 29 29 | sparc: | TODO |
+1 -1
Documentation/features/locking/lockdep/arch-support.txt
··· 23 23 | openrisc: | ok | 24 24 | parisc: | TODO | 25 25 | powerpc: | ok | 26 - | riscv: | TODO | 26 + | riscv: | ok | 27 27 | s390: | ok | 28 28 | sh: | ok | 29 29 | sparc: | ok |
+1 -1
Documentation/features/time/context-tracking/arch-support.txt
··· 23 23 | openrisc: | TODO | 24 24 | parisc: | TODO | 25 25 | powerpc: | ok | 26 - | riscv: | TODO | 26 + | riscv: | ok | 27 27 | s390: | TODO | 28 28 | sh: | TODO | 29 29 | sparc: | ok |
+33 -33
Documentation/filesystems/journalling.rst
··· 10 10 The journalling layer is easy to use. You need to first of all create a 11 11 journal_t data structure. There are two calls to do this dependent on 12 12 how you decide to allocate the physical media on which the journal 13 - resides. The :c:func:`jbd2_journal_init_inode` call is for journals stored in 14 - filesystem inodes, or the :c:func:`jbd2_journal_init_dev` call can be used 13 + resides. The jbd2_journal_init_inode() call is for journals stored in 14 + filesystem inodes, or the jbd2_journal_init_dev() call can be used 15 15 for journal stored on a raw device (in a continuous range of blocks). A 16 16 journal_t is a typedef for a struct pointer, so when you are finally 17 - finished make sure you call :c:func:`jbd2_journal_destroy` on it to free up 17 + finished make sure you call jbd2_journal_destroy() on it to free up 18 18 any used kernel memory. 19 19 20 20 Once you have got your journal_t object you need to 'mount' or load the 21 21 journal file. The journalling layer expects the space for the journal 22 22 was already allocated and initialized properly by the userspace tools. 23 - When loading the journal you must call :c:func:`jbd2_journal_load` to process 23 + When loading the journal you must call jbd2_journal_load() to process 24 24 journal contents. If the client file system detects the journal contents 25 25 does not need to be processed (or even need not have valid contents), it 26 - may call :c:func:`jbd2_journal_wipe` to clear the journal contents before 27 - calling :c:func:`jbd2_journal_load`. 26 + may call jbd2_journal_wipe() to clear the journal contents before 27 + calling jbd2_journal_load(). 28 28 29 29 Note that jbd2_journal_wipe(..,0) calls 30 - :c:func:`jbd2_journal_skip_recovery` for you if it detects any outstanding 31 - transactions in the journal and similarly :c:func:`jbd2_journal_load` will 32 - call :c:func:`jbd2_journal_recover` if necessary. I would advise reading 33 - :c:func:`ext4_load_journal` in fs/ext4/super.c for examples on this stage. 30 + jbd2_journal_skip_recovery() for you if it detects any outstanding 31 + transactions in the journal and similarly jbd2_journal_load() will 32 + call jbd2_journal_recover() if necessary. I would advise reading 33 + ext4_load_journal() in fs/ext4/super.c for examples on this stage. 34 34 35 35 Now you can go ahead and start modifying the underlying filesystem. 36 36 Almost. ··· 39 39 by wrapping them into transactions. Additionally you also need to wrap 40 40 the modification of each of the buffers with calls to the journal layer, 41 41 so it knows what the modifications you are actually making are. To do 42 - this use :c:func:`jbd2_journal_start` which returns a transaction handle. 42 + this use jbd2_journal_start() which returns a transaction handle. 43 43 44 - :c:func:`jbd2_journal_start` and its counterpart :c:func:`jbd2_journal_stop`, 44 + jbd2_journal_start() and its counterpart jbd2_journal_stop(), 45 45 which indicates the end of a transaction are nestable calls, so you can 46 46 reenter a transaction if necessary, but remember you must call 47 - :c:func:`jbd2_journal_stop` the same number of times as 48 - :c:func:`jbd2_journal_start` before the transaction is completed (or more 47 + jbd2_journal_stop() the same number of times as 48 + jbd2_journal_start() before the transaction is completed (or more 49 49 accurately leaves the update phase). Ext4/VFS makes use of this feature to 50 50 simplify handling of inode dirtying, quota support, etc. 51 51 52 52 Inside each transaction you need to wrap the modifications to the 53 53 individual buffers (blocks). Before you start to modify a buffer you 54 - need to call :c:func:`jbd2_journal_get_create_access()` / 55 - :c:func:`jbd2_journal_get_write_access()` / 56 - :c:func:`jbd2_journal_get_undo_access()` as appropriate, this allows the 54 + need to call jbd2_journal_get_create_access() / 55 + jbd2_journal_get_write_access() / 56 + jbd2_journal_get_undo_access() as appropriate, this allows the 57 57 journalling layer to copy the unmodified 58 58 data if it needs to. After all the buffer may be part of a previously 59 59 uncommitted transaction. At this point you are at last ready to modify a 60 60 buffer, and once you are have done so you need to call 61 - :c:func:`jbd2_journal_dirty_metadata`. Or if you've asked for access to a 61 + jbd2_journal_dirty_metadata(). Or if you've asked for access to a 62 62 buffer you now know is now longer required to be pushed back on the 63 - device you can call :c:func:`jbd2_journal_forget` in much the same way as you 64 - might have used :c:func:`bforget` in the past. 63 + device you can call jbd2_journal_forget() in much the same way as you 64 + might have used bforget() in the past. 65 65 66 - A :c:func:`jbd2_journal_flush` may be called at any time to commit and 66 + A jbd2_journal_flush() may be called at any time to commit and 67 67 checkpoint all your transactions. 68 68 69 - Then at umount time , in your :c:func:`put_super` you can then call 70 - :c:func:`jbd2_journal_destroy` to clean up your in-core journal object. 69 + Then at umount time , in your put_super() you can then call 70 + jbd2_journal_destroy() to clean up your in-core journal object. 71 71 72 72 Unfortunately there a couple of ways the journal layer can cause a 73 73 deadlock. The first thing to note is that each task can only have a 74 74 single outstanding transaction at any one time, remember nothing commits 75 - until the outermost :c:func:`jbd2_journal_stop`. This means you must complete 75 + until the outermost jbd2_journal_stop(). This means you must complete 76 76 the transaction at the end of each file/inode/address etc. operation you 77 77 perform, so that the journalling system isn't re-entered on another 78 78 journal. Since transactions can't be nested/batched across differing 79 79 journals, and another filesystem other than yours (say ext4) may be 80 80 modified in a later syscall. 81 81 82 - The second case to bear in mind is that :c:func:`jbd2_journal_start` can block 82 + The second case to bear in mind is that jbd2_journal_start() can block 83 83 if there isn't enough space in the journal for your transaction (based 84 84 on the passed nblocks param) - when it blocks it merely(!) needs to wait 85 85 for transactions to complete and be committed from other tasks, so 86 - essentially we are waiting for :c:func:`jbd2_journal_stop`. So to avoid 87 - deadlocks you must treat :c:func:`jbd2_journal_start` / 88 - :c:func:`jbd2_journal_stop` as if they were semaphores and include them in 86 + essentially we are waiting for jbd2_journal_stop(). So to avoid 87 + deadlocks you must treat jbd2_journal_start() / 88 + jbd2_journal_stop() as if they were semaphores and include them in 89 89 your semaphore ordering rules to prevent 90 - deadlocks. Note that :c:func:`jbd2_journal_extend` has similar blocking 91 - behaviour to :c:func:`jbd2_journal_start` so you can deadlock here just as 92 - easily as on :c:func:`jbd2_journal_start`. 90 + deadlocks. Note that jbd2_journal_extend() has similar blocking 91 + behaviour to jbd2_journal_start() so you can deadlock here just as 92 + easily as on jbd2_journal_start(). 93 93 94 94 Try to reserve the right number of blocks the first time. ;-). This will 95 95 be the maximum number of blocks you are going to touch in this ··· 116 116 that need processing when the transaction commits. 117 117 118 118 JBD2 also provides a way to block all transaction updates via 119 - :c:func:`jbd2_journal_lock_updates()` / 120 - :c:func:`jbd2_journal_unlock_updates()`. Ext4 uses this when it wants a 119 + jbd2_journal_lock_updates() / 120 + jbd2_journal_unlock_updates(). Ext4 uses this when it wants a 121 121 window with a clean and stable fs for a moment. E.g. 122 122 123 123 ::
-1
Documentation/i2c/index.rst
··· 62 62 .. toctree:: 63 63 :maxdepth: 1 64 64 65 - upgrading-clients 66 65 old-module-parameters 67 66 68 67 .. only:: subproject and html
-285
Documentation/i2c/upgrading-clients.rst
··· 1 - ================================================= 2 - Upgrading I2C Drivers to the new 2.6 Driver Model 3 - ================================================= 4 - 5 - Ben Dooks <ben-linux@fluff.org> 6 - 7 - Introduction 8 - ------------ 9 - 10 - This guide outlines how to alter existing Linux 2.6 client drivers from 11 - the old to the new binding methods. 12 - 13 - 14 - Example old-style driver 15 - ------------------------ 16 - 17 - :: 18 - 19 - struct example_state { 20 - struct i2c_client client; 21 - .... 22 - }; 23 - 24 - static struct i2c_driver example_driver; 25 - 26 - static unsigned short ignore[] = { I2C_CLIENT_END }; 27 - static unsigned short normal_addr[] = { OUR_ADDR, I2C_CLIENT_END }; 28 - 29 - I2C_CLIENT_INSMOD; 30 - 31 - static int example_attach(struct i2c_adapter *adap, int addr, int kind) 32 - { 33 - struct example_state *state; 34 - struct device *dev = &adap->dev; /* to use for dev_ reports */ 35 - int ret; 36 - 37 - state = kzalloc(sizeof(struct example_state), GFP_KERNEL); 38 - if (state == NULL) { 39 - dev_err(dev, "failed to create our state\n"); 40 - return -ENOMEM; 41 - } 42 - 43 - example->client.addr = addr; 44 - example->client.flags = 0; 45 - example->client.adapter = adap; 46 - 47 - i2c_set_clientdata(&state->i2c_client, state); 48 - strscpy(client->i2c_client.name, "example", sizeof(client->i2c_client.name)); 49 - 50 - ret = i2c_attach_client(&state->i2c_client); 51 - if (ret < 0) { 52 - dev_err(dev, "failed to attach client\n"); 53 - kfree(state); 54 - return ret; 55 - } 56 - 57 - dev = &state->i2c_client.dev; 58 - 59 - /* rest of the initialisation goes here. */ 60 - 61 - dev_info(dev, "example client created\n"); 62 - 63 - return 0; 64 - } 65 - 66 - static int example_detach(struct i2c_client *client) 67 - { 68 - struct example_state *state = i2c_get_clientdata(client); 69 - 70 - i2c_detach_client(client); 71 - kfree(state); 72 - return 0; 73 - } 74 - 75 - static int example_attach_adapter(struct i2c_adapter *adap) 76 - { 77 - return i2c_probe(adap, &addr_data, example_attach); 78 - } 79 - 80 - static struct i2c_driver example_driver = { 81 - .driver = { 82 - .owner = THIS_MODULE, 83 - .name = "example", 84 - .pm = &example_pm_ops, 85 - }, 86 - .attach_adapter = example_attach_adapter, 87 - .detach_client = example_detach, 88 - }; 89 - 90 - 91 - Updating the client 92 - ------------------- 93 - 94 - The new style binding model will check against a list of supported 95 - devices and their associated address supplied by the code registering 96 - the busses. This means that the driver .attach_adapter and 97 - .detach_client methods can be removed, along with the addr_data, 98 - as follows:: 99 - 100 - - static struct i2c_driver example_driver; 101 - 102 - - static unsigned short ignore[] = { I2C_CLIENT_END }; 103 - - static unsigned short normal_addr[] = { OUR_ADDR, I2C_CLIENT_END }; 104 - 105 - - I2C_CLIENT_INSMOD; 106 - 107 - - static int example_attach_adapter(struct i2c_adapter *adap) 108 - - { 109 - - return i2c_probe(adap, &addr_data, example_attach); 110 - - } 111 - 112 - static struct i2c_driver example_driver = { 113 - - .attach_adapter = example_attach_adapter, 114 - - .detach_client = example_detach, 115 - } 116 - 117 - Add the probe and remove methods to the i2c_driver, as so:: 118 - 119 - static struct i2c_driver example_driver = { 120 - + .probe = example_probe, 121 - + .remove = example_remove, 122 - } 123 - 124 - Change the example_attach method to accept the new parameters 125 - which include the i2c_client that it will be working with:: 126 - 127 - - static int example_attach(struct i2c_adapter *adap, int addr, int kind) 128 - + static int example_probe(struct i2c_client *client, 129 - + const struct i2c_device_id *id) 130 - 131 - Change the name of example_attach to example_probe to align it with the 132 - i2c_driver entry names. The rest of the probe routine will now need to be 133 - changed as the i2c_client has already been setup for use. 134 - 135 - The necessary client fields have already been setup before 136 - the probe function is called, so the following client setup 137 - can be removed:: 138 - 139 - - example->client.addr = addr; 140 - - example->client.flags = 0; 141 - - example->client.adapter = adap; 142 - - 143 - - strscpy(client->i2c_client.name, "example", sizeof(client->i2c_client.name)); 144 - 145 - The i2c_set_clientdata is now:: 146 - 147 - - i2c_set_clientdata(&state->client, state); 148 - + i2c_set_clientdata(client, state); 149 - 150 - The call to i2c_attach_client is no longer needed, if the probe 151 - routine exits successfully, then the driver will be automatically 152 - attached by the core. Change the probe routine as so:: 153 - 154 - - ret = i2c_attach_client(&state->i2c_client); 155 - - if (ret < 0) { 156 - - dev_err(dev, "failed to attach client\n"); 157 - - kfree(state); 158 - - return ret; 159 - - } 160 - 161 - 162 - Remove the storage of 'struct i2c_client' from the 'struct example_state' 163 - as we are provided with the i2c_client in our example_probe. Instead we 164 - store a pointer to it for when it is needed. 165 - 166 - :: 167 - 168 - struct example_state { 169 - - struct i2c_client client; 170 - + struct i2c_client *client; 171 - 172 - the new i2c client as so:: 173 - 174 - - struct device *dev = &adap->dev; /* to use for dev_ reports */ 175 - + struct device *dev = &i2c_client->dev; /* to use for dev_ reports */ 176 - 177 - And remove the change after our client is attached, as the driver no 178 - longer needs to register a new client structure with the core:: 179 - 180 - - dev = &state->i2c_client.dev; 181 - 182 - In the probe routine, ensure that the new state has the client stored 183 - in it:: 184 - 185 - static int example_probe(struct i2c_client *i2c_client, 186 - const struct i2c_device_id *id) 187 - { 188 - struct example_state *state; 189 - struct device *dev = &i2c_client->dev; 190 - int ret; 191 - 192 - state = kzalloc(sizeof(struct example_state), GFP_KERNEL); 193 - if (state == NULL) { 194 - dev_err(dev, "failed to create our state\n"); 195 - return -ENOMEM; 196 - } 197 - 198 - + state->client = i2c_client; 199 - 200 - Update the detach method, by changing the name to _remove and 201 - to delete the i2c_detach_client call. It is possible that you 202 - can also remove the ret variable as it is not needed for any 203 - of the core functions. 204 - 205 - :: 206 - 207 - - static int example_detach(struct i2c_client *client) 208 - + static int example_remove(struct i2c_client *client) 209 - { 210 - struct example_state *state = i2c_get_clientdata(client); 211 - 212 - - i2c_detach_client(client); 213 - 214 - And finally ensure that we have the correct ID table for the i2c-core 215 - and other utilities:: 216 - 217 - + struct i2c_device_id example_idtable[] = { 218 - + { "example", 0 }, 219 - + { } 220 - +}; 221 - + 222 - +MODULE_DEVICE_TABLE(i2c, example_idtable); 223 - 224 - static struct i2c_driver example_driver = { 225 - .driver = { 226 - .owner = THIS_MODULE, 227 - .name = "example", 228 - }, 229 - + .id_table = example_ids, 230 - 231 - 232 - Our driver should now look like this:: 233 - 234 - struct example_state { 235 - struct i2c_client *client; 236 - .... 237 - }; 238 - 239 - static int example_probe(struct i2c_client *client, 240 - const struct i2c_device_id *id) 241 - { 242 - struct example_state *state; 243 - struct device *dev = &client->dev; 244 - 245 - state = kzalloc(sizeof(struct example_state), GFP_KERNEL); 246 - if (state == NULL) { 247 - dev_err(dev, "failed to create our state\n"); 248 - return -ENOMEM; 249 - } 250 - 251 - state->client = client; 252 - i2c_set_clientdata(client, state); 253 - 254 - /* rest of the initialisation goes here. */ 255 - 256 - dev_info(dev, "example client created\n"); 257 - 258 - return 0; 259 - } 260 - 261 - static int example_remove(struct i2c_client *client) 262 - { 263 - struct example_state *state = i2c_get_clientdata(client); 264 - 265 - kfree(state); 266 - return 0; 267 - } 268 - 269 - static struct i2c_device_id example_idtable[] = { 270 - { "example", 0 }, 271 - { } 272 - }; 273 - 274 - MODULE_DEVICE_TABLE(i2c, example_idtable); 275 - 276 - static struct i2c_driver example_driver = { 277 - .driver = { 278 - .owner = THIS_MODULE, 279 - .name = "example", 280 - .pm = &example_pm_ops, 281 - }, 282 - .id_table = example_idtable, 283 - .probe = example_probe, 284 - .remove = example_remove, 285 - };
+1 -1
Documentation/locking/locktypes.rst
··· 10 10 ============ 11 11 12 12 The kernel provides a variety of locking primitives which can be divided 13 - into two categories: 13 + into three categories: 14 14 15 15 - Sleeping locks 16 16 - CPU local locks
+1 -1
Documentation/process/2.Process.rst
··· 113 113 5.2 kernel's history looked like this (all dates in 2019): 114 114 115 115 ============== =============================== 116 - September 15 5.2 stable release 116 + July 7 5.2 stable release 117 117 July 14 5.2.1 118 118 July 21 5.2.2 119 119 July 26 5.2.3
+1 -1
Documentation/trace/intel_th.rst
··· 58 58 59 59 For each Intel TH device in the system a bus of its own is 60 60 created and assigned an id number that reflects the order in which TH 61 - devices were emumerated. All TH subdevices (devices on intel_th bus) 61 + devices were enumerated. All TH subdevices (devices on intel_th bus) 62 62 begin with this id: 0-gth, 0-msc0, 0-msc1, 0-pti, 0-sth, which is 63 63 followed by device's name and an optional index. 64 64
+2 -2
Documentation/translations/zh_CN/admin-guide/cpu-load.rst
··· 1 - ======= 1 + ======== 2 2 CPU 负载 3 - ======= 3 + ======== 4 4 5 5 Linux通过``/proc/stat``和``/proc/uptime``导出各种信息,用户空间工具 6 6 如top(1)使用这些信息计算系统花费在某个特定状态的平均时间。
+1 -1
Documentation/translations/zh_CN/admin-guide/index.rst
··· 1 1 .. include:: ../disclaimer-zh_CN.rst 2 2 3 - :Original: :ref:`Documentation/admin-guide/index.rst` 3 + :Original: :doc:`../../../admin-guide/index` 4 4 :Translator: Alex Shi <alex.shi@linux.alibaba.com> 5 5 6 6