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

Documentation: Fix core-api typos

Fix typos.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250813200526.290420-5-helgaas@kernel.org

authored by

Bjorn Helgaas and committed by
Jonathan Corbet
8900f9ad c3492167

+22 -22
+3 -3
Documentation/core-api/irq/irq-affinity.rst
··· 9 9 10 10 /proc/irq/IRQ#/smp_affinity and /proc/irq/IRQ#/smp_affinity_list specify 11 11 which target CPUs are permitted for a given IRQ source. It's a bitmask 12 - (smp_affinity) or cpu list (smp_affinity_list) of allowed CPUs. It's not 12 + (smp_affinity) or CPU list (smp_affinity_list) of allowed CPUs. It's not 13 13 allowed to turn off all CPUs, and if an IRQ controller does not support 14 - IRQ affinity then the value will not change from the default of all cpus. 14 + IRQ affinity then the value will not change from the default of all CPUs. 15 15 16 16 /proc/irq/default_smp_affinity specifies default affinity mask that applies 17 17 to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask ··· 60 60 This time around IRQ44 was delivered only to the last four processors. 61 61 i.e counters for the CPU0-3 did not change. 62 62 63 - Here is an example of limiting that same irq (44) to cpus 1024 to 1031:: 63 + Here is an example of limiting that same IRQ (44) to CPUs 1024 to 1031:: 64 64 65 65 [root@moon 44]# echo 1024-1031 > smp_affinity_list 66 66 [root@moon 44]# cat smp_affinity_list
+19 -19
Documentation/core-api/irq/irq-domain.rst
··· 18 18 So in the past, IRQ numbers could be chosen so that they match the 19 19 hardware IRQ line into the root interrupt controller (i.e. the 20 20 component actually firing the interrupt line to the CPU). Nowadays, 21 - this number is just a number and the number loose all kind of 22 - correspondence to hardware interrupt numbers. 21 + this number is just a number and the number has no 22 + relationship to hardware interrupt numbers. 23 23 24 24 For this reason, we need a mechanism to separate controller-local 25 25 interrupt numbers, called hardware IRQs, from Linux IRQ numbers. ··· 77 77 variety of methods: 78 78 79 79 - irq_resolve_mapping() returns a pointer to the irq_desc structure 80 - for a given domain and hwirq number, and NULL if there was no 80 + for a given domain and hwirq number, or NULL if there was no 81 81 mapping. 82 82 - irq_find_mapping() returns a Linux IRQ number for a given domain and 83 - hwirq number, and 0 if there was no mapping 83 + hwirq number, or 0 if there was no mapping 84 84 - generic_handle_domain_irq() handles an interrupt described by a 85 85 domain and a hwirq number 86 86 87 - Note that irq domain lookups must happen in contexts that are 88 - compatible with a RCU read-side critical section. 87 + Note that irq_domain lookups must happen in contexts that are 88 + compatible with an RCU read-side critical section. 89 89 90 90 The irq_create_mapping() function must be called *at least once* 91 91 before any call to irq_find_mapping(), lest the descriptor will not ··· 100 100 ============================ 101 101 102 102 There are several mechanisms available for reverse mapping from hwirq 103 - to Linux irq, and each mechanism uses a different allocation function. 103 + to Linux IRQ, and each mechanism uses a different allocation function. 104 104 Which reverse map type should be used depends on the use case. Each 105 105 of the reverse map types are described below: 106 106 ··· 111 111 112 112 irq_domain_create_linear() 113 113 114 - The linear reverse map maintains a fixed size table indexed by the 114 + The linear reverse map maintains a fixed-size table indexed by the 115 115 hwirq number. When a hwirq is mapped, an irq_desc is allocated for 116 116 the hwirq, and the IRQ number is stored in the table. 117 117 118 118 The Linear map is a good choice when the maximum number of hwirqs is 119 119 fixed and a relatively small number (~ < 256). The advantages of this 120 - map are fixed time lookup for IRQ numbers, and irq_descs are only 120 + map are fixed-time lookup for IRQ numbers, and irq_descs are only 121 121 allocated for in-use IRQs. The disadvantage is that the table must be 122 122 as large as the largest possible hwirq number. 123 123 ··· 134 134 IRQs. When an hwirq is mapped, an irq_desc is allocated and the 135 135 hwirq is used as the lookup key for the radix tree. 136 136 137 - The tree map is a good choice if the hwirq number can be very large 137 + The Tree map is a good choice if the hwirq number can be very large 138 138 since it doesn't need to allocate a table as large as the largest 139 139 hwirq number. The disadvantage is that hwirq to IRQ number lookup is 140 140 dependent on how many entries are in the table. ··· 169 169 170 170 The Legacy mapping is a special case for drivers that already have a 171 171 range of irq_descs allocated for the hwirqs. It is used when the 172 - driver cannot be immediately converted to use the linear mapping. For 172 + driver cannot be immediately converted to use the Linear mapping. For 173 173 example, many embedded system board support files use a set of #defines 174 174 for IRQ numbers that are passed to struct device registrations. In that 175 - case the Linux IRQ numbers cannot be dynamically assigned and the legacy 175 + case the Linux IRQ numbers cannot be dynamically assigned and the Legacy 176 176 mapping should be used. 177 177 178 178 As the name implies, the \*_legacy() functions are deprecated and only ··· 180 180 added. Same goes for the \*_simple() functions when their use results 181 181 in the legacy behaviour. 182 182 183 - The legacy map assumes a contiguous range of IRQ numbers has already 183 + The Legacy map assumes a contiguous range of IRQ numbers has already 184 184 been allocated for the controller and that the IRQ number can be 185 185 calculated by adding a fixed offset to the hwirq number, and 186 186 visa-versa. The disadvantage is that it requires the interrupt 187 187 controller to manage IRQ allocations and it requires an irq_desc to be 188 188 allocated for every hwirq, even if it is unused. 189 189 190 - The legacy map should only be used if fixed IRQ mappings must be 191 - supported. For example, ISA controllers would use the legacy map for 190 + The Legacy map should only be used if fixed IRQ mappings must be 191 + supported. For example, ISA controllers would use the Legacy map for 192 192 mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ 193 193 numbers. 194 194 ··· 197 197 system and will otherwise use a linear domain mapping. The semantics of 198 198 this call are such that if an IRQ range is specified then descriptors 199 199 will be allocated on-the-fly for it, and if no range is specified it 200 - will fall through to irq_domain_create_linear() which means *no* irq 200 + will fall through to irq_domain_create_linear() which means *no* IRQ 201 201 descriptors will be allocated. 202 202 203 203 A typical use case for simple domains is where an irqchip provider ··· 214 214 215 215 On some architectures, there may be multiple interrupt controllers 216 216 involved in delivering an interrupt from the device to the target CPU. 217 - Let's look at a typical interrupt delivering path on x86 platforms:: 217 + Let's look at a typical interrupt delivery path on x86 platforms:: 218 218 219 219 Device --> IOAPIC -> Interrupt remapping Controller -> Local APIC -> CPU 220 220 ··· 227 227 To support such a hardware topology and make software architecture match 228 228 hardware architecture, an irq_domain data structure is built for each 229 229 interrupt controller and those irq_domains are organized into hierarchy. 230 - When building irq_domain hierarchy, the irq_domain near to the device is 231 - child and the irq_domain near to CPU is parent. So a hierarchy structure 230 + When building irq_domain hierarchy, the irq_domain nearest the device is 231 + child and the irq_domain nearest the CPU is parent. So a hierarchy structure 232 232 as below will be built for the example above:: 233 233 234 234 CPU Vector irq_domain (root irq_domain to manage CPU vectors)