Merge 3cb9871f81 ("Merge tag 'urgent-rcu.2024.01.24a' of https://github.com/neeraju/linux") into android-mainline
Steps on the way to v6.8-rc1 Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: I2b95d8ef56b0a11e730c1cb3bff593c689b32d10
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
root = true
|
||||
|
||||
[{*.{awk,c,dts,dtsi,dtso,h,mk,s,S},Kconfig,Makefile,Makefile.*}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
|
||||
[*.{json,py,rs}]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# this must be below the general *.py to overwrite it
|
||||
[tools/{perf,power,rcu,testing/kunit}/**.py,]
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
|
||||
[*.yaml]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = unset
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -96,6 +96,7 @@ modules.order
|
||||
#
|
||||
!.clang-format
|
||||
!.cocciconfig
|
||||
!.editorconfig
|
||||
!.get_maintainer.ignore
|
||||
!.gitattributes
|
||||
!.gitignore
|
||||
|
||||
@@ -179,6 +179,7 @@ E: ralf@gnu.org
|
||||
P: 1024/AF7B30C1 CF 97 C2 CC 6D AE A7 FE C8 BA 9C FC 88 DE 32 C3
|
||||
D: Linux/MIPS port
|
||||
D: Linux/68k hacker
|
||||
D: AX25 maintainer
|
||||
S: Hauptstrasse 19
|
||||
S: 79837 St. Blasien
|
||||
S: Germany
|
||||
@@ -677,6 +678,10 @@ D: Media subsystem (V4L/DVB) drivers and core
|
||||
D: EDAC drivers and EDAC 3.0 core rework
|
||||
S: Brazil
|
||||
|
||||
N: Landen Chao
|
||||
E: Landen.Chao@mediatek.com
|
||||
D: MT7531 Ethernet switch support
|
||||
|
||||
N: Raymond Chen
|
||||
E: raymondc@microsoft.com
|
||||
D: Author of Configure script
|
||||
@@ -814,6 +819,10 @@ D: Support for Xircom PGSDB9 (firmware and host driver)
|
||||
S: Bucharest
|
||||
S: Romania
|
||||
|
||||
N: John Crispin
|
||||
E: john@phrozen.org
|
||||
D: MediaTek MT7623 Gigabit ethernet support
|
||||
|
||||
N: Laurence Culhane
|
||||
E: loz@holmes.demon.co.uk
|
||||
D: Wrote the initial alpha SLIP code
|
||||
@@ -1538,6 +1547,10 @@ N: Andrew Haylett
|
||||
E: ajh@primag.co.uk
|
||||
D: Selection mechanism
|
||||
|
||||
N: Johan Hedberg
|
||||
E: johan.hedberg@gmail.com
|
||||
D: Bluetooth subsystem maintainer
|
||||
|
||||
N: Andre Hedrick
|
||||
E: andre@linux-ide.org
|
||||
E: andre@linuxdiskcert.org
|
||||
@@ -3052,6 +3065,10 @@ S: Demonstratsii 8-382
|
||||
S: Tula 300000
|
||||
S: Russia
|
||||
|
||||
N: Thomas Petazzoni
|
||||
E: thomas.petazzoni@bootlin.com
|
||||
D: Driver for the Marvell Armada 370/XP network unit.
|
||||
|
||||
N: Gordon Peters
|
||||
E: GordPeters@smarttech.com
|
||||
D: Isochronous receive for IEEE 1394 driver (OHCI module).
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
What: /sys/kernel/debug/vfio
|
||||
Date: December 2023
|
||||
KernelVersion: 6.8
|
||||
Contact: Longfang Liu <liulongfang@huawei.com>
|
||||
Description: This debugfs file directory is used for debugging
|
||||
of vfio devices, it's a common directory for all vfio devices.
|
||||
Vfio core will create a device subdirectory under this
|
||||
directory.
|
||||
|
||||
What: /sys/kernel/debug/vfio/<device>/migration
|
||||
Date: December 2023
|
||||
KernelVersion: 6.8
|
||||
Contact: Longfang Liu <liulongfang@huawei.com>
|
||||
Description: This debugfs file directory is used for debugging
|
||||
of vfio devices that support live migration.
|
||||
The debugfs of each vfio device that supports live migration
|
||||
could be created under this directory.
|
||||
|
||||
What: /sys/kernel/debug/vfio/<device>/migration/state
|
||||
Date: December 2023
|
||||
KernelVersion: 6.8
|
||||
Contact: Longfang Liu <liulongfang@huawei.com>
|
||||
Description: Read the live migration status of the vfio device.
|
||||
The contents of the state file reflects the migration state
|
||||
relative to those defined in the vfio_device_mig_state enum
|
||||
@@ -28,6 +28,23 @@ Description:
|
||||
Payload in the CXL-2.0 specification.
|
||||
|
||||
|
||||
What: /sys/bus/cxl/devices/memX/ram/qos_class
|
||||
Date: May, 2023
|
||||
KernelVersion: v6.8
|
||||
Contact: linux-cxl@vger.kernel.org
|
||||
Description:
|
||||
(RO) For CXL host platforms that support "QoS Telemmetry"
|
||||
this attribute conveys a comma delimited list of platform
|
||||
specific cookies that identifies a QoS performance class
|
||||
for the volatile partition of the CXL mem device. These
|
||||
class-ids can be compared against a similar "qos_class"
|
||||
published for a root decoder. While it is not required
|
||||
that the endpoints map their local memory-class to a
|
||||
matching platform class, mismatches are not recommended
|
||||
and there are platform specific performance related
|
||||
side-effects that may result. First class-id is displayed.
|
||||
|
||||
|
||||
What: /sys/bus/cxl/devices/memX/pmem/size
|
||||
Date: December, 2020
|
||||
KernelVersion: v5.12
|
||||
@@ -38,6 +55,23 @@ Description:
|
||||
Payload in the CXL-2.0 specification.
|
||||
|
||||
|
||||
What: /sys/bus/cxl/devices/memX/pmem/qos_class
|
||||
Date: May, 2023
|
||||
KernelVersion: v6.8
|
||||
Contact: linux-cxl@vger.kernel.org
|
||||
Description:
|
||||
(RO) For CXL host platforms that support "QoS Telemmetry"
|
||||
this attribute conveys a comma delimited list of platform
|
||||
specific cookies that identifies a QoS performance class
|
||||
for the persistent partition of the CXL mem device. These
|
||||
class-ids can be compared against a similar "qos_class"
|
||||
published for a root decoder. While it is not required
|
||||
that the endpoints map their local memory-class to a
|
||||
matching platform class, mismatches are not recommended
|
||||
and there are platform specific performance related
|
||||
side-effects that may result. First class-id is displayed.
|
||||
|
||||
|
||||
What: /sys/bus/cxl/devices/memX/serial
|
||||
Date: January, 2022
|
||||
KernelVersion: v5.18
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
Version 2.14 December 21, 2018
|
||||
As of 6.7 kernel. See https://wiki.samba.org/index.php/LinuxCIFSKernel
|
||||
for list of features added by release
|
||||
|
||||
A Partial List of Missing Features
|
||||
==================================
|
||||
@@ -12,22 +13,22 @@ for visible, important contributions to this module. Here
|
||||
is a partial list of the known problems and missing features:
|
||||
|
||||
a) SMB3 (and SMB3.1.1) missing optional features:
|
||||
multichannel performance optimizations, algorithmic channel selection,
|
||||
directory leases optimizations,
|
||||
support for faster packet signing (GMAC),
|
||||
support for compression over the network,
|
||||
T10 copy offload ie "ODX" (copy chunk, and "Duplicate Extents" ioctl
|
||||
are currently the only two server side copy mechanisms supported)
|
||||
|
||||
- multichannel (partially integrated), integration of multichannel with RDMA
|
||||
- directory leases (improved metadata caching). Currently only implemented for root dir
|
||||
- T10 copy offload ie "ODX" (copy chunk, and "Duplicate Extents" ioctl
|
||||
currently the only two server side copy mechanisms supported)
|
||||
b) Better optimized compounding and error handling for sparse file support,
|
||||
perhaps addition of new optional SMB3.1.1 fsctls to make collapse range
|
||||
and insert range more atomic
|
||||
|
||||
b) improved sparse file support (fiemap and SEEK_HOLE are implemented
|
||||
but additional features would be supportable by the protocol such
|
||||
as FALLOC_FL_COLLAPSE_RANGE and FALLOC_FL_INSERT_RANGE)
|
||||
|
||||
c) Directory entry caching relies on a 1 second timer, rather than
|
||||
using Directory Leases, currently only the root file handle is cached longer
|
||||
by leveraging Directory Leases
|
||||
c) Support for SMB3.1.1 over QUIC (and perhaps other socket based protocols
|
||||
like SCTP)
|
||||
|
||||
d) quota support (needs minor kernel change since quota calls otherwise
|
||||
won't make it to network filesystems or deviceless filesystems).
|
||||
won't make it to network filesystems or deviceless filesystems).
|
||||
|
||||
e) Additional use cases can be optimized to use "compounding" (e.g.
|
||||
open/query/close and open/setinfo/close) to reduce the number of
|
||||
@@ -92,23 +93,20 @@ t) split cifs and smb3 support into separate modules so legacy (and less
|
||||
|
||||
v) Additional testing of POSIX Extensions for SMB3.1.1
|
||||
|
||||
w) Add support for additional strong encryption types, and additional spnego
|
||||
authentication mechanisms (see MS-SMB2). GCM-256 is now partially implemented.
|
||||
w) Support for the Mac SMB3.1.1 extensions to improve interop with Apple servers
|
||||
|
||||
x) Finish support for SMB3.1.1 compression
|
||||
x) Support for additional authentication options (e.g. IAKERB, peer-to-peer
|
||||
Kerberos, SCRAM and others supported by existing servers)
|
||||
|
||||
y) Improved tracing, more eBPF trace points, better scripts for performance
|
||||
analysis
|
||||
|
||||
Known Bugs
|
||||
==========
|
||||
|
||||
See https://bugzilla.samba.org - search on product "CifsVFS" for
|
||||
current bug list. Also check http://bugzilla.kernel.org (Product = File System, Component = CIFS)
|
||||
|
||||
1) existing symbolic links (Windows reparse points) are recognized but
|
||||
can not be created remotely. They are implemented for Samba and those that
|
||||
support the CIFS Unix extensions, although earlier versions of Samba
|
||||
overly restrict the pathnames.
|
||||
2) follow_link and readdir code does not follow dfs junctions
|
||||
but recognizes them
|
||||
and xfstest results e.g. https://wiki.samba.org/index.php/Xfstest-results-smb3
|
||||
|
||||
Misc testing to do
|
||||
==================
|
||||
|
||||
@@ -81,7 +81,7 @@ much older and less secure than the default dialect SMB3 which includes
|
||||
many advanced security features such as downgrade attack detection
|
||||
and encrypted shares and stronger signing and authentication algorithms.
|
||||
There are additional mount options that may be helpful for SMB3 to get
|
||||
improved POSIX behavior (NB: can use vers=3.0 to force only SMB3, never 2.1):
|
||||
improved POSIX behavior (NB: can use vers=3 to force SMB3 or later, never 2.1):
|
||||
|
||||
``mfsymlinks`` and either ``cifsacl`` or ``modefromsid`` (usually with ``idsfromsid``)
|
||||
|
||||
@@ -715,6 +715,7 @@ DebugData Displays information about active CIFS sessions and
|
||||
Stats Lists summary resource usage information as well as per
|
||||
share statistics.
|
||||
open_files List all the open file handles on all active SMB sessions.
|
||||
mount_params List of all mount parameters available for the module
|
||||
======================= =======================================================
|
||||
|
||||
Configuration pseudo-files:
|
||||
@@ -864,6 +865,11 @@ i.e.::
|
||||
|
||||
echo "value" > /sys/module/cifs/parameters/<param>
|
||||
|
||||
More detailed descriptions of the available module parameters and their values
|
||||
can be seen by doing:
|
||||
|
||||
modinfo cifs (or modinfo smb3)
|
||||
|
||||
================= ==========================================================
|
||||
1. enable_oplocks Enable or disable oplocks. Oplocks are enabled by default.
|
||||
[Y/y/1]. To disable use any of [N/n/0].
|
||||
|
||||
@@ -888,9 +888,9 @@
|
||||
memory region [offset, offset + size] for that kernel
|
||||
image. If '@offset' is omitted, then a suitable offset
|
||||
is selected automatically.
|
||||
[KNL, X86-64, ARM64, RISCV] Select a region under 4G first, and
|
||||
fall back to reserve region above 4G when '@offset'
|
||||
hasn't been specified.
|
||||
[KNL, X86-64, ARM64, RISCV, LoongArch] Select a region
|
||||
under 4G first, and fall back to reserve region above
|
||||
4G when '@offset' hasn't been specified.
|
||||
See Documentation/admin-guide/kdump/kdump.rst for further details.
|
||||
|
||||
crashkernel=range1:size1[,range2:size2,...][@offset]
|
||||
@@ -901,25 +901,27 @@
|
||||
Documentation/admin-guide/kdump/kdump.rst for an example.
|
||||
|
||||
crashkernel=size[KMG],high
|
||||
[KNL, X86-64, ARM64, RISCV] range could be above 4G.
|
||||
[KNL, X86-64, ARM64, RISCV, LoongArch] range could be
|
||||
above 4G.
|
||||
Allow kernel to allocate physical memory region from top,
|
||||
so could be above 4G if system have more than 4G ram
|
||||
installed. Otherwise memory region will be allocated
|
||||
below 4G, if available.
|
||||
It will be ignored if crashkernel=X is specified.
|
||||
crashkernel=size[KMG],low
|
||||
[KNL, X86-64, ARM64, RISCV] range under 4G. When crashkernel=X,high
|
||||
is passed, kernel could allocate physical memory region
|
||||
above 4G, that cause second kernel crash on system
|
||||
that require some amount of low memory, e.g. swiotlb
|
||||
requires at least 64M+32K low memory, also enough extra
|
||||
low memory is needed to make sure DMA buffers for 32-bit
|
||||
devices won't run out. Kernel would try to allocate
|
||||
[KNL, X86-64, ARM64, RISCV, LoongArch] range under 4G.
|
||||
When crashkernel=X,high is passed, kernel could allocate
|
||||
physical memory region above 4G, that cause second kernel
|
||||
crash on system that require some amount of low memory,
|
||||
e.g. swiotlb requires at least 64M+32K low memory, also
|
||||
enough extra low memory is needed to make sure DMA buffers
|
||||
for 32-bit devices won't run out. Kernel would try to allocate
|
||||
default size of memory below 4G automatically. The default
|
||||
size is platform dependent.
|
||||
--> x86: max(swiotlb_size_or_default() + 8MiB, 256MiB)
|
||||
--> arm64: 128MiB
|
||||
--> riscv: 128MiB
|
||||
--> loongarch: 128MiB
|
||||
This one lets the user specify own low range under 4G
|
||||
for second kernel instead.
|
||||
0: to disable low allocation.
|
||||
|
||||
@@ -71,6 +71,8 @@ stable kernels.
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A510 | #2658417 | ARM64_ERRATUM_2658417 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A510 | #3117295 | ARM64_ERRATUM_3117295 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A520 | #2966298 | ARM64_ERRATUM_2966298 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ARM | Cortex-A53 | #826319 | ARM64_ERRATUM_826319 |
|
||||
@@ -235,11 +237,9 @@ stable kernels.
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Rockchip | RK3588 | #3588001 | ROCKCHIP_ERRATUM_3588001 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| Fujitsu | A64FX | E#010001 | FUJITSU_ERRATUM_010001 |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
| ASR | ASR8601 | #8601001 | N/A |
|
||||
+----------------+-----------------+-----------------+-----------------------------+
|
||||
|
||||
+196
-11
@@ -10,6 +10,191 @@ encrypting the guest memory. In TDX, a special module running in a special
|
||||
mode sits between the host and the guest and manages the guest/host
|
||||
separation.
|
||||
|
||||
TDX Host Kernel Support
|
||||
=======================
|
||||
|
||||
TDX introduces a new CPU mode called Secure Arbitration Mode (SEAM) and
|
||||
a new isolated range pointed by the SEAM Ranger Register (SEAMRR). A
|
||||
CPU-attested software module called 'the TDX module' runs inside the new
|
||||
isolated range to provide the functionalities to manage and run protected
|
||||
VMs.
|
||||
|
||||
TDX also leverages Intel Multi-Key Total Memory Encryption (MKTME) to
|
||||
provide crypto-protection to the VMs. TDX reserves part of MKTME KeyIDs
|
||||
as TDX private KeyIDs, which are only accessible within the SEAM mode.
|
||||
BIOS is responsible for partitioning legacy MKTME KeyIDs and TDX KeyIDs.
|
||||
|
||||
Before the TDX module can be used to create and run protected VMs, it
|
||||
must be loaded into the isolated range and properly initialized. The TDX
|
||||
architecture doesn't require the BIOS to load the TDX module, but the
|
||||
kernel assumes it is loaded by the BIOS.
|
||||
|
||||
TDX boot-time detection
|
||||
-----------------------
|
||||
|
||||
The kernel detects TDX by detecting TDX private KeyIDs during kernel
|
||||
boot. Below dmesg shows when TDX is enabled by BIOS::
|
||||
|
||||
[..] virt/tdx: BIOS enabled: private KeyID range: [16, 64)
|
||||
|
||||
TDX module initialization
|
||||
---------------------------------------
|
||||
|
||||
The kernel talks to the TDX module via the new SEAMCALL instruction. The
|
||||
TDX module implements SEAMCALL leaf functions to allow the kernel to
|
||||
initialize it.
|
||||
|
||||
If the TDX module isn't loaded, the SEAMCALL instruction fails with a
|
||||
special error. In this case the kernel fails the module initialization
|
||||
and reports the module isn't loaded::
|
||||
|
||||
[..] virt/tdx: module not loaded
|
||||
|
||||
Initializing the TDX module consumes roughly ~1/256th system RAM size to
|
||||
use it as 'metadata' for the TDX memory. It also takes additional CPU
|
||||
time to initialize those metadata along with the TDX module itself. Both
|
||||
are not trivial. The kernel initializes the TDX module at runtime on
|
||||
demand.
|
||||
|
||||
Besides initializing the TDX module, a per-cpu initialization SEAMCALL
|
||||
must be done on one cpu before any other SEAMCALLs can be made on that
|
||||
cpu.
|
||||
|
||||
The kernel provides two functions, tdx_enable() and tdx_cpu_enable() to
|
||||
allow the user of TDX to enable the TDX module and enable TDX on local
|
||||
cpu respectively.
|
||||
|
||||
Making SEAMCALL requires VMXON has been done on that CPU. Currently only
|
||||
KVM implements VMXON. For now both tdx_enable() and tdx_cpu_enable()
|
||||
don't do VMXON internally (not trivial), but depends on the caller to
|
||||
guarantee that.
|
||||
|
||||
To enable TDX, the caller of TDX should: 1) temporarily disable CPU
|
||||
hotplug; 2) do VMXON and tdx_enable_cpu() on all online cpus; 3) call
|
||||
tdx_enable(). For example::
|
||||
|
||||
cpus_read_lock();
|
||||
on_each_cpu(vmxon_and_tdx_cpu_enable());
|
||||
ret = tdx_enable();
|
||||
cpus_read_unlock();
|
||||
if (ret)
|
||||
goto no_tdx;
|
||||
// TDX is ready to use
|
||||
|
||||
And the caller of TDX must guarantee the tdx_cpu_enable() has been
|
||||
successfully done on any cpu before it wants to run any other SEAMCALL.
|
||||
A typical usage is do both VMXON and tdx_cpu_enable() in CPU hotplug
|
||||
online callback, and refuse to online if tdx_cpu_enable() fails.
|
||||
|
||||
User can consult dmesg to see whether the TDX module has been initialized.
|
||||
|
||||
If the TDX module is initialized successfully, dmesg shows something
|
||||
like below::
|
||||
|
||||
[..] virt/tdx: 262668 KBs allocated for PAMT
|
||||
[..] virt/tdx: module initialized
|
||||
|
||||
If the TDX module failed to initialize, dmesg also shows it failed to
|
||||
initialize::
|
||||
|
||||
[..] virt/tdx: module initialization failed ...
|
||||
|
||||
TDX Interaction to Other Kernel Components
|
||||
------------------------------------------
|
||||
|
||||
TDX Memory Policy
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
TDX reports a list of "Convertible Memory Region" (CMR) to tell the
|
||||
kernel which memory is TDX compatible. The kernel needs to build a list
|
||||
of memory regions (out of CMRs) as "TDX-usable" memory and pass those
|
||||
regions to the TDX module. Once this is done, those "TDX-usable" memory
|
||||
regions are fixed during module's lifetime.
|
||||
|
||||
To keep things simple, currently the kernel simply guarantees all pages
|
||||
in the page allocator are TDX memory. Specifically, the kernel uses all
|
||||
system memory in the core-mm "at the time of TDX module initialization"
|
||||
as TDX memory, and in the meantime, refuses to online any non-TDX-memory
|
||||
in the memory hotplug.
|
||||
|
||||
Physical Memory Hotplug
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Note TDX assumes convertible memory is always physically present during
|
||||
machine's runtime. A non-buggy BIOS should never support hot-removal of
|
||||
any convertible memory. This implementation doesn't handle ACPI memory
|
||||
removal but depends on the BIOS to behave correctly.
|
||||
|
||||
CPU Hotplug
|
||||
~~~~~~~~~~~
|
||||
|
||||
TDX module requires the per-cpu initialization SEAMCALL must be done on
|
||||
one cpu before any other SEAMCALLs can be made on that cpu. The kernel
|
||||
provides tdx_cpu_enable() to let the user of TDX to do it when the user
|
||||
wants to use a new cpu for TDX task.
|
||||
|
||||
TDX doesn't support physical (ACPI) CPU hotplug. During machine boot,
|
||||
TDX verifies all boot-time present logical CPUs are TDX compatible before
|
||||
enabling TDX. A non-buggy BIOS should never support hot-add/removal of
|
||||
physical CPU. Currently the kernel doesn't handle physical CPU hotplug,
|
||||
but depends on the BIOS to behave correctly.
|
||||
|
||||
Note TDX works with CPU logical online/offline, thus the kernel still
|
||||
allows to offline logical CPU and online it again.
|
||||
|
||||
Kexec()
|
||||
~~~~~~~
|
||||
|
||||
TDX host support currently lacks the ability to handle kexec. For
|
||||
simplicity only one of them can be enabled in the Kconfig. This will be
|
||||
fixed in the future.
|
||||
|
||||
Erratum
|
||||
~~~~~~~
|
||||
|
||||
The first few generations of TDX hardware have an erratum. A partial
|
||||
write to a TDX private memory cacheline will silently "poison" the
|
||||
line. Subsequent reads will consume the poison and generate a machine
|
||||
check.
|
||||
|
||||
A partial write is a memory write where a write transaction of less than
|
||||
cacheline lands at the memory controller. The CPU does these via
|
||||
non-temporal write instructions (like MOVNTI), or through UC/WC memory
|
||||
mappings. Devices can also do partial writes via DMA.
|
||||
|
||||
Theoretically, a kernel bug could do partial write to TDX private memory
|
||||
and trigger unexpected machine check. What's more, the machine check
|
||||
code will present these as "Hardware error" when they were, in fact, a
|
||||
software-triggered issue. But in the end, this issue is hard to trigger.
|
||||
|
||||
If the platform has such erratum, the kernel prints additional message in
|
||||
machine check handler to tell user the machine check may be caused by
|
||||
kernel bug on TDX private memory.
|
||||
|
||||
Interaction vs S3 and deeper states
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
TDX cannot survive from S3 and deeper states. The hardware resets and
|
||||
disables TDX completely when platform goes to S3 and deeper. Both TDX
|
||||
guests and the TDX module get destroyed permanently.
|
||||
|
||||
The kernel uses S3 for suspend-to-ram, and use S4 and deeper states for
|
||||
hibernation. Currently, for simplicity, the kernel chooses to make TDX
|
||||
mutually exclusive with S3 and hibernation.
|
||||
|
||||
The kernel disables TDX during early boot when hibernation support is
|
||||
available::
|
||||
|
||||
[..] virt/tdx: initialization failed: Hibernation support is enabled
|
||||
|
||||
Add 'nohibernate' kernel command line to disable hibernation in order to
|
||||
use TDX.
|
||||
|
||||
ACPI S3 is disabled during kernel early boot if TDX is enabled. The user
|
||||
needs to turn off TDX in the BIOS in order to use S3.
|
||||
|
||||
TDX Guest Support
|
||||
=================
|
||||
Since the host cannot directly access guest registers or memory, much
|
||||
normal functionality of a hypervisor must be moved into the guest. This is
|
||||
implemented using a Virtualization Exception (#VE) that is handled by the
|
||||
@@ -20,7 +205,7 @@ TDX includes new hypercall-like mechanisms for communicating from the
|
||||
guest to the hypervisor or the TDX module.
|
||||
|
||||
New TDX Exceptions
|
||||
==================
|
||||
------------------
|
||||
|
||||
TDX guests behave differently from bare-metal and traditional VMX guests.
|
||||
In TDX guests, otherwise normal instructions or memory accesses can cause
|
||||
@@ -30,7 +215,7 @@ Instructions marked with an '*' conditionally cause exceptions. The
|
||||
details for these instructions are discussed below.
|
||||
|
||||
Instruction-based #VE
|
||||
---------------------
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Port I/O (INS, OUTS, IN, OUT)
|
||||
- HLT
|
||||
@@ -41,7 +226,7 @@ Instruction-based #VE
|
||||
- CPUID*
|
||||
|
||||
Instruction-based #GP
|
||||
---------------------
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- All VMX instructions: INVEPT, INVVPID, VMCLEAR, VMFUNC, VMLAUNCH,
|
||||
VMPTRLD, VMPTRST, VMREAD, VMRESUME, VMWRITE, VMXOFF, VMXON
|
||||
@@ -52,7 +237,7 @@ Instruction-based #GP
|
||||
- RDMSR*,WRMSR*
|
||||
|
||||
RDMSR/WRMSR Behavior
|
||||
--------------------
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
MSR access behavior falls into three categories:
|
||||
|
||||
@@ -73,7 +258,7 @@ trapping and handling in the TDX module. Other than possibly being slow,
|
||||
these MSRs appear to function just as they would on bare metal.
|
||||
|
||||
CPUID Behavior
|
||||
--------------
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
For some CPUID leaves and sub-leaves, the virtualized bit fields of CPUID
|
||||
return values (in guest EAX/EBX/ECX/EDX) are configurable by the
|
||||
@@ -93,7 +278,7 @@ not know how to handle. The guest kernel may ask the hypervisor for the
|
||||
value with a hypercall.
|
||||
|
||||
#VE on Memory Accesses
|
||||
======================
|
||||
----------------------
|
||||
|
||||
There are essentially two classes of TDX memory: private and shared.
|
||||
Private memory receives full TDX protections. Its content is protected
|
||||
@@ -107,7 +292,7 @@ entries. This helps ensure that a guest does not place sensitive
|
||||
information in shared memory, exposing it to the untrusted hypervisor.
|
||||
|
||||
#VE on Shared Memory
|
||||
--------------------
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Access to shared mappings can cause a #VE. The hypervisor ultimately
|
||||
controls whether a shared memory access causes a #VE, so the guest must be
|
||||
@@ -127,7 +312,7 @@ be careful not to access device MMIO regions unless it is also prepared to
|
||||
handle a #VE.
|
||||
|
||||
#VE on Private Pages
|
||||
--------------------
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
An access to private mappings can also cause a #VE. Since all kernel
|
||||
memory is also private memory, the kernel might theoretically need to
|
||||
@@ -145,7 +330,7 @@ The hypervisor is permitted to unilaterally move accepted pages to a
|
||||
to handle the exception.
|
||||
|
||||
Linux #VE handler
|
||||
=================
|
||||
-----------------
|
||||
|
||||
Just like page faults or #GP's, #VE exceptions can be either handled or be
|
||||
fatal. Typically, an unhandled userspace #VE results in a SIGSEGV.
|
||||
@@ -167,7 +352,7 @@ While the block is in place, any #VE is elevated to a double fault (#DF)
|
||||
which is not recoverable.
|
||||
|
||||
MMIO handling
|
||||
=============
|
||||
-------------
|
||||
|
||||
In non-TDX VMs, MMIO is usually implemented by giving a guest access to a
|
||||
mapping which will cause a VMEXIT on access, and then the hypervisor
|
||||
@@ -189,7 +374,7 @@ MMIO access via other means (like structure overlays) may result in an
|
||||
oops.
|
||||
|
||||
Shared Memory Conversions
|
||||
=========================
|
||||
-------------------------
|
||||
|
||||
All TDX guest memory starts out as private at boot. This memory can not
|
||||
be accessed by the hypervisor. However, some kernel users like device
|
||||
|
||||
@@ -6,17 +6,16 @@ Block io priorities
|
||||
Intro
|
||||
-----
|
||||
|
||||
With the introduction of cfq v3 (aka cfq-ts or time sliced cfq), basic io
|
||||
priorities are supported for reads on files. This enables users to io nice
|
||||
processes or process groups, similar to what has been possible with cpu
|
||||
scheduling for ages. This document mainly details the current possibilities
|
||||
with cfq; other io schedulers do not support io priorities thus far.
|
||||
The io priority feature enables users to io nice processes or process groups,
|
||||
similar to what has been possible with cpu scheduling for ages. Support for io
|
||||
priorities is io scheduler dependent and currently supported by bfq and
|
||||
mq-deadline.
|
||||
|
||||
Scheduling classes
|
||||
------------------
|
||||
|
||||
CFQ implements three generic scheduling classes that determine how io is
|
||||
served for a process.
|
||||
Three generic scheduling classes are implemented for io priorities that
|
||||
determine how io is served for a process.
|
||||
|
||||
IOPRIO_CLASS_RT: This is the realtime io class. This scheduling class is given
|
||||
higher priority than any other in the system, processes from this class are
|
||||
|
||||
@@ -0,0 +1,477 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
============
|
||||
UAPI Checker
|
||||
============
|
||||
|
||||
The UAPI checker (``scripts/check-uapi.sh``) is a shell script which
|
||||
checks UAPI header files for userspace backwards-compatibility across
|
||||
the git tree.
|
||||
|
||||
Options
|
||||
=======
|
||||
|
||||
This section will describe the options with which ``check-uapi.sh``
|
||||
can be run.
|
||||
|
||||
Usage::
|
||||
|
||||
check-uapi.sh [-b BASE_REF] [-p PAST_REF] [-j N] [-l ERROR_LOG] [-i] [-q] [-v]
|
||||
|
||||
Available options::
|
||||
|
||||
-b BASE_REF Base git reference to use for comparison. If unspecified or empty,
|
||||
will use any dirty changes in tree to UAPI files. If there are no
|
||||
dirty changes, HEAD will be used.
|
||||
-p PAST_REF Compare BASE_REF to PAST_REF (e.g. -p v6.1). If unspecified or empty,
|
||||
will use BASE_REF^1. Must be an ancestor of BASE_REF. Only headers
|
||||
that exist on PAST_REF will be checked for compatibility.
|
||||
-j JOBS Number of checks to run in parallel (default: number of CPU cores).
|
||||
-l ERROR_LOG Write error log to file (default: no error log is generated).
|
||||
-i Ignore ambiguous changes that may or may not break UAPI compatibility.
|
||||
-q Quiet operation.
|
||||
-v Verbose operation (print more information about each header being checked).
|
||||
|
||||
Environmental args::
|
||||
|
||||
ABIDIFF Custom path to abidiff binary
|
||||
CC C compiler (default is "gcc")
|
||||
ARCH Target architecture of C compiler (default is host arch)
|
||||
|
||||
Exit codes::
|
||||
|
||||
0) Success
|
||||
1) ABI difference detected
|
||||
2) Prerequisite not met
|
||||
|
||||
Examples
|
||||
========
|
||||
|
||||
Basic Usage
|
||||
-----------
|
||||
|
||||
First, let's try making a change to a UAPI header file that obviously
|
||||
won't break userspace::
|
||||
|
||||
cat << 'EOF' | patch -l -p1
|
||||
--- a/include/uapi/linux/acct.h
|
||||
+++ b/include/uapi/linux/acct.h
|
||||
@@ -21,7 +21,9 @@
|
||||
#include <asm/param.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
-/*
|
||||
+#define FOO
|
||||
+
|
||||
+/*
|
||||
* comp_t is a 16-bit "floating" point number with a 3-bit base 8
|
||||
* exponent and a 13-bit fraction.
|
||||
* comp2_t is 24-bit with 5-bit base 2 exponent and 20 bit fraction
|
||||
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
|
||||
EOF
|
||||
|
||||
Now, let's use the script to validate::
|
||||
|
||||
% ./scripts/check-uapi.sh
|
||||
Installing user-facing UAPI headers from dirty tree... OK
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Checking changes to UAPI headers between HEAD and dirty tree...
|
||||
All 912 UAPI headers compatible with x86 appear to be backwards compatible
|
||||
|
||||
Let's add another change that *might* break userspace::
|
||||
|
||||
cat << 'EOF' | patch -l -p1
|
||||
--- a/include/uapi/linux/bpf.h
|
||||
+++ b/include/uapi/linux/bpf.h
|
||||
@@ -74,7 +74,7 @@ struct bpf_insn {
|
||||
__u8 dst_reg:4; /* dest register */
|
||||
__u8 src_reg:4; /* source register */
|
||||
__s16 off; /* signed offset */
|
||||
- __s32 imm; /* signed immediate constant */
|
||||
+ __u32 imm; /* unsigned immediate constant */
|
||||
};
|
||||
|
||||
/* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */
|
||||
EOF
|
||||
|
||||
The script will catch this::
|
||||
|
||||
% ./scripts/check-uapi.sh
|
||||
Installing user-facing UAPI headers from dirty tree... OK
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Checking changes to UAPI headers between HEAD and dirty tree...
|
||||
==== ABI differences detected in include/linux/bpf.h from HEAD -> dirty tree ====
|
||||
[C] 'struct bpf_insn' changed:
|
||||
type size hasn't changed
|
||||
1 data member change:
|
||||
type of '__s32 imm' changed:
|
||||
typedef name changed from __s32 to __u32 at int-ll64.h:27:1
|
||||
underlying type 'int' changed:
|
||||
type name changed from 'int' to 'unsigned int'
|
||||
type size hasn't changed
|
||||
==================================================================================
|
||||
|
||||
error - 1/912 UAPI headers compatible with x86 appear _not_ to be backwards compatible
|
||||
|
||||
In this case, the script is reporting the type change because it could
|
||||
break a userspace program that passes in a negative number. Now, let's
|
||||
say you know that no userspace program could possibly be using a negative
|
||||
value in ``imm``, so changing to an unsigned type there shouldn't hurt
|
||||
anything. You can pass the ``-i`` flag to the script to ignore changes
|
||||
in which the userspace backwards compatibility is ambiguous::
|
||||
|
||||
% ./scripts/check-uapi.sh -i
|
||||
Installing user-facing UAPI headers from dirty tree... OK
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Checking changes to UAPI headers between HEAD and dirty tree...
|
||||
All 912 UAPI headers compatible with x86 appear to be backwards compatible
|
||||
|
||||
Now, let's make a similar change that *will* break userspace::
|
||||
|
||||
cat << 'EOF' | patch -l -p1
|
||||
--- a/include/uapi/linux/bpf.h
|
||||
+++ b/include/uapi/linux/bpf.h
|
||||
@@ -71,8 +71,8 @@ enum {
|
||||
|
||||
struct bpf_insn {
|
||||
__u8 code; /* opcode */
|
||||
- __u8 dst_reg:4; /* dest register */
|
||||
__u8 src_reg:4; /* source register */
|
||||
+ __u8 dst_reg:4; /* dest register */
|
||||
__s16 off; /* signed offset */
|
||||
__s32 imm; /* signed immediate constant */
|
||||
};
|
||||
EOF
|
||||
|
||||
Since we're re-ordering an existing struct member, there's no ambiguity,
|
||||
and the script will report the breakage even if you pass ``-i``::
|
||||
|
||||
% ./scripts/check-uapi.sh -i
|
||||
Installing user-facing UAPI headers from dirty tree... OK
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Checking changes to UAPI headers between HEAD and dirty tree...
|
||||
==== ABI differences detected in include/linux/bpf.h from HEAD -> dirty tree ====
|
||||
[C] 'struct bpf_insn' changed:
|
||||
type size hasn't changed
|
||||
2 data member changes:
|
||||
'__u8 dst_reg' offset changed from 8 to 12 (in bits) (by +4 bits)
|
||||
'__u8 src_reg' offset changed from 12 to 8 (in bits) (by -4 bits)
|
||||
==================================================================================
|
||||
|
||||
error - 1/912 UAPI headers compatible with x86 appear _not_ to be backwards compatible
|
||||
|
||||
Let's commit the breaking change, then commit the innocuous change::
|
||||
|
||||
% git commit -m 'Breaking UAPI change' include/uapi/linux/bpf.h
|
||||
[detached HEAD f758e574663a] Breaking UAPI change
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
% git commit -m 'Innocuous UAPI change' include/uapi/linux/acct.h
|
||||
[detached HEAD 2e87df769081] Innocuous UAPI change
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
Now, let's run the script again with no arguments::
|
||||
|
||||
% ./scripts/check-uapi.sh
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Installing user-facing UAPI headers from HEAD^1... OK
|
||||
Checking changes to UAPI headers between HEAD^1 and HEAD...
|
||||
All 912 UAPI headers compatible with x86 appear to be backwards compatible
|
||||
|
||||
It doesn't catch any breaking change because, by default, it only
|
||||
compares ``HEAD`` to ``HEAD^1``. The breaking change was committed on
|
||||
``HEAD~2``. If we wanted the search scope to go back further, we'd have to
|
||||
use the ``-p`` option to pass a different past reference. In this case,
|
||||
let's pass ``-p HEAD~2`` to the script so it checks UAPI changes between
|
||||
``HEAD~2`` and ``HEAD``::
|
||||
|
||||
% ./scripts/check-uapi.sh -p HEAD~2
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Installing user-facing UAPI headers from HEAD~2... OK
|
||||
Checking changes to UAPI headers between HEAD~2 and HEAD...
|
||||
==== ABI differences detected in include/linux/bpf.h from HEAD~2 -> HEAD ====
|
||||
[C] 'struct bpf_insn' changed:
|
||||
type size hasn't changed
|
||||
2 data member changes:
|
||||
'__u8 dst_reg' offset changed from 8 to 12 (in bits) (by +4 bits)
|
||||
'__u8 src_reg' offset changed from 12 to 8 (in bits) (by -4 bits)
|
||||
==============================================================================
|
||||
|
||||
error - 1/912 UAPI headers compatible with x86 appear _not_ to be backwards compatible
|
||||
|
||||
Alternatively, we could have also run with ``-b HEAD~``. This would set the
|
||||
base reference to ``HEAD~`` so then the script would compare it to ``HEAD~^1``.
|
||||
|
||||
Architecture-specific Headers
|
||||
-----------------------------
|
||||
|
||||
Consider this change::
|
||||
|
||||
cat << 'EOF' | patch -l -p1
|
||||
--- a/arch/arm64/include/uapi/asm/sigcontext.h
|
||||
+++ b/arch/arm64/include/uapi/asm/sigcontext.h
|
||||
@@ -70,6 +70,7 @@ struct sigcontext {
|
||||
struct _aarch64_ctx {
|
||||
__u32 magic;
|
||||
__u32 size;
|
||||
+ __u32 new_var;
|
||||
};
|
||||
|
||||
#define FPSIMD_MAGIC 0x46508001
|
||||
EOF
|
||||
|
||||
This is a change to an arm64-specific UAPI header file. In this example, I'm
|
||||
running the script from an x86 machine with an x86 compiler, so, by default,
|
||||
the script only checks x86-compatible UAPI header files::
|
||||
|
||||
% ./scripts/check-uapi.sh
|
||||
Installing user-facing UAPI headers from dirty tree... OK
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
No changes to UAPI headers were applied between HEAD and dirty tree
|
||||
|
||||
With an x86 compiler, we can't check header files in ``arch/arm64``, so the
|
||||
script doesn't even try.
|
||||
|
||||
If we want to check the header file, we'll have to use an arm64 compiler and
|
||||
set ``ARCH`` accordingly::
|
||||
|
||||
% CC=aarch64-linux-gnu-gcc ARCH=arm64 ./scripts/check-uapi.sh
|
||||
Installing user-facing UAPI headers from dirty tree... OK
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Checking changes to UAPI headers between HEAD and dirty tree...
|
||||
==== ABI differences detected in include/asm/sigcontext.h from HEAD -> dirty tree ====
|
||||
[C] 'struct _aarch64_ctx' changed:
|
||||
type size changed from 64 to 96 (in bits)
|
||||
1 data member insertion:
|
||||
'__u32 new_var', at offset 64 (in bits) at sigcontext.h:73:1
|
||||
-- snip --
|
||||
[C] 'struct zt_context' changed:
|
||||
type size changed from 128 to 160 (in bits)
|
||||
2 data member changes (1 filtered):
|
||||
'__u16 nregs' offset changed from 64 to 96 (in bits) (by +32 bits)
|
||||
'__u16 __reserved[3]' offset changed from 80 to 112 (in bits) (by +32 bits)
|
||||
=======================================================================================
|
||||
|
||||
error - 1/884 UAPI headers compatible with arm64 appear _not_ to be backwards compatible
|
||||
|
||||
We can see with ``ARCH`` and ``CC`` set properly for the file, the ABI
|
||||
change is reported properly. Also notice that the total number of UAPI
|
||||
header files checked by the script changes. This is because the number
|
||||
of headers installed for arm64 platforms is different than x86.
|
||||
|
||||
Cross-Dependency Breakages
|
||||
--------------------------
|
||||
|
||||
Consider this change::
|
||||
|
||||
cat << 'EOF' | patch -l -p1
|
||||
--- a/include/uapi/linux/types.h
|
||||
+++ b/include/uapi/linux/types.h
|
||||
@@ -52,7 +52,7 @@ typedef __u32 __bitwise __wsum;
|
||||
#define __aligned_be64 __be64 __attribute__((aligned(8)))
|
||||
#define __aligned_le64 __le64 __attribute__((aligned(8)))
|
||||
|
||||
-typedef unsigned __bitwise __poll_t;
|
||||
+typedef unsigned short __bitwise __poll_t;
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* _UAPI_LINUX_TYPES_H */
|
||||
EOF
|
||||
|
||||
Here, we're changing a ``typedef`` in ``types.h``. This doesn't break
|
||||
a UAPI in ``types.h``, but other UAPIs in the tree may break due to
|
||||
this change::
|
||||
|
||||
% ./scripts/check-uapi.sh
|
||||
Installing user-facing UAPI headers from dirty tree... OK
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Checking changes to UAPI headers between HEAD and dirty tree...
|
||||
==== ABI differences detected in include/linux/eventpoll.h from HEAD -> dirty tree ====
|
||||
[C] 'struct epoll_event' changed:
|
||||
type size changed from 96 to 80 (in bits)
|
||||
2 data member changes:
|
||||
type of '__poll_t events' changed:
|
||||
underlying type 'unsigned int' changed:
|
||||
type name changed from 'unsigned int' to 'unsigned short int'
|
||||
type size changed from 32 to 16 (in bits)
|
||||
'__u64 data' offset changed from 32 to 16 (in bits) (by -16 bits)
|
||||
========================================================================================
|
||||
include/linux/eventpoll.h did not change between HEAD and dirty tree...
|
||||
It's possible a change to one of the headers it includes caused this error:
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
Note that the script noticed the failing header file did not change,
|
||||
so it assumes one of its includes must have caused the breakage. Indeed,
|
||||
we can see ``linux/types.h`` is used from ``eventpoll.h``.
|
||||
|
||||
UAPI Header Removals
|
||||
--------------------
|
||||
|
||||
Consider this change::
|
||||
|
||||
cat << 'EOF' | patch -l -p1
|
||||
diff --git a/include/uapi/asm-generic/Kbuild b/include/uapi/asm-generic/Kbuild
|
||||
index ebb180aac74e..a9c88b0a8b3b 100644
|
||||
--- a/include/uapi/asm-generic/Kbuild
|
||||
+++ b/include/uapi/asm-generic/Kbuild
|
||||
@@ -31,6 +31,6 @@ mandatory-y += stat.h
|
||||
mandatory-y += statfs.h
|
||||
mandatory-y += swab.h
|
||||
mandatory-y += termbits.h
|
||||
-mandatory-y += termios.h
|
||||
+#mandatory-y += termios.h
|
||||
mandatory-y += types.h
|
||||
mandatory-y += unistd.h
|
||||
EOF
|
||||
|
||||
This script removes a UAPI header file from the install list. Let's run
|
||||
the script::
|
||||
|
||||
% ./scripts/check-uapi.sh
|
||||
Installing user-facing UAPI headers from dirty tree... OK
|
||||
Installing user-facing UAPI headers from HEAD... OK
|
||||
Checking changes to UAPI headers between HEAD and dirty tree...
|
||||
==== UAPI header include/asm/termios.h was removed between HEAD and dirty tree ====
|
||||
|
||||
error - 1/912 UAPI headers compatible with x86 appear _not_ to be backwards compatible
|
||||
|
||||
Removing a UAPI header is considered a breaking change, and the script
|
||||
will flag it as such.
|
||||
|
||||
Checking Historic UAPI Compatibility
|
||||
------------------------------------
|
||||
|
||||
You can use the ``-b`` and ``-p`` options to examine different chunks of your
|
||||
git tree. For example, to check all changed UAPI header files between tags
|
||||
v6.0 and v6.1, you'd run::
|
||||
|
||||
% ./scripts/check-uapi.sh -b v6.1 -p v6.0
|
||||
Installing user-facing UAPI headers from v6.1... OK
|
||||
Installing user-facing UAPI headers from v6.0... OK
|
||||
Checking changes to UAPI headers between v6.0 and v6.1...
|
||||
|
||||
--- snip ---
|
||||
error - 37/907 UAPI headers compatible with x86 appear _not_ to be backwards compatible
|
||||
|
||||
Note: Before v5.3, a header file needed by the script is not present,
|
||||
so the script is unable to check changes before then.
|
||||
|
||||
You'll notice that the script detected many UAPI changes that are not
|
||||
backwards compatible. Knowing that kernel UAPIs are supposed to be stable
|
||||
forever, this is an alarming result. This brings us to the next section:
|
||||
caveats.
|
||||
|
||||
Caveats
|
||||
=======
|
||||
|
||||
The UAPI checker makes no assumptions about the author's intention, so some
|
||||
types of changes may be flagged even though they intentionally break UAPI.
|
||||
|
||||
Removals For Refactoring or Deprecation
|
||||
---------------------------------------
|
||||
|
||||
Sometimes drivers for very old hardware are removed, such as in this example::
|
||||
|
||||
% ./scripts/check-uapi.sh -b ba47652ba655
|
||||
Installing user-facing UAPI headers from ba47652ba655... OK
|
||||
Installing user-facing UAPI headers from ba47652ba655^1... OK
|
||||
Checking changes to UAPI headers between ba47652ba655^1 and ba47652ba655...
|
||||
==== UAPI header include/linux/meye.h was removed between ba47652ba655^1 and ba47652ba655 ====
|
||||
|
||||
error - 1/910 UAPI headers compatible with x86 appear _not_ to be backwards compatible
|
||||
|
||||
The script will always flag removals (even if they're intentional).
|
||||
|
||||
Struct Expansions
|
||||
-----------------
|
||||
|
||||
Depending on how a structure is handled in kernelspace, a change which
|
||||
expands a struct could be non-breaking.
|
||||
|
||||
If a struct is used as the argument to an ioctl, then the kernel driver
|
||||
must be able to handle ioctl commands of any size. Beyond that, you need
|
||||
to be careful when copying data from the user. Say, for example, that
|
||||
``struct foo`` is changed like this::
|
||||
|
||||
struct foo {
|
||||
__u64 a; /* added in version 1 */
|
||||
+ __u32 b; /* added in version 2 */
|
||||
+ __u32 c; /* added in version 2 */
|
||||
}
|
||||
|
||||
By default, the script will flag this kind of change for further review::
|
||||
|
||||
[C] 'struct foo' changed:
|
||||
type size changed from 64 to 128 (in bits)
|
||||
2 data member insertions:
|
||||
'__u32 b', at offset 64 (in bits)
|
||||
'__u32 c', at offset 96 (in bits)
|
||||
|
||||
However, it is possible that this change was made safely.
|
||||
|
||||
If a userspace program was built with version 1, it will think
|
||||
``sizeof(struct foo)`` is 8. That size will be encoded in the
|
||||
ioctl value that gets sent to the kernel. If the kernel is built
|
||||
with version 2, it will think the ``sizeof(struct foo)`` is 16.
|
||||
|
||||
The kernel can use the ``_IOC_SIZE`` macro to get the size encoded
|
||||
in the ioctl code that the user passed in and then use
|
||||
``copy_struct_from_user()`` to safely copy the value::
|
||||
|
||||
int handle_ioctl(unsigned long cmd, unsigned long arg)
|
||||
{
|
||||
switch _IOC_NR(cmd) {
|
||||
0x01: {
|
||||
struct foo my_cmd; /* size 16 in the kernel */
|
||||
|
||||
ret = copy_struct_from_user(&my_cmd, arg, sizeof(struct foo), _IOC_SIZE(cmd));
|
||||
...
|
||||
|
||||
``copy_struct_from_user`` will zero the struct in the kernel and then copy
|
||||
only the bytes passed in from the user (leaving new members zeroized).
|
||||
If the user passed in a larger struct, the extra members are ignored.
|
||||
|
||||
If you know this situation is accounted for in the kernel code, you can
|
||||
pass ``-i`` to the script, and struct expansions like this will be ignored.
|
||||
|
||||
Flex Array Migration
|
||||
--------------------
|
||||
|
||||
While the script handles expansion into an existing flex array, it does
|
||||
still flag initial migration to flex arrays from 1-element fake flex
|
||||
arrays. For example::
|
||||
|
||||
struct foo {
|
||||
__u32 x;
|
||||
- __u32 flex[1]; /* fake flex */
|
||||
+ __u32 flex[]; /* real flex */
|
||||
};
|
||||
|
||||
This change would be flagged by the script::
|
||||
|
||||
[C] 'struct foo' changed:
|
||||
type size changed from 64 to 32 (in bits)
|
||||
1 data member change:
|
||||
type of '__u32 flex[1]' changed:
|
||||
type name changed from '__u32[1]' to '__u32[]'
|
||||
array type size changed from 32 to 'unknown'
|
||||
array type subrange 1 changed length from 1 to 'unknown'
|
||||
|
||||
At this time, there's no way to filter these types of changes, so be
|
||||
aware of this possible false positive.
|
||||
|
||||
Summary
|
||||
-------
|
||||
|
||||
While many types of false positives are filtered out by the script,
|
||||
it's possible there are some cases where the script flags a change
|
||||
which does not break UAPI. It's also possible a change which *does*
|
||||
break userspace would not be flagged by this script. While the script
|
||||
has been run on much of the kernel history, there could still be corner
|
||||
cases that are not accounted for.
|
||||
|
||||
The intention is for this script to be used as a quick check for
|
||||
maintainers or automated tooling, not as the end-all authority on
|
||||
patch compatibility. It's best to remember: use your best judgment
|
||||
(and ideally a unit test in userspace) to make sure your UAPI changes
|
||||
are backwards-compatible!
|
||||
@@ -31,6 +31,7 @@ Documentation/dev-tools/testing-overview.rst
|
||||
kselftest
|
||||
kunit/index
|
||||
ktap
|
||||
checkuapi
|
||||
|
||||
|
||||
.. only:: subproject and html
|
||||
|
||||
@@ -19,19 +19,4 @@ properties:
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
examples:
|
||||
- |
|
||||
dma: dma-controller@48000000 {
|
||||
compatible = "ti,omap-sdma";
|
||||
reg = <0x48000000 0x1000>;
|
||||
interrupts = <0 12 0x4>,
|
||||
<0 13 0x4>,
|
||||
<0 14 0x4>,
|
||||
<0 15 0x4>;
|
||||
#dma-cells = <1>;
|
||||
dma-channels = <32>;
|
||||
dma-requests = <127>;
|
||||
dma-channel-mask = <0xfffe>;
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
@@ -40,15 +40,4 @@ required:
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
examples:
|
||||
- |
|
||||
sdma_xbar: dma-router@4a002b78 {
|
||||
compatible = "ti,dra7-dma-crossbar";
|
||||
reg = <0x4a002b78 0xfc>;
|
||||
#dma-cells = <1>;
|
||||
dma-requests = <205>;
|
||||
ti,dma-safe-map = <0>;
|
||||
dma-masters = <&sdma>;
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/dma/loongson,ls2x-apbdma.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Loongson LS2X APB DMA controller
|
||||
|
||||
description:
|
||||
The Loongson LS2X APB DMA controller is used for transferring data
|
||||
between system memory and the peripherals on the APB bus.
|
||||
|
||||
maintainers:
|
||||
- Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
|
||||
allOf:
|
||||
- $ref: dma-controller.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
oneOf:
|
||||
- const: loongson,ls2k1000-apbdma
|
||||
- items:
|
||||
- const: loongson,ls2k0500-apbdma
|
||||
- const: loongson,ls2k1000-apbdma
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
'#dma-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
- '#dma-cells'
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/clock/loongson,ls2k-clk.h>
|
||||
|
||||
dma-controller@1fe00c00 {
|
||||
compatible = "loongson,ls2k1000-apbdma";
|
||||
reg = <0x1fe00c00 0x8>;
|
||||
interrupt-parent = <&liointc1>;
|
||||
interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk LOONGSON2_APB_CLK>;
|
||||
#dma-cells = <1>;
|
||||
};
|
||||
|
||||
...
|
||||
@@ -53,6 +53,9 @@ properties:
|
||||
ADMA_CHn_CTRL register.
|
||||
const: 1
|
||||
|
||||
dma-channel-mask:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -32,6 +32,8 @@ properties:
|
||||
- qcom,sm8350-gpi-dma
|
||||
- qcom,sm8450-gpi-dma
|
||||
- qcom,sm8550-gpi-dma
|
||||
- qcom,sm8650-gpi-dma
|
||||
- qcom,x1e80100-gpi-dma
|
||||
- const: qcom,sm6350-gpi-dma
|
||||
- items:
|
||||
- enum:
|
||||
|
||||
@@ -16,7 +16,7 @@ properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- renesas,r9a07g043-dmac # RZ/G2UL
|
||||
- renesas,r9a07g043-dmac # RZ/G2UL and RZ/Five
|
||||
- renesas,r9a07g044-dmac # RZ/G2{L,LC}
|
||||
- renesas,r9a07g054-dmac # RZ/V2L
|
||||
- const: renesas,rz-dmac
|
||||
|
||||
@@ -29,6 +29,7 @@ properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- microchip,mpfs-pdma
|
||||
- sifive,fu540-c000-pdma
|
||||
- const: sifive,pdma0
|
||||
description:
|
||||
|
||||
@@ -37,11 +37,11 @@ properties:
|
||||
|
||||
reg:
|
||||
minItems: 3
|
||||
maxItems: 5
|
||||
maxItems: 9
|
||||
|
||||
reg-names:
|
||||
minItems: 3
|
||||
maxItems: 5
|
||||
maxItems: 9
|
||||
|
||||
"#dma-cells":
|
||||
const: 3
|
||||
@@ -141,7 +141,10 @@ allOf:
|
||||
ti,sci-rm-range-tchan: false
|
||||
|
||||
reg:
|
||||
maxItems: 3
|
||||
items:
|
||||
- description: BCDMA Control /Status Registers region
|
||||
- description: RX Channel Realtime Registers region
|
||||
- description: Ring Realtime Registers region
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
@@ -161,14 +164,29 @@ allOf:
|
||||
properties:
|
||||
reg:
|
||||
minItems: 5
|
||||
items:
|
||||
- description: BCDMA Control /Status Registers region
|
||||
- description: Block Copy Channel Realtime Registers region
|
||||
- description: RX Channel Realtime Registers region
|
||||
- description: TX Channel Realtime Registers region
|
||||
- description: Ring Realtime Registers region
|
||||
- description: Ring Configuration Registers region
|
||||
- description: TX Channel Configuration Registers region
|
||||
- description: RX Channel Configuration Registers region
|
||||
- description: Block Copy Channel Configuration Registers region
|
||||
|
||||
reg-names:
|
||||
minItems: 5
|
||||
items:
|
||||
- const: gcfg
|
||||
- const: bchanrt
|
||||
- const: rchanrt
|
||||
- const: tchanrt
|
||||
- const: ringrt
|
||||
- const: ring
|
||||
- const: tchan
|
||||
- const: rchan
|
||||
- const: bchan
|
||||
|
||||
required:
|
||||
- ti,sci-rm-range-bchan
|
||||
@@ -184,7 +202,11 @@ allOf:
|
||||
ti,sci-rm-range-bchan: false
|
||||
|
||||
reg:
|
||||
maxItems: 4
|
||||
items:
|
||||
- description: BCDMA Control /Status Registers region
|
||||
- description: RX Channel Realtime Registers region
|
||||
- description: TX Channel Realtime Registers region
|
||||
- description: Ring Realtime Registers region
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
@@ -220,8 +242,13 @@ examples:
|
||||
<0x0 0x4c000000 0x0 0x20000>,
|
||||
<0x0 0x4a820000 0x0 0x20000>,
|
||||
<0x0 0x4aa40000 0x0 0x20000>,
|
||||
<0x0 0x4bc00000 0x0 0x100000>;
|
||||
reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt";
|
||||
<0x0 0x4bc00000 0x0 0x100000>,
|
||||
<0x0 0x48600000 0x0 0x8000>,
|
||||
<0x0 0x484a4000 0x0 0x2000>,
|
||||
<0x0 0x484c2000 0x0 0x2000>,
|
||||
<0x0 0x48420000 0x0 0x2000>;
|
||||
reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt",
|
||||
"ring", "tchan", "rchan", "bchan";
|
||||
msi-parent = <&inta_main_dmss>;
|
||||
#dma-cells = <3>;
|
||||
|
||||
|
||||
@@ -45,14 +45,28 @@ properties:
|
||||
The second cell is the ASEL value for the channel
|
||||
|
||||
reg:
|
||||
maxItems: 4
|
||||
minItems: 4
|
||||
items:
|
||||
- description: Packet DMA Control /Status Registers region
|
||||
- description: RX Channel Realtime Registers region
|
||||
- description: TX Channel Realtime Registers region
|
||||
- description: Ring Realtime Registers region
|
||||
- description: Ring Configuration Registers region
|
||||
- description: TX Configuration Registers region
|
||||
- description: RX Configuration Registers region
|
||||
- description: RX Flow Configuration Registers region
|
||||
|
||||
reg-names:
|
||||
minItems: 4
|
||||
items:
|
||||
- const: gcfg
|
||||
- const: rchanrt
|
||||
- const: tchanrt
|
||||
- const: ringrt
|
||||
- const: ring
|
||||
- const: tchan
|
||||
- const: rchan
|
||||
- const: rflow
|
||||
|
||||
msi-parent: true
|
||||
|
||||
@@ -136,8 +150,14 @@ examples:
|
||||
reg = <0x0 0x485c0000 0x0 0x100>,
|
||||
<0x0 0x4a800000 0x0 0x20000>,
|
||||
<0x0 0x4aa00000 0x0 0x40000>,
|
||||
<0x0 0x4b800000 0x0 0x400000>;
|
||||
reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt";
|
||||
<0x0 0x4b800000 0x0 0x400000>,
|
||||
<0x0 0x485e0000 0x0 0x20000>,
|
||||
<0x0 0x484a0000 0x0 0x4000>,
|
||||
<0x0 0x484c0000 0x0 0x2000>,
|
||||
<0x0 0x48430000 0x0 0x4000>;
|
||||
reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
|
||||
"ring", "tchan", "rchan", "rflow";
|
||||
|
||||
msi-parent = <&inta_main_dmss>;
|
||||
#dma-cells = <2>;
|
||||
|
||||
|
||||
@@ -69,13 +69,24 @@ properties:
|
||||
- ti,j721e-navss-mcu-udmap
|
||||
|
||||
reg:
|
||||
maxItems: 3
|
||||
minItems: 3
|
||||
items:
|
||||
- description: UDMA-P Control /Status Registers region
|
||||
- description: RX Channel Realtime Registers region
|
||||
- description: TX Channel Realtime Registers region
|
||||
- description: TX Configuration Registers region
|
||||
- description: RX Configuration Registers region
|
||||
- description: RX Flow Configuration Registers region
|
||||
|
||||
reg-names:
|
||||
minItems: 3
|
||||
items:
|
||||
- const: gcfg
|
||||
- const: rchanrt
|
||||
- const: tchanrt
|
||||
- const: tchan
|
||||
- const: rchan
|
||||
- const: rflow
|
||||
|
||||
msi-parent: true
|
||||
|
||||
@@ -158,8 +169,11 @@ examples:
|
||||
compatible = "ti,am654-navss-main-udmap";
|
||||
reg = <0x0 0x31150000 0x0 0x100>,
|
||||
<0x0 0x34000000 0x0 0x100000>,
|
||||
<0x0 0x35000000 0x0 0x100000>;
|
||||
reg-names = "gcfg", "rchanrt", "tchanrt";
|
||||
<0x0 0x35000000 0x0 0x100000>,
|
||||
<0x0 0x30b00000 0x0 0x20000>,
|
||||
<0x0 0x30c00000 0x0 0x8000>,
|
||||
<0x0 0x30d00000 0x0 0x4000>;
|
||||
reg-names = "gcfg", "rchanrt", "tchanrt", "tchan", "rchan", "rflow";
|
||||
#dma-cells = <1>;
|
||||
|
||||
ti,ringacc = <&ringacc>;
|
||||
|
||||
@@ -123,6 +123,7 @@ properties:
|
||||
- enum:
|
||||
- onnn,cat24c04
|
||||
- onnn,cat24c05
|
||||
- rohm,br24g04
|
||||
- const: atmel,24c04
|
||||
- items:
|
||||
- const: renesas,r1ex24016
|
||||
|
||||
@@ -126,7 +126,7 @@ examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
gpio@e000a000 {
|
||||
gpio@a0020000 {
|
||||
compatible = "xlnx,xps-gpio-1.00.a";
|
||||
reg = <0xa0020000 0x10000>;
|
||||
#gpio-cells = <2>;
|
||||
|
||||
@@ -19,6 +19,7 @@ allOf:
|
||||
- st,stm32f7-i2c
|
||||
- st,stm32mp13-i2c
|
||||
- st,stm32mp15-i2c
|
||||
- st,stm32mp25-i2c
|
||||
then:
|
||||
properties:
|
||||
i2c-scl-rising-time-ns:
|
||||
@@ -41,6 +42,30 @@ allOf:
|
||||
clock-frequency:
|
||||
enum: [100000, 400000]
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- st,stm32f4-i2c
|
||||
- st,stm32f7-i2c
|
||||
- st,stm32mp13-i2c
|
||||
- st,stm32mp15-i2c
|
||||
then:
|
||||
properties:
|
||||
interrupts:
|
||||
minItems: 2
|
||||
|
||||
interrupt-names:
|
||||
minItems: 2
|
||||
else:
|
||||
properties:
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
interrupt-names:
|
||||
maxItems: 1
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
@@ -48,6 +73,7 @@ properties:
|
||||
- st,stm32f7-i2c
|
||||
- st,stm32mp13-i2c
|
||||
- st,stm32mp15-i2c
|
||||
- st,stm32mp25-i2c
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@@ -56,11 +82,13 @@ properties:
|
||||
items:
|
||||
- description: interrupt ID for I2C event
|
||||
- description: interrupt ID for I2C error
|
||||
minItems: 1
|
||||
|
||||
interrupt-names:
|
||||
items:
|
||||
- const: event
|
||||
- const: error
|
||||
minItems: 1
|
||||
|
||||
resets:
|
||||
maxItems: 1
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/adafruit,seesaw-gamepad.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Adafruit Mini I2C Gamepad with seesaw
|
||||
|
||||
maintainers:
|
||||
- Anshul Dalal <anshulusr@gmail.com>
|
||||
|
||||
description: |
|
||||
Adafruit Mini I2C Gamepad
|
||||
|
||||
+-----------------------------+
|
||||
| ___ |
|
||||
| / \ (X) |
|
||||
| | S | __ __ (Y) (A) |
|
||||
| \___/ |ST| |SE| (B) |
|
||||
| |
|
||||
+-----------------------------+
|
||||
|
||||
S -> 10-bit precision bidirectional analog joystick
|
||||
ST -> Start
|
||||
SE -> Select
|
||||
X, A, B, Y -> Digital action buttons
|
||||
|
||||
Datasheet: https://cdn-learn.adafruit.com/downloads/pdf/gamepad-qt.pdf
|
||||
Product page: https://www.adafruit.com/product/5743
|
||||
Arduino Driver: https://github.com/adafruit/Adafruit_Seesaw
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: adafruit,seesaw-gamepad
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
description:
|
||||
The gamepad's IRQ pin triggers a rising edge if interrupts are enabled.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
joystick@50 {
|
||||
compatible = "adafruit,seesaw-gamepad";
|
||||
interrupts = <18 IRQ_TYPE_EDGE_RISING>;
|
||||
reg = <0x50>;
|
||||
};
|
||||
};
|
||||
@@ -31,7 +31,23 @@ patternProperties:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
oneOf:
|
||||
- items:
|
||||
- description: Optional key interrupt or wakeup interrupt
|
||||
- items:
|
||||
- description: Key interrupt
|
||||
- description: Wakeup interrupt
|
||||
|
||||
interrupt-names:
|
||||
description:
|
||||
Optional interrupt names, can be used to specify a separate dedicated
|
||||
wake-up interrupt in addition to the gpio irq
|
||||
oneOf:
|
||||
- items:
|
||||
- enum: [ irq, wakeup ]
|
||||
- items:
|
||||
- const: irq
|
||||
- const: wakeup
|
||||
|
||||
label:
|
||||
description: Descriptive name of the key.
|
||||
@@ -97,6 +113,20 @@ patternProperties:
|
||||
- required:
|
||||
- gpios
|
||||
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
interrupts:
|
||||
minItems: 2
|
||||
required:
|
||||
- interrupts
|
||||
then:
|
||||
properties:
|
||||
interrupt-names:
|
||||
minItems: 2
|
||||
required:
|
||||
- interrupt-names
|
||||
|
||||
dependencies:
|
||||
wakeup-event-action: [ wakeup-source ]
|
||||
linux,input-value: [ gpios ]
|
||||
@@ -137,6 +167,15 @@ examples:
|
||||
linux,code = <108>;
|
||||
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
|
||||
};
|
||||
|
||||
key-wakeup {
|
||||
label = "GPIO Key WAKEUP";
|
||||
linux,code = <143>;
|
||||
interrupts-extended = <&intc 2 IRQ_TYPE_EDGE_FALLING>,
|
||||
<&intc_wakeup 0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "irq", "wakeup";
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
...
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
Device-Tree bindings for GPIO attached mice
|
||||
|
||||
This simply uses standard GPIO handles to define a simple mouse connected
|
||||
to 5-7 GPIO lines.
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "gpio-mouse"
|
||||
- scan-interval-ms: The scanning interval in milliseconds
|
||||
- up-gpios: GPIO line phandle to the line indicating "up"
|
||||
- down-gpios: GPIO line phandle to the line indicating "down"
|
||||
- left-gpios: GPIO line phandle to the line indicating "left"
|
||||
- right-gpios: GPIO line phandle to the line indicating "right"
|
||||
|
||||
Optional properties:
|
||||
- button-left-gpios: GPIO line handle to the left mouse button
|
||||
- button-middle-gpios: GPIO line handle to the middle mouse button
|
||||
- button-right-gpios: GPIO line handle to the right mouse button
|
||||
Example:
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
gpio-mouse {
|
||||
compatible = "gpio-mouse";
|
||||
scan-interval-ms = <50>;
|
||||
up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
|
||||
down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
|
||||
right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
|
||||
button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
|
||||
button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/gpio-mouse.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: GPIO attached mouse
|
||||
|
||||
description: |
|
||||
This simply uses standard GPIO handles to define a simple mouse connected
|
||||
to 5-7 GPIO lines.
|
||||
|
||||
maintainers:
|
||||
- Anshul Dalal <anshulusr@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: gpio-mouse
|
||||
|
||||
scan-interval-ms:
|
||||
maxItems: 1
|
||||
|
||||
up-gpios:
|
||||
maxItems: 1
|
||||
|
||||
down-gpios:
|
||||
maxItems: 1
|
||||
|
||||
left-gpios:
|
||||
maxItems: 1
|
||||
|
||||
right-gpios:
|
||||
maxItems: 1
|
||||
|
||||
button-left-gpios:
|
||||
maxItems: 1
|
||||
|
||||
button-middle-gpios:
|
||||
maxItems: 1
|
||||
|
||||
button-right-gpios:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- scan-interval-ms
|
||||
- up-gpios
|
||||
- down-gpios
|
||||
- left-gpios
|
||||
- right-gpios
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
gpio-mouse {
|
||||
compatible = "gpio-mouse";
|
||||
scan-interval-ms = <50>;
|
||||
up-gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
|
||||
down-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
left-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
|
||||
right-gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
|
||||
button-left-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
|
||||
button-middle-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
button-right-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
@@ -9,6 +9,9 @@ title: Azoteq IQS269A Capacitive Touch Controller
|
||||
maintainers:
|
||||
- Jeff LaBundy <jeff@labundy.com>
|
||||
|
||||
allOf:
|
||||
- $ref: input.yaml#
|
||||
|
||||
description: |
|
||||
The Azoteq IQS269A is an 8-channel capacitive touch controller that features
|
||||
additional Hall-effect and inductive sensing capabilities.
|
||||
@@ -17,7 +20,10 @@ description: |
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: azoteq,iqs269a
|
||||
enum:
|
||||
- azoteq,iqs269a
|
||||
- azoteq,iqs269a-00
|
||||
- azoteq,iqs269a-d0
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@@ -204,6 +210,73 @@ properties:
|
||||
default: 1
|
||||
description: Specifies the slider coordinate filter strength.
|
||||
|
||||
azoteq,touch-hold-ms:
|
||||
multipleOf: 256
|
||||
minimum: 256
|
||||
maximum: 65280
|
||||
default: 5120
|
||||
description:
|
||||
Specifies the length of time (in ms) for which the channel selected by
|
||||
'azoteq,gpio3-select' must be held in a state of touch in order for an
|
||||
approximately 60-ms pulse to be asserted on the GPIO4 pin.
|
||||
|
||||
linux,keycodes:
|
||||
minItems: 1
|
||||
maxItems: 8
|
||||
description: |
|
||||
Specifies the numeric keycodes associated with each available gesture in
|
||||
the following order (enter 0 for unused gestures):
|
||||
0: Slider 0 tap
|
||||
1: Slider 0 hold
|
||||
2: Slider 0 positive flick or swipe
|
||||
3: Slider 0 negative flick or swipe
|
||||
4: Slider 1 tap
|
||||
5: Slider 1 hold
|
||||
6: Slider 1 positive flick or swipe
|
||||
7: Slider 1 negative flick or swipe
|
||||
|
||||
azoteq,gesture-swipe:
|
||||
type: boolean
|
||||
description:
|
||||
Directs the device to interpret axial gestures as a swipe (finger remains
|
||||
on slider) instead of a flick (finger leaves slider).
|
||||
|
||||
azoteq,timeout-tap-ms:
|
||||
multipleOf: 16
|
||||
minimum: 0
|
||||
maximum: 4080
|
||||
default: 400
|
||||
description:
|
||||
Specifies the length of time (in ms) within which a slider touch must be
|
||||
released in order to be interpreted as a tap. Default and maximum values
|
||||
as well as step size are reduced by a factor of 4 with device version 2.
|
||||
|
||||
azoteq,timeout-swipe-ms:
|
||||
multipleOf: 16
|
||||
minimum: 0
|
||||
maximum: 4080
|
||||
default: 2000
|
||||
description:
|
||||
Specifies the length of time (in ms) within which an axial gesture must be
|
||||
completed in order to be interpreted as a flick or swipe. Default and max-
|
||||
imum values as well as step size are reduced by a factor of 4 with device
|
||||
version 2.
|
||||
|
||||
azoteq,thresh-swipe:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
minimum: 0
|
||||
maximum: 255
|
||||
default: 128
|
||||
description:
|
||||
Specifies the number of points across which an axial gesture must travel
|
||||
in order to be interpreted as a flick or swipe.
|
||||
|
||||
dependencies:
|
||||
azoteq,gesture-swipe: ["linux,keycodes"]
|
||||
azoteq,timeout-tap-ms: ["linux,keycodes"]
|
||||
azoteq,timeout-swipe-ms: ["linux,keycodes"]
|
||||
azoteq,thresh-swipe: ["linux,keycodes"]
|
||||
|
||||
patternProperties:
|
||||
"^channel@[0-7]$":
|
||||
type: object
|
||||
@@ -454,6 +527,21 @@ patternProperties:
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- azoteq,iqs269a-d0
|
||||
then:
|
||||
patternProperties:
|
||||
"^channel@[0-7]$":
|
||||
properties:
|
||||
azoteq,slider1-select: false
|
||||
else:
|
||||
properties:
|
||||
azoteq,touch-hold-ms: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
@@ -484,6 +572,14 @@ examples:
|
||||
azoteq,hall-enable;
|
||||
azoteq,suspend-mode = <2>;
|
||||
|
||||
linux,keycodes = <KEY_PLAYPAUSE>,
|
||||
<KEY_STOPCD>,
|
||||
<KEY_NEXTSONG>,
|
||||
<KEY_PREVIOUSSONG>;
|
||||
|
||||
azoteq,timeout-tap-ms = <400>;
|
||||
azoteq,timeout-swipe-ms = <800>;
|
||||
|
||||
channel@0 {
|
||||
reg = <0x0>;
|
||||
|
||||
|
||||
@@ -90,26 +90,4 @@ required:
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
pmic {
|
||||
compatible = "mediatek,mt6397";
|
||||
|
||||
keys {
|
||||
compatible = "mediatek,mt6397-keys";
|
||||
mediatek,long-press-mode = <1>;
|
||||
power-off-time-sec = <0>;
|
||||
|
||||
key-power {
|
||||
linux,keycodes = <KEY_POWER>;
|
||||
wakeup-source;
|
||||
};
|
||||
|
||||
key-home {
|
||||
linux,keycodes = <KEY_VOLUMEDOWN>;
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
||||
|
||||
@@ -45,13 +45,13 @@ properties:
|
||||
Enables the Linux input system's autorepeat feature on the input device.
|
||||
|
||||
linux,keycodes:
|
||||
minItems: 6
|
||||
maxItems: 6
|
||||
minItems: 3
|
||||
maxItems: 8
|
||||
description: |
|
||||
Specifies an array of numeric keycode values to
|
||||
be used for the channels. If this property is
|
||||
omitted, KEY_A, KEY_B, etc are used as defaults.
|
||||
The array must have exactly six entries.
|
||||
The number of entries must correspond to the number of channels.
|
||||
|
||||
microchip,sensor-gain:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
@@ -70,6 +70,59 @@ properties:
|
||||
open drain. This property allows using the active
|
||||
high push-pull output.
|
||||
|
||||
microchip,sensitivity-delta-sense:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
default: 32
|
||||
enum: [1, 2, 4, 8, 16, 32, 64, 128]
|
||||
description:
|
||||
Controls the sensitivity multiplier of a touch detection.
|
||||
Higher value means more sensitive settings.
|
||||
At the more sensitive settings, touches are detected for a smaller delta
|
||||
capacitance corresponding to a "lighter" touch.
|
||||
|
||||
microchip,signal-guard:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 3
|
||||
maxItems: 8
|
||||
items:
|
||||
enum: [0, 1]
|
||||
description: |
|
||||
0 - off
|
||||
1 - on
|
||||
The signal guard isolates the signal from virtual grounds.
|
||||
If enabled then the behavior of the channel is changed to signal guard.
|
||||
The number of entries must correspond to the number of channels.
|
||||
|
||||
microchip,input-threshold:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 3
|
||||
maxItems: 8
|
||||
items:
|
||||
minimum: 0
|
||||
maximum: 127
|
||||
description:
|
||||
Specifies the delta threshold that is used to determine if a touch has
|
||||
been detected. A higher value means a larger difference in capacitance
|
||||
is required for a touch to be registered, making the touch sensor less
|
||||
sensitive.
|
||||
The number of entries must correspond to the number of channels.
|
||||
|
||||
microchip,calib-sensitivity:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||
minItems: 3
|
||||
maxItems: 8
|
||||
items:
|
||||
enum: [1, 2, 4]
|
||||
description: |
|
||||
Specifies an array of numeric values that controls the gain
|
||||
used by the calibration routine to enable sensor inputs
|
||||
to be more sensitive for proximity detection.
|
||||
Gain is based on touch pad capacitance range
|
||||
1 - 5-50pF
|
||||
2 - 0-25pF
|
||||
4 - 0-12.5pF
|
||||
The number of entries must correspond to the number of channels.
|
||||
|
||||
patternProperties:
|
||||
"^led@[0-7]$":
|
||||
type: object
|
||||
@@ -99,10 +152,29 @@ allOf:
|
||||
contains:
|
||||
enum:
|
||||
- microchip,cap1106
|
||||
- microchip,cap1203
|
||||
- microchip,cap1206
|
||||
- microchip,cap1293
|
||||
- microchip,cap1298
|
||||
then:
|
||||
patternProperties:
|
||||
"^led@[0-7]$": false
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- microchip,cap1106
|
||||
- microchip,cap1126
|
||||
- microchip,cap1188
|
||||
- microchip,cap1203
|
||||
- microchip,cap1206
|
||||
then:
|
||||
properties:
|
||||
microchip,signal-guard: false
|
||||
microchip,calib-sensitivity: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- interrupts
|
||||
@@ -122,6 +194,8 @@ examples:
|
||||
reg = <0x28>;
|
||||
autorepeat;
|
||||
microchip,sensor-gain = <2>;
|
||||
microchip,sensitivity-delta-sense = <16>;
|
||||
microchip,input-threshold = <21>, <18>, <46>, <46>, <46>, <21>;
|
||||
|
||||
linux,keycodes = <103>, /* KEY_UP */
|
||||
<106>, /* KEY_RIGHT */
|
||||
|
||||
@@ -28,21 +28,4 @@ required:
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
sc2731_pmic: pmic@0 {
|
||||
compatible = "sprd,sc2731";
|
||||
reg = <0 0>;
|
||||
spi-max-frequency = <26000000>;
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
vibrator@eb4 {
|
||||
compatible = "sprd,sc2731-vibrator";
|
||||
reg = <0xeb4>;
|
||||
};
|
||||
};
|
||||
...
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
* Texas Instruments - drv2665 Haptics driver
|
||||
|
||||
Required properties:
|
||||
- compatible - "ti,drv2665" - DRV2665
|
||||
- reg - I2C slave address
|
||||
- vbat-supply - Required supply regulator
|
||||
|
||||
Example:
|
||||
|
||||
haptics: haptics@59 {
|
||||
compatible = "ti,drv2665";
|
||||
reg = <0x59>;
|
||||
vbat-supply = <&vbat>;
|
||||
};
|
||||
|
||||
For more product information please see the link below:
|
||||
http://www.ti.com/product/drv2665
|
||||
@@ -1,17 +0,0 @@
|
||||
* Texas Instruments - drv2667 Haptics driver
|
||||
|
||||
Required properties:
|
||||
- compatible - "ti,drv2667" - DRV2667
|
||||
- reg - I2C slave address
|
||||
- vbat-supply - Required supply regulator
|
||||
|
||||
Example:
|
||||
|
||||
haptics: haptics@59 {
|
||||
compatible = "ti,drv2667";
|
||||
reg = <0x59>;
|
||||
vbat-supply = <&vbat>;
|
||||
};
|
||||
|
||||
For more product information please see the link below:
|
||||
http://www.ti.com/product/drv2667
|
||||
@@ -0,0 +1,50 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/ti,drv266x.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Texas Instruments - drv266x Haptics driver
|
||||
|
||||
description: |
|
||||
Product Page:
|
||||
http://www.ti.com/product/drv2665
|
||||
http://www.ti.com/product/drv2667
|
||||
|
||||
maintainers:
|
||||
- Anshul Dalal <anshulusr@gmail.com>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- ti,drv2665
|
||||
- ti,drv2667
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
vbat-supply:
|
||||
description: Required supply regulator
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- vbat-supply
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
haptics@59 {
|
||||
compatible = "ti,drv2667";
|
||||
reg = <0x59>;
|
||||
vbat-supply = <&vbat>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/touchscreen/neonode,zforce.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Neonode infrared touchscreen controller
|
||||
|
||||
maintainers:
|
||||
- Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
allOf:
|
||||
- $ref: touchscreen.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: neonode,zforce
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
|
||||
irq-gpios:
|
||||
maxItems: 1
|
||||
|
||||
x-size:
|
||||
deprecated: true
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
y-size:
|
||||
deprecated: true
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
|
||||
vdd-supply: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- reset-gpios
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
touchscreen@50 {
|
||||
compatible = "neonode,zforce";
|
||||
reg = <0x50>;
|
||||
interrupts = <2 0>;
|
||||
vdd-supply = <®_zforce_vdd>;
|
||||
|
||||
reset-gpios = <&gpio5 9 0>; /* RST */
|
||||
irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
|
||||
|
||||
touchscreen-min-x = <0>;
|
||||
touchscreen-size-x = <800>;
|
||||
touchscreen-min-y = <0>;
|
||||
touchscreen-size-y = <600>;
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -1,32 +0,0 @@
|
||||
* Samsung S6SY761 touchscreen controller
|
||||
|
||||
Required properties:
|
||||
- compatible : must be "samsung,s6sy761"
|
||||
- reg : I2C slave address, (e.g. 0x48)
|
||||
- interrupts : interrupt specification
|
||||
- avdd-supply : analogic power supply
|
||||
- vdd-supply : power supply
|
||||
|
||||
Optional properties:
|
||||
- touchscreen-size-x : see touchscreen.txt. This property is embedded in the
|
||||
device. If defined it forces a different x resolution.
|
||||
- touchscreen-size-y : see touchscreen.txt. This property is embedded in the
|
||||
device. If defined it forces a different y resolution.
|
||||
|
||||
Example:
|
||||
|
||||
i2c@00000000 {
|
||||
|
||||
/* ... */
|
||||
|
||||
touchscreen@48 {
|
||||
compatible = "samsung,s6sy761";
|
||||
reg = <0x48>;
|
||||
interrupt-parent = <&gpa1>;
|
||||
interrupts = <1 IRQ_TYPE_NONE>;
|
||||
avdd-supply = <&ldo30_reg>;
|
||||
vdd-supply = <&ldo31_reg>;
|
||||
touchscreen-size-x = <4096>;
|
||||
touchscreen-size-y = <4096>;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/touchscreen/samsung,s6sy761.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Samsung S6SY761 touchscreen controller
|
||||
|
||||
maintainers:
|
||||
- Andi Shyti <andi.shyti@kernel.org>
|
||||
|
||||
allOf:
|
||||
- $ref: touchscreen.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: samsung,s6sy761
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
avdd-supply: true
|
||||
vdd-supply: true
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- avdd-supply
|
||||
- vdd-supply
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
touchscreen@48 {
|
||||
compatible = "samsung,s6sy761";
|
||||
reg = <0x48>;
|
||||
interrupt-parent = <&gpa1>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
avdd-supply = <&ldo30_reg>;
|
||||
vdd-supply = <&ldo31_reg>;
|
||||
touchscreen-size-x = <4096>;
|
||||
touchscreen-size-y = <4096>;
|
||||
};
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
* Neonode infrared touchscreen controller
|
||||
|
||||
Required properties:
|
||||
- compatible: must be "neonode,zforce"
|
||||
- reg: I2C address of the chip
|
||||
- interrupts: interrupt to which the chip is connected
|
||||
- reset-gpios: reset gpio the chip is connected to
|
||||
- x-size: horizontal resolution of touchscreen
|
||||
- y-size: vertical resolution of touchscreen
|
||||
|
||||
Optional properties:
|
||||
- irq-gpios : interrupt gpio the chip is connected to
|
||||
- vdd-supply: Regulator controlling the controller supply
|
||||
|
||||
Example:
|
||||
|
||||
i2c@00000000 {
|
||||
/* ... */
|
||||
|
||||
zforce_ts@50 {
|
||||
compatible = "neonode,zforce";
|
||||
reg = <0x50>;
|
||||
interrupts = <2 0>;
|
||||
vdd-supply = <®_zforce_vdd>;
|
||||
|
||||
reset-gpios = <&gpio5 9 0>; /* RST */
|
||||
irq-gpios = <&gpio5 6 0>; /* IRQ, optional */
|
||||
|
||||
x-size = <800>;
|
||||
y-size = <600>;
|
||||
};
|
||||
|
||||
/* ... */
|
||||
};
|
||||
@@ -11,8 +11,13 @@ maintainers:
|
||||
|
||||
description: |
|
||||
This interrupt controller is found in the Loongson-3 family of chips and
|
||||
Loongson-2K1000 chip, as the primary package interrupt controller which
|
||||
Loongson-2K series chips, as the primary package interrupt controller which
|
||||
can route local I/O interrupt to interrupt lines of cores.
|
||||
Be aware of the following points.
|
||||
1.The Loongson-2K0500 is a single core CPU;
|
||||
2.The Loongson-2K0500/2K1000 has 64 device interrupt sources as inputs, so we
|
||||
need to define two nodes in dts{i} to describe the "0-31" and "32-61" interrupt
|
||||
sources respectively.
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/interrupt-controller.yaml#
|
||||
@@ -33,6 +38,7 @@ properties:
|
||||
- const: main
|
||||
- const: isr0
|
||||
- const: isr1
|
||||
minItems: 2
|
||||
|
||||
interrupt-controller: true
|
||||
|
||||
@@ -45,11 +51,9 @@ properties:
|
||||
interrupt-names:
|
||||
description: List of names for the parent interrupts.
|
||||
items:
|
||||
- const: int0
|
||||
- const: int1
|
||||
- const: int2
|
||||
- const: int3
|
||||
pattern: int[0-3]
|
||||
minItems: 1
|
||||
maxItems: 4
|
||||
|
||||
'#interrupt-cells':
|
||||
const: 2
|
||||
@@ -69,6 +73,7 @@ required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- interrupt-names
|
||||
- interrupt-controller
|
||||
- '#interrupt-cells'
|
||||
- loongson,parent_int_map
|
||||
@@ -86,7 +91,8 @@ if:
|
||||
then:
|
||||
properties:
|
||||
reg:
|
||||
minItems: 3
|
||||
minItems: 2
|
||||
maxItems: 3
|
||||
|
||||
required:
|
||||
- reg-names
|
||||
|
||||
@@ -24,6 +24,7 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- apple,t8103-dart
|
||||
- apple,t8103-usb4-dart
|
||||
- apple,t8110-dart
|
||||
- apple,t6000-dart
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ properties:
|
||||
- qcom,sm8350-smmu-500
|
||||
- qcom,sm8450-smmu-500
|
||||
- qcom,sm8550-smmu-500
|
||||
- qcom,sm8650-smmu-500
|
||||
- qcom,x1e80100-smmu-500
|
||||
- const: qcom,smmu-500
|
||||
- const: arm,mmu-500
|
||||
|
||||
@@ -89,6 +91,8 @@ properties:
|
||||
- qcom,sm8150-smmu-500
|
||||
- qcom,sm8250-smmu-500
|
||||
- qcom,sm8350-smmu-500
|
||||
- qcom,sm8450-smmu-500
|
||||
- qcom,sm8550-smmu-500
|
||||
- const: qcom,adreno-smmu
|
||||
- const: qcom,smmu-500
|
||||
- const: arm,mmu-500
|
||||
@@ -429,6 +433,30 @@ allOf:
|
||||
- description: interface clock required to access smmu's registers
|
||||
through the TCU's programming interface.
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- qcom,sm8350-smmu-500
|
||||
- const: qcom,adreno-smmu
|
||||
- const: qcom,smmu-500
|
||||
- const: arm,mmu-500
|
||||
then:
|
||||
properties:
|
||||
clock-names:
|
||||
items:
|
||||
- const: bus
|
||||
- const: iface
|
||||
- const: ahb
|
||||
- const: hlos1_vote_gpu_smmu
|
||||
- const: cx_gmu
|
||||
- const: hub_cx_int
|
||||
- const: hub_aon
|
||||
clocks:
|
||||
minItems: 7
|
||||
maxItems: 7
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
@@ -453,6 +481,50 @@ allOf:
|
||||
- description: Voter clock required for HLOS SMMU access
|
||||
- description: Interface clock required for register access
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm8450-smmu-500
|
||||
then:
|
||||
properties:
|
||||
clock-names:
|
||||
items:
|
||||
- const: gmu
|
||||
- const: hub
|
||||
- const: hlos
|
||||
- const: bus
|
||||
- const: iface
|
||||
- const: ahb
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: GMU clock
|
||||
- description: GPU HUB clock
|
||||
- description: HLOS vote clock
|
||||
- description: GPU memory bus clock
|
||||
- description: GPU SNoC bus clock
|
||||
- description: GPU AHB clock
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
const: qcom,sm8550-smmu-500
|
||||
then:
|
||||
properties:
|
||||
clock-names:
|
||||
items:
|
||||
- const: hlos
|
||||
- const: bus
|
||||
- const: iface
|
||||
- const: ahb
|
||||
|
||||
clocks:
|
||||
items:
|
||||
- description: HLOS vote clock
|
||||
- description: GPU memory bus clock
|
||||
- description: GPU SNoC bus clock
|
||||
- description: GPU AHB clock
|
||||
|
||||
# Disallow clocks for all other platforms with specific compatibles
|
||||
- if:
|
||||
properties:
|
||||
@@ -472,9 +544,8 @@ allOf:
|
||||
- qcom,sdx65-smmu-500
|
||||
- qcom,sm6350-smmu-500
|
||||
- qcom,sm6375-smmu-500
|
||||
- qcom,sm8350-smmu-500
|
||||
- qcom,sm8450-smmu-500
|
||||
- qcom,sm8550-smmu-500
|
||||
- qcom,sm8650-smmu-500
|
||||
- qcom,x1e80100-smmu-500
|
||||
then:
|
||||
properties:
|
||||
clock-names: false
|
||||
|
||||
@@ -19,9 +19,14 @@ description: |+
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- rockchip,iommu
|
||||
- rockchip,rk3568-iommu
|
||||
oneOf:
|
||||
- enum:
|
||||
- rockchip,iommu
|
||||
- rockchip,rk3568-iommu
|
||||
- items:
|
||||
- enum:
|
||||
- rockchip,rk3588-iommu
|
||||
- const: rockchip,rk3568-iommu
|
||||
|
||||
reg:
|
||||
items:
|
||||
|
||||
@@ -14,8 +14,8 @@ description: |
|
||||
programmable switching frequency to optimize efficiency.
|
||||
It supports two different dimming modes:
|
||||
|
||||
- analog mode, via I2C commands (default)
|
||||
- PWM controlled mode.
|
||||
- analog mode, via I2C commands, as default mode (32 dimming levels)
|
||||
- PWM controlled mode (optional)
|
||||
|
||||
The datasheet is available at:
|
||||
https://www.monolithicpower.com/en/mp3309c.html
|
||||
@@ -50,8 +50,6 @@ properties:
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- max-brightness
|
||||
- default-brightness
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
@@ -66,8 +64,8 @@ examples:
|
||||
compatible = "mps,mp3309c";
|
||||
reg = <0x17>;
|
||||
pwms = <&pwm1 0 3333333 0>; /* 300 Hz --> (1/f) * 1*10^9 */
|
||||
max-brightness = <100>;
|
||||
default-brightness = <80>;
|
||||
brightness-levels = <0 4 8 16 32 64 128 255>;
|
||||
default-brightness = <6>;
|
||||
mps,overvoltage-protection-microvolt = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/loongarch/cpus.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: LoongArch CPUs
|
||||
|
||||
maintainers:
|
||||
- Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
|
||||
description:
|
||||
This document describes the list of LoongArch CPU cores that support FDT,
|
||||
it describe the layout of CPUs in a system through the "cpus" node.
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/cpu.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- loongson,la264
|
||||
- loongson,la364
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- clocks
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/loongson,ls2k-clk.h>
|
||||
|
||||
cpus {
|
||||
#size-cells = <0>;
|
||||
#address-cells = <1>;
|
||||
|
||||
cpu@0 {
|
||||
compatible = "loongson,la264";
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
clocks = <&clk LOONGSON2_NODE_CLK>;
|
||||
};
|
||||
|
||||
cpu@1 {
|
||||
compatible = "loongson,la264";
|
||||
device_type = "cpu";
|
||||
reg = <1>;
|
||||
clocks = <&clk LOONGSON2_NODE_CLK>;
|
||||
};
|
||||
};
|
||||
|
||||
...
|
||||
@@ -0,0 +1,34 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/loongarch/loongson.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Loongson SoC-based boards
|
||||
|
||||
maintainers:
|
||||
- Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
|
||||
properties:
|
||||
$nodename:
|
||||
const: '/'
|
||||
compatible:
|
||||
oneOf:
|
||||
- description: Loongson-2K0500 processor based boards
|
||||
items:
|
||||
- const: loongson,ls2k0500-ref
|
||||
- const: loongson,ls2k0500
|
||||
|
||||
- description: Loongson-2K1000 processor based boards
|
||||
items:
|
||||
- const: loongson,ls2k1000-ref
|
||||
- const: loongson,ls2k1000
|
||||
|
||||
- description: Loongson-2K2000 processor based boards
|
||||
items:
|
||||
- const: loongson,ls2k2000-ref
|
||||
- const: loongson,ls2k2000
|
||||
|
||||
additionalProperties: true
|
||||
|
||||
...
|
||||
@@ -16,20 +16,8 @@ properties:
|
||||
"#phy-cells":
|
||||
const: 0
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
phy@0 {
|
||||
compatible = "amlogic,g12a-mipi-dphy-analog";
|
||||
reg = <0x0 0xc>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
|
||||
@@ -9,16 +9,6 @@ title: Amlogic AXG shared MIPI/PCIE analog PHY
|
||||
maintainers:
|
||||
- Remi Pommarel <repk@triplefau.lt>
|
||||
|
||||
description: |+
|
||||
The Everything-Else Power Domains node should be the child of a syscon
|
||||
node with the required property:
|
||||
|
||||
- compatible: Should be the following:
|
||||
"amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
|
||||
|
||||
Refer to the bindings described in
|
||||
Documentation/devicetree/bindings/mfd/syscon.yaml
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: amlogic,axg-mipi-pcie-analog-phy
|
||||
@@ -31,10 +21,3 @@ required:
|
||||
- "#phy-cells"
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
mpphy: phy {
|
||||
compatible = "amlogic,axg-mipi-pcie-analog-phy";
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
|
||||
@@ -31,6 +31,7 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- mediatek,mt8188-mipi-tx
|
||||
- mediatek,mt8195-mipi-tx
|
||||
- mediatek,mt8365-mipi-tx
|
||||
- const: mediatek,mt8183-mipi-tx
|
||||
- const: mediatek,mt2701-mipi-tx
|
||||
|
||||
@@ -235,6 +235,15 @@ patternProperties:
|
||||
Specify the flag to enable BC1.2 if support it
|
||||
type: boolean
|
||||
|
||||
mediatek,force-mode:
|
||||
description:
|
||||
The force mode is used to manually switch the shared phy mode between
|
||||
USB3 and PCIe, when USB3 phy type is selected by the consumer, and
|
||||
force-mode is set, will cause phy's power and pipe toggled and force
|
||||
phy as USB3 mode which switched from default PCIe mode. But perfer to
|
||||
use the property "mediatek,syscon-type" for newer SoCs that support it.
|
||||
type: boolean
|
||||
|
||||
mediatek,syscon-type:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
maxItems: 1
|
||||
|
||||
@@ -36,6 +36,8 @@ properties:
|
||||
- qcom,sm8450-qmp-gen4x2-pcie-phy
|
||||
- qcom,sm8550-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8550-qmp-gen4x2-pcie-phy
|
||||
- qcom,sm8650-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8650-qmp-gen4x2-pcie-phy
|
||||
|
||||
reg:
|
||||
minItems: 1
|
||||
@@ -147,6 +149,8 @@ allOf:
|
||||
- qcom,sm8450-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8550-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8550-qmp-gen4x2-pcie-phy
|
||||
- qcom,sm8650-qmp-gen3x2-pcie-phy
|
||||
- qcom,sm8650-qmp-gen4x2-pcie-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
@@ -189,6 +193,7 @@ allOf:
|
||||
contains:
|
||||
enum:
|
||||
- qcom,sm8550-qmp-gen4x2-pcie-phy
|
||||
- qcom,sm8650-qmp-gen4x2-pcie-phy
|
||||
then:
|
||||
properties:
|
||||
resets:
|
||||
|
||||
@@ -32,6 +32,7 @@ properties:
|
||||
- qcom,sm8350-qmp-ufs-phy
|
||||
- qcom,sm8450-qmp-ufs-phy
|
||||
- qcom,sm8550-qmp-ufs-phy
|
||||
- qcom,sm8650-qmp-ufs-phy
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@@ -112,6 +113,7 @@ allOf:
|
||||
- qcom,sm8250-qmp-ufs-phy
|
||||
- qcom,sm8350-qmp-ufs-phy
|
||||
- qcom,sm8550-qmp-ufs-phy
|
||||
- qcom,sm8650-qmp-ufs-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
|
||||
@@ -32,6 +32,7 @@ properties:
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
- qcom,x1e80100-qmp-usb3-uni-phy
|
||||
|
||||
|
||||
reg:
|
||||
@@ -135,6 +136,7 @@ allOf:
|
||||
- qcom,sm8150-qmp-usb3-uni-phy
|
||||
- qcom,sm8250-qmp-usb3-uni-phy
|
||||
- qcom,sm8350-qmp-usb3-uni-phy
|
||||
- qcom,x1e80100-qmp-usb3-uni-phy
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
@@ -171,6 +173,7 @@ allOf:
|
||||
enum:
|
||||
- qcom,sa8775p-qmp-usb3-uni-phy
|
||||
- qcom,sc8280xp-qmp-usb3-uni-phy
|
||||
- qcom,x1e80100-qmp-usb3-uni-phy
|
||||
then:
|
||||
required:
|
||||
- power-domains
|
||||
|
||||
@@ -27,6 +27,8 @@ properties:
|
||||
- qcom,sm8350-qmp-usb3-dp-phy
|
||||
- qcom,sm8450-qmp-usb3-dp-phy
|
||||
- qcom,sm8550-qmp-usb3-dp-phy
|
||||
- qcom,sm8650-qmp-usb3-dp-phy
|
||||
- qcom,x1e80100-qmp-usb3-dp-phy
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
@@ -62,12 +64,12 @@ properties:
|
||||
"#clock-cells":
|
||||
const: 1
|
||||
description:
|
||||
See include/dt-bindings/dt-bindings/phy/phy-qcom-qmp.h
|
||||
See include/dt-bindings/phy/phy-qcom-qmp.h
|
||||
|
||||
"#phy-cells":
|
||||
const: 1
|
||||
description:
|
||||
See include/dt-bindings/dt-bindings/phy/phy-qcom-qmp.h
|
||||
See include/dt-bindings/phy/phy-qcom-qmp.h
|
||||
|
||||
orientation-switch:
|
||||
description:
|
||||
@@ -128,6 +130,8 @@ allOf:
|
||||
- qcom,sc8280xp-qmp-usb43dp-phy
|
||||
- qcom,sm6350-qmp-usb3-dp-phy
|
||||
- qcom,sm8550-qmp-usb3-dp-phy
|
||||
- qcom,sm8650-qmp-usb3-dp-phy
|
||||
- qcom,x1e80100-qmp-usb3-dp-phy
|
||||
then:
|
||||
required:
|
||||
- power-domains
|
||||
|
||||
@@ -18,6 +18,8 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- qcom,sdx75-snps-eusb2-phy
|
||||
- qcom,sm8650-snps-eusb2-phy
|
||||
- qcom,x1e80100-snps-eusb2-phy
|
||||
- const: qcom,sm8550-snps-eusb2-phy
|
||||
- const: qcom,sm8550-snps-eusb2-phy
|
||||
|
||||
|
||||
@@ -28,17 +28,15 @@ properties:
|
||||
items:
|
||||
- const: reboot-mode
|
||||
|
||||
patternProperties:
|
||||
"^mode-.+":
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: Vendor-specific mode value written to the mode register
|
||||
allOf:
|
||||
- $ref: reboot-mode.yaml#
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- nvmem-cells
|
||||
- nvmem-cell-names
|
||||
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
|
||||
@@ -111,21 +111,24 @@ examples:
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
#include <dt-bindings/spmi/spmi.h>
|
||||
spmi_bus: spmi@c440000 {
|
||||
|
||||
spmi@c440000 {
|
||||
reg = <0x0c440000 0x1100>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
pmk8350: pmic@0 {
|
||||
|
||||
pmic@0 {
|
||||
reg = <0x0 SPMI_USID>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pmk8350_pon: pon_hlos@1300 {
|
||||
reg = <0x1300>;
|
||||
|
||||
pon@800 {
|
||||
compatible = "qcom,pm8998-pon";
|
||||
reg = <0x800>;
|
||||
|
||||
pwrkey {
|
||||
compatible = "qcom,pm8941-pwrkey";
|
||||
interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >;
|
||||
interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
|
||||
debounce = <15625>;
|
||||
bias-pull-up;
|
||||
linux,code = <KEY_POWER>;
|
||||
|
||||
@@ -29,12 +29,10 @@ properties:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: Offset in the register map for the mode register (in bytes)
|
||||
|
||||
patternProperties:
|
||||
"^mode-.+":
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: Vendor-specific mode value written to the mode register
|
||||
allOf:
|
||||
- $ref: reboot-mode.yaml#
|
||||
|
||||
additionalProperties: false
|
||||
unevaluatedProperties: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
|
||||
@@ -57,7 +57,7 @@ examples:
|
||||
|
||||
firmware {
|
||||
zynqmp-firmware {
|
||||
zynqmp-power {
|
||||
power-management {
|
||||
compatible = "xlnx,zynqmp-power";
|
||||
interrupts = <0 35 4>;
|
||||
};
|
||||
@@ -70,7 +70,7 @@ examples:
|
||||
|
||||
firmware {
|
||||
zynqmp-firmware {
|
||||
zynqmp-power {
|
||||
power-management {
|
||||
compatible = "xlnx,zynqmp-power";
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <0 35 4>;
|
||||
|
||||
@@ -20,6 +20,7 @@ properties:
|
||||
- ti,bq24192
|
||||
- ti,bq24192i
|
||||
- ti,bq24196
|
||||
- ti,bq24296
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
@@ -63,8 +63,8 @@ properties:
|
||||
|
||||
mmu-type:
|
||||
description:
|
||||
Identifies the MMU address translation mode used on this
|
||||
hart. These values originate from the RISC-V Privileged
|
||||
Identifies the largest MMU address translation mode supported by
|
||||
this hart. These values originate from the RISC-V Privileged
|
||||
Specification document, available from
|
||||
https://riscv.org/specifications/
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
@@ -80,6 +80,11 @@ properties:
|
||||
description:
|
||||
The blocksize in bytes for the Zicbom cache operations.
|
||||
|
||||
riscv,cbop-block-size:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
The blocksize in bytes for the Zicbop cache operations.
|
||||
|
||||
riscv,cboz-block-size:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
|
||||
@@ -48,7 +48,7 @@ properties:
|
||||
insensitive, letters in the riscv,isa string must be all
|
||||
lowercase.
|
||||
$ref: /schemas/types.yaml#/definitions/string
|
||||
pattern: ^rv(?:64|32)imaf?d?q?c?b?k?j?p?v?h?(?:[hsxz](?:[a-z])+)?(?:_[hsxz](?:[a-z])+)*$
|
||||
pattern: ^rv(?:64|32)imaf?d?q?c?b?k?j?p?v?h?(?:[hsxz](?:[0-9a-z])+)?(?:_[hsxz](?:[0-9a-z])+)*$
|
||||
deprecated: true
|
||||
|
||||
riscv,isa-base:
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/rtc/adi,max31335.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Analog Devices MAX31335 RTC
|
||||
|
||||
maintainers:
|
||||
- Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
|
||||
description:
|
||||
Analog Devices MAX31335 I2C RTC ±2ppm Automotive Real-Time Clock with
|
||||
Integrated MEMS Resonator.
|
||||
|
||||
allOf:
|
||||
- $ref: rtc.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: adi,max31335
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
"#clock-cells":
|
||||
description:
|
||||
RTC can be used as a clock source through its clock output pin.
|
||||
const: 0
|
||||
|
||||
adi,tc-diode:
|
||||
description:
|
||||
Select the diode configuration for the trickle charger.
|
||||
schottky - Schottky diode in series.
|
||||
standard+schottky - standard diode + Schottky diode in series.
|
||||
enum: [schottky, standard+schottky]
|
||||
|
||||
trickle-resistor-ohms:
|
||||
description:
|
||||
Selected resistor for trickle charger. Should be specified if trickle
|
||||
charger should be enabled.
|
||||
enum: [3000, 6000, 11000]
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rtc@68 {
|
||||
compatible = "adi,max31335";
|
||||
reg = <0x68>;
|
||||
pinctrl-0 = <&rtc_nint_pins>;
|
||||
interrupts-extended = <&gpio1 16 IRQ_TYPE_LEVEL_HIGH>;
|
||||
aux-voltage-chargeable = <1>;
|
||||
trickle-resistor-ohms = <6000>;
|
||||
adi,tc-diode = "schottky";
|
||||
};
|
||||
};
|
||||
...
|
||||
@@ -29,6 +29,8 @@ properties:
|
||||
|
||||
trickle-diode-disable: true
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/rtc/nuvoton,ma35d1-rtc.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Nuvoton MA35D1 Real Time Clock
|
||||
|
||||
maintainers:
|
||||
- Min-Jen Chen <mjchen@nuvoton.com>
|
||||
|
||||
allOf:
|
||||
- $ref: rtc.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- nuvoton,ma35d1-rtc
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- clocks
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/clock/nuvoton,ma35d1-clk.h>
|
||||
rtc@40410000 {
|
||||
compatible = "nuvoton,ma35d1-rtc";
|
||||
reg = <0x40410000 0x200>;
|
||||
interrupts = <GIC_SPI 5 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&clk RTC_GATE>;
|
||||
};
|
||||
|
||||
...
|
||||
@@ -61,27 +61,27 @@ additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/spmi/spmi.h>
|
||||
spmi_bus: spmi@c440000 {
|
||||
reg = <0x0c440000 0x1100>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
pmicintc: pmic@0 {
|
||||
reg = <0x0 SPMI_USID>;
|
||||
compatible = "qcom,pm8921";
|
||||
interrupts = <104 8>;
|
||||
#interrupt-cells = <2>;
|
||||
interrupt-controller;
|
||||
#address-cells = <1>;
|
||||
|
||||
spmi {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pm8921_rtc: rtc@11d {
|
||||
compatible = "qcom,pm8921-rtc";
|
||||
reg = <0x11d>;
|
||||
interrupts = <0x27 0>;
|
||||
nvmem-cells = <&rtc_offset>;
|
||||
nvmem-cell-names = "offset";
|
||||
pmic@0 {
|
||||
compatible = "qcom,pm8941", "qcom,spmi-pmic";
|
||||
reg = <0x0 SPMI_USID>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
rtc@6000 {
|
||||
compatible = "qcom,pm8941-rtc";
|
||||
reg = <0x6000>, <0x6100>;
|
||||
reg-names = "rtc", "alarm";
|
||||
interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
|
||||
nvmem-cells = <&rtc_offset>;
|
||||
nvmem-cell-names = "offset";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
...
|
||||
|
||||
@@ -18,7 +18,6 @@ description: |
|
||||
|
||||
Specifications about the audio amplifier can be found at:
|
||||
https://www.ti.com/lit/gpn/tas2562
|
||||
https://www.ti.com/lit/gpn/tas2563
|
||||
https://www.ti.com/lit/gpn/tas2564
|
||||
https://www.ti.com/lit/gpn/tas2110
|
||||
|
||||
@@ -29,7 +28,6 @@ properties:
|
||||
compatible:
|
||||
enum:
|
||||
- ti,tas2562
|
||||
- ti,tas2563
|
||||
- ti,tas2564
|
||||
- ti,tas2110
|
||||
|
||||
|
||||
@@ -5,36 +5,46 @@
|
||||
$id: http://devicetree.org/schemas/sound/ti,tas2781.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Texas Instruments TAS2781 SmartAMP
|
||||
title: Texas Instruments TAS2563/TAS2781 SmartAMP
|
||||
|
||||
maintainers:
|
||||
- Shenghao Ding <shenghao-ding@ti.com>
|
||||
|
||||
description:
|
||||
The TAS2781 is a mono, digital input Class-D audio amplifier
|
||||
optimized for efficiently driving high peak power into small
|
||||
loudspeakers. An integrated on-chip DSP supports Texas Instruments
|
||||
Smart Amp speaker protection algorithm. The integrated speaker
|
||||
voltage and current sense provides for real time
|
||||
description: |
|
||||
The TAS2563/TAS2781 is a mono, digital input Class-D audio
|
||||
amplifier optimized for efficiently driving high peak power into
|
||||
small loudspeakers. An integrated on-chip DSP supports Texas
|
||||
Instruments Smart Amp speaker protection algorithm. The
|
||||
integrated speaker voltage and current sense provides for real time
|
||||
monitoring of loudspeaker behavior.
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
Specifications about the audio amplifier can be found at:
|
||||
https://www.ti.com/lit/gpn/tas2563
|
||||
https://www.ti.com/lit/gpn/tas2781
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- ti,tas2781
|
||||
description: |
|
||||
ti,tas2563: 6.1-W Boosted Class-D Audio Amplifier With Integrated
|
||||
DSP and IV Sense, 16/20/24/32bit stereo I2S or multichannel TDM.
|
||||
|
||||
ti,tas2781: 24-V Class-D Amplifier with Real Time Integrated Speaker
|
||||
Protection and Audio Processing, 16/20/24/32bit stereo I2S or
|
||||
multichannel TDM.
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- ti,tas2563
|
||||
- const: ti,tas2781
|
||||
- enum:
|
||||
- ti,tas2781
|
||||
|
||||
reg:
|
||||
description:
|
||||
I2C address, in multiple tas2781s case, all the i2c address
|
||||
I2C address, in multiple-AMP case, all the i2c address
|
||||
aggregate as one Audio Device to support multiple audio slots.
|
||||
maxItems: 8
|
||||
minItems: 1
|
||||
items:
|
||||
minimum: 0x38
|
||||
maximum: 0x3f
|
||||
|
||||
reset-gpios:
|
||||
maxItems: 1
|
||||
@@ -49,6 +59,44 @@ required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
allOf:
|
||||
- $ref: dai-common.yaml#
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- ti,tas2563
|
||||
then:
|
||||
properties:
|
||||
reg:
|
||||
description:
|
||||
I2C address, in multiple-AMP case, all the i2c address
|
||||
aggregate as one Audio Device to support multiple audio slots.
|
||||
maxItems: 4
|
||||
minItems: 1
|
||||
items:
|
||||
minimum: 0x4c
|
||||
maximum: 0x4f
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
- ti,tas2781
|
||||
then:
|
||||
properties:
|
||||
reg:
|
||||
description:
|
||||
I2C address, in multiple-AMP case, all the i2c address
|
||||
aggregate as one Audio Device to support multiple audio slots.
|
||||
maxItems: 8
|
||||
minItems: 1
|
||||
items:
|
||||
minimum: 0x38
|
||||
maximum: 0x3f
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
@@ -33,6 +33,7 @@ properties:
|
||||
- sifive,fu540-c000-clint # SiFive FU540
|
||||
- starfive,jh7100-clint # StarFive JH7100
|
||||
- starfive,jh7110-clint # StarFive JH7110
|
||||
- starfive,jh8100-clint # StarFive JH8100
|
||||
- const: sifive,clint0 # SiFive CLINT v0 IP block
|
||||
- items:
|
||||
- enum:
|
||||
|
||||
@@ -17,7 +17,12 @@ properties:
|
||||
- const: thead,c900-aclint-mtimer
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
items:
|
||||
- description: MTIMECMP Registers
|
||||
|
||||
reg-names:
|
||||
items:
|
||||
- const: mtimecmp
|
||||
|
||||
interrupts-extended:
|
||||
minItems: 1
|
||||
@@ -28,6 +33,7 @@ additionalProperties: false
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- reg-names
|
||||
- interrupts-extended
|
||||
|
||||
examples:
|
||||
@@ -39,5 +45,6 @@ examples:
|
||||
<&cpu3intc 7>,
|
||||
<&cpu4intc 7>;
|
||||
reg = <0xac000000 0x00010000>;
|
||||
reg-names = "mtimecmp";
|
||||
};
|
||||
...
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
| openrisc: | .. |
|
||||
| parisc: | TODO |
|
||||
| powerpc: | TODO |
|
||||
| riscv: | TODO |
|
||||
| riscv: | ok |
|
||||
| s390: | TODO |
|
||||
| sh: | TODO |
|
||||
| sparc: | TODO |
|
||||
|
||||
@@ -295,7 +295,6 @@ through which it can issue requests and negotiate::
|
||||
struct netfs_request_ops {
|
||||
void (*init_request)(struct netfs_io_request *rreq, struct file *file);
|
||||
void (*free_request)(struct netfs_io_request *rreq);
|
||||
int (*begin_cache_operation)(struct netfs_io_request *rreq);
|
||||
void (*expand_readahead)(struct netfs_io_request *rreq);
|
||||
bool (*clamp_length)(struct netfs_io_subrequest *subreq);
|
||||
void (*issue_read)(struct netfs_io_subrequest *subreq);
|
||||
@@ -317,20 +316,6 @@ The operations are as follows:
|
||||
[Optional] This is called as the request is being deallocated so that the
|
||||
filesystem can clean up any state it has attached there.
|
||||
|
||||
* ``begin_cache_operation()``
|
||||
|
||||
[Optional] This is called to ask the network filesystem to call into the
|
||||
cache (if present) to initialise the caching state for this read. The netfs
|
||||
library module cannot access the cache directly, so the cache should call
|
||||
something like fscache_begin_read_operation() to do this.
|
||||
|
||||
The cache gets to store its state in ->cache_resources and must set a table
|
||||
of operations of its own there (though of a different type).
|
||||
|
||||
This should return 0 on success and an error code otherwise. If an error is
|
||||
reported, the operation may proceed anyway, just without local caching (only
|
||||
out of memory and interruption errors cause failure here).
|
||||
|
||||
* ``expand_readahead()``
|
||||
|
||||
[Optional] This is called to allow the filesystem to expand the size of a
|
||||
@@ -460,14 +445,14 @@ When implementing a local cache to be used by the read helpers, two things are
|
||||
required: some way for the network filesystem to initialise the caching for a
|
||||
read request and a table of operations for the helpers to call.
|
||||
|
||||
The network filesystem's ->begin_cache_operation() method is called to set up a
|
||||
cache and this must call into the cache to do the work. If using fscache, for
|
||||
example, the cache would call::
|
||||
To begin a cache operation on an fscache object, the following function is
|
||||
called::
|
||||
|
||||
int fscache_begin_read_operation(struct netfs_io_request *rreq,
|
||||
struct fscache_cookie *cookie);
|
||||
|
||||
passing in the request pointer and the cookie corresponding to the file.
|
||||
passing in the request pointer and the cookie corresponding to the file. This
|
||||
fills in the cache resources mentioned below.
|
||||
|
||||
The netfs_io_request object contains a place for the cache to hang its
|
||||
state::
|
||||
|
||||
@@ -73,15 +73,14 @@ Auto Negotiation Supported.
|
||||
Compound Request Supported.
|
||||
Oplock Cache Mechanism Supported.
|
||||
SMB2 leases(v1 lease) Supported.
|
||||
Directory leases(v2 lease) Planned for future.
|
||||
Directory leases(v2 lease) Supported.
|
||||
Multi-credits Supported.
|
||||
NTLM/NTLMv2 Supported.
|
||||
HMAC-SHA256 Signing Supported.
|
||||
Secure negotiate Supported.
|
||||
Signing Update Supported.
|
||||
Pre-authentication integrity Supported.
|
||||
SMB3 encryption(CCM, GCM) Supported. (CCM and GCM128 supported, GCM256 in
|
||||
progress)
|
||||
SMB3 encryption(CCM, GCM) Supported. (CCM/GCM128 and CCM/GCM256 supported)
|
||||
SMB direct(RDMA) Supported.
|
||||
SMB3 Multi-channel Partially Supported. Planned to implement
|
||||
replay/retry mechanisms for future.
|
||||
@@ -112,6 +111,10 @@ DCE/RPC support Partially Supported. a few calls(NetShareEnumAll,
|
||||
for Witness protocol e.g.)
|
||||
ksmbd/nfsd interoperability Planned for future. The features that ksmbd
|
||||
support are Leases, Notify, ACLs and Share modes.
|
||||
SMB3.1.1 Compression Planned for future.
|
||||
SMB3.1.1 over QUIC Planned for future.
|
||||
Signing/Encryption over RDMA Planned for future.
|
||||
SMB3.1.1 GMAC signing support Planned for future.
|
||||
============================== =================================================
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +66,10 @@ for aligning variables/macros, for reflowing text and other similar tasks.
|
||||
See the file :ref:`Documentation/process/clang-format.rst <clangformat>`
|
||||
for more details.
|
||||
|
||||
Some basic editor settings, such as indentation and line endings, will be
|
||||
set automatically if you are using an editor that is compatible with
|
||||
EditorConfig. See the official EditorConfig website for more information:
|
||||
https://editorconfig.org/
|
||||
|
||||
Abstraction layers
|
||||
******************
|
||||
|
||||
@@ -735,6 +735,10 @@ for aligning variables/macros, for reflowing text and other similar tasks.
|
||||
See the file :ref:`Documentation/process/clang-format.rst <clangformat>`
|
||||
for more details.
|
||||
|
||||
Some basic editor settings, such as indentation and line endings, will be
|
||||
set automatically if you are using an editor that is compatible with
|
||||
EditorConfig. See the official EditorConfig website for more information:
|
||||
https://editorconfig.org/
|
||||
|
||||
10) Kconfig configuration files
|
||||
-------------------------------
|
||||
|
||||
@@ -12,10 +12,11 @@ which uses ``libclang``.
|
||||
Below is a general summary of architectures that currently work. Level of
|
||||
support corresponds to ``S`` values in the ``MAINTAINERS`` file.
|
||||
|
||||
============ ================ ==============================================
|
||||
Architecture Level of support Constraints
|
||||
============ ================ ==============================================
|
||||
``um`` Maintained ``x86_64`` only.
|
||||
``x86`` Maintained ``x86_64`` only.
|
||||
============ ================ ==============================================
|
||||
============= ================ ==============================================
|
||||
Architecture Level of support Constraints
|
||||
============= ================ ==============================================
|
||||
``loongarch`` Maintained -
|
||||
``um`` Maintained ``x86_64`` only.
|
||||
``x86`` Maintained ``x86_64`` only.
|
||||
============= ================ ==============================================
|
||||
|
||||
|
||||
@@ -218,6 +218,27 @@ of ftrace. Here is a list of some of the key files:
|
||||
|
||||
This displays the total combined size of all the trace buffers.
|
||||
|
||||
buffer_subbuf_size_kb:
|
||||
|
||||
This sets or displays the sub buffer size. The ring buffer is broken up
|
||||
into several same size "sub buffers". An event can not be bigger than
|
||||
the size of the sub buffer. Normally, the sub buffer is the size of the
|
||||
architecture's page (4K on x86). The sub buffer also contains meta data
|
||||
at the start which also limits the size of an event. That means when
|
||||
the sub buffer is a page size, no event can be larger than the page
|
||||
size minus the sub buffer meta data.
|
||||
|
||||
Note, the buffer_subbuf_size_kb is a way for the user to specify the
|
||||
minimum size of the subbuffer. The kernel may make it bigger due to the
|
||||
implementation details, or simply fail the operation if the kernel can
|
||||
not handle the request.
|
||||
|
||||
Changing the sub buffer size allows for events to be larger than the
|
||||
page size.
|
||||
|
||||
Note: When changing the sub-buffer size, tracing is stopped and any
|
||||
data in the ring buffer and the snapshot buffer will be discarded.
|
||||
|
||||
free_buffer:
|
||||
|
||||
If a process is performing tracing, and the ring buffer should be
|
||||
|
||||
+69
-27
@@ -441,6 +441,13 @@ W: http://wiki.analog.com/AD7879
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: drivers/input/touchscreen/ad7879.c
|
||||
|
||||
ADAFRUIT MINI I2C GAMEPAD
|
||||
M: Anshul Dalal <anshulusr@gmail.com>
|
||||
L: linux-input@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/input/adafruit,seesaw-gamepad.yaml
|
||||
F: drivers/input/joystick/adafruit-seesaw.c
|
||||
|
||||
ADDRESS SPACE LAYOUT RANDOMIZATION (ASLR)
|
||||
M: Jiri Kosina <jikos@kernel.org>
|
||||
S: Maintained
|
||||
@@ -3383,9 +3390,8 @@ F: Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml
|
||||
F: drivers/iio/adc/hx711.c
|
||||
|
||||
AX.25 NETWORK LAYER
|
||||
M: Ralf Baechle <ralf@linux-mips.org>
|
||||
L: linux-hams@vger.kernel.org
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
W: https://linux-ax25.in-berlin.de
|
||||
F: include/net/ax25.h
|
||||
F: include/uapi/linux/ax25.h
|
||||
@@ -3624,7 +3630,6 @@ F: drivers/mtd/devices/block2mtd.c
|
||||
|
||||
BLUETOOTH DRIVERS
|
||||
M: Marcel Holtmann <marcel@holtmann.org>
|
||||
M: Johan Hedberg <johan.hedberg@gmail.com>
|
||||
M: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
|
||||
L: linux-bluetooth@vger.kernel.org
|
||||
S: Supported
|
||||
@@ -3687,6 +3692,13 @@ L: bpf@vger.kernel.org
|
||||
S: Supported
|
||||
F: arch/arm64/net/
|
||||
|
||||
BPF JIT for LOONGARCH
|
||||
M: Tiezhu Yang <yangtiezhu@loongson.cn>
|
||||
R: Hengqi Chen <hengqi.chen@gmail.com>
|
||||
L: bpf@vger.kernel.org
|
||||
S: Maintained
|
||||
F: arch/loongarch/net/
|
||||
|
||||
BPF JIT for MIPS (32-BIT AND 64-BIT)
|
||||
M: Johan Almbladh <johan.almbladh@anyfinetworks.com>
|
||||
M: Paul Burton <paulburton@kernel.org>
|
||||
@@ -4719,11 +4731,8 @@ F: drivers/i2c/busses/i2c-octeon*
|
||||
F: drivers/i2c/busses/i2c-thunderx*
|
||||
|
||||
CAVIUM LIQUIDIO NETWORK DRIVER
|
||||
M: Derek Chickles <dchickles@marvell.com>
|
||||
M: Satanand Burla <sburla@marvell.com>
|
||||
M: Felix Manlunas <fmanlunas@marvell.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
S: Orphan
|
||||
W: http://www.marvell.com
|
||||
F: drivers/net/ethernet/cavium/liquidio/
|
||||
|
||||
@@ -5227,7 +5236,7 @@ X: drivers/clk/clkdev.c
|
||||
COMMON INTERNET FILE SYSTEM CLIENT (CIFS and SMB3)
|
||||
M: Steve French <sfrench@samba.org>
|
||||
R: Paulo Alcantara <pc@manguebit.com> (DFS, global name space)
|
||||
R: Ronnie Sahlberg <lsahlber@redhat.com> (directory leases, sparse files)
|
||||
R: Ronnie Sahlberg <ronniesahlberg@gmail.com> (directory leases, sparse files)
|
||||
R: Shyam Prasad N <sprasad@microsoft.com> (multichannel)
|
||||
R: Tom Talpey <tom@talpey.com> (RDMA, smbdirect)
|
||||
L: linux-cifs@vger.kernel.org
|
||||
@@ -5280,6 +5289,7 @@ M: Dan Williams <dan.j.williams@intel.com>
|
||||
L: linux-cxl@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/cxl/
|
||||
F: include/linux/cxl-event.h
|
||||
F: include/uapi/linux/cxl_mem.h
|
||||
F: tools/testing/cxl/
|
||||
|
||||
@@ -7945,12 +7955,13 @@ L: rust-for-linux@vger.kernel.org
|
||||
S: Maintained
|
||||
F: rust/kernel/net/phy.rs
|
||||
|
||||
EXEC & BINFMT API
|
||||
EXEC & BINFMT API, ELF
|
||||
R: Eric Biederman <ebiederm@xmission.com>
|
||||
R: Kees Cook <keescook@chromium.org>
|
||||
L: linux-mm@kvack.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
|
||||
F: Documentation/userspace-api/ELF.rst
|
||||
F: fs/*binfmt_*.c
|
||||
F: fs/exec.c
|
||||
F: include/linux/binfmts.h
|
||||
@@ -8211,6 +8222,19 @@ S: Supported
|
||||
F: fs/iomap/
|
||||
F: include/linux/iomap.h
|
||||
|
||||
FILESYSTEMS [NETFS LIBRARY]
|
||||
M: David Howells <dhowells@redhat.com>
|
||||
L: linux-cachefs@redhat.com (moderated for non-subscribers)
|
||||
L: linux-fsdevel@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/filesystems/caching/
|
||||
F: Documentation/filesystems/netfs_library.rst
|
||||
F: fs/netfs/
|
||||
F: include/linux/fscache*.h
|
||||
F: include/linux/netfs.h
|
||||
F: include/trace/events/fscache.h
|
||||
F: include/trace/events/netfs.h
|
||||
|
||||
FILESYSTEMS [STACKABLE]
|
||||
M: Miklos Szeredi <miklos@szeredi.hu>
|
||||
M: Amir Goldstein <amir73il@gmail.com>
|
||||
@@ -8656,14 +8680,6 @@ F: Documentation/power/freezing-of-tasks.rst
|
||||
F: include/linux/freezer.h
|
||||
F: kernel/freezer.c
|
||||
|
||||
FS-CACHE: LOCAL CACHING FOR NETWORK FILESYSTEMS
|
||||
M: David Howells <dhowells@redhat.com>
|
||||
L: linux-cachefs@redhat.com (moderated for non-subscribers)
|
||||
S: Supported
|
||||
F: Documentation/filesystems/caching/
|
||||
F: fs/fscache/
|
||||
F: include/linux/fscache*.h
|
||||
|
||||
FSCRYPT: FILE SYSTEM LEVEL ENCRYPTION SUPPORT
|
||||
M: Eric Biggers <ebiggers@kernel.org>
|
||||
M: Theodore Y. Ts'o <tytso@mit.edu>
|
||||
@@ -10053,7 +10069,7 @@ F: Documentation/i2c/busses/i2c-parport.rst
|
||||
F: drivers/i2c/busses/i2c-parport.c
|
||||
|
||||
I2C SUBSYSTEM
|
||||
M: Wolfram Sang <wsa@kernel.org>
|
||||
M: Wolfram Sang <wsa+renesas@sang-engineering.com>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
S: Maintained
|
||||
W: https://i2c.wiki.kernel.org/
|
||||
@@ -10231,7 +10247,6 @@ IBM Power SRIOV Virtual NIC Device Driver
|
||||
M: Haren Myneni <haren@linux.ibm.com>
|
||||
M: Rick Lindsley <ricklind@linux.ibm.com>
|
||||
R: Nick Child <nnac123@linux.ibm.com>
|
||||
R: Dany Madden <danymadden@us.ibm.com>
|
||||
R: Thomas Falcon <tlfalcon@linux.ibm.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
@@ -12632,6 +12647,13 @@ S: Maintained
|
||||
F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
|
||||
F: drivers/gpio/gpio-loongson-64bit.c
|
||||
|
||||
LOONGSON LS2X APB DMA DRIVER
|
||||
M: Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
L: dmaengine@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/dma/loongson,ls2x-apbdma.yaml
|
||||
F: drivers/dma/ls2x-apb-dma.c
|
||||
|
||||
LOONGSON LS2X I2C DRIVER
|
||||
M: Binbin Zhou <zhoubinbin@loongson.cn>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
@@ -13002,10 +13024,10 @@ S: Maintained
|
||||
F: drivers/thermal/armada_thermal.c
|
||||
|
||||
MARVELL MVNETA ETHERNET DRIVER
|
||||
M: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
M: Marcin Wojtas <marcin.s.wojtas@gmail.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/marvell/mvneta.*
|
||||
F: drivers/net/ethernet/marvell/mvneta*
|
||||
|
||||
MARVELL MVPP2 ETHERNET DRIVER
|
||||
M: Marcin Wojtas <marcin.s.wojtas@gmail.com>
|
||||
@@ -13125,6 +13147,14 @@ F: Documentation/devicetree/bindings/hwmon/adi,max31827.yaml
|
||||
F: Documentation/hwmon/max31827.rst
|
||||
F: drivers/hwmon/max31827.c
|
||||
|
||||
MAX31335 RTC DRIVER
|
||||
M: Antoniu Miclaus <antoniu.miclaus@analog.com>
|
||||
L: linux-rtc@vger.kernel.org
|
||||
S: Supported
|
||||
W: https://ez.analog.com/linux-software-drivers
|
||||
F: Documentation/devicetree/bindings/rtc/adi,max31335.yaml
|
||||
F: drivers/rtc/rtc-max31335.c
|
||||
|
||||
MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
|
||||
L: linux-hwmon@vger.kernel.org
|
||||
S: Orphan
|
||||
@@ -13647,7 +13677,6 @@ F: drivers/dma/mediatek/
|
||||
|
||||
MEDIATEK ETHERNET DRIVER
|
||||
M: Felix Fietkau <nbd@nbd.name>
|
||||
M: John Crispin <john@phrozen.org>
|
||||
M: Sean Wang <sean.wang@mediatek.com>
|
||||
M: Mark Lee <Mark-MC.Lee@mediatek.com>
|
||||
M: Lorenzo Bianconi <lorenzo@kernel.org>
|
||||
@@ -13803,7 +13832,6 @@ F: include/soc/mediatek/smi.h
|
||||
MEDIATEK SWITCH DRIVER
|
||||
M: Arınç ÜNAL <arinc.unal@arinc9.com>
|
||||
M: Daniel Golle <daniel@makrotopia.org>
|
||||
M: Landen Chao <Landen.Chao@mediatek.com>
|
||||
M: DENG Qingfang <dqfext@gmail.com>
|
||||
M: Sean Wang <sean.wang@mediatek.com>
|
||||
L: netdev@vger.kernel.org
|
||||
@@ -14810,6 +14838,13 @@ S: Maintained
|
||||
F: Documentation/driver-api/tty/moxa-smartio.rst
|
||||
F: drivers/tty/mxser.*
|
||||
|
||||
MP3309C BACKLIGHT DRIVER
|
||||
M: Flavio Suligoi <f.suligoi@asem.it>
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml
|
||||
F: drivers/video/backlight/mp3309c.c
|
||||
|
||||
MR800 AVERMEDIA USB FM RADIO DRIVER
|
||||
M: Alexey Klimov <klimov.linux@gmail.com>
|
||||
L: linux-media@vger.kernel.org
|
||||
@@ -17120,10 +17155,10 @@ PERFORMANCE EVENTS SUBSYSTEM
|
||||
M: Peter Zijlstra <peterz@infradead.org>
|
||||
M: Ingo Molnar <mingo@redhat.com>
|
||||
M: Arnaldo Carvalho de Melo <acme@kernel.org>
|
||||
M: Namhyung Kim <namhyung@kernel.org>
|
||||
R: Mark Rutland <mark.rutland@arm.com>
|
||||
R: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
R: Jiri Olsa <jolsa@kernel.org>
|
||||
R: Namhyung Kim <namhyung@kernel.org>
|
||||
R: Ian Rogers <irogers@google.com>
|
||||
R: Adrian Hunter <adrian.hunter@intel.com>
|
||||
L: linux-perf-users@vger.kernel.org
|
||||
@@ -18443,7 +18478,6 @@ X: include/linux/srcu*.h
|
||||
X: kernel/rcu/srcu*.c
|
||||
|
||||
REAL TIME CLOCK (RTC) SUBSYSTEM
|
||||
M: Alessandro Zummo <a.zummo@towertech.it>
|
||||
M: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
L: linux-rtc@vger.kernel.org
|
||||
S: Maintained
|
||||
@@ -19131,7 +19165,7 @@ F: drivers/iommu/s390-iommu.c
|
||||
|
||||
S390 IUCV NETWORK LAYER
|
||||
M: Alexandra Winter <wintera@linux.ibm.com>
|
||||
M: Wenjia Zhang <wenjia@linux.ibm.com>
|
||||
M: Thorsten Winkler <twinkler@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
@@ -19150,7 +19184,7 @@ F: arch/s390/mm
|
||||
|
||||
S390 NETWORK DRIVERS
|
||||
M: Alexandra Winter <wintera@linux.ibm.com>
|
||||
M: Wenjia Zhang <wenjia@linux.ibm.com>
|
||||
M: Thorsten Winkler <twinkler@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
L: netdev@vger.kernel.org
|
||||
S: Supported
|
||||
@@ -23009,6 +23043,7 @@ M: Alex Williamson <alex.williamson@redhat.com>
|
||||
L: kvm@vger.kernel.org
|
||||
S: Maintained
|
||||
T: git https://github.com/awilliam/linux-vfio.git
|
||||
F: Documentation/ABI/testing/debugfs-vfio
|
||||
F: Documentation/ABI/testing/sysfs-devices-vfio-dev
|
||||
F: Documentation/driver-api/vfio.rst
|
||||
F: drivers/vfio/
|
||||
@@ -23044,6 +23079,13 @@ L: kvm@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/vfio/pci/mlx5/
|
||||
|
||||
VFIO VIRTIO PCI DRIVER
|
||||
M: Yishai Hadas <yishaih@nvidia.com>
|
||||
L: kvm@vger.kernel.org
|
||||
L: virtualization@lists.linux-foundation.org
|
||||
S: Maintained
|
||||
F: drivers/vfio/pci/virtio
|
||||
|
||||
VFIO PCI DEVICE SPECIFIC DRIVERS
|
||||
R: Jason Gunthorpe <jgg@nvidia.com>
|
||||
R: Yishai Hadas <yishaih@nvidia.com>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 7
|
||||
PATCHLEVEL = 8
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION =
|
||||
EXTRAVERSION = -rc1
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@@ -173,6 +173,15 @@ export KBUILD_MIXED_TREE
|
||||
# TODO(b/205893923): Revert this hack once it is properly handled.
|
||||
export mixed-build-prefix
|
||||
|
||||
# backward compatibility
|
||||
KBUILD_EXTRA_WARN ?= $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)
|
||||
|
||||
ifeq ("$(origin W)", "command line")
|
||||
KBUILD_EXTRA_WARN := $(W)
|
||||
endif
|
||||
|
||||
export KBUILD_EXTRA_WARN
|
||||
|
||||
# Kbuild will save output files in the current working directory.
|
||||
# This does not need to match to the root of the kernel source tree.
|
||||
#
|
||||
@@ -199,14 +208,11 @@ ifeq ("$(origin O)", "command line")
|
||||
endif
|
||||
|
||||
ifneq ($(KBUILD_OUTPUT),)
|
||||
# Make's built-in functions such as $(abspath ...), $(realpath ...) cannot
|
||||
# expand a shell special character '~'. We use a somewhat tedious way here.
|
||||
abs_objtree := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd)
|
||||
$(if $(abs_objtree),, \
|
||||
$(error failed to create output directory "$(KBUILD_OUTPUT)"))
|
||||
|
||||
# $(realpath ...) gets empty if the path does not exist. Run 'mkdir -p' first.
|
||||
$(shell mkdir -p "$(KBUILD_OUTPUT)")
|
||||
# $(realpath ...) resolves symlinks
|
||||
abs_objtree := $(realpath $(abs_objtree))
|
||||
abs_objtree := $(realpath $(KBUILD_OUTPUT))
|
||||
$(if $(abs_objtree),,$(error failed to create output directory "$(KBUILD_OUTPUT)"))
|
||||
endif # ifneq ($(KBUILD_OUTPUT),)
|
||||
|
||||
ifneq ($(words $(subst :, ,$(abs_srctree))), 1)
|
||||
@@ -627,8 +633,6 @@ export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL KBUILD_RUSTFLAGS_KERNEL
|
||||
export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \
|
||||
-name CVS -o -name .pc -o -name .hg -o -name .git \) \
|
||||
-prune -o
|
||||
export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
|
||||
--exclude CVS --exclude .pc --exclude .hg --exclude .git
|
||||
|
||||
# ===========================================================================
|
||||
# Rules shared between *config targets and build targets
|
||||
@@ -1009,6 +1013,10 @@ NOSTDINC_FLAGS += -nostdinc
|
||||
# perform bounds checking.
|
||||
KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)
|
||||
|
||||
#Currently, disable -Wstringop-overflow for GCC 11, globally.
|
||||
KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-option, -Wno-stringop-overflow)
|
||||
KBUILD_CFLAGS-$(CONFIG_CC_STRINGOP_OVERFLOW) += $(call cc-option, -Wstringop-overflow)
|
||||
|
||||
# disable invalid "can't wrap" optimizations for signed / pointers
|
||||
KBUILD_CFLAGS += -fno-strict-overflow
|
||||
|
||||
@@ -1701,6 +1709,7 @@ help:
|
||||
@echo ' 1: warnings which may be relevant and do not occur too often'
|
||||
@echo ' 2: warnings which occur quite often but may still be relevant'
|
||||
@echo ' 3: more obscure warnings, can most likely be ignored'
|
||||
@echo ' c: extra checks in the configuration stage (Kconfig)'
|
||||
@echo ' e: warnings are being treated as errors'
|
||||
@echo ' Multiple levels can be combined with W=12 or W=123'
|
||||
@$(if $(dtstree), \
|
||||
|
||||
@@ -301,6 +301,11 @@ config ARCH_HAS_DMA_CLEAR_UNCACHED
|
||||
config ARCH_HAS_CPU_FINALIZE_INIT
|
||||
bool
|
||||
|
||||
# The architecture has a per-task state that includes the mm's PASID
|
||||
config ARCH_HAS_CPU_PASID
|
||||
bool
|
||||
select IOMMU_MM_DATA
|
||||
|
||||
config HAVE_ARCH_THREAD_STRUCT_WHITELIST
|
||||
bool
|
||||
help
|
||||
|
||||
@@ -80,7 +80,7 @@ init_rtc_epoch(void)
|
||||
static int
|
||||
alpha_rtc_read_time(struct device *dev, struct rtc_time *tm)
|
||||
{
|
||||
int ret = mc146818_get_time(tm);
|
||||
int ret = mc146818_get_time(tm, 10);
|
||||
|
||||
if (ret < 0) {
|
||||
dev_err_ratelimited(dev, "unable to read current time\n");
|
||||
|
||||
@@ -40,6 +40,7 @@ void dma_cache_wback(phys_addr_t start, unsigned long sz);
|
||||
|
||||
/* TBD: optimize this */
|
||||
#define flush_cache_vmap(start, end) flush_cache_all()
|
||||
#define flush_cache_vmap_early(start, end) do { } while (0)
|
||||
#define flush_cache_vunmap(start, end) flush_cache_all()
|
||||
|
||||
#define flush_cache_dup_mm(mm) /* called on fork (VIVT only) */
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size,
|
||||
* Plug in direct dma map ops.
|
||||
*/
|
||||
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||
const struct iommu_ops *iommu, bool coherent)
|
||||
bool coherent)
|
||||
{
|
||||
/*
|
||||
* IOC hardware snoops all DMA traffic keeping the caches consistent
|
||||
|
||||
@@ -138,7 +138,8 @@ CONFIG_PWM_MXS=y
|
||||
CONFIG_NVMEM_MXS_OCOTP=y
|
||||
CONFIG_EXT4_FS=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
CONFIG_FSCACHE=m
|
||||
CONFIG_NETFS_SUPPORT=m
|
||||
CONFIG_FSCACHE=y
|
||||
CONFIG_FSCACHE_STATS=y
|
||||
CONFIG_CACHEFILES=m
|
||||
CONFIG_VFAT_FS=y
|
||||
|
||||
@@ -340,6 +340,8 @@ static inline void flush_cache_vmap(unsigned long start, unsigned long end)
|
||||
dsb(ishst);
|
||||
}
|
||||
|
||||
#define flush_cache_vmap_early(start, end) do { } while (0)
|
||||
|
||||
static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
|
||||
{
|
||||
if (!cache_is_vipt_nonaliasing())
|
||||
|
||||
@@ -34,7 +34,7 @@ void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size,
|
||||
}
|
||||
|
||||
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||
const struct iommu_ops *iommu, bool coherent)
|
||||
bool coherent)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_CPU_V7M)) {
|
||||
/*
|
||||
|
||||
@@ -1710,7 +1710,7 @@ void arm_iommu_detach_device(struct device *dev)
|
||||
EXPORT_SYMBOL_GPL(arm_iommu_detach_device);
|
||||
|
||||
static void arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||
const struct iommu_ops *iommu, bool coherent)
|
||||
bool coherent)
|
||||
{
|
||||
struct dma_iommu_mapping *mapping;
|
||||
|
||||
@@ -1745,7 +1745,7 @@ static void arm_teardown_iommu_dma_ops(struct device *dev)
|
||||
#else
|
||||
|
||||
static void arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||
const struct iommu_ops *iommu, bool coherent)
|
||||
bool coherent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1754,7 +1754,7 @@ static void arm_teardown_iommu_dma_ops(struct device *dev) { }
|
||||
#endif /* CONFIG_ARM_DMA_USE_IOMMU */
|
||||
|
||||
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||
const struct iommu_ops *iommu, bool coherent)
|
||||
bool coherent)
|
||||
{
|
||||
/*
|
||||
* Due to legacy code that sets the ->dma_coherent flag from a bus
|
||||
@@ -1773,8 +1773,8 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||
if (dev->dma_ops)
|
||||
return;
|
||||
|
||||
if (iommu)
|
||||
arm_setup_iommu_dma_ops(dev, dma_base, size, iommu, coherent);
|
||||
if (device_iommu_mapped(dev))
|
||||
arm_setup_iommu_dma_ops(dev, dma_base, size, coherent);
|
||||
|
||||
xen_setup_dma_ops(dev);
|
||||
dev->archdata.dma_ops_setup = true;
|
||||
|
||||
@@ -1039,8 +1039,12 @@ config ARM64_ERRATUM_2645198
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD
|
||||
bool
|
||||
|
||||
config ARM64_ERRATUM_2966298
|
||||
bool "Cortex-A520: 2966298: workaround for speculatively executed unprivileged load"
|
||||
select ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD
|
||||
default y
|
||||
help
|
||||
This option adds the workaround for ARM Cortex-A520 erratum 2966298.
|
||||
@@ -1052,6 +1056,20 @@ config ARM64_ERRATUM_2966298
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config ARM64_ERRATUM_3117295
|
||||
bool "Cortex-A510: 3117295: workaround for speculatively executed unprivileged load"
|
||||
select ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD
|
||||
default y
|
||||
help
|
||||
This option adds the workaround for ARM Cortex-A510 erratum 3117295.
|
||||
|
||||
On an affected Cortex-A510 core, a speculatively executed unprivileged
|
||||
load might leak data from a privileged level via a cache side channel.
|
||||
|
||||
Work around this problem by executing a TLBI before returning to EL0.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config CAVIUM_ERRATUM_22375
|
||||
bool "Cavium erratum 22375, 24313"
|
||||
default y
|
||||
|
||||
@@ -760,32 +760,25 @@ alternative_endif
|
||||
.endm
|
||||
|
||||
/*
|
||||
* Check whether preempt/bh-disabled asm code should yield as soon as
|
||||
* it is able. This is the case if we are currently running in task
|
||||
* context, and either a softirq is pending, or the TIF_NEED_RESCHED
|
||||
* flag is set and re-enabling preemption a single time would result in
|
||||
* a preempt count of zero. (Note that the TIF_NEED_RESCHED flag is
|
||||
* stored negated in the top word of the thread_info::preempt_count
|
||||
* Check whether asm code should yield as soon as it is able. This is
|
||||
* the case if we are currently running in task context, and the
|
||||
* TIF_NEED_RESCHED flag is set. (Note that the TIF_NEED_RESCHED flag
|
||||
* is stored negated in the top word of the thread_info::preempt_count
|
||||
* field)
|
||||
*/
|
||||
.macro cond_yield, lbl:req, tmp:req, tmp2:req
|
||||
.macro cond_yield, lbl:req, tmp:req, tmp2
|
||||
#ifdef CONFIG_PREEMPT_VOLUNTARY
|
||||
get_current_task \tmp
|
||||
ldr \tmp, [\tmp, #TSK_TI_PREEMPT]
|
||||
/*
|
||||
* If we are serving a softirq, there is no point in yielding: the
|
||||
* softirq will not be preempted no matter what we do, so we should
|
||||
* run to completion as quickly as we can.
|
||||
* run to completion as quickly as we can. The preempt_count field will
|
||||
* have BIT(SOFTIRQ_SHIFT) set in this case, so the zero check will
|
||||
* catch this case too.
|
||||
*/
|
||||
tbnz \tmp, #SOFTIRQ_SHIFT, .Lnoyield_\@
|
||||
#ifdef CONFIG_PREEMPTION
|
||||
sub \tmp, \tmp, #PREEMPT_DISABLE_OFFSET
|
||||
cbz \tmp, \lbl
|
||||
#endif
|
||||
adr_l \tmp, irq_stat + IRQ_CPUSTAT_SOFTIRQ_PENDING
|
||||
get_this_cpu_offset \tmp2
|
||||
ldr w\tmp, [\tmp, \tmp2]
|
||||
cbnz w\tmp, \lbl // yield on pending softirq in task context
|
||||
.Lnoyield_\@:
|
||||
.endm
|
||||
|
||||
/*
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
#include <linux/cpumask.h>
|
||||
|
||||
#include <asm-generic/irq.h>
|
||||
|
||||
void arch_trigger_cpumask_backtrace(const cpumask_t *mask, int exclude_cpu);
|
||||
|
||||
@@ -73,7 +73,13 @@ obj-$(CONFIG_ARM64_MTE) += mte.o
|
||||
obj-y += vdso-wrap.o
|
||||
obj-$(CONFIG_COMPAT_VDSO) += vdso32-wrap.o
|
||||
obj-$(CONFIG_UNWIND_PATCH_PAC_INTO_SCS) += patch-scs.o
|
||||
CFLAGS_patch-scs.o += -mbranch-protection=none
|
||||
|
||||
# We need to prevent the SCS patching code from patching itself. Using
|
||||
# -mbranch-protection=none here to avoid the patchable PAC opcodes from being
|
||||
# generated triggers an issue with full LTO on Clang, which stops emitting PAC
|
||||
# instructions altogether. So instead, omit the unwind tables used by the
|
||||
# patching code, so it will not be able to locate its own PAC instructions.
|
||||
CFLAGS_patch-scs.o += -fno-asynchronous-unwind-tables -fno-unwind-tables
|
||||
|
||||
# Force dependency (vdso*-wrap.S includes vdso.so through incbin)
|
||||
$(obj)/vdso-wrap.o: $(obj)/vdso/vdso.so
|
||||
|
||||
@@ -117,8 +117,6 @@ int main(void)
|
||||
DEFINE(DMA_FROM_DEVICE, DMA_FROM_DEVICE);
|
||||
BLANK();
|
||||
DEFINE(PREEMPT_DISABLE_OFFSET, PREEMPT_DISABLE_OFFSET);
|
||||
DEFINE(SOFTIRQ_SHIFT, SOFTIRQ_SHIFT);
|
||||
DEFINE(IRQ_CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
|
||||
BLANK();
|
||||
DEFINE(CPU_BOOT_TASK, offsetof(struct secondary_data, task));
|
||||
BLANK();
|
||||
|
||||
@@ -416,6 +416,19 @@ static struct midr_range broken_aarch32_aes[] = {
|
||||
};
|
||||
#endif /* CONFIG_ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE */
|
||||
|
||||
#ifdef CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD
|
||||
static const struct midr_range erratum_spec_unpriv_load_list[] = {
|
||||
#ifdef CONFIG_ARM64_ERRATUM_3117295
|
||||
MIDR_ALL_VERSIONS(MIDR_CORTEX_A510),
|
||||
#endif
|
||||
#ifdef CONFIG_ARM64_ERRATUM_2966298
|
||||
/* Cortex-A520 r0p0 to r0p1 */
|
||||
MIDR_REV_RANGE(MIDR_CORTEX_A520, 0, 0, 1),
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||
#ifdef CONFIG_ARM64_WORKAROUND_CLEAN_CACHE
|
||||
{
|
||||
@@ -713,12 +726,12 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
||||
MIDR_FIXED(MIDR_CPU_VAR_REV(1,1), BIT(25)),
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_ARM64_ERRATUM_2966298
|
||||
#ifdef CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD
|
||||
{
|
||||
.desc = "ARM erratum 2966298",
|
||||
.capability = ARM64_WORKAROUND_2966298,
|
||||
.desc = "ARM errata 2966298, 3117295",
|
||||
.capability = ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD,
|
||||
/* Cortex-A520 r0p0 - r0p1 */
|
||||
ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A520, 0, 0, 1),
|
||||
ERRATA_MIDR_RANGE_LIST(erratum_spec_unpriv_load_list),
|
||||
},
|
||||
#endif
|
||||
#ifdef CONFIG_AMPERE_ERRATUM_AC03_CPU_38
|
||||
|
||||
+14
-11
@@ -428,16 +428,9 @@ alternative_else_nop_endif
|
||||
ldp x28, x29, [sp, #16 * 14]
|
||||
|
||||
.if \el == 0
|
||||
alternative_if ARM64_WORKAROUND_2966298
|
||||
tlbi vale1, xzr
|
||||
dsb nsh
|
||||
alternative_else_nop_endif
|
||||
alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0
|
||||
ldr lr, [sp, #S_LR]
|
||||
add sp, sp, #PT_REGS_SIZE // restore sp
|
||||
eret
|
||||
alternative_else_nop_endif
|
||||
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
|
||||
alternative_insn "b .L_skip_tramp_exit_\@", nop, ARM64_UNMAP_KERNEL_AT_EL0
|
||||
|
||||
msr far_el1, x29
|
||||
|
||||
ldr_this_cpu x30, this_cpu_vector, x29
|
||||
@@ -446,16 +439,26 @@ alternative_else_nop_endif
|
||||
ldr lr, [sp, #S_LR] // restore x30
|
||||
add sp, sp, #PT_REGS_SIZE // restore sp
|
||||
br x29
|
||||
|
||||
.L_skip_tramp_exit_\@:
|
||||
#endif
|
||||
.else
|
||||
.endif
|
||||
|
||||
ldr lr, [sp, #S_LR]
|
||||
add sp, sp, #PT_REGS_SIZE // restore sp
|
||||
|
||||
.if \el == 0
|
||||
/* This must be after the last explicit memory access */
|
||||
alternative_if ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD
|
||||
tlbi vale1, xzr
|
||||
dsb nsh
|
||||
alternative_else_nop_endif
|
||||
.else
|
||||
/* Ensure any device/NC reads complete */
|
||||
alternative_insn nop, "dmb sy", ARM64_WORKAROUND_1508412
|
||||
.endif
|
||||
|
||||
eret
|
||||
.endif
|
||||
sb
|
||||
.endm
|
||||
|
||||
|
||||
@@ -898,10 +898,8 @@ int vec_set_vector_length(struct task_struct *task, enum vec_type type,
|
||||
* allocate SVE now in case it is needed for use in streaming
|
||||
* mode.
|
||||
*/
|
||||
if (system_supports_sve()) {
|
||||
sve_free(task);
|
||||
sve_alloc(task, true);
|
||||
}
|
||||
sve_free(task);
|
||||
sve_alloc(task, true);
|
||||
|
||||
if (free_sme)
|
||||
sme_free(task);
|
||||
@@ -1219,8 +1217,10 @@ void fpsimd_release_task(struct task_struct *dead_task)
|
||||
*/
|
||||
void sme_alloc(struct task_struct *task, bool flush)
|
||||
{
|
||||
if (task->thread.sme_state && flush) {
|
||||
memset(task->thread.sme_state, 0, sme_state_size(task));
|
||||
if (task->thread.sme_state) {
|
||||
if (flush)
|
||||
memset(task->thread.sme_state, 0,
|
||||
sme_state_size(task));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1108,12 +1108,13 @@ static int za_set(struct task_struct *target,
|
||||
}
|
||||
}
|
||||
|
||||
/* Allocate/reinit ZA storage */
|
||||
sme_alloc(target, true);
|
||||
if (!target->thread.sme_state) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
* Only flush the storage if PSTATE.ZA was not already set,
|
||||
* otherwise preserve any existing data.
|
||||
*/
|
||||
sme_alloc(target, !thread_za_enabled(&target->thread));
|
||||
if (!target->thread.sme_state)
|
||||
return -ENOMEM;
|
||||
|
||||
/* If there is no data then disable ZA */
|
||||
if (!count) {
|
||||
|
||||
@@ -48,7 +48,7 @@ void arch_teardown_dma_ops(struct device *dev)
|
||||
#endif
|
||||
|
||||
void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||
const struct iommu_ops *iommu, bool coherent)
|
||||
bool coherent)
|
||||
{
|
||||
int cls = cache_line_size_of_cpu();
|
||||
|
||||
@@ -59,7 +59,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
|
||||
ARCH_DMA_MINALIGN, cls);
|
||||
|
||||
dev->dma_coherent = coherent;
|
||||
if (iommu) {
|
||||
if (device_iommu_mapped(dev)) {
|
||||
iommu_setup_dma_ops(dev, dma_base, dma_base + size - 1);
|
||||
trace_android_rvh_iommu_setup_dma_ops(dev, dma_base, dma_base + size - 1);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ WORKAROUND_2077057
|
||||
WORKAROUND_2457168
|
||||
WORKAROUND_2645198
|
||||
WORKAROUND_2658417
|
||||
WORKAROUND_2966298
|
||||
WORKAROUND_AMPERE_AC03_CPU_38
|
||||
WORKAROUND_TRBE_OVERWRITE_FILL_MODE
|
||||
WORKAROUND_TSB_FLUSH_FAILURE
|
||||
@@ -100,3 +99,4 @@ WORKAROUND_NVIDIA_CARMEL_CNP
|
||||
WORKAROUND_QCOM_FALKOR_E1003
|
||||
WORKAROUND_REPEAT_TLBI
|
||||
WORKAROUND_SPECULATIVE_AT
|
||||
WORKAROUND_SPECULATIVE_UNPRIV_LOAD
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user