Merge e8f75c0270 ("Merge tag 'x86_sgx_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") into android-mainline
Steps on the way to 6.5-rc1 Change-Id: I38eacf73f43308bdc6ed9148d6f73f888c3590c5 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -2071,41 +2071,7 @@ call.
|
||||
|
||||
Because RCU avoids interrupting idle CPUs, it is illegal to execute an
|
||||
RCU read-side critical section on an idle CPU. (Kernels built with
|
||||
``CONFIG_PROVE_RCU=y`` will splat if you try it.) The RCU_NONIDLE()
|
||||
macro and ``_rcuidle`` event tracing is provided to work around this
|
||||
restriction. In addition, rcu_is_watching() may be used to test
|
||||
whether or not it is currently legal to run RCU read-side critical
|
||||
sections on this CPU. I learned of the need for diagnostics on the one
|
||||
hand and RCU_NONIDLE() on the other while inspecting idle-loop code.
|
||||
Steven Rostedt supplied ``_rcuidle`` event tracing, which is used quite
|
||||
heavily in the idle loop. However, there are some restrictions on the
|
||||
code placed within RCU_NONIDLE():
|
||||
|
||||
#. Blocking is prohibited. In practice, this is not a serious
|
||||
restriction given that idle tasks are prohibited from blocking to
|
||||
begin with.
|
||||
#. Although nesting RCU_NONIDLE() is permitted, they cannot nest
|
||||
indefinitely deeply. However, given that they can be nested on the
|
||||
order of a million deep, even on 32-bit systems, this should not be a
|
||||
serious restriction. This nesting limit would probably be reached
|
||||
long after the compiler OOMed or the stack overflowed.
|
||||
#. Any code path that enters RCU_NONIDLE() must sequence out of that
|
||||
same RCU_NONIDLE(). For example, the following is grossly
|
||||
illegal:
|
||||
|
||||
::
|
||||
|
||||
1 RCU_NONIDLE({
|
||||
2 do_something();
|
||||
3 goto bad_idea; /* BUG!!! */
|
||||
4 do_something_else();});
|
||||
5 bad_idea:
|
||||
|
||||
|
||||
It is just as illegal to transfer control into the middle of
|
||||
RCU_NONIDLE()'s argument. Yes, in theory, you could transfer in
|
||||
as long as you also transferred out, but in practice you could also
|
||||
expect to get sharply worded review comments.
|
||||
``CONFIG_PROVE_RCU=y`` will splat if you try it.)
|
||||
|
||||
It is similarly socially unacceptable to interrupt an ``nohz_full`` CPU
|
||||
running in userspace. RCU must therefore track ``nohz_full`` userspace
|
||||
|
||||
@@ -1117,7 +1117,6 @@ All: lockdep-checked RCU utility APIs::
|
||||
|
||||
RCU_LOCKDEP_WARN
|
||||
rcu_sleep_check
|
||||
RCU_NONIDLE
|
||||
|
||||
All: Unchecked RCU-protected pointer access::
|
||||
|
||||
|
||||
@@ -429,6 +429,9 @@
|
||||
arm64.nosme [ARM64] Unconditionally disable Scalable Matrix
|
||||
Extension support
|
||||
|
||||
arm64.nomops [ARM64] Unconditionally disable Memory Copy and Memory
|
||||
Set instructions support
|
||||
|
||||
ataflop= [HW,M68k]
|
||||
|
||||
atarimouse= [HW,MOUSE] Atari Mouse
|
||||
@@ -2113,6 +2116,16 @@
|
||||
disable
|
||||
Do not enable intel_pstate as the default
|
||||
scaling driver for the supported processors
|
||||
active
|
||||
Use intel_pstate driver to bypass the scaling
|
||||
governors layer of cpufreq and provides it own
|
||||
algorithms for p-state selection. There are two
|
||||
P-state selection algorithms provided by
|
||||
intel_pstate in the active mode: powersave and
|
||||
performance. The way they both operate depends
|
||||
on whether or not the hardware managed P-states
|
||||
(HWP) feature has been enabled in the processor
|
||||
and possibly on the processor model.
|
||||
passive
|
||||
Use intel_pstate as a scaling driver, but configure it
|
||||
to work with generic cpufreq governors (instead of
|
||||
@@ -2547,12 +2560,13 @@
|
||||
If the value is 0 (the default), KVM will pick a period based
|
||||
on the ratio, such that a page is zapped after 1 hour on average.
|
||||
|
||||
kvm-amd.nested= [KVM,AMD] Allow nested virtualization in KVM/SVM.
|
||||
Default is 1 (enabled)
|
||||
kvm-amd.nested= [KVM,AMD] Control nested virtualization feature in
|
||||
KVM/SVM. Default is 1 (enabled).
|
||||
|
||||
kvm-amd.npt= [KVM,AMD] Disable nested paging (virtualized MMU)
|
||||
for all guests.
|
||||
Default is 1 (enabled) if in 64-bit or 32-bit PAE mode.
|
||||
kvm-amd.npt= [KVM,AMD] Control KVM's use of Nested Page Tables,
|
||||
a.k.a. Two-Dimensional Page Tables. Default is 1
|
||||
(enabled). Disable by KVM if hardware lacks support
|
||||
for NPT.
|
||||
|
||||
kvm-arm.mode=
|
||||
[KVM,ARM] Select one of KVM/arm64's modes of operation.
|
||||
@@ -2598,30 +2612,33 @@
|
||||
Format: <integer>
|
||||
Default: 5
|
||||
|
||||
kvm-intel.ept= [KVM,Intel] Disable extended page tables
|
||||
(virtualized MMU) support on capable Intel chips.
|
||||
Default is 1 (enabled)
|
||||
kvm-intel.ept= [KVM,Intel] Control KVM's use of Extended Page Tables,
|
||||
a.k.a. Two-Dimensional Page Tables. Default is 1
|
||||
(enabled). Disable by KVM if hardware lacks support
|
||||
for EPT.
|
||||
|
||||
kvm-intel.emulate_invalid_guest_state=
|
||||
[KVM,Intel] Disable emulation of invalid guest state.
|
||||
Ignored if kvm-intel.enable_unrestricted_guest=1, as
|
||||
guest state is never invalid for unrestricted guests.
|
||||
This param doesn't apply to nested guests (L2), as KVM
|
||||
never emulates invalid L2 guest state.
|
||||
Default is 1 (enabled)
|
||||
[KVM,Intel] Control whether to emulate invalid guest
|
||||
state. Ignored if kvm-intel.enable_unrestricted_guest=1,
|
||||
as guest state is never invalid for unrestricted
|
||||
guests. This param doesn't apply to nested guests (L2),
|
||||
as KVM never emulates invalid L2 guest state.
|
||||
Default is 1 (enabled).
|
||||
|
||||
kvm-intel.flexpriority=
|
||||
[KVM,Intel] Disable FlexPriority feature (TPR shadow).
|
||||
Default is 1 (enabled)
|
||||
[KVM,Intel] Control KVM's use of FlexPriority feature
|
||||
(TPR shadow). Default is 1 (enabled). Disalbe by KVM if
|
||||
hardware lacks support for it.
|
||||
|
||||
kvm-intel.nested=
|
||||
[KVM,Intel] Enable VMX nesting (nVMX).
|
||||
Default is 0 (disabled)
|
||||
[KVM,Intel] Control nested virtualization feature in
|
||||
KVM/VMX. Default is 1 (enabled).
|
||||
|
||||
kvm-intel.unrestricted_guest=
|
||||
[KVM,Intel] Disable unrestricted guest feature
|
||||
(virtualized real and unpaged mode) on capable
|
||||
Intel chips. Default is 1 (enabled)
|
||||
[KVM,Intel] Control KVM's use of unrestricted guest
|
||||
feature (virtualized real and unpaged mode). Default
|
||||
is 1 (enabled). Disable by KVM if EPT is disabled or
|
||||
hardware lacks support for it.
|
||||
|
||||
kvm-intel.vmentry_l1d_flush=[KVM,Intel] Mitigation for L1 Terminal Fault
|
||||
CVE-2018-3620.
|
||||
@@ -2635,9 +2652,10 @@
|
||||
|
||||
Default is cond (do L1 cache flush in specific instances)
|
||||
|
||||
kvm-intel.vpid= [KVM,Intel] Disable Virtual Processor Identification
|
||||
feature (tagged TLBs) on capable Intel chips.
|
||||
Default is 1 (enabled)
|
||||
kvm-intel.vpid= [KVM,Intel] Control KVM's use of Virtual Processor
|
||||
Identification feature (tagged TLBs). Default is 1
|
||||
(enabled). Disable by KVM if hardware lacks support
|
||||
for it.
|
||||
|
||||
l1d_flush= [X86,INTEL]
|
||||
Control mitigation for L1D based snooping vulnerability.
|
||||
@@ -3419,6 +3437,10 @@
|
||||
[HW] Make the MicroTouch USB driver use raw coordinates
|
||||
('y', default) or cooked coordinates ('n')
|
||||
|
||||
mtrr=debug [X86]
|
||||
Enable printing debug information related to MTRR
|
||||
registers at boot time.
|
||||
|
||||
mtrr_chunk_size=nn[KMG] [X86]
|
||||
used for mtrr cleanup. It is largest continuous chunk
|
||||
that could hold holes aka. UC entries.
|
||||
@@ -4732,43 +4754,6 @@
|
||||
the propagation of recent CPU-hotplug changes up
|
||||
the rcu_node combining tree.
|
||||
|
||||
rcutree.use_softirq= [KNL]
|
||||
If set to zero, move all RCU_SOFTIRQ processing to
|
||||
per-CPU rcuc kthreads. Defaults to a non-zero
|
||||
value, meaning that RCU_SOFTIRQ is used by default.
|
||||
Specify rcutree.use_softirq=0 to use rcuc kthreads.
|
||||
|
||||
But note that CONFIG_PREEMPT_RT=y kernels disable
|
||||
this kernel boot parameter, forcibly setting it
|
||||
to zero.
|
||||
|
||||
rcutree.rcu_fanout_exact= [KNL]
|
||||
Disable autobalancing of the rcu_node combining
|
||||
tree. This is used by rcutorture, and might
|
||||
possibly be useful for architectures having high
|
||||
cache-to-cache transfer latencies.
|
||||
|
||||
rcutree.rcu_fanout_leaf= [KNL]
|
||||
Change the number of CPUs assigned to each
|
||||
leaf rcu_node structure. Useful for very
|
||||
large systems, which will choose the value 64,
|
||||
and for NUMA systems with large remote-access
|
||||
latencies, which will choose a value aligned
|
||||
with the appropriate hardware boundaries.
|
||||
|
||||
rcutree.rcu_min_cached_objs= [KNL]
|
||||
Minimum number of objects which are cached and
|
||||
maintained per one CPU. Object size is equal
|
||||
to PAGE_SIZE. The cache allows to reduce the
|
||||
pressure to page allocator, also it makes the
|
||||
whole algorithm to behave better in low memory
|
||||
condition.
|
||||
|
||||
rcutree.rcu_delay_page_cache_fill_msec= [KNL]
|
||||
Set the page-cache refill delay (in milliseconds)
|
||||
in response to low-memory conditions. The range
|
||||
of permitted values is in the range 0:100000.
|
||||
|
||||
rcutree.jiffies_till_first_fqs= [KNL]
|
||||
Set delay from grace-period initialization to
|
||||
first attempt to force quiescent states.
|
||||
@@ -4807,21 +4792,6 @@
|
||||
When RCU_NOCB_CPU is set, also adjust the
|
||||
priority of NOCB callback kthreads.
|
||||
|
||||
rcutree.rcu_divisor= [KNL]
|
||||
Set the shift-right count to use to compute
|
||||
the callback-invocation batch limit bl from
|
||||
the number of callbacks queued on this CPU.
|
||||
The result will be bounded below by the value of
|
||||
the rcutree.blimit kernel parameter. Every bl
|
||||
callbacks, the softirq handler will exit in
|
||||
order to allow the CPU to do other work.
|
||||
|
||||
Please note that this callback-invocation batch
|
||||
limit applies only to non-offloaded callback
|
||||
invocation. Offloaded callbacks are instead
|
||||
invoked in the context of an rcuoc kthread, which
|
||||
scheduler will preempt as it does any other task.
|
||||
|
||||
rcutree.nocb_nobypass_lim_per_jiffy= [KNL]
|
||||
On callback-offloaded (rcu_nocbs) CPUs,
|
||||
RCU reduces the lock contention that would
|
||||
@@ -4835,14 +4805,6 @@
|
||||
the ->nocb_bypass queue. The definition of "too
|
||||
many" is supplied by this kernel boot parameter.
|
||||
|
||||
rcutree.rcu_nocb_gp_stride= [KNL]
|
||||
Set the number of NOCB callback kthreads in
|
||||
each group, which defaults to the square root
|
||||
of the number of CPUs. Larger numbers reduce
|
||||
the wakeup overhead on the global grace-period
|
||||
kthread, but increases that same overhead on
|
||||
each group's NOCB grace-period kthread.
|
||||
|
||||
rcutree.qhimark= [KNL]
|
||||
Set threshold of queued RCU callbacks beyond which
|
||||
batch limiting is disabled.
|
||||
@@ -4860,6 +4822,56 @@
|
||||
on rcutree.qhimark at boot time and to zero to
|
||||
disable more aggressive help enlistment.
|
||||
|
||||
rcutree.rcu_delay_page_cache_fill_msec= [KNL]
|
||||
Set the page-cache refill delay (in milliseconds)
|
||||
in response to low-memory conditions. The range
|
||||
of permitted values is in the range 0:100000.
|
||||
|
||||
rcutree.rcu_divisor= [KNL]
|
||||
Set the shift-right count to use to compute
|
||||
the callback-invocation batch limit bl from
|
||||
the number of callbacks queued on this CPU.
|
||||
The result will be bounded below by the value of
|
||||
the rcutree.blimit kernel parameter. Every bl
|
||||
callbacks, the softirq handler will exit in
|
||||
order to allow the CPU to do other work.
|
||||
|
||||
Please note that this callback-invocation batch
|
||||
limit applies only to non-offloaded callback
|
||||
invocation. Offloaded callbacks are instead
|
||||
invoked in the context of an rcuoc kthread, which
|
||||
scheduler will preempt as it does any other task.
|
||||
|
||||
rcutree.rcu_fanout_exact= [KNL]
|
||||
Disable autobalancing of the rcu_node combining
|
||||
tree. This is used by rcutorture, and might
|
||||
possibly be useful for architectures having high
|
||||
cache-to-cache transfer latencies.
|
||||
|
||||
rcutree.rcu_fanout_leaf= [KNL]
|
||||
Change the number of CPUs assigned to each
|
||||
leaf rcu_node structure. Useful for very
|
||||
large systems, which will choose the value 64,
|
||||
and for NUMA systems with large remote-access
|
||||
latencies, which will choose a value aligned
|
||||
with the appropriate hardware boundaries.
|
||||
|
||||
rcutree.rcu_min_cached_objs= [KNL]
|
||||
Minimum number of objects which are cached and
|
||||
maintained per one CPU. Object size is equal
|
||||
to PAGE_SIZE. The cache allows to reduce the
|
||||
pressure to page allocator, also it makes the
|
||||
whole algorithm to behave better in low memory
|
||||
condition.
|
||||
|
||||
rcutree.rcu_nocb_gp_stride= [KNL]
|
||||
Set the number of NOCB callback kthreads in
|
||||
each group, which defaults to the square root
|
||||
of the number of CPUs. Larger numbers reduce
|
||||
the wakeup overhead on the global grace-period
|
||||
kthread, but increases that same overhead on
|
||||
each group's NOCB grace-period kthread.
|
||||
|
||||
rcutree.rcu_kick_kthreads= [KNL]
|
||||
Cause the grace-period kthread to get an extra
|
||||
wake_up() if it sleeps three times longer than
|
||||
@@ -4867,6 +4879,13 @@
|
||||
This wake_up() will be accompanied by a
|
||||
WARN_ONCE() splat and an ftrace_dump().
|
||||
|
||||
rcutree.rcu_resched_ns= [KNL]
|
||||
Limit the time spend invoking a batch of RCU
|
||||
callbacks to the specified number of nanoseconds.
|
||||
By default, this limit is checked only once
|
||||
every 32 callbacks in order to limit the pain
|
||||
inflicted by local_clock() overhead.
|
||||
|
||||
rcutree.rcu_unlock_delay= [KNL]
|
||||
In CONFIG_RCU_STRICT_GRACE_PERIOD=y kernels,
|
||||
this specifies an rcu_read_unlock()-time delay
|
||||
@@ -4881,6 +4900,16 @@
|
||||
rcu_node tree with an eye towards determining
|
||||
why a new grace period has not yet started.
|
||||
|
||||
rcutree.use_softirq= [KNL]
|
||||
If set to zero, move all RCU_SOFTIRQ processing to
|
||||
per-CPU rcuc kthreads. Defaults to a non-zero
|
||||
value, meaning that RCU_SOFTIRQ is used by default.
|
||||
Specify rcutree.use_softirq=0 to use rcuc kthreads.
|
||||
|
||||
But note that CONFIG_PREEMPT_RT=y kernels disable
|
||||
this kernel boot parameter, forcibly setting it
|
||||
to zero.
|
||||
|
||||
rcuscale.gp_async= [KNL]
|
||||
Measure performance of asynchronous
|
||||
grace-period primitives such as call_rcu().
|
||||
@@ -5083,8 +5112,17 @@
|
||||
|
||||
rcutorture.stall_cpu_block= [KNL]
|
||||
Sleep while stalling if set. This will result
|
||||
in warnings from preemptible RCU in addition
|
||||
to any other stall-related activity.
|
||||
in warnings from preemptible RCU in addition to
|
||||
any other stall-related activity. Note that
|
||||
in kernels built with CONFIG_PREEMPTION=n and
|
||||
CONFIG_PREEMPT_COUNT=y, this parameter will
|
||||
cause the CPU to pass through a quiescent state.
|
||||
Given CONFIG_PREEMPTION=n, this will suppress
|
||||
RCU CPU stall warnings, but will instead result
|
||||
in scheduling-while-atomic splats.
|
||||
|
||||
Use of this module parameter results in splats.
|
||||
|
||||
|
||||
rcutorture.stall_cpu_holdoff= [KNL]
|
||||
Time to wait (s) after boot before inducing stall.
|
||||
|
||||
@@ -56,14 +56,14 @@ Example usage of perf::
|
||||
For HiSilicon uncore PMU v2 whose identifier is 0x30, the topology is the same
|
||||
as PMU v1, but some new functions are added to the hardware.
|
||||
|
||||
(a) L3C PMU supports filtering by core/thread within the cluster which can be
|
||||
1. L3C PMU supports filtering by core/thread within the cluster which can be
|
||||
specified as a bitmap::
|
||||
|
||||
$# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_core=0x3/ sleep 5
|
||||
|
||||
This will only count the operations from core/thread 0 and 1 in this cluster.
|
||||
|
||||
(b) Tracetag allow the user to chose to count only read, write or atomic
|
||||
2. Tracetag allow the user to chose to count only read, write or atomic
|
||||
operations via the tt_req parameeter in perf. The default value counts all
|
||||
operations. tt_req is 3bits, 3'b100 represents read operations, 3'b101
|
||||
represents write operations, 3'b110 represents atomic store operations and
|
||||
@@ -73,14 +73,16 @@ represents write operations, 3'b110 represents atomic store operations and
|
||||
|
||||
This will only count the read operations in this cluster.
|
||||
|
||||
(c) Datasrc allows the user to check where the data comes from. It is 5 bits.
|
||||
3. Datasrc allows the user to check where the data comes from. It is 5 bits.
|
||||
Some important codes are as follows:
|
||||
5'b00001: comes from L3C in this die;
|
||||
5'b01000: comes from L3C in the cross-die;
|
||||
5'b01001: comes from L3C which is in another socket;
|
||||
5'b01110: comes from the local DDR;
|
||||
5'b01111: comes from the cross-die DDR;
|
||||
5'b10000: comes from cross-socket DDR;
|
||||
|
||||
- 5'b00001: comes from L3C in this die;
|
||||
- 5'b01000: comes from L3C in the cross-die;
|
||||
- 5'b01001: comes from L3C which is in another socket;
|
||||
- 5'b01110: comes from the local DDR;
|
||||
- 5'b01111: comes from the cross-die DDR;
|
||||
- 5'b10000: comes from cross-socket DDR;
|
||||
|
||||
etc, it is mainly helpful to find that the data source is nearest from the CPU
|
||||
cores. If datasrc_cfg is used in the multi-chips, the datasrc_skt shall be
|
||||
configured in perf command::
|
||||
@@ -88,15 +90,25 @@ configured in perf command::
|
||||
$# perf stat -a -e hisi_sccl3_l3c0/config=0xb9,datasrc_cfg=0xE/,
|
||||
hisi_sccl3_l3c0/config=0xb9,datasrc_cfg=0xF/ sleep 5
|
||||
|
||||
(d)Some HiSilicon SoCs encapsulate multiple CPU and IO dies. Each CPU die
|
||||
4. Some HiSilicon SoCs encapsulate multiple CPU and IO dies. Each CPU die
|
||||
contains several Compute Clusters (CCLs). The I/O dies are called Super I/O
|
||||
clusters (SICL) containing multiple I/O clusters (ICLs). Each CCL/ICL in the
|
||||
SoC has a unique ID. Each ID is 11bits, include a 6-bit SCCL-ID and 5-bit
|
||||
CCL/ICL-ID. For I/O die, the ICL-ID is followed by:
|
||||
5'b00000: I/O_MGMT_ICL;
|
||||
5'b00001: Network_ICL;
|
||||
5'b00011: HAC_ICL;
|
||||
5'b10000: PCIe_ICL;
|
||||
|
||||
- 5'b00000: I/O_MGMT_ICL;
|
||||
- 5'b00001: Network_ICL;
|
||||
- 5'b00011: HAC_ICL;
|
||||
- 5'b10000: PCIe_ICL;
|
||||
|
||||
5. uring_channel: UC PMU events 0x47~0x59 supports filtering by tx request
|
||||
uring channel. It is 2 bits. Some important codes are as follows:
|
||||
|
||||
- 2'b11: count the events which sent to the uring_ext (MATA) channel;
|
||||
- 2'b01: is the same as 2'b11;
|
||||
- 2'b10: count the events which sent to the uring (non-MATA) channel;
|
||||
- 2'b00: default value, count the events which sent to the both uring and
|
||||
uring_ext channel;
|
||||
|
||||
Users could configure IDs to count data come from specific CCL/ICL, by setting
|
||||
srcid_cmd & srcid_msk, and data desitined for specific CCL/ICL by setting
|
||||
|
||||
@@ -10,7 +10,7 @@ implementation.
|
||||
:maxdepth: 2
|
||||
|
||||
arc/index
|
||||
../arm/index
|
||||
arm/index
|
||||
../arm64/index
|
||||
ia64/index
|
||||
../loongarch/index
|
||||
|
||||
@@ -17,16 +17,37 @@ For ACPI on arm64, tables also fall into the following categories:
|
||||
|
||||
- Recommended: BERT, EINJ, ERST, HEST, PCCT, SSDT
|
||||
|
||||
- Optional: BGRT, CPEP, CSRT, DBG2, DRTM, ECDT, FACS, FPDT, IBFT,
|
||||
IORT, MCHI, MPST, MSCT, NFIT, PMTT, RASF, SBST, SLIT, SPMI, SRAT,
|
||||
STAO, TCPA, TPM2, UEFI, XENV
|
||||
- Optional: AGDI, BGRT, CEDT, CPEP, CSRT, DBG2, DRTM, ECDT, FACS, FPDT,
|
||||
HMAT, IBFT, IORT, MCHI, MPAM, MPST, MSCT, NFIT, PMTT, PPTT, RASF, SBST,
|
||||
SDEI, SLIT, SPMI, SRAT, STAO, TCPA, TPM2, UEFI, XENV
|
||||
|
||||
- Not supported: BOOT, DBGP, DMAR, ETDT, HPET, IVRS, LPIT, MSDM, OEMx,
|
||||
PSDT, RSDT, SLIC, WAET, WDAT, WDRT, WPBT
|
||||
- Not supported: AEST, APMT, BOOT, DBGP, DMAR, ETDT, HPET, IVRS, LPIT,
|
||||
MSDM, OEMx, PDTT, PSDT, RAS2, RSDT, SLIC, WAET, WDAT, WDRT, WPBT
|
||||
|
||||
====== ========================================================================
|
||||
Table Usage for ARMv8 Linux
|
||||
====== ========================================================================
|
||||
AEST Signature Reserved (signature == "AEST")
|
||||
|
||||
**Arm Error Source Table**
|
||||
|
||||
This table informs the OS of any error nodes in the system that are
|
||||
compliant with the Arm RAS architecture.
|
||||
|
||||
AGDI Signature Reserved (signature == "AGDI")
|
||||
|
||||
**Arm Generic diagnostic Dump and Reset Device Interface Table**
|
||||
|
||||
This table describes a non-maskable event, that is used by the platform
|
||||
firmware, to request the OS to generate a diagnostic dump and reset the device.
|
||||
|
||||
APMT Signature Reserved (signature == "APMT")
|
||||
|
||||
**Arm Performance Monitoring Table**
|
||||
|
||||
This table describes the properties of PMU support implmented by
|
||||
components in the system.
|
||||
|
||||
BERT Section 18.3 (signature == "BERT")
|
||||
|
||||
**Boot Error Record Table**
|
||||
@@ -47,6 +68,13 @@ BGRT Section 5.2.22 (signature == "BGRT")
|
||||
Optional, not currently supported, with no real use-case for an
|
||||
ARM server.
|
||||
|
||||
CEDT Signature Reserved (signature == "CEDT")
|
||||
|
||||
**CXL Early Discovery Table**
|
||||
|
||||
This table allows the OS to discover any CXL Host Bridges and the Host
|
||||
Bridge registers.
|
||||
|
||||
CPEP Section 5.2.18 (signature == "CPEP")
|
||||
|
||||
**Corrected Platform Error Polling table**
|
||||
@@ -184,6 +212,15 @@ HEST Section 18.3.2 (signature == "HEST")
|
||||
Must be supplied if RAS support is provided by the platform. It
|
||||
is recommended this table be supplied.
|
||||
|
||||
HMAT Section 5.2.28 (signature == "HMAT")
|
||||
|
||||
**Heterogeneous Memory Attribute Table**
|
||||
|
||||
This table describes the memory attributes, such as memory side cache
|
||||
attributes and bandwidth and latency details, related to Memory Proximity
|
||||
Domains. The OS uses this information to optimize the system memory
|
||||
configuration.
|
||||
|
||||
HPET Signature Reserved (signature == "HPET")
|
||||
|
||||
**High Precision Event timer Table**
|
||||
@@ -241,6 +278,13 @@ MCHI Signature Reserved (signature == "MCHI")
|
||||
|
||||
Optional, not currently supported.
|
||||
|
||||
MPAM Signature Reserved (signature == "MPAM")
|
||||
|
||||
**Memory Partitioning And Monitoring table**
|
||||
|
||||
This table allows the OS to discover the MPAM controls implemented by
|
||||
the subsystems.
|
||||
|
||||
MPST Section 5.2.21 (signature == "MPST")
|
||||
|
||||
**Memory Power State Table**
|
||||
@@ -281,18 +325,39 @@ PCCT Section 14.1 (signature == "PCCT)
|
||||
Recommend for use on arm64; use of PCC is recommended when using CPPC
|
||||
to control performance and power for platform processors.
|
||||
|
||||
PDTT Section 5.2.29 (signature == "PDTT")
|
||||
|
||||
**Platform Debug Trigger Table**
|
||||
|
||||
This table describes PCC channels used to gather debug logs of
|
||||
non-architectural features.
|
||||
|
||||
|
||||
PMTT Section 5.2.21.12 (signature == "PMTT")
|
||||
|
||||
**Platform Memory Topology Table**
|
||||
|
||||
Optional, not currently supported.
|
||||
|
||||
PPTT Section 5.2.30 (signature == "PPTT")
|
||||
|
||||
**Processor Properties Topology Table**
|
||||
|
||||
This table provides the processor and cache topology.
|
||||
|
||||
PSDT Section 5.2.11.3 (signature == "PSDT")
|
||||
|
||||
**Persistent System Description Table**
|
||||
|
||||
Obsolete table, will not be supported.
|
||||
|
||||
RAS2 Section 5.2.21 (signature == "RAS2")
|
||||
|
||||
**RAS Features 2 table**
|
||||
|
||||
This table provides interfaces for the RAS capabilities implemented in
|
||||
the platform.
|
||||
|
||||
RASF Section 5.2.20 (signature == "RASF")
|
||||
|
||||
**RAS Feature table**
|
||||
@@ -318,6 +383,12 @@ SBST Section 5.2.14 (signature == "SBST")
|
||||
|
||||
Optional, not currently supported.
|
||||
|
||||
SDEI Signature Reserved (signature == "SDEI")
|
||||
|
||||
**Software Delegated Exception Interface table**
|
||||
|
||||
This table advertises the presence of the SDEI interface.
|
||||
|
||||
SLIC Signature Reserved (signature == "SLIC")
|
||||
|
||||
**Software LIcensing table**
|
||||
|
||||
@@ -1,40 +1,41 @@
|
||||
=====================
|
||||
ACPI on ARMv8 Servers
|
||||
=====================
|
||||
===================
|
||||
ACPI on Arm systems
|
||||
===================
|
||||
|
||||
ACPI can be used for ARMv8 general purpose servers designed to follow
|
||||
the ARM SBSA (Server Base System Architecture) [0] and SBBR (Server
|
||||
Base Boot Requirements) [1] specifications. Please note that the SBBR
|
||||
can be retrieved simply by visiting [1], but the SBSA is currently only
|
||||
available to those with an ARM login due to ARM IP licensing concerns.
|
||||
ACPI can be used for Armv8 and Armv9 systems designed to follow
|
||||
the BSA (Arm Base System Architecture) [0] and BBR (Arm
|
||||
Base Boot Requirements) [1] specifications. Both BSA and BBR are publicly
|
||||
accessible documents.
|
||||
Arm Servers, in addition to being BSA compliant, comply with a set
|
||||
of rules defined in SBSA (Server Base System Architecture) [2].
|
||||
|
||||
The ARMv8 kernel implements the reduced hardware model of ACPI version
|
||||
The Arm kernel implements the reduced hardware model of ACPI version
|
||||
5.1 or later. Links to the specification and all external documents
|
||||
it refers to are managed by the UEFI Forum. The specification is
|
||||
available at http://www.uefi.org/specifications and documents referenced
|
||||
by the specification can be found via http://www.uefi.org/acpi.
|
||||
|
||||
If an ARMv8 system does not meet the requirements of the SBSA and SBBR,
|
||||
If an Arm system does not meet the requirements of the BSA and BBR,
|
||||
or cannot be described using the mechanisms defined in the required ACPI
|
||||
specifications, then ACPI may not be a good fit for the hardware.
|
||||
|
||||
While the documents mentioned above set out the requirements for building
|
||||
industry-standard ARMv8 servers, they also apply to more than one operating
|
||||
industry-standard Arm systems, they also apply to more than one operating
|
||||
system. The purpose of this document is to describe the interaction between
|
||||
ACPI and Linux only, on an ARMv8 system -- that is, what Linux expects of
|
||||
ACPI and Linux only, on an Arm system -- that is, what Linux expects of
|
||||
ACPI and what ACPI can expect of Linux.
|
||||
|
||||
|
||||
Why ACPI on ARM?
|
||||
Why ACPI on Arm?
|
||||
----------------
|
||||
Before examining the details of the interface between ACPI and Linux, it is
|
||||
useful to understand why ACPI is being used. Several technologies already
|
||||
exist in Linux for describing non-enumerable hardware, after all. In this
|
||||
section we summarize a blog post [2] from Grant Likely that outlines the
|
||||
reasoning behind ACPI on ARMv8 servers. Actually, we snitch a good portion
|
||||
section we summarize a blog post [3] from Grant Likely that outlines the
|
||||
reasoning behind ACPI on Arm systems. Actually, we snitch a good portion
|
||||
of the summary text almost directly, to be honest.
|
||||
|
||||
The short form of the rationale for ACPI on ARM is:
|
||||
The short form of the rationale for ACPI on Arm is:
|
||||
|
||||
- ACPI’s byte code (AML) allows the platform to encode hardware behavior,
|
||||
while DT explicitly does not support this. For hardware vendors, being
|
||||
@@ -47,7 +48,7 @@ The short form of the rationale for ACPI on ARM is:
|
||||
|
||||
- In the enterprise server environment, ACPI has established bindings (such
|
||||
as for RAS) which are currently used in production systems. DT does not.
|
||||
Such bindings could be defined in DT at some point, but doing so means ARM
|
||||
Such bindings could be defined in DT at some point, but doing so means Arm
|
||||
and x86 would end up using completely different code paths in both firmware
|
||||
and the kernel.
|
||||
|
||||
@@ -108,7 +109,7 @@ recent version of the kernel.
|
||||
|
||||
Relationship with Device Tree
|
||||
-----------------------------
|
||||
ACPI support in drivers and subsystems for ARMv8 should never be mutually
|
||||
ACPI support in drivers and subsystems for Arm should never be mutually
|
||||
exclusive with DT support at compile time.
|
||||
|
||||
At boot time the kernel will only use one description method depending on
|
||||
@@ -121,11 +122,11 @@ time).
|
||||
|
||||
Booting using ACPI tables
|
||||
-------------------------
|
||||
The only defined method for passing ACPI tables to the kernel on ARMv8
|
||||
The only defined method for passing ACPI tables to the kernel on Arm
|
||||
is via the UEFI system configuration table. Just so it is explicit, this
|
||||
means that ACPI is only supported on platforms that boot via UEFI.
|
||||
|
||||
When an ARMv8 system boots, it can either have DT information, ACPI tables,
|
||||
When an Arm system boots, it can either have DT information, ACPI tables,
|
||||
or in some very unusual cases, both. If no command line parameters are used,
|
||||
the kernel will try to use DT for device enumeration; if there is no DT
|
||||
present, the kernel will try to use ACPI tables, but only if they are present.
|
||||
@@ -169,7 +170,7 @@ hardware reduced mode must be set to zero.
|
||||
|
||||
For the ACPI core to operate properly, and in turn provide the information
|
||||
the kernel needs to configure devices, it expects to find the following
|
||||
tables (all section numbers refer to the ACPI 6.1 specification):
|
||||
tables (all section numbers refer to the ACPI 6.5 specification):
|
||||
|
||||
- RSDP (Root System Description Pointer), section 5.2.5
|
||||
|
||||
@@ -184,20 +185,76 @@ tables (all section numbers refer to the ACPI 6.1 specification):
|
||||
|
||||
- GTDT (Generic Timer Description Table), section 5.2.24
|
||||
|
||||
- PPTT (Processor Properties Topology Table), section 5.2.30
|
||||
|
||||
- DBG2 (DeBuG port table 2), section 5.2.6, specifically Table 5-6.
|
||||
|
||||
- APMT (Arm Performance Monitoring unit Table), section 5.2.6, specifically Table 5-6.
|
||||
|
||||
- AGDI (Arm Generic diagnostic Dump and Reset Device Interface Table), section 5.2.6, specifically Table 5-6.
|
||||
|
||||
- If PCI is supported, the MCFG (Memory mapped ConFiGuration
|
||||
Table), section 5.2.6, specifically Table 5-31.
|
||||
Table), section 5.2.6, specifically Table 5-6.
|
||||
|
||||
- If booting without a console=<device> kernel parameter is
|
||||
supported, the SPCR (Serial Port Console Redirection table),
|
||||
section 5.2.6, specifically Table 5-31.
|
||||
section 5.2.6, specifically Table 5-6.
|
||||
|
||||
- If necessary to describe the I/O topology, SMMUs and GIC ITSs,
|
||||
the IORT (Input Output Remapping Table, section 5.2.6, specifically
|
||||
Table 5-31).
|
||||
Table 5-6).
|
||||
|
||||
- If NUMA is supported, the following tables are required:
|
||||
|
||||
- SRAT (System Resource Affinity Table), section 5.2.16
|
||||
|
||||
- SLIT (System Locality distance Information Table), section 5.2.17
|
||||
|
||||
- If NUMA is supported, and the system contains heterogeneous memory,
|
||||
the HMAT (Heterogeneous Memory Attribute Table), section 5.2.28.
|
||||
|
||||
- If the ACPI Platform Error Interfaces are required, the following
|
||||
tables are conditionally required:
|
||||
|
||||
- BERT (Boot Error Record Table, section 18.3.1)
|
||||
|
||||
- EINJ (Error INJection table, section 18.6.1)
|
||||
|
||||
- ERST (Error Record Serialization Table, section 18.5)
|
||||
|
||||
- HEST (Hardware Error Source Table, section 18.3.2)
|
||||
|
||||
- SDEI (Software Delegated Exception Interface table, section 5.2.6,
|
||||
specifically Table 5-6)
|
||||
|
||||
- AEST (Arm Error Source Table, section 5.2.6,
|
||||
specifically Table 5-6)
|
||||
|
||||
- RAS2 (ACPI RAS2 feature table, section 5.2.21)
|
||||
|
||||
- If the system contains controllers using PCC channel, the
|
||||
PCCT (Platform Communications Channel Table), section 14.1
|
||||
|
||||
- If the system contains a controller to capture board-level system state,
|
||||
and communicates with the host via PCC, the PDTT (Platform Debug Trigger
|
||||
Table), section 5.2.29.
|
||||
|
||||
- If NVDIMM is supported, the NFIT (NVDIMM Firmware Interface Table), section 5.2.26
|
||||
|
||||
- If video framebuffer is present, the BGRT (Boot Graphics Resource Table), section 5.2.23
|
||||
|
||||
- If IPMI is implemented, the SPMI (Server Platform Management Interface),
|
||||
section 5.2.6, specifically Table 5-6.
|
||||
|
||||
- If the system contains a CXL Host Bridge, the CEDT (CXL Early Discovery
|
||||
Table), section 5.2.6, specifically Table 5-6.
|
||||
|
||||
- If the system supports MPAM, the MPAM (Memory Partitioning And Monitoring table), section 5.2.6,
|
||||
specifically Table 5-6.
|
||||
|
||||
- If the system lacks persistent storage, the IBFT (ISCSI Boot Firmware
|
||||
Table), section 5.2.6, specifically Table 5-6.
|
||||
|
||||
- If NUMA is supported, the SRAT (System Resource Affinity Table)
|
||||
and SLIT (System Locality distance Information Table), sections
|
||||
5.2.16 and 5.2.17, respectively.
|
||||
|
||||
If the above tables are not all present, the kernel may or may not be
|
||||
able to boot properly since it may not be able to configure all of the
|
||||
@@ -269,16 +326,14 @@ Drivers should look for device properties in the _DSD object ONLY; the _DSD
|
||||
object is described in the ACPI specification section 6.2.5, but this only
|
||||
describes how to define the structure of an object returned via _DSD, and
|
||||
how specific data structures are defined by specific UUIDs. Linux should
|
||||
only use the _DSD Device Properties UUID [5]:
|
||||
only use the _DSD Device Properties UUID [4]:
|
||||
|
||||
- UUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301
|
||||
|
||||
- https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf
|
||||
|
||||
The UEFI Forum provides a mechanism for registering device properties [4]
|
||||
so that they may be used across all operating systems supporting ACPI.
|
||||
Device properties that have not been registered with the UEFI Forum should
|
||||
not be used.
|
||||
Common device properties can be registered by creating a pull request to [4] so
|
||||
that they may be used across all operating systems supporting ACPI.
|
||||
Device properties that have not been registered with the UEFI Forum can be used
|
||||
but not as "uefi-" common properties.
|
||||
|
||||
Before creating new device properties, check to be sure that they have not
|
||||
been defined before and either registered in the Linux kernel documentation
|
||||
@@ -306,7 +361,7 @@ process.
|
||||
|
||||
Once registration and review have been completed, the kernel provides an
|
||||
interface for looking up device properties in a manner independent of
|
||||
whether DT or ACPI is being used. This API should be used [6]; it can
|
||||
whether DT or ACPI is being used. This API should be used [5]; it can
|
||||
eliminate some duplication of code paths in driver probing functions and
|
||||
discourage divergence between DT bindings and ACPI device properties.
|
||||
|
||||
@@ -448,15 +503,15 @@ ASWG
|
||||
----
|
||||
The ACPI specification changes regularly. During the year 2014, for instance,
|
||||
version 5.1 was released and version 6.0 substantially completed, with most of
|
||||
the changes being driven by ARM-specific requirements. Proposed changes are
|
||||
the changes being driven by Arm-specific requirements. Proposed changes are
|
||||
presented and discussed in the ASWG (ACPI Specification Working Group) which
|
||||
is a part of the UEFI Forum. The current version of the ACPI specification
|
||||
is 6.1 release in January 2016.
|
||||
is 6.5 release in August 2022.
|
||||
|
||||
Participation in this group is open to all UEFI members. Please see
|
||||
http://www.uefi.org/workinggroup for details on group membership.
|
||||
|
||||
It is the intent of the ARMv8 ACPI kernel code to follow the ACPI specification
|
||||
It is the intent of the Arm ACPI kernel code to follow the ACPI specification
|
||||
as closely as possible, and to only implement functionality that complies with
|
||||
the released standards from UEFI ASWG. As a practical matter, there will be
|
||||
vendors that provide bad ACPI tables or violate the standards in some way.
|
||||
@@ -470,12 +525,12 @@ likely be willing to assist in submitting ECRs.
|
||||
|
||||
Linux Code
|
||||
----------
|
||||
Individual items specific to Linux on ARM, contained in the Linux
|
||||
Individual items specific to Linux on Arm, contained in the Linux
|
||||
source code, are in the list that follows:
|
||||
|
||||
ACPI_OS_NAME
|
||||
This macro defines the string to be returned when
|
||||
an ACPI method invokes the _OS method. On ARM64
|
||||
an ACPI method invokes the _OS method. On Arm
|
||||
systems, this macro will be "Linux" by default.
|
||||
The command line parameter acpi_os=<string>
|
||||
can be used to set it to some other value. The
|
||||
@@ -490,31 +545,23 @@ Documentation/arm64/acpi_object_usage.rst.
|
||||
|
||||
References
|
||||
----------
|
||||
[0] http://silver.arm.com
|
||||
document ARM-DEN-0029, or newer:
|
||||
"Server Base System Architecture", version 2.3, dated 27 Mar 2014
|
||||
[0] https://developer.arm.com/documentation/den0094/latest
|
||||
document Arm-DEN-0094: "Arm Base System Architecture", version 1.0C, dated 6 Oct 2022
|
||||
|
||||
[1] http://infocenter.arm.com/help/topic/com.arm.doc.den0044a/Server_Base_Boot_Requirements.pdf
|
||||
Document ARM-DEN-0044A, or newer: "Server Base Boot Requirements, System
|
||||
Software on ARM Platforms", dated 16 Aug 2014
|
||||
[1] https://developer.arm.com/documentation/den0044/latest
|
||||
Document Arm-DEN-0044: "Arm Base Boot Requirements", version 2.0G, dated 15 Apr 2022
|
||||
|
||||
[2] http://www.secretlab.ca/archives/151,
|
||||
[2] https://developer.arm.com/documentation/den0029/latest
|
||||
Document Arm-DEN-0029: "Arm Server Base System Architecture", version 7.1, dated 06 Oct 2022
|
||||
|
||||
[3] http://www.secretlab.ca/archives/151,
|
||||
10 Jan 2015, Copyright (c) 2015,
|
||||
Linaro Ltd., written by Grant Likely.
|
||||
|
||||
[3] AMD ACPI for Seattle platform documentation
|
||||
http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Seattle_ACPI_Guide.pdf
|
||||
[4] _DSD (Device Specific Data) Implementation Guide
|
||||
https://github.com/UEFI/DSD-Guide/blob/main/dsd-guide.pdf
|
||||
|
||||
|
||||
[4] http://www.uefi.org/acpi
|
||||
please see the link for the "ACPI _DSD Device
|
||||
Property Registry Instructions"
|
||||
|
||||
[5] http://www.uefi.org/acpi
|
||||
please see the link for the "_DSD (Device
|
||||
Specific Data) Implementation Guide"
|
||||
|
||||
[6] Kernel code for the unified device
|
||||
[5] Kernel code for the unified device
|
||||
property interface can be found in
|
||||
include/linux/property.h and drivers/base/property.c.
|
||||
|
||||
|
||||
@@ -379,6 +379,38 @@ Before jumping into the kernel, the following conditions must be met:
|
||||
|
||||
- SMCR_EL2.EZT0 (bit 30) must be initialised to 0b1.
|
||||
|
||||
For CPUs with Memory Copy and Memory Set instructions (FEAT_MOPS):
|
||||
|
||||
- If the kernel is entered at EL1 and EL2 is present:
|
||||
|
||||
- HCRX_EL2.MSCEn (bit 11) must be initialised to 0b1.
|
||||
|
||||
For CPUs with the Extended Translation Control Register feature (FEAT_TCR2):
|
||||
|
||||
- If EL3 is present:
|
||||
|
||||
- SCR_EL3.TCR2En (bit 43) must be initialised to 0b1.
|
||||
|
||||
- If the kernel is entered at EL1 and EL2 is present:
|
||||
|
||||
- HCRX_EL2.TCR2En (bit 14) must be initialised to 0b1.
|
||||
|
||||
For CPUs with the Stage 1 Permission Indirection Extension feature (FEAT_S1PIE):
|
||||
|
||||
- If EL3 is present:
|
||||
|
||||
- SCR_EL3.PIEn (bit 45) must be initialised to 0b1.
|
||||
|
||||
- If the kernel is entered at EL1 and EL2 is present:
|
||||
|
||||
- HFGRTR_EL2.nPIR_EL1 (bit 58) must be initialised to 0b1.
|
||||
|
||||
- HFGWTR_EL2.nPIR_EL1 (bit 58) must be initialised to 0b1.
|
||||
|
||||
- HFGRTR_EL2.nPIRE0_EL1 (bit 57) must be initialised to 0b1.
|
||||
|
||||
- HFGRWR_EL2.nPIRE0_EL1 (bit 57) must be initialised to 0b1.
|
||||
|
||||
The requirements described above for CPU mode, caches, MMUs, architected
|
||||
timers, coherency and system registers apply to all CPUs. All CPUs must
|
||||
enter the kernel in the same exception level. Where the values documented
|
||||
|
||||
@@ -288,6 +288,8 @@ infrastructure:
|
||||
+------------------------------+---------+---------+
|
||||
| Name | bits | visible |
|
||||
+------------------------------+---------+---------+
|
||||
| MOPS | [19-16] | y |
|
||||
+------------------------------+---------+---------+
|
||||
| RPRES | [7-4] | y |
|
||||
+------------------------------+---------+---------+
|
||||
| WFXT | [3-0] | y |
|
||||
|
||||
@@ -302,6 +302,9 @@ HWCAP2_SMEB16B16
|
||||
HWCAP2_SMEF16F16
|
||||
Functionality implied by ID_AA64SMFR0_EL1.F16F16 == 0b1
|
||||
|
||||
HWCAP2_MOPS
|
||||
Functionality implied by ID_AA64ISAR2_EL1.MOPS == 0b0001.
|
||||
|
||||
4. Unused AT_HWCAP bits
|
||||
-----------------------
|
||||
|
||||
|
||||
@@ -15,11 +15,13 @@ ARM64 Architecture
|
||||
cpu-feature-registers
|
||||
elf_hwcaps
|
||||
hugetlbpage
|
||||
kdump
|
||||
legacy_instructions
|
||||
memory
|
||||
memory-tagging-extension
|
||||
perf
|
||||
pointer-authentication
|
||||
ptdump
|
||||
silicon-errata
|
||||
sme
|
||||
sve
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
=======================================
|
||||
crashkernel memory reservation on arm64
|
||||
=======================================
|
||||
|
||||
Author: Baoquan He <bhe@redhat.com>
|
||||
|
||||
Kdump mechanism is used to capture a corrupted kernel vmcore so that
|
||||
it can be subsequently analyzed. In order to do this, a preliminarily
|
||||
reserved memory is needed to pre-load the kdump kernel and boot such
|
||||
kernel if corruption happens.
|
||||
|
||||
That reserved memory for kdump is adapted to be able to minimally
|
||||
accommodate the kdump kernel and the user space programs needed for the
|
||||
vmcore collection.
|
||||
|
||||
Kernel parameter
|
||||
================
|
||||
|
||||
Through the kernel parameters below, memory can be reserved accordingly
|
||||
during the early stage of the first kernel booting so that a continuous
|
||||
large chunk of memomy can be found. The low memory reservation needs to
|
||||
be considered if the crashkernel is reserved from the high memory area.
|
||||
|
||||
- crashkernel=size@offset
|
||||
- crashkernel=size
|
||||
- crashkernel=size,high crashkernel=size,low
|
||||
|
||||
Low memory and high memory
|
||||
==========================
|
||||
|
||||
For kdump reservations, low memory is the memory area under a specific
|
||||
limit, usually decided by the accessible address bits of the DMA-capable
|
||||
devices needed by the kdump kernel to run. Those devices not related to
|
||||
vmcore dumping can be ignored. On arm64, the low memory upper bound is
|
||||
not fixed: it is 1G on the RPi4 platform but 4G on most other systems.
|
||||
On special kernels built with CONFIG_ZONE_(DMA|DMA32) disabled, the
|
||||
whole system RAM is low memory. Outside of the low memory described
|
||||
above, the rest of system RAM is considered high memory.
|
||||
|
||||
Implementation
|
||||
==============
|
||||
|
||||
1) crashkernel=size@offset
|
||||
--------------------------
|
||||
|
||||
The crashkernel memory must be reserved at the user-specified region or
|
||||
fail if already occupied.
|
||||
|
||||
|
||||
2) crashkernel=size
|
||||
-------------------
|
||||
|
||||
The crashkernel memory region will be reserved in any available position
|
||||
according to the search order:
|
||||
|
||||
Firstly, the kernel searches the low memory area for an available region
|
||||
with the specified size.
|
||||
|
||||
If searching for low memory fails, the kernel falls back to searching
|
||||
the high memory area for an available region of the specified size. If
|
||||
the reservation in high memory succeeds, a default size reservation in
|
||||
the low memory will be done. Currently the default size is 128M,
|
||||
sufficient for the low memory needs of the kdump kernel.
|
||||
|
||||
Note: crashkernel=size is the recommended option for crashkernel kernel
|
||||
reservations. The user would not need to know the system memory layout
|
||||
for a specific platform.
|
||||
|
||||
3) crashkernel=size,high crashkernel=size,low
|
||||
---------------------------------------------
|
||||
|
||||
crashkernel=size,(high|low) are an important supplement to
|
||||
crashkernel=size. They allows the user to specify how much memory needs
|
||||
to be allocated from the high memory and low memory respectively. On
|
||||
many systems the low memory is precious and crashkernel reservations
|
||||
from this area should be kept to a minimum.
|
||||
|
||||
To reserve memory for crashkernel=size,high, searching is first
|
||||
attempted from the high memory region. If the reservation succeeds, the
|
||||
low memory reservation will be done subsequently.
|
||||
|
||||
If reservation from the high memory failed, the kernel falls back to
|
||||
searching the low memory with the specified size in crashkernel=,high.
|
||||
If it succeeds, no further reservation for low memory is needed.
|
||||
|
||||
Notes:
|
||||
|
||||
- If crashkernel=,low is not specified, the default low memory
|
||||
reservation will be done automatically.
|
||||
|
||||
- if crashkernel=0,low is specified, it means that the low memory
|
||||
reservation is omitted intentionally.
|
||||
@@ -33,8 +33,8 @@ AArch64 Linux memory layout with 4KB pages + 4 levels (48-bit)::
|
||||
0000000000000000 0000ffffffffffff 256TB user
|
||||
ffff000000000000 ffff7fffffffffff 128TB kernel logical memory map
|
||||
[ffff600000000000 ffff7fffffffffff] 32TB [kasan shadow region]
|
||||
ffff800000000000 ffff800007ffffff 128MB modules
|
||||
ffff800008000000 fffffbffefffffff 124TB vmalloc
|
||||
ffff800000000000 ffff80007fffffff 2GB modules
|
||||
ffff800080000000 fffffbffefffffff 124TB vmalloc
|
||||
fffffbfff0000000 fffffbfffdffffff 224MB fixed mappings (top down)
|
||||
fffffbfffe000000 fffffbfffe7fffff 8MB [guard region]
|
||||
fffffbfffe800000 fffffbffff7fffff 16MB PCI I/O space
|
||||
@@ -50,8 +50,8 @@ AArch64 Linux memory layout with 64KB pages + 3 levels (52-bit with HW support):
|
||||
0000000000000000 000fffffffffffff 4PB user
|
||||
fff0000000000000 ffff7fffffffffff ~4PB kernel logical memory map
|
||||
[fffd800000000000 ffff7fffffffffff] 512TB [kasan shadow region]
|
||||
ffff800000000000 ffff800007ffffff 128MB modules
|
||||
ffff800008000000 fffffbffefffffff 124TB vmalloc
|
||||
ffff800000000000 ffff80007fffffff 2GB modules
|
||||
ffff800080000000 fffffbffefffffff 124TB vmalloc
|
||||
fffffbfff0000000 fffffbfffdffffff 224MB fixed mappings (top down)
|
||||
fffffbfffe000000 fffffbfffe7fffff 8MB [guard region]
|
||||
fffffbfffe800000 fffffbffff7fffff 16MB PCI I/O space
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
======================
|
||||
Kernel page table dump
|
||||
======================
|
||||
|
||||
ptdump is a debugfs interface that provides a detailed dump of the
|
||||
kernel page tables. It offers a comprehensive overview of the kernel
|
||||
virtual memory layout as well as the attributes associated with the
|
||||
various regions in a human-readable format. It is useful to dump the
|
||||
kernel page tables to verify permissions and memory types. Examining the
|
||||
page table entries and permissions helps identify potential security
|
||||
vulnerabilities such as mappings with overly permissive access rights or
|
||||
improper memory protections.
|
||||
|
||||
Memory hotplug allows dynamic expansion or contraction of available
|
||||
memory without requiring a system reboot. To maintain the consistency
|
||||
and integrity of the memory management data structures, arm64 makes use
|
||||
of the ``mem_hotplug_lock`` semaphore in write mode. Additionally, in
|
||||
read mode, ``mem_hotplug_lock`` supports an efficient implementation of
|
||||
``get_online_mems()`` and ``put_online_mems()``. These protect the
|
||||
offlining of memory being accessed by the ptdump code.
|
||||
|
||||
In order to dump the kernel page tables, enable the following
|
||||
configurations and mount debugfs::
|
||||
|
||||
CONFIG_GENERIC_PTDUMP=y
|
||||
CONFIG_PTDUMP_CORE=y
|
||||
CONFIG_PTDUMP_DEBUGFS=y
|
||||
|
||||
mount -t debugfs nodev /sys/kernel/debug
|
||||
cat /sys/kernel/debug/kernel_page_tables
|
||||
|
||||
On analysing the output of ``cat /sys/kernel/debug/kernel_page_tables``
|
||||
one can derive information about the virtual address range of the entry,
|
||||
followed by size of the memory region covered by this entry, the
|
||||
hierarchical structure of the page tables and finally the attributes
|
||||
associated with each page. The page attributes provide information about
|
||||
access permissions, execution capability, type of mapping such as leaf
|
||||
level PTE or block level PGD, PMD and PUD, and access status of a page
|
||||
within the kernel memory. Assessing these attributes can assist in
|
||||
understanding the memory layout, access patterns and security
|
||||
characteristics of the kernel pages.
|
||||
|
||||
Kernel virtual memory layout example::
|
||||
|
||||
start address end address size attributes
|
||||
+---------------------------------------------------------------------------------------+
|
||||
| ---[ Linear Mapping start ]---------------------------------------------------------- |
|
||||
| .................. |
|
||||
| 0xfff0000000000000-0xfff0000000210000 2112K PTE RW NX SHD AF UXN MEM/NORMAL-TAGGED |
|
||||
| 0xfff0000000210000-0xfff0000001c00000 26560K PTE ro NX SHD AF UXN MEM/NORMAL |
|
||||
| .................. |
|
||||
| ---[ Linear Mapping end ]------------------------------------------------------------ |
|
||||
+---------------------------------------------------------------------------------------+
|
||||
| ---[ Modules start ]----------------------------------------------------------------- |
|
||||
| .................. |
|
||||
| 0xffff800000000000-0xffff800008000000 128M PTE |
|
||||
| .................. |
|
||||
| ---[ Modules end ]------------------------------------------------------------------- |
|
||||
+---------------------------------------------------------------------------------------+
|
||||
| ---[ vmalloc() area ]---------------------------------------------------------------- |
|
||||
| .................. |
|
||||
| 0xffff800008010000-0xffff800008200000 1984K PTE ro x SHD AF UXN MEM/NORMAL |
|
||||
| 0xffff800008200000-0xffff800008e00000 12M PTE ro x SHD AF CON UXN MEM/NORMAL |
|
||||
| .................. |
|
||||
| ---[ vmalloc() end ]----------------------------------------------------------------- |
|
||||
+---------------------------------------------------------------------------------------+
|
||||
| ---[ Fixmap start ]------------------------------------------------------------------ |
|
||||
| .................. |
|
||||
| 0xfffffbfffdb80000-0xfffffbfffdb90000 64K PTE ro x SHD AF UXN MEM/NORMAL |
|
||||
| 0xfffffbfffdb90000-0xfffffbfffdba0000 64K PTE ro NX SHD AF UXN MEM/NORMAL |
|
||||
| .................. |
|
||||
| ---[ Fixmap end ]-------------------------------------------------------------------- |
|
||||
+---------------------------------------------------------------------------------------+
|
||||
| ---[ PCI I/O start ]----------------------------------------------------------------- |
|
||||
| .................. |
|
||||
| 0xfffffbfffe800000-0xfffffbffff800000 16M PTE |
|
||||
| .................. |
|
||||
| ---[ PCI I/O end ]------------------------------------------------------------------- |
|
||||
+---------------------------------------------------------------------------------------+
|
||||
| ---[ vmemmap start ]----------------------------------------------------------------- |
|
||||
| .................. |
|
||||
| 0xfffffc0002000000-0xfffffc0002200000 2M PTE RW NX SHD AF UXN MEM/NORMAL |
|
||||
| 0xfffffc0002200000-0xfffffc0020000000 478M PTE |
|
||||
| .................. |
|
||||
| ---[ vmemmap end ]------------------------------------------------------------------- |
|
||||
+---------------------------------------------------------------------------------------+
|
||||
|
||||
``cat /sys/kernel/debug/kernel_page_tables`` output::
|
||||
|
||||
0xfff0000001c00000-0xfff0000080000000 2020M PTE RW NX SHD AF UXN MEM/NORMAL-TAGGED
|
||||
0xfff0000080000000-0xfff0000800000000 30G PMD
|
||||
0xfff0000800000000-0xfff0000800700000 7M PTE RW NX SHD AF UXN MEM/NORMAL-TAGGED
|
||||
0xfff0000800700000-0xfff0000800710000 64K PTE ro NX SHD AF UXN MEM/NORMAL-TAGGED
|
||||
0xfff0000800710000-0xfff0000880000000 2089920K PTE RW NX SHD AF UXN MEM/NORMAL-TAGGED
|
||||
0xfff0000880000000-0xfff0040000000000 4062G PMD
|
||||
0xfff0040000000000-0xffff800000000000 3964T PGD
|
||||
@@ -74,6 +74,7 @@ if major >= 3:
|
||||
"__percpu",
|
||||
"__rcu",
|
||||
"__user",
|
||||
"__force",
|
||||
|
||||
# include/linux/compiler_attributes.h:
|
||||
"__alias",
|
||||
|
||||
@@ -96,6 +96,12 @@ Command-line Parsing
|
||||
.. kernel-doc:: lib/cmdline.c
|
||||
:export:
|
||||
|
||||
Error Pointers
|
||||
--------------
|
||||
|
||||
.. kernel-doc:: include/linux/err.h
|
||||
:internal:
|
||||
|
||||
Sorting
|
||||
-------
|
||||
|
||||
@@ -412,3 +418,15 @@ Read-Copy Update (RCU)
|
||||
.. kernel-doc:: include/linux/rcu_sync.h
|
||||
|
||||
.. kernel-doc:: kernel/rcu/sync.c
|
||||
|
||||
.. kernel-doc:: kernel/rcu/tasks.h
|
||||
|
||||
.. kernel-doc:: kernel/rcu/tree_stall.h
|
||||
|
||||
.. kernel-doc:: include/linux/rcupdate_trace.h
|
||||
|
||||
.. kernel-doc:: include/linux/rcupdate_wait.h
|
||||
|
||||
.. kernel-doc:: include/linux/rcuref.h
|
||||
|
||||
.. kernel-doc:: include/linux/rcutree.h
|
||||
|
||||
@@ -66,7 +66,7 @@ features surfaced as a result:
|
||||
::
|
||||
|
||||
struct dma_async_tx_descriptor *
|
||||
async_<operation>(<op specific parameters>, struct async_submit ctl *submit)
|
||||
async_<operation>(<op specific parameters>, struct async_submit_ctl *submit)
|
||||
|
||||
3.2 Supported operations
|
||||
------------------------
|
||||
|
||||
@@ -168,6 +168,28 @@ the `-t` option for specific single tests. Either can be used multiple times::
|
||||
|
||||
For other features see the script usage output, seen with the `-h` option.
|
||||
|
||||
Timeout for selftests
|
||||
=====================
|
||||
|
||||
Selftests are designed to be quick and so a default timeout is used of 45
|
||||
seconds for each test. Tests can override the default timeout by adding
|
||||
a settings file in their directory and set a timeout variable there to the
|
||||
configured a desired upper timeout for the test. Only a few tests override
|
||||
the timeout with a value higher than 45 seconds, selftests strives to keep
|
||||
it that way. Timeouts in selftests are not considered fatal because the
|
||||
system under which a test runs may change and this can also modify the
|
||||
expected time it takes to run a test. If you have control over the systems
|
||||
which will run the tests you can configure a test runner on those systems to
|
||||
use a greater or lower timeout on the command line as with the `-o` or
|
||||
the `--override-timeout` argument. For example to use 165 seconds instead
|
||||
one would use:
|
||||
|
||||
$ ./run_kselftest.sh --override-timeout 165
|
||||
|
||||
You can look at the TAP output to see if you ran into the timeout. Test
|
||||
runners which know a test must run under a specific time can then optionally
|
||||
treat these timeouts then as fatal.
|
||||
|
||||
Packaging selftests
|
||||
===================
|
||||
|
||||
|
||||
@@ -119,9 +119,9 @@ All expectations/assertions are formatted as:
|
||||
terminated immediately.
|
||||
|
||||
- Assertions call the function:
|
||||
``void __noreturn kunit_abort(struct kunit *)``.
|
||||
``void __noreturn __kunit_abort(struct kunit *)``.
|
||||
|
||||
- ``kunit_abort`` calls the function:
|
||||
- ``__kunit_abort`` calls the function:
|
||||
``void __noreturn kunit_try_catch_throw(struct kunit_try_catch *try_catch)``.
|
||||
|
||||
- ``kunit_try_catch_throw`` calls the function:
|
||||
|
||||
@@ -250,15 +250,20 @@ Now we are ready to write the test cases.
|
||||
};
|
||||
kunit_test_suite(misc_example_test_suite);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
2. Add the following lines to ``drivers/misc/Kconfig``:
|
||||
|
||||
.. code-block:: kconfig
|
||||
|
||||
config MISC_EXAMPLE_TEST
|
||||
tristate "Test for my example" if !KUNIT_ALL_TESTS
|
||||
depends on MISC_EXAMPLE && KUNIT=y
|
||||
depends on MISC_EXAMPLE && KUNIT
|
||||
default KUNIT_ALL_TESTS
|
||||
|
||||
Note: If your test does not support being built as a loadable module (which is
|
||||
discouraged), replace tristate by bool, and depend on KUNIT=y instead of KUNIT.
|
||||
|
||||
3. Add the following lines to ``drivers/misc/Makefile``:
|
||||
|
||||
.. code-block:: make
|
||||
|
||||
@@ -121,6 +121,12 @@ there's an allocation error.
|
||||
``return`` so they only work from the test function. In KUnit, we stop the
|
||||
current kthread on failure, so you can call them from anywhere.
|
||||
|
||||
.. note::
|
||||
Warning: There is an exception to the above rule. You shouldn't use assertions
|
||||
in the suite's exit() function, or in the free function for a resource. These
|
||||
run when a test is shutting down, and an assertion here prevents further
|
||||
cleanup code from running, potentially leading to a memory leak.
|
||||
|
||||
Customizing error messages
|
||||
--------------------------
|
||||
|
||||
@@ -160,7 +166,12 @@ many similar tests. In order to reduce duplication in these closely related
|
||||
tests, most unit testing frameworks (including KUnit) provide the concept of a
|
||||
*test suite*. A test suite is a collection of test cases for a unit of code
|
||||
with optional setup and teardown functions that run before/after the whole
|
||||
suite and/or every test case. For example:
|
||||
suite and/or every test case.
|
||||
|
||||
.. note::
|
||||
A test case will only run if it is associated with a test suite.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
@@ -190,7 +201,10 @@ after everything else. ``kunit_test_suite(example_test_suite)`` registers the
|
||||
test suite with the KUnit test framework.
|
||||
|
||||
.. note::
|
||||
A test case will only run if it is associated with a test suite.
|
||||
The ``exit`` and ``suite_exit`` functions will run even if ``init`` or
|
||||
``suite_init`` fail. Make sure that they can handle any inconsistent
|
||||
state which may result from ``init`` or ``suite_init`` encountering errors
|
||||
or exiting early.
|
||||
|
||||
``kunit_test_suite(...)`` is a macro which tells the linker to put the
|
||||
specified test suite in a special linker section so that it can be run by KUnit
|
||||
@@ -601,6 +615,57 @@ For example:
|
||||
KUNIT_ASSERT_STREQ(test, buffer, "");
|
||||
}
|
||||
|
||||
Registering Cleanup Actions
|
||||
---------------------------
|
||||
|
||||
If you need to perform some cleanup beyond simple use of ``kunit_kzalloc``,
|
||||
you can register a custom "deferred action", which is a cleanup function
|
||||
run when the test exits (whether cleanly, or via a failed assertion).
|
||||
|
||||
Actions are simple functions with no return value, and a single ``void*``
|
||||
context argument, and fulfill the same role as "cleanup" functions in Python
|
||||
and Go tests, "defer" statements in languages which support them, and
|
||||
(in some cases) destructors in RAII languages.
|
||||
|
||||
These are very useful for unregistering things from global lists, closing
|
||||
files or other resources, or freeing resources.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
static void cleanup_device(void *ctx)
|
||||
{
|
||||
struct device *dev = (struct device *)ctx;
|
||||
|
||||
device_unregister(dev);
|
||||
}
|
||||
|
||||
void example_device_test(struct kunit *test)
|
||||
{
|
||||
struct my_device dev;
|
||||
|
||||
device_register(&dev);
|
||||
|
||||
kunit_add_action(test, &cleanup_device, &dev);
|
||||
}
|
||||
|
||||
Note that, for functions like device_unregister which only accept a single
|
||||
pointer-sized argument, it's possible to directly cast that function to
|
||||
a ``kunit_action_t`` rather than writing a wrapper function, for example:
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
kunit_add_action(test, (kunit_action_t *)&device_unregister, &dev);
|
||||
|
||||
``kunit_add_action`` can fail if, for example, the system is out of memory.
|
||||
You can use ``kunit_add_action_or_reset`` instead which runs the action
|
||||
immediately if it cannot be deferred.
|
||||
|
||||
If you need more control over when the cleanup function is called, you
|
||||
can trigger it early using ``kunit_release_action``, or cancel it entirely
|
||||
with ``kunit_remove_action``.
|
||||
|
||||
|
||||
Testing Static Functions
|
||||
------------------------
|
||||
|
||||
@@ -56,7 +56,7 @@ hypervisor {
|
||||
};
|
||||
|
||||
The format and meaning of the "xen,uefi-*" parameters are similar to those in
|
||||
Documentation/arm/uefi.rst, which are provided by the regular UEFI stub. However
|
||||
Documentation/arch/arm/uefi.rst, which are provided by the regular UEFI stub. However
|
||||
they differ because they are provided by the Xen hypervisor, together with a set
|
||||
of UEFI runtime services implemented via hypercalls, see
|
||||
http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,platform.h.html.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
$id: http://devicetree.org/schemas/perf/fsl-imx-ddr.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Freescale(NXP) IMX8 DDR performance monitor
|
||||
title: Freescale(NXP) IMX8/9 DDR performance monitor
|
||||
|
||||
maintainers:
|
||||
- Frank Li <frank.li@nxp.com>
|
||||
@@ -19,6 +19,7 @@ properties:
|
||||
- fsl,imx8mm-ddr-pmu
|
||||
- fsl,imx8mn-ddr-pmu
|
||||
- fsl,imx8mp-ddr-pmu
|
||||
- fsl,imx93-ddr-pmu
|
||||
- items:
|
||||
- enum:
|
||||
- fsl,imx8mm-ddr-pmu
|
||||
|
||||
@@ -8,6 +8,7 @@ Required properties:
|
||||
* marvell,armada380-thermal
|
||||
* marvell,armadaxp-thermal
|
||||
* marvell,armada-ap806-thermal
|
||||
* marvell,armada-ap807-thermal
|
||||
* marvell,armada-cp110-thermal
|
||||
|
||||
Note: these bindings are deprecated for AP806/CP110 and should instead
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
Binding for Thermal Sensor driver for BCM2835 SoCs.
|
||||
|
||||
Required parameters:
|
||||
-------------------
|
||||
|
||||
compatible: should be one of: "brcm,bcm2835-thermal",
|
||||
"brcm,bcm2836-thermal" or "brcm,bcm2837-thermal"
|
||||
reg: Address range of the thermal registers.
|
||||
clocks: Phandle of the clock used by the thermal sensor.
|
||||
#thermal-sensor-cells: should be 0 (see Documentation/devicetree/bindings/thermal/thermal-sensor.yaml)
|
||||
|
||||
Example:
|
||||
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <1000>;
|
||||
|
||||
thermal-sensors = <&thermal>;
|
||||
|
||||
trips {
|
||||
cpu-crit {
|
||||
temperature = <80000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
coefficients = <(-538) 407000>;
|
||||
|
||||
cooling-maps {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
thermal: thermal@7e212000 {
|
||||
compatible = "brcm,bcm2835-thermal";
|
||||
reg = <0x7e212000 0x8>;
|
||||
clocks = <&clocks BCM2835_CLOCK_TSENS>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/thermal/brcm,bcm2835-thermal.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Broadcom BCM2835 thermal sensor
|
||||
|
||||
maintainers:
|
||||
- Stefan Wahren <stefan.wahren@i2se.com>
|
||||
|
||||
allOf:
|
||||
- $ref: thermal-sensor.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- brcm,bcm2835-thermal
|
||||
- brcm,bcm2836-thermal
|
||||
- brcm,bcm2837-thermal
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
"#thermal-sensor-cells":
|
||||
const: 0
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
- '#thermal-sensor-cells'
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/bcm2835.h>
|
||||
|
||||
thermal@7e212000 {
|
||||
compatible = "brcm,bcm2835-thermal";
|
||||
reg = <0x7e212000 0x8>;
|
||||
clocks = <&clocks BCM2835_CLOCK_TSENS>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
@@ -29,6 +29,8 @@ properties:
|
||||
items:
|
||||
- enum:
|
||||
- qcom,mdm9607-tsens
|
||||
- qcom,msm8226-tsens
|
||||
- qcom,msm8909-tsens
|
||||
- qcom,msm8916-tsens
|
||||
- qcom,msm8939-tsens
|
||||
- qcom,msm8974-tsens
|
||||
@@ -48,6 +50,7 @@ properties:
|
||||
- qcom,msm8953-tsens
|
||||
- qcom,msm8996-tsens
|
||||
- qcom,msm8998-tsens
|
||||
- qcom,qcm2290-tsens
|
||||
- qcom,sc7180-tsens
|
||||
- qcom,sc7280-tsens
|
||||
- qcom,sc8180x-tsens
|
||||
@@ -56,6 +59,7 @@ properties:
|
||||
- qcom,sdm845-tsens
|
||||
- qcom,sm6115-tsens
|
||||
- qcom,sm6350-tsens
|
||||
- qcom,sm6375-tsens
|
||||
- qcom,sm8150-tsens
|
||||
- qcom,sm8250-tsens
|
||||
- qcom,sm8350-tsens
|
||||
@@ -67,6 +71,12 @@ properties:
|
||||
enum:
|
||||
- qcom,ipq8074-tsens
|
||||
|
||||
- description: v2 of TSENS with combined interrupt
|
||||
items:
|
||||
- enum:
|
||||
- qcom,ipq9574-tsens
|
||||
- const: qcom,ipq8074-tsens
|
||||
|
||||
reg:
|
||||
items:
|
||||
- description: TM registers
|
||||
@@ -223,12 +233,7 @@ allOf:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,ipq8064-tsens
|
||||
- qcom,mdm9607-tsens
|
||||
- qcom,msm8916-tsens
|
||||
- qcom,msm8960-tsens
|
||||
- qcom,msm8974-tsens
|
||||
- qcom,msm8976-tsens
|
||||
- qcom,qcs404-tsens
|
||||
- qcom,tsens-v0_1
|
||||
- qcom,tsens-v1
|
||||
then:
|
||||
@@ -244,22 +249,7 @@ allOf:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,msm8953-tsens
|
||||
- qcom,msm8996-tsens
|
||||
- qcom,msm8998-tsens
|
||||
- qcom,sc7180-tsens
|
||||
- qcom,sc7280-tsens
|
||||
- qcom,sc8180x-tsens
|
||||
- qcom,sc8280xp-tsens
|
||||
- qcom,sdm630-tsens
|
||||
- qcom,sdm845-tsens
|
||||
- qcom,sm6350-tsens
|
||||
- qcom,sm8150-tsens
|
||||
- qcom,sm8250-tsens
|
||||
- qcom,sm8350-tsens
|
||||
- qcom,sm8450-tsens
|
||||
- qcom,tsens-v2
|
||||
const: qcom,tsens-v2
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
|
||||
@@ -313,9 +313,18 @@ the documentation build system will automatically turn a reference to
|
||||
function name exists. If you see ``c:func:`` use in a kernel document,
|
||||
please feel free to remove it.
|
||||
|
||||
Tables
|
||||
------
|
||||
|
||||
ReStructuredText provides several options for table syntax. Kernel style for
|
||||
tables is to prefer *simple table* syntax or *grid table* syntax. See the
|
||||
`reStructuredText user reference for table syntax`_ for more details.
|
||||
|
||||
.. _reStructuredText user reference for table syntax:
|
||||
https://docutils.sourceforge.io/docs/user/rst/quickref.html#tables
|
||||
|
||||
list tables
|
||||
-----------
|
||||
~~~~~~~~~~~
|
||||
|
||||
The list-table formats can be useful for tables that are not easily laid
|
||||
out in the usual Sphinx ASCII-art formats. These formats are nearly
|
||||
|
||||
@@ -56,7 +56,7 @@ by adding the following hook into your git:
|
||||
$ cat >.git/hooks/applypatch-msg <<'EOF'
|
||||
#!/bin/sh
|
||||
. git-sh-setup
|
||||
perl -pi -e 's|^Message-Id:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
|
||||
perl -pi -e 's|^Message-I[dD]:\s*<?([^>]+)>?$|Link: https://lore.kernel.org/r/$1|g;' "$1"
|
||||
test -x "$GIT_DIR/hooks/commit-msg" &&
|
||||
exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
|
||||
:
|
||||
|
||||
@@ -3,3 +3,152 @@
|
||||
===========
|
||||
Page Tables
|
||||
===========
|
||||
|
||||
Paged virtual memory was invented along with virtual memory as a concept in
|
||||
1962 on the Ferranti Atlas Computer which was the first computer with paged
|
||||
virtual memory. The feature migrated to newer computers and became a de facto
|
||||
feature of all Unix-like systems as time went by. In 1985 the feature was
|
||||
included in the Intel 80386, which was the CPU Linux 1.0 was developed on.
|
||||
|
||||
Page tables map virtual addresses as seen by the CPU into physical addresses
|
||||
as seen on the external memory bus.
|
||||
|
||||
Linux defines page tables as a hierarchy which is currently five levels in
|
||||
height. The architecture code for each supported architecture will then
|
||||
map this to the restrictions of the hardware.
|
||||
|
||||
The physical address corresponding to the virtual address is often referenced
|
||||
by the underlying physical page frame. The **page frame number** or **pfn**
|
||||
is the physical address of the page (as seen on the external memory bus)
|
||||
divided by `PAGE_SIZE`.
|
||||
|
||||
Physical memory address 0 will be *pfn 0* and the highest pfn will be
|
||||
the last page of physical memory the external address bus of the CPU can
|
||||
address.
|
||||
|
||||
With a page granularity of 4KB and a address range of 32 bits, pfn 0 is at
|
||||
address 0x00000000, pfn 1 is at address 0x00001000, pfn 2 is at 0x00002000
|
||||
and so on until we reach pfn 0xfffff at 0xfffff000. With 16KB pages pfs are
|
||||
at 0x00004000, 0x00008000 ... 0xffffc000 and pfn goes from 0 to 0x3fffff.
|
||||
|
||||
As you can see, with 4KB pages the page base address uses bits 12-31 of the
|
||||
address, and this is why `PAGE_SHIFT` in this case is defined as 12 and
|
||||
`PAGE_SIZE` is usually defined in terms of the page shift as `(1 << PAGE_SHIFT)`
|
||||
|
||||
Over time a deeper hierarchy has been developed in response to increasing memory
|
||||
sizes. When Linux was created, 4KB pages and a single page table called
|
||||
`swapper_pg_dir` with 1024 entries was used, covering 4MB which coincided with
|
||||
the fact that Torvald's first computer had 4MB of physical memory. Entries in
|
||||
this single table were referred to as *PTE*:s - page table entries.
|
||||
|
||||
The software page table hierarchy reflects the fact that page table hardware has
|
||||
become hierarchical and that in turn is done to save page table memory and
|
||||
speed up mapping.
|
||||
|
||||
One could of course imagine a single, linear page table with enormous amounts
|
||||
of entries, breaking down the whole memory into single pages. Such a page table
|
||||
would be very sparse, because large portions of the virtual memory usually
|
||||
remains unused. By using hierarchical page tables large holes in the virtual
|
||||
address space does not waste valuable page table memory, because it will suffice
|
||||
to mark large areas as unmapped at a higher level in the page table hierarchy.
|
||||
|
||||
Additionally, on modern CPUs, a higher level page table entry can point directly
|
||||
to a physical memory range, which allows mapping a contiguous range of several
|
||||
megabytes or even gigabytes in a single high-level page table entry, taking
|
||||
shortcuts in mapping virtual memory to physical memory: there is no need to
|
||||
traverse deeper in the hierarchy when you find a large mapped range like this.
|
||||
|
||||
The page table hierarchy has now developed into this::
|
||||
|
||||
+-----+
|
||||
| PGD |
|
||||
+-----+
|
||||
|
|
||||
| +-----+
|
||||
+-->| P4D |
|
||||
+-----+
|
||||
|
|
||||
| +-----+
|
||||
+-->| PUD |
|
||||
+-----+
|
||||
|
|
||||
| +-----+
|
||||
+-->| PMD |
|
||||
+-----+
|
||||
|
|
||||
| +-----+
|
||||
+-->| PTE |
|
||||
+-----+
|
||||
|
||||
|
||||
Symbols on the different levels of the page table hierarchy have the following
|
||||
meaning beginning from the bottom:
|
||||
|
||||
- **pte**, `pte_t`, `pteval_t` = **Page Table Entry** - mentioned earlier.
|
||||
The *pte* is an array of `PTRS_PER_PTE` elements of the `pteval_t` type, each
|
||||
mapping a single page of virtual memory to a single page of physical memory.
|
||||
The architecture defines the size and contents of `pteval_t`.
|
||||
|
||||
A typical example is that the `pteval_t` is a 32- or 64-bit value with the
|
||||
upper bits being a **pfn** (page frame number), and the lower bits being some
|
||||
architecture-specific bits such as memory protection.
|
||||
|
||||
The **entry** part of the name is a bit confusing because while in Linux 1.0
|
||||
this did refer to a single page table entry in the single top level page
|
||||
table, it was retrofitted to be an array of mapping elements when two-level
|
||||
page tables were first introduced, so the *pte* is the lowermost page
|
||||
*table*, not a page table *entry*.
|
||||
|
||||
- **pmd**, `pmd_t`, `pmdval_t` = **Page Middle Directory**, the hierarchy right
|
||||
above the *pte*, with `PTRS_PER_PMD` references to the *pte*:s.
|
||||
|
||||
- **pud**, `pud_t`, `pudval_t` = **Page Upper Directory** was introduced after
|
||||
the other levels to handle 4-level page tables. It is potentially unused,
|
||||
or *folded* as we will discuss later.
|
||||
|
||||
- **p4d**, `p4d_t`, `p4dval_t` = **Page Level 4 Directory** was introduced to
|
||||
handle 5-level page tables after the *pud* was introduced. Now it was clear
|
||||
that we needed to replace *pgd*, *pmd*, *pud* etc with a figure indicating the
|
||||
directory level and that we cannot go on with ad hoc names any more. This
|
||||
is only used on systems which actually have 5 levels of page tables, otherwise
|
||||
it is folded.
|
||||
|
||||
- **pgd**, `pgd_t`, `pgdval_t` = **Page Global Directory** - the Linux kernel
|
||||
main page table handling the PGD for the kernel memory is still found in
|
||||
`swapper_pg_dir`, but each userspace process in the system also has its own
|
||||
memory context and thus its own *pgd*, found in `struct mm_struct` which
|
||||
in turn is referenced to in each `struct task_struct`. So tasks have memory
|
||||
context in the form of a `struct mm_struct` and this in turn has a
|
||||
`struct pgt_t *pgd` pointer to the corresponding page global directory.
|
||||
|
||||
To repeat: each level in the page table hierarchy is a *array of pointers*, so
|
||||
the **pgd** contains `PTRS_PER_PGD` pointers to the next level below, **p4d**
|
||||
contains `PTRS_PER_P4D` pointers to **pud** items and so on. The number of
|
||||
pointers on each level is architecture-defined.::
|
||||
|
||||
PMD
|
||||
--> +-----+ PTE
|
||||
| ptr |-------> +-----+
|
||||
| ptr |- | ptr |-------> PAGE
|
||||
| ptr | \ | ptr |
|
||||
| ptr | \ ...
|
||||
| ... | \
|
||||
| ptr | \ PTE
|
||||
+-----+ +----> +-----+
|
||||
| ptr |-------> PAGE
|
||||
| ptr |
|
||||
...
|
||||
|
||||
|
||||
Page Table Folding
|
||||
==================
|
||||
|
||||
If the architecture does not use all the page table levels, they can be *folded*
|
||||
which means skipped, and all operations performed on page tables will be
|
||||
compile-time augmented to just skip a level when accessing the next lower
|
||||
level.
|
||||
|
||||
Page table handling code that wishes to be architecture-neutral, such as the
|
||||
virtual memory manager, will need to be written so that it traverses all of the
|
||||
currently five levels. This style should also be preferred for
|
||||
architecture-specific code, so as to be robust to future changes.
|
||||
|
||||
@@ -434,9 +434,10 @@ There are a few hints which can help with linux-kernel survival:
|
||||
questions. Some developers can get impatient with people who clearly
|
||||
have not done their homework.
|
||||
|
||||
- Avoid top-posting (the practice of putting your answer above the quoted
|
||||
text you are responding to). It makes your response harder to read and
|
||||
makes a poor impression.
|
||||
- Use interleaved ("inline") replies, which makes your response easier to
|
||||
read. (i.e. avoid top-posting -- the practice of putting your answer above
|
||||
the quoted text you are responding to.) For more details, see
|
||||
:ref:`Documentation/process/submitting-patches.rst <interleaved_replies>`.
|
||||
|
||||
- Ask on the correct mailing list. Linux-kernel may be the general meeting
|
||||
point, but it is not the best place to find developers from all
|
||||
|
||||
@@ -129,88 +129,132 @@ tools and scripts used by other kernel developers or Linux distributions; one of
|
||||
these tools is regzbot, which heavily relies on the "Link:" tags to associate
|
||||
reports for regression with changes resolving them.
|
||||
|
||||
Prioritize work on fixing regressions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Expectations and best practices for fixing regressions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You should fix any reported regression as quickly as possible, to provide
|
||||
affected users with a solution in a timely manner and prevent more users from
|
||||
running into the issue; nevertheless developers need to take enough time and
|
||||
care to ensure regression fixes do not cause additional damage.
|
||||
As a Linux kernel developer, you are expected to give your best to prevent
|
||||
situations where a regression caused by a recent change of yours leaves users
|
||||
only these options:
|
||||
|
||||
In the end though, developers should give their best to prevent users from
|
||||
running into situations where a regression leaves them only three options: "run
|
||||
a kernel with a regression that seriously impacts usage", "continue running an
|
||||
outdated and thus potentially insecure kernel version for more than two weeks
|
||||
after a regression's culprit was identified", and "downgrade to a still
|
||||
supported kernel series that lack required features".
|
||||
* Run a kernel with a regression that impacts usage.
|
||||
|
||||
How to realize this depends a lot on the situation. Here are a few rules of
|
||||
thumb for you, in order or importance:
|
||||
* Switch to an older or newer kernel series.
|
||||
|
||||
* Prioritize work on handling regression reports and fixing regression over all
|
||||
other Linux kernel work, unless the latter concerns acute security issues or
|
||||
bugs causing data loss or damage.
|
||||
* Continue running an outdated and thus potentially insecure kernel for more
|
||||
than three weeks after the regression's culprit was identified. Ideally it
|
||||
should be less than two. And it ought to be just a few days, if the issue is
|
||||
severe or affects many users -- either in general or in prevalent
|
||||
environments.
|
||||
|
||||
* Always consider reverting the culprit commits and reapplying them later
|
||||
together with necessary fixes, as this might be the least dangerous and
|
||||
quickest way to fix a regression.
|
||||
How to realize that in practice depends on various factors. Use the following
|
||||
rules of thumb as a guide.
|
||||
|
||||
* Developers should handle regressions in all supported kernel series, but are
|
||||
free to delegate the work to the stable team, if the issue probably at no
|
||||
point in time occurred with mainline.
|
||||
In general:
|
||||
|
||||
* Try to resolve any regressions introduced in the current development before
|
||||
its end. If you fear a fix might be too risky to apply only days before a new
|
||||
mainline release, let Linus decide: submit the fix separately to him as soon
|
||||
as possible with the explanation of the situation. He then can make a call
|
||||
and postpone the release if necessary, for example if multiple such changes
|
||||
show up in his inbox.
|
||||
* Prioritize work on regressions over all other Linux kernel work, unless the
|
||||
latter concerns a severe issue (e.g. acute security vulnerability, data loss,
|
||||
bricked hardware, ...).
|
||||
|
||||
* Address regressions in stable, longterm, or proper mainline releases with
|
||||
more urgency than regressions in mainline pre-releases. That changes after
|
||||
the release of the fifth pre-release, aka "-rc5": mainline then becomes as
|
||||
important, to ensure all the improvements and fixes are ideally tested
|
||||
together for at least one week before Linus releases a new mainline version.
|
||||
* Expedite fixing mainline regressions that recently made it into a proper
|
||||
mainline, stable, or longterm release (either directly or via backport).
|
||||
|
||||
* Fix regressions within two or three days, if they are critical for some
|
||||
reason -- for example, if the issue is likely to affect many users of the
|
||||
kernel series in question on all or certain architectures. Note, this
|
||||
includes mainline, as issues like compile errors otherwise might prevent many
|
||||
testers or continuous integration systems from testing the series.
|
||||
* Do not consider regressions from the current cycle as something that can wait
|
||||
till the end of the cycle, as the issue might discourage or prevent users and
|
||||
CI systems from testing mainline now or generally.
|
||||
|
||||
* Aim to fix regressions within one week after the culprit was identified, if
|
||||
the issue was introduced in either:
|
||||
* Work with the required care to avoid additional or bigger damage, even if
|
||||
resolving an issue then might take longer than outlined below.
|
||||
|
||||
* a recent stable/longterm release
|
||||
On timing once the culprit of a regression is known:
|
||||
|
||||
* the development cycle of the latest proper mainline release
|
||||
* Aim to mainline a fix within two or three days, if the issue is severe or
|
||||
bothering many users -- either in general or in prevalent conditions like a
|
||||
particular hardware environment, distribution, or stable/longterm series.
|
||||
|
||||
In the latter case (say Linux v5.14), try to address regressions even
|
||||
quicker, if the stable series for the predecessor (v5.13) will be abandoned
|
||||
soon or already was stamped "End-of-Life" (EOL) -- this usually happens about
|
||||
three to four weeks after a new mainline release.
|
||||
* Aim to mainline a fix by Sunday after the next, if the culprit made it
|
||||
into a recent mainline, stable, or longterm release (either directly or via
|
||||
backport); if the culprit became known early during a week and is simple to
|
||||
resolve, try to mainline the fix within the same week.
|
||||
|
||||
* Try to fix all other regressions within two weeks after the culprit was
|
||||
found. Two or three additional weeks are acceptable for performance
|
||||
regressions and other issues which are annoying, but don't prevent anyone
|
||||
from running Linux (unless it's an issue in the current development cycle,
|
||||
as those should ideally be addressed before the release). A few weeks in
|
||||
total are acceptable if a regression can only be fixed with a risky change
|
||||
and at the same time is affecting only a few users; as much time is
|
||||
also okay if the regression is already present in the second newest longterm
|
||||
kernel series.
|
||||
* For other regressions, aim to mainline fixes before the hindmost Sunday
|
||||
within the next three weeks. One or two Sundays later are acceptable, if the
|
||||
regression is something people can live with easily for a while -- like a
|
||||
mild performance regression.
|
||||
|
||||
Note: The aforementioned time frames for resolving regressions are meant to
|
||||
include getting the fix tested, reviewed, and merged into mainline, ideally with
|
||||
the fix being in linux-next at least briefly. This leads to delays you need to
|
||||
account for.
|
||||
* It's strongly discouraged to delay mainlining regression fixes till the next
|
||||
merge window, except when the fix is extraordinarily risky or when the
|
||||
culprit was mainlined more than a year ago.
|
||||
|
||||
Subsystem maintainers are expected to assist in reaching those periods by doing
|
||||
timely reviews and quick handling of accepted patches. They thus might have to
|
||||
send git-pull requests earlier or more often than usual; depending on the fix,
|
||||
it might even be acceptable to skip testing in linux-next. Especially fixes for
|
||||
regressions in stable and longterm kernels need to be handled quickly, as fixes
|
||||
need to be merged in mainline before they can be backported to older series.
|
||||
On procedure:
|
||||
|
||||
* Always consider reverting the culprit, as it's often the quickest and least
|
||||
dangerous way to fix a regression. Don't worry about mainlining a fixed
|
||||
variant later: that should be straight-forward, as most of the code went
|
||||
through review once already.
|
||||
|
||||
* Try to resolve any regressions introduced in mainline during the past
|
||||
twelve months before the current development cycle ends: Linus wants such
|
||||
regressions to be handled like those from the current cycle, unless fixing
|
||||
bears unusual risks.
|
||||
|
||||
* Consider CCing Linus on discussions or patch review, if a regression seems
|
||||
tangly. Do the same in precarious or urgent cases -- especially if the
|
||||
subsystem maintainer might be unavailable. Also CC the stable team, when you
|
||||
know such a regression made it into a mainline, stable, or longterm release.
|
||||
|
||||
* For urgent regressions, consider asking Linus to pick up the fix straight
|
||||
from the mailing list: he is totally fine with that for uncontroversial
|
||||
fixes. Ideally though such requests should happen in accordance with the
|
||||
subsystem maintainers or come directly from them.
|
||||
|
||||
* In case you are unsure if a fix is worth the risk applying just days before
|
||||
a new mainline release, send Linus a mail with the usual lists and people in
|
||||
CC; in it, summarize the situation while asking him to consider picking up
|
||||
the fix straight from the list. He then himself can make the call and when
|
||||
needed even postpone the release. Such requests again should ideally happen
|
||||
in accordance with the subsystem maintainers or come directly from them.
|
||||
|
||||
Regarding stable and longterm kernels:
|
||||
|
||||
* You are free to leave regressions to the stable team, if they at no point in
|
||||
time occurred with mainline or were fixed there already.
|
||||
|
||||
* If a regression made it into a proper mainline release during the past
|
||||
twelve months, ensure to tag the fix with "Cc: stable@vger.kernel.org", as a
|
||||
"Fixes:" tag alone does not guarantee a backport. Please add the same tag,
|
||||
in case you know the culprit was backported to stable or longterm kernels.
|
||||
|
||||
* When receiving reports about regressions in recent stable or longterm kernel
|
||||
series, please evaluate at least briefly if the issue might happen in current
|
||||
mainline as well -- and if that seems likely, take hold of the report. If in
|
||||
doubt, ask the reporter to check mainline.
|
||||
|
||||
* Whenever you want to swiftly resolve a regression that recently also made it
|
||||
into a proper mainline, stable, or longterm release, fix it quickly in
|
||||
mainline; when appropriate thus involve Linus to fast-track the fix (see
|
||||
above). That's because the stable team normally does neither revert nor fix
|
||||
any changes that cause the same problems in mainline.
|
||||
|
||||
* In case of urgent regression fixes you might want to ensure prompt
|
||||
backporting by dropping the stable team a note once the fix was mainlined;
|
||||
this is especially advisable during merge windows and shortly thereafter, as
|
||||
the fix otherwise might land at the end of a huge patch queue.
|
||||
|
||||
On patch flow:
|
||||
|
||||
* Developers, when trying to reach the time periods mentioned above, remember
|
||||
to account for the time it takes to get fixes tested, reviewed, and merged by
|
||||
Linus, ideally with them being in linux-next at least briefly. Hence, if a
|
||||
fix is urgent, make it obvious to ensure others handle it appropriately.
|
||||
|
||||
* Reviewers, you are kindly asked to assist developers in reaching the time
|
||||
periods mentioned above by reviewing regression fixes in a timely manner.
|
||||
|
||||
* Subsystem maintainers, you likewise are encouraged to expedite the handling
|
||||
of regression fixes. Thus evaluate if skipping linux-next is an option for
|
||||
the particular fix. Also consider sending git pull requests more often than
|
||||
usual when needed. And try to avoid holding onto regression fixes over
|
||||
weekends -- especially when the fix is marked for backporting.
|
||||
|
||||
|
||||
More aspects regarding regressions developers should be aware of
|
||||
|
||||
@@ -331,6 +331,31 @@ explaining difference against previous submission (see
|
||||
See Documentation/process/email-clients.rst for recommendations on email
|
||||
clients and mailing list etiquette.
|
||||
|
||||
.. _interleaved_replies:
|
||||
|
||||
Use trimmed interleaved replies in email discussions
|
||||
----------------------------------------------------
|
||||
Top-posting is strongly discouraged in Linux kernel development
|
||||
discussions. Interleaved (or "inline") replies make conversations much
|
||||
easier to follow. For more details see:
|
||||
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
|
||||
|
||||
As is frequently quoted on the mailing list::
|
||||
|
||||
A: http://en.wikipedia.org/wiki/Top_post
|
||||
Q: Were do I find info about this thing called top-posting?
|
||||
A: Because it messes up the order in which people normally read text.
|
||||
Q: Why is top-posting such a bad thing?
|
||||
A: Top-posting.
|
||||
Q: What is the most annoying thing in e-mail?
|
||||
|
||||
Similarly, please trim all unneeded quotations that aren't relevant
|
||||
to your reply. This makes responses easier to find, and saves time and
|
||||
space. For more details see: http://daringfireball.net/2007/07/on_top ::
|
||||
|
||||
A: No.
|
||||
Q: Should I include quotations after my reply?
|
||||
|
||||
.. _resend_reminders:
|
||||
|
||||
Don't get discouraged - or impatient
|
||||
|
||||
@@ -10,6 +10,30 @@ is taken directly from the kernel source, with supplemental material added
|
||||
as needed (or at least as we managed to add it — probably *not* all that is
|
||||
needed).
|
||||
|
||||
Human interfaces
|
||||
----------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
input/index
|
||||
hid/index
|
||||
sound/index
|
||||
gpu/index
|
||||
fb/index
|
||||
|
||||
Storage interfaces
|
||||
------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
filesystems/index
|
||||
block/index
|
||||
cdrom/index
|
||||
scsi/index
|
||||
target/index
|
||||
|
||||
**Fixme**: much more organizational work is needed here.
|
||||
|
||||
.. toctree::
|
||||
@@ -19,12 +43,8 @@ needed).
|
||||
core-api/index
|
||||
locking/index
|
||||
accounting/index
|
||||
block/index
|
||||
cdrom/index
|
||||
cpu-freq/index
|
||||
fb/index
|
||||
fpga/index
|
||||
hid/index
|
||||
i2c/index
|
||||
iio/index
|
||||
isdn/index
|
||||
@@ -34,25 +54,19 @@ needed).
|
||||
networking/index
|
||||
pcmcia/index
|
||||
power/index
|
||||
target/index
|
||||
timers/index
|
||||
spi/index
|
||||
w1/index
|
||||
watchdog/index
|
||||
virt/index
|
||||
input/index
|
||||
hwmon/index
|
||||
gpu/index
|
||||
accel/index
|
||||
security/index
|
||||
sound/index
|
||||
crypto/index
|
||||
filesystems/index
|
||||
mm/index
|
||||
bpf/index
|
||||
usb/index
|
||||
PCI/index
|
||||
scsi/index
|
||||
misc-devices/index
|
||||
scheduler/index
|
||||
mhi/index
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
Chinese translated version of Documentation/arm/booting.rst
|
||||
Chinese translated version of Documentation/arch/arm/booting.rst
|
||||
|
||||
If you have any comment or update to the content, please contact the
|
||||
original document maintainer directly. However, if you have a problem
|
||||
@@ -9,7 +9,7 @@ or if there is a problem with the translation.
|
||||
Maintainer: Russell King <linux@arm.linux.org.uk>
|
||||
Chinese maintainer: Fu Wei <tekkamanninja@gmail.com>
|
||||
---------------------------------------------------------------------
|
||||
Documentation/arm/booting.rst 的中文翻译
|
||||
Documentation/arch/arm/booting.rst 的中文翻译
|
||||
|
||||
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
|
||||
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
Chinese translated version of Documentation/arm/kernel_user_helpers.rst
|
||||
Chinese translated version of Documentation/arch/arm/kernel_user_helpers.rst
|
||||
|
||||
If you have any comment or update to the content, please contact the
|
||||
original document maintainer directly. However, if you have a problem
|
||||
@@ -10,7 +10,7 @@ Maintainer: Nicolas Pitre <nicolas.pitre@linaro.org>
|
||||
Dave Martin <dave.martin@linaro.org>
|
||||
Chinese maintainer: Fu Wei <tekkamanninja@gmail.com>
|
||||
---------------------------------------------------------------------
|
||||
Documentation/arm/kernel_user_helpers.rst 的中文翻译
|
||||
Documentation/arch/arm/kernel_user_helpers.rst 的中文翻译
|
||||
|
||||
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
|
||||
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
|
||||
@@ -72,7 +72,7 @@ high once achieves global guest_halt_poll_ns value).
|
||||
|
||||
Default: Y
|
||||
|
||||
The module parameters can be set from the debugfs files in::
|
||||
The module parameters can be set from the sysfs files in::
|
||||
|
||||
/sys/module/haltpoll/parameters/
|
||||
|
||||
|
||||
@@ -112,11 +112,11 @@ powerpc kvm-hv case.
|
||||
| | function. | |
|
||||
+-----------------------+---------------------------+-------------------------+
|
||||
|
||||
These module parameters can be set from the debugfs files in:
|
||||
These module parameters can be set from the sysfs files in:
|
||||
|
||||
/sys/module/kvm/parameters/
|
||||
|
||||
Note: that these module parameters are system wide values and are not able to
|
||||
Note: these module parameters are system-wide values and are not able to
|
||||
be tuned on a per vm basis.
|
||||
|
||||
Any changes to these parameters will be picked up by new and existing vCPUs the
|
||||
@@ -142,12 +142,12 @@ Further Notes
|
||||
global max polling interval (halt_poll_ns) then the host will always poll for the
|
||||
entire block time and thus cpu utilisation will go to 100%.
|
||||
|
||||
- Halt polling essentially presents a trade off between power usage and latency and
|
||||
- Halt polling essentially presents a trade-off between power usage and latency and
|
||||
the module parameters should be used to tune the affinity for this. Idle cpu time is
|
||||
essentially converted to host kernel time with the aim of decreasing latency when
|
||||
entering the guest.
|
||||
|
||||
- Halt polling will only be conducted by the host when no other tasks are runnable on
|
||||
that cpu, otherwise the polling will cease immediately and schedule will be invoked to
|
||||
allow that other task to run. Thus this doesn't allow a guest to denial of service the
|
||||
cpu.
|
||||
allow that other task to run. Thus this doesn't allow a guest to cause denial of service
|
||||
of the cpu.
|
||||
|
||||
@@ -67,7 +67,7 @@ following two cases:
|
||||
2. Write-Protection: The SPTE is present and the fault is caused by
|
||||
write-protect. That means we just need to change the W bit of the spte.
|
||||
|
||||
What we use to avoid all the race is the Host-writable bit and MMU-writable bit
|
||||
What we use to avoid all the races is the Host-writable bit and MMU-writable bit
|
||||
on the spte:
|
||||
|
||||
- Host-writable means the gfn is writable in the host kernel page tables and in
|
||||
@@ -130,7 +130,7 @@ to gfn. For indirect sp, we disabled fast page fault for simplicity.
|
||||
A solution for indirect sp could be to pin the gfn, for example via
|
||||
kvm_vcpu_gfn_to_pfn_atomic, before the cmpxchg. After the pinning:
|
||||
|
||||
- We have held the refcount of pfn that means the pfn can not be freed and
|
||||
- We have held the refcount of pfn; that means the pfn can not be freed and
|
||||
be reused for another gfn.
|
||||
- The pfn is writable and therefore it cannot be shared between different gfns
|
||||
by KSM.
|
||||
@@ -186,22 +186,22 @@ writable between reading spte and updating spte. Like below case:
|
||||
The Dirty bit is lost in this case.
|
||||
|
||||
In order to avoid this kind of issue, we always treat the spte as "volatile"
|
||||
if it can be updated out of mmu-lock, see spte_has_volatile_bits(), it means,
|
||||
if it can be updated out of mmu-lock [see spte_has_volatile_bits()]; it means
|
||||
the spte is always atomically updated in this case.
|
||||
|
||||
3) flush tlbs due to spte updated
|
||||
|
||||
If the spte is updated from writable to readonly, we should flush all TLBs,
|
||||
If the spte is updated from writable to read-only, we should flush all TLBs,
|
||||
otherwise rmap_write_protect will find a read-only spte, even though the
|
||||
writable spte might be cached on a CPU's TLB.
|
||||
|
||||
As mentioned before, the spte can be updated to writable out of mmu-lock on
|
||||
fast page fault path, in order to easily audit the path, we see if TLBs need
|
||||
be flushed caused by this reason in mmu_spte_update() since this is a common
|
||||
fast page fault path. In order to easily audit the path, we see if TLBs needing
|
||||
to be flushed caused this reason in mmu_spte_update() since this is a common
|
||||
function to update spte (present -> present).
|
||||
|
||||
Since the spte is "volatile" if it can be updated out of mmu-lock, we always
|
||||
atomically update the spte, the race caused by fast page fault can be avoided,
|
||||
atomically update the spte and the race caused by fast page fault can be avoided.
|
||||
See the comments in spte_has_volatile_bits() and mmu_spte_update().
|
||||
|
||||
Lockless Access Tracking:
|
||||
@@ -283,9 +283,9 @@ time it will be set using the Dirty tracking mechanism described above.
|
||||
:Arch: x86
|
||||
:Protects: wakeup_vcpus_on_cpu
|
||||
:Comment: This is a per-CPU lock and it is used for VT-d posted-interrupts.
|
||||
When VT-d posted-interrupts is supported and the VM has assigned
|
||||
When VT-d posted-interrupts are supported and the VM has assigned
|
||||
devices, we put the blocked vCPU on the list blocked_vcpu_on_cpu
|
||||
protected by blocked_vcpu_on_cpu_lock, when VT-d hardware issues
|
||||
protected by blocked_vcpu_on_cpu_lock. When VT-d hardware issues
|
||||
wakeup notification event since external interrupts from the
|
||||
assigned devices happens, we will find the vCPU on the list to
|
||||
wakeup.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user