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
This commit is contained in:
Bjorn Helgaas 2025-08-13 15:05:00 -05:00 committed by Jonathan Corbet
parent c349216707
commit 8900f9ad90
2 changed files with 22 additions and 22 deletions

View File

@ -9,9 +9,9 @@ ChangeLog:
/proc/irq/IRQ#/smp_affinity and /proc/irq/IRQ#/smp_affinity_list specify /proc/irq/IRQ#/smp_affinity and /proc/irq/IRQ#/smp_affinity_list specify
which target CPUs are permitted for a given IRQ source. It's a bitmask which target CPUs are permitted for a given IRQ source. It's a bitmask
(smp_affinity) or cpu list (smp_affinity_list) of allowed CPUs. It's not (smp_affinity) or CPU list (smp_affinity_list) of allowed CPUs. It's not
allowed to turn off all CPUs, and if an IRQ controller does not support allowed to turn off all CPUs, and if an IRQ controller does not support
IRQ affinity then the value will not change from the default of all cpus. IRQ affinity then the value will not change from the default of all CPUs.
/proc/irq/default_smp_affinity specifies default affinity mask that applies /proc/irq/default_smp_affinity specifies default affinity mask that applies
to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask
@ -60,7 +60,7 @@ Now lets restrict that IRQ to CPU(4-7).
This time around IRQ44 was delivered only to the last four processors. This time around IRQ44 was delivered only to the last four processors.
i.e counters for the CPU0-3 did not change. i.e counters for the CPU0-3 did not change.
Here is an example of limiting that same irq (44) to cpus 1024 to 1031:: Here is an example of limiting that same IRQ (44) to CPUs 1024 to 1031::
[root@moon 44]# echo 1024-1031 > smp_affinity_list [root@moon 44]# echo 1024-1031 > smp_affinity_list
[root@moon 44]# cat smp_affinity_list [root@moon 44]# cat smp_affinity_list

View File

@ -18,8 +18,8 @@ handlers as irqchips. I.e. in effect cascading interrupt controllers.
So in the past, IRQ numbers could be chosen so that they match the So in the past, IRQ numbers could be chosen so that they match the
hardware IRQ line into the root interrupt controller (i.e. the hardware IRQ line into the root interrupt controller (i.e. the
component actually firing the interrupt line to the CPU). Nowadays, component actually firing the interrupt line to the CPU). Nowadays,
this number is just a number and the number loose all kind of this number is just a number and the number has no
correspondence to hardware interrupt numbers. relationship to hardware interrupt numbers.
For this reason, we need a mechanism to separate controller-local For this reason, we need a mechanism to separate controller-local
interrupt numbers, called hardware IRQs, from Linux IRQ numbers. interrupt numbers, called hardware IRQs, from Linux IRQ numbers.
@ -77,15 +77,15 @@ Once a mapping has been established, it can be retrieved or used via a
variety of methods: variety of methods:
- irq_resolve_mapping() returns a pointer to the irq_desc structure - irq_resolve_mapping() returns a pointer to the irq_desc structure
for a given domain and hwirq number, and NULL if there was no for a given domain and hwirq number, or NULL if there was no
mapping. mapping.
- irq_find_mapping() returns a Linux IRQ number for a given domain and - irq_find_mapping() returns a Linux IRQ number for a given domain and
hwirq number, and 0 if there was no mapping hwirq number, or 0 if there was no mapping
- generic_handle_domain_irq() handles an interrupt described by a - generic_handle_domain_irq() handles an interrupt described by a
domain and a hwirq number domain and a hwirq number
Note that irq domain lookups must happen in contexts that are Note that irq_domain lookups must happen in contexts that are
compatible with a RCU read-side critical section. compatible with an RCU read-side critical section.
The irq_create_mapping() function must be called *at least once* The irq_create_mapping() function must be called *at least once*
before any call to irq_find_mapping(), lest the descriptor will not before any call to irq_find_mapping(), lest the descriptor will not
@ -100,7 +100,7 @@ Types of irq_domain Mappings
============================ ============================
There are several mechanisms available for reverse mapping from hwirq There are several mechanisms available for reverse mapping from hwirq
to Linux irq, and each mechanism uses a different allocation function. to Linux IRQ, and each mechanism uses a different allocation function.
Which reverse map type should be used depends on the use case. Each Which reverse map type should be used depends on the use case. Each
of the reverse map types are described below: of the reverse map types are described below:
@ -111,13 +111,13 @@ Linear
irq_domain_create_linear() irq_domain_create_linear()
The linear reverse map maintains a fixed size table indexed by the The linear reverse map maintains a fixed-size table indexed by the
hwirq number. When a hwirq is mapped, an irq_desc is allocated for hwirq number. When a hwirq is mapped, an irq_desc is allocated for
the hwirq, and the IRQ number is stored in the table. the hwirq, and the IRQ number is stored in the table.
The Linear map is a good choice when the maximum number of hwirqs is The Linear map is a good choice when the maximum number of hwirqs is
fixed and a relatively small number (~ < 256). The advantages of this fixed and a relatively small number (~ < 256). The advantages of this
map are fixed time lookup for IRQ numbers, and irq_descs are only map are fixed-time lookup for IRQ numbers, and irq_descs are only
allocated for in-use IRQs. The disadvantage is that the table must be allocated for in-use IRQs. The disadvantage is that the table must be
as large as the largest possible hwirq number. as large as the largest possible hwirq number.
@ -134,7 +134,7 @@ The irq_domain maintains a radix tree map from hwirq numbers to Linux
IRQs. When an hwirq is mapped, an irq_desc is allocated and the IRQs. When an hwirq is mapped, an irq_desc is allocated and the
hwirq is used as the lookup key for the radix tree. hwirq is used as the lookup key for the radix tree.
The tree map is a good choice if the hwirq number can be very large The Tree map is a good choice if the hwirq number can be very large
since it doesn't need to allocate a table as large as the largest since it doesn't need to allocate a table as large as the largest
hwirq number. The disadvantage is that hwirq to IRQ number lookup is hwirq number. The disadvantage is that hwirq to IRQ number lookup is
dependent on how many entries are in the table. dependent on how many entries are in the table.
@ -169,10 +169,10 @@ Legacy
The Legacy mapping is a special case for drivers that already have a The Legacy mapping is a special case for drivers that already have a
range of irq_descs allocated for the hwirqs. It is used when the range of irq_descs allocated for the hwirqs. It is used when the
driver cannot be immediately converted to use the linear mapping. For driver cannot be immediately converted to use the Linear mapping. For
example, many embedded system board support files use a set of #defines example, many embedded system board support files use a set of #defines
for IRQ numbers that are passed to struct device registrations. In that for IRQ numbers that are passed to struct device registrations. In that
case the Linux IRQ numbers cannot be dynamically assigned and the legacy case the Linux IRQ numbers cannot be dynamically assigned and the Legacy
mapping should be used. mapping should be used.
As the name implies, the \*_legacy() functions are deprecated and only As the name implies, the \*_legacy() functions are deprecated and only
@ -180,15 +180,15 @@ exist to ease the support of ancient platforms. No new users should be
added. Same goes for the \*_simple() functions when their use results added. Same goes for the \*_simple() functions when their use results
in the legacy behaviour. in the legacy behaviour.
The legacy map assumes a contiguous range of IRQ numbers has already The Legacy map assumes a contiguous range of IRQ numbers has already
been allocated for the controller and that the IRQ number can be been allocated for the controller and that the IRQ number can be
calculated by adding a fixed offset to the hwirq number, and calculated by adding a fixed offset to the hwirq number, and
visa-versa. The disadvantage is that it requires the interrupt visa-versa. The disadvantage is that it requires the interrupt
controller to manage IRQ allocations and it requires an irq_desc to be controller to manage IRQ allocations and it requires an irq_desc to be
allocated for every hwirq, even if it is unused. allocated for every hwirq, even if it is unused.
The legacy map should only be used if fixed IRQ mappings must be The Legacy map should only be used if fixed IRQ mappings must be
supported. For example, ISA controllers would use the legacy map for supported. For example, ISA controllers would use the Legacy map for
mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ
numbers. numbers.
@ -197,7 +197,7 @@ which will use a legacy domain only if an IRQ range is supplied by the
system and will otherwise use a linear domain mapping. The semantics of system and will otherwise use a linear domain mapping. The semantics of
this call are such that if an IRQ range is specified then descriptors this call are such that if an IRQ range is specified then descriptors
will be allocated on-the-fly for it, and if no range is specified it will be allocated on-the-fly for it, and if no range is specified it
will fall through to irq_domain_create_linear() which means *no* irq will fall through to irq_domain_create_linear() which means *no* IRQ
descriptors will be allocated. descriptors will be allocated.
A typical use case for simple domains is where an irqchip provider A typical use case for simple domains is where an irqchip provider
@ -214,7 +214,7 @@ Hierarchy IRQ Domain
On some architectures, there may be multiple interrupt controllers On some architectures, there may be multiple interrupt controllers
involved in delivering an interrupt from the device to the target CPU. involved in delivering an interrupt from the device to the target CPU.
Let's look at a typical interrupt delivering path on x86 platforms:: Let's look at a typical interrupt delivery path on x86 platforms::
Device --> IOAPIC -> Interrupt remapping Controller -> Local APIC -> CPU Device --> IOAPIC -> Interrupt remapping Controller -> Local APIC -> CPU
@ -227,8 +227,8 @@ There are three interrupt controllers involved:
To support such a hardware topology and make software architecture match To support such a hardware topology and make software architecture match
hardware architecture, an irq_domain data structure is built for each hardware architecture, an irq_domain data structure is built for each
interrupt controller and those irq_domains are organized into hierarchy. interrupt controller and those irq_domains are organized into hierarchy.
When building irq_domain hierarchy, the irq_domain near to the device is When building irq_domain hierarchy, the irq_domain nearest the device is
child and the irq_domain near to CPU is parent. So a hierarchy structure child and the irq_domain nearest the CPU is parent. So a hierarchy structure
as below will be built for the example above:: as below will be built for the example above::
CPU Vector irq_domain (root irq_domain to manage CPU vectors) CPU Vector irq_domain (root irq_domain to manage CPU vectors)