mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
Merge tag 'asoc-v6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v6.18 A relatively quiet release for ASoC, we've had a lot of maintainance work going on and several new drivers but really the most remarkable thing is that we removed a driver, the WL1273 driver used in some old Nokia systems that have had the underlying system support removed from the kernel. - Morimoto-san continues his work on cleanups of the core APIs and enforcement of abstraction layers. - Lots of cleanups and conversions of DT bindings. - Substantial maintainance work on the Intel AVS drivers. - Support for Qualcomm Glymur and PM4125, Realtek RT1321, Shanghai FourSemi FS2104/5S, Texas Instruments PCM1754. - Remove support for TI WL1273.
This commit is contained in:
1
.mailmap
1
.mailmap
@@ -589,6 +589,7 @@ Nikolay Aleksandrov <razor@blackwall.org> <nikolay@redhat.com>
|
|||||||
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@cumulusnetworks.com>
|
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@cumulusnetworks.com>
|
||||||
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@nvidia.com>
|
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@nvidia.com>
|
||||||
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@isovalent.com>
|
Nikolay Aleksandrov <razor@blackwall.org> <nikolay@isovalent.com>
|
||||||
|
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba> <nobuhiro1.iwamatsu@toshiba.co.jp>
|
||||||
Odelu Kukatla <quic_okukatla@quicinc.com> <okukatla@codeaurora.org>
|
Odelu Kukatla <quic_okukatla@quicinc.com> <okukatla@codeaurora.org>
|
||||||
Oleksandr Natalenko <oleksandr@natalenko.name> <oleksandr@redhat.com>
|
Oleksandr Natalenko <oleksandr@natalenko.name> <oleksandr@redhat.com>
|
||||||
Oleksij Rempel <linux@rempel-privat.de> <bug-track@fisher-privat.net>
|
Oleksij Rempel <linux@rempel-privat.de> <bug-track@fisher-privat.net>
|
||||||
|
|||||||
7
CREDITS
7
CREDITS
@@ -3222,6 +3222,10 @@ D: AIC5800 IEEE 1394, RAW I/O on 1394
|
|||||||
D: Starter of Linux1394 effort
|
D: Starter of Linux1394 effort
|
||||||
S: ask per mail for current address
|
S: ask per mail for current address
|
||||||
|
|
||||||
|
N: Boris Pismenny
|
||||||
|
E: borisp@mellanox.com
|
||||||
|
D: Kernel TLS implementation and offload support.
|
||||||
|
|
||||||
N: Nicolas Pitre
|
N: Nicolas Pitre
|
||||||
E: nico@fluxnic.net
|
E: nico@fluxnic.net
|
||||||
D: StrongARM SA1100 support integrator & hacker
|
D: StrongARM SA1100 support integrator & hacker
|
||||||
@@ -4168,6 +4172,9 @@ S: 1513 Brewster Dr.
|
|||||||
S: Carrollton, TX 75010
|
S: Carrollton, TX 75010
|
||||||
S: USA
|
S: USA
|
||||||
|
|
||||||
|
N: Dave Watson
|
||||||
|
D: Kernel TLS implementation.
|
||||||
|
|
||||||
N: Tim Waugh
|
N: Tim Waugh
|
||||||
E: tim@cyberelk.net
|
E: tim@cyberelk.net
|
||||||
D: Co-architect of the parallel-port sharing system
|
D: Co-architect of the parallel-port sharing system
|
||||||
|
|||||||
@@ -586,6 +586,7 @@ What: /sys/devices/system/cpu/vulnerabilities
|
|||||||
/sys/devices/system/cpu/vulnerabilities/srbds
|
/sys/devices/system/cpu/vulnerabilities/srbds
|
||||||
/sys/devices/system/cpu/vulnerabilities/tsa
|
/sys/devices/system/cpu/vulnerabilities/tsa
|
||||||
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
|
/sys/devices/system/cpu/vulnerabilities/tsx_async_abort
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/vmscape
|
||||||
Date: January 2018
|
Date: January 2018
|
||||||
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
||||||
Description: Information about CPU vulnerabilities
|
Description: Information about CPU vulnerabilities
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ Spectre_v2 X X
|
|||||||
Spectre_v2_user X X * (Note 1)
|
Spectre_v2_user X X * (Note 1)
|
||||||
SRBDS X X X X
|
SRBDS X X X X
|
||||||
SRSO X X X X
|
SRSO X X X X
|
||||||
SSB (Note 4)
|
SSB X
|
||||||
TAA X X X X * (Note 2)
|
TAA X X X X * (Note 2)
|
||||||
TSA X X X X
|
TSA X X X X
|
||||||
=============== ============== ============ ============= ============== ============ ========
|
=============== ============== ============ ============= ============== ============ ========
|
||||||
@@ -229,9 +229,6 @@ Notes:
|
|||||||
3 -- Disables SMT if cross-thread mitigations are fully enabled, the CPU is
|
3 -- Disables SMT if cross-thread mitigations are fully enabled, the CPU is
|
||||||
vulnerable, and STIBP is not supported
|
vulnerable, and STIBP is not supported
|
||||||
|
|
||||||
4 -- Speculative store bypass is always enabled by default (no kernel
|
|
||||||
mitigation applied) unless overridden with spec_store_bypass_disable option
|
|
||||||
|
|
||||||
When an attack-vector is disabled, all mitigations for the vulnerabilities
|
When an attack-vector is disabled, all mitigations for the vulnerabilities
|
||||||
listed in the above table are disabled, unless mitigation is required for a
|
listed in the above table are disabled, unless mitigation is required for a
|
||||||
different enabled attack-vector or a mitigation is explicitly selected via a
|
different enabled attack-vector or a mitigation is explicitly selected via a
|
||||||
|
|||||||
@@ -26,3 +26,4 @@ are configurable at compile, boot or run time.
|
|||||||
rsb
|
rsb
|
||||||
old_microcode
|
old_microcode
|
||||||
indirect-target-selection
|
indirect-target-selection
|
||||||
|
vmscape
|
||||||
|
|||||||
110
Documentation/admin-guide/hw-vuln/vmscape.rst
Normal file
110
Documentation/admin-guide/hw-vuln/vmscape.rst
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
VMSCAPE
|
||||||
|
=======
|
||||||
|
|
||||||
|
VMSCAPE is a vulnerability that may allow a guest to influence the branch
|
||||||
|
prediction in host userspace. It particularly affects hypervisors like QEMU.
|
||||||
|
|
||||||
|
Even if a hypervisor may not have any sensitive data like disk encryption keys,
|
||||||
|
guest-userspace may be able to attack the guest-kernel using the hypervisor as
|
||||||
|
a confused deputy.
|
||||||
|
|
||||||
|
Affected processors
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The following CPU families are affected by VMSCAPE:
|
||||||
|
|
||||||
|
**Intel processors:**
|
||||||
|
- Skylake generation (Parts without Enhanced-IBRS)
|
||||||
|
- Cascade Lake generation - (Parts affected by ITS guest/host separation)
|
||||||
|
- Alder Lake and newer (Parts affected by BHI)
|
||||||
|
|
||||||
|
Note that, BHI affected parts that use BHB clearing software mitigation e.g.
|
||||||
|
Icelake are not vulnerable to VMSCAPE.
|
||||||
|
|
||||||
|
**AMD processors:**
|
||||||
|
- Zen series (families 0x17, 0x19, 0x1a)
|
||||||
|
|
||||||
|
** Hygon processors:**
|
||||||
|
- Family 0x18
|
||||||
|
|
||||||
|
Mitigation
|
||||||
|
----------
|
||||||
|
|
||||||
|
Conditional IBPB
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Kernel tracks when a CPU has run a potentially malicious guest and issues an
|
||||||
|
IBPB before the first exit to userspace after VM-exit. If userspace did not run
|
||||||
|
between VM-exit and the next VM-entry, no IBPB is issued.
|
||||||
|
|
||||||
|
Note that the existing userspace mitigation against Spectre-v2 is effective in
|
||||||
|
protecting the userspace. They are insufficient to protect the userspace VMMs
|
||||||
|
from a malicious guest. This is because Spectre-v2 mitigations are applied at
|
||||||
|
context switch time, while the userspace VMM can run after a VM-exit without a
|
||||||
|
context switch.
|
||||||
|
|
||||||
|
Vulnerability enumeration and mitigation is not applied inside a guest. This is
|
||||||
|
because nested hypervisors should already be deploying IBPB to isolate
|
||||||
|
themselves from nested guests.
|
||||||
|
|
||||||
|
SMT considerations
|
||||||
|
------------------
|
||||||
|
|
||||||
|
When Simultaneous Multi-Threading (SMT) is enabled, hypervisors can be
|
||||||
|
vulnerable to cross-thread attacks. For complete protection against VMSCAPE
|
||||||
|
attacks in SMT environments, STIBP should be enabled.
|
||||||
|
|
||||||
|
The kernel will issue a warning if SMT is enabled without adequate STIBP
|
||||||
|
protection. Warning is not issued when:
|
||||||
|
|
||||||
|
- SMT is disabled
|
||||||
|
- STIBP is enabled system-wide
|
||||||
|
- Intel eIBRS is enabled (which implies STIBP protection)
|
||||||
|
|
||||||
|
System information and options
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
The sysfs file showing VMSCAPE mitigation status is:
|
||||||
|
|
||||||
|
/sys/devices/system/cpu/vulnerabilities/vmscape
|
||||||
|
|
||||||
|
The possible values in this file are:
|
||||||
|
|
||||||
|
* 'Not affected':
|
||||||
|
|
||||||
|
The processor is not vulnerable to VMSCAPE attacks.
|
||||||
|
|
||||||
|
* 'Vulnerable':
|
||||||
|
|
||||||
|
The processor is vulnerable and no mitigation has been applied.
|
||||||
|
|
||||||
|
* 'Mitigation: IBPB before exit to userspace':
|
||||||
|
|
||||||
|
Conditional IBPB mitigation is enabled. The kernel tracks when a CPU has
|
||||||
|
run a potentially malicious guest and issues an IBPB before the first
|
||||||
|
exit to userspace after VM-exit.
|
||||||
|
|
||||||
|
* 'Mitigation: IBPB on VMEXIT':
|
||||||
|
|
||||||
|
IBPB is issued on every VM-exit. This occurs when other mitigations like
|
||||||
|
RETBLEED or SRSO are already issuing IBPB on VM-exit.
|
||||||
|
|
||||||
|
Mitigation control on the kernel command line
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
|
The mitigation can be controlled via the ``vmscape=`` command line parameter:
|
||||||
|
|
||||||
|
* ``vmscape=off``:
|
||||||
|
|
||||||
|
Disable the VMSCAPE mitigation.
|
||||||
|
|
||||||
|
* ``vmscape=ibpb``:
|
||||||
|
|
||||||
|
Enable conditional IBPB mitigation (default when CONFIG_MITIGATION_VMSCAPE=y).
|
||||||
|
|
||||||
|
* ``vmscape=force``:
|
||||||
|
|
||||||
|
Force vulnerability detection and mitigation even on processors that are
|
||||||
|
not known to be affected.
|
||||||
@@ -3829,6 +3829,7 @@
|
|||||||
srbds=off [X86,INTEL]
|
srbds=off [X86,INTEL]
|
||||||
ssbd=force-off [ARM64]
|
ssbd=force-off [ARM64]
|
||||||
tsx_async_abort=off [X86]
|
tsx_async_abort=off [X86]
|
||||||
|
vmscape=off [X86]
|
||||||
|
|
||||||
Exceptions:
|
Exceptions:
|
||||||
This does not have any effect on
|
This does not have any effect on
|
||||||
@@ -8041,6 +8042,16 @@
|
|||||||
vmpoff= [KNL,S390] Perform z/VM CP command after power off.
|
vmpoff= [KNL,S390] Perform z/VM CP command after power off.
|
||||||
Format: <command>
|
Format: <command>
|
||||||
|
|
||||||
|
vmscape= [X86] Controls mitigation for VMscape attacks.
|
||||||
|
VMscape attacks can leak information from a userspace
|
||||||
|
hypervisor to a guest via speculative side-channels.
|
||||||
|
|
||||||
|
off - disable the mitigation
|
||||||
|
ibpb - use Indirect Branch Prediction Barrier
|
||||||
|
(IBPB) mitigation (default)
|
||||||
|
force - force vulnerability detection even on
|
||||||
|
unaffected processors
|
||||||
|
|
||||||
vsyscall= [X86-64,EARLY]
|
vsyscall= [X86-64,EARLY]
|
||||||
Controls the behavior of vsyscalls (i.e. calls to
|
Controls the behavior of vsyscalls (i.e. calls to
|
||||||
fixed addresses of 0xffffffffff600x00 from legacy
|
fixed addresses of 0xffffffffff600x00 from legacy
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ properties:
|
|||||||
- const: bus
|
- const: bus
|
||||||
- const: core
|
- const: core
|
||||||
- const: vsync
|
- const: vsync
|
||||||
- const: lut
|
|
||||||
- const: tbu
|
- const: tbu
|
||||||
- const: tbu_rt
|
- const: tbu_rt
|
||||||
# MSM8996 has additional iommu clock
|
# MSM8996 has additional iommu clock
|
||||||
|
|||||||
@@ -92,8 +92,12 @@ required:
|
|||||||
anyOf:
|
anyOf:
|
||||||
- required:
|
- required:
|
||||||
- qcom,powered-remotely
|
- qcom,powered-remotely
|
||||||
|
- num-channels
|
||||||
|
- qcom,num-ees
|
||||||
- required:
|
- required:
|
||||||
- qcom,controlled-remotely
|
- qcom,controlled-remotely
|
||||||
|
- num-channels
|
||||||
|
- qcom,num-ees
|
||||||
- required:
|
- required:
|
||||||
- clocks
|
- clocks
|
||||||
- clock-names
|
- clock-names
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
Texas Instruments TWL family (twl4030) audio module
|
|
||||||
|
|
||||||
The audio module inside the TWL family consist of an audio codec and a vibra
|
|
||||||
driver.
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible : must be "ti,twl4030-audio"
|
|
||||||
|
|
||||||
Optional properties, nodes:
|
|
||||||
|
|
||||||
Audio functionality:
|
|
||||||
- codec { }: Need to be present if the audio functionality is used. Within this
|
|
||||||
section the following options can be used:
|
|
||||||
- ti,digimic_delay: Delay need after enabling the digimic to reduce artifacts
|
|
||||||
from the start of the recorded sample (in ms)
|
|
||||||
-ti,ramp_delay_value: HS ramp delay configuration to reduce pop noise
|
|
||||||
-ti,hs_extmute: Use external mute for HS pop reduction
|
|
||||||
-ti,hs_extmute_gpio: Use external GPIO to control the external mute
|
|
||||||
-ti,offset_cncl_path: Offset cancellation path selection, refer to TRM for the
|
|
||||||
valid values.
|
|
||||||
|
|
||||||
Vibra functionality
|
|
||||||
- ti,enable-vibra: Need to be set to <1> if the vibra functionality is used. if
|
|
||||||
missing or it is 0, the vibra functionality is disabled.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
&i2c1 {
|
|
||||||
clock-frequency = <2600000>;
|
|
||||||
|
|
||||||
twl: twl@48 {
|
|
||||||
reg = <0x48>;
|
|
||||||
interrupts = <7>; /* SYS_NIRQ cascaded to intc */
|
|
||||||
interrupt-parent = <&intc>;
|
|
||||||
|
|
||||||
twl_audio: audio {
|
|
||||||
compatible = "ti,twl4030-audio";
|
|
||||||
|
|
||||||
ti,enable-vibra = <1>;
|
|
||||||
|
|
||||||
codec {
|
|
||||||
ti,ramp_delay_value = <3>;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -47,21 +47,19 @@ properties:
|
|||||||
const: 0
|
const: 0
|
||||||
|
|
||||||
clocks:
|
clocks:
|
||||||
|
minItems: 1
|
||||||
maxItems: 3
|
maxItems: 3
|
||||||
description: Reference clocks for CP110; MG clock, MG Core clock, AXI clock
|
|
||||||
|
|
||||||
clock-names:
|
clock-names:
|
||||||
items:
|
minItems: 1
|
||||||
- const: mg_clk
|
maxItems: 3
|
||||||
- const: mg_core_clk
|
|
||||||
- const: axi_clk
|
|
||||||
|
|
||||||
marvell,system-controller:
|
marvell,system-controller:
|
||||||
description: Phandle to the Marvell system controller (CP110 only)
|
description: Phandle to the Marvell system controller (CP110 only)
|
||||||
$ref: /schemas/types.yaml#/definitions/phandle
|
$ref: /schemas/types.yaml#/definitions/phandle
|
||||||
|
|
||||||
patternProperties:
|
patternProperties:
|
||||||
'^phy@[0-2]$':
|
'^phy@[0-5]$':
|
||||||
description: A COMPHY lane child node
|
description: A COMPHY lane child node
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@@ -69,10 +67,14 @@ patternProperties:
|
|||||||
properties:
|
properties:
|
||||||
reg:
|
reg:
|
||||||
description: COMPHY lane number
|
description: COMPHY lane number
|
||||||
|
maximum: 5
|
||||||
|
|
||||||
'#phy-cells':
|
'#phy-cells':
|
||||||
const: 1
|
const: 1
|
||||||
|
|
||||||
|
connector:
|
||||||
|
type: object
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- reg
|
- reg
|
||||||
- '#phy-cells'
|
- '#phy-cells'
|
||||||
@@ -91,13 +93,24 @@ allOf:
|
|||||||
|
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
clocks: false
|
clocks:
|
||||||
clock-names: false
|
maxItems: 1
|
||||||
|
clock-names:
|
||||||
|
const: xtal
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- reg-names
|
- reg-names
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
properties:
|
||||||
|
clocks:
|
||||||
|
minItems: 3
|
||||||
|
clock-names:
|
||||||
|
items:
|
||||||
|
- const: mg_clk
|
||||||
|
- const: mg_core_clk
|
||||||
|
- const: axi_clk
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- marvell,system-controller
|
- marvell,system-controller
|
||||||
|
|
||||||
|
|||||||
@@ -176,6 +176,8 @@ allOf:
|
|||||||
compatible:
|
compatible:
|
||||||
contains:
|
contains:
|
||||||
enum:
|
enum:
|
||||||
|
- qcom,sa8775p-qmp-gen4x2-pcie-phy
|
||||||
|
- qcom,sa8775p-qmp-gen4x4-pcie-phy
|
||||||
- qcom,sc8280xp-qmp-gen3x1-pcie-phy
|
- qcom,sc8280xp-qmp-gen3x1-pcie-phy
|
||||||
- qcom,sc8280xp-qmp-gen3x2-pcie-phy
|
- qcom,sc8280xp-qmp-gen3x2-pcie-phy
|
||||||
- qcom,sc8280xp-qmp-gen3x4-pcie-phy
|
- qcom,sc8280xp-qmp-gen3x4-pcie-phy
|
||||||
@@ -197,8 +199,6 @@ allOf:
|
|||||||
contains:
|
contains:
|
||||||
enum:
|
enum:
|
||||||
- qcom,qcs8300-qmp-gen4x2-pcie-phy
|
- qcom,qcs8300-qmp-gen4x2-pcie-phy
|
||||||
- qcom,sa8775p-qmp-gen4x2-pcie-phy
|
|
||||||
- qcom,sa8775p-qmp-gen4x4-pcie-phy
|
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
clocks:
|
clocks:
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ allOf:
|
|||||||
oneOf:
|
oneOf:
|
||||||
- required: [ clock-frequency ]
|
- required: [ clock-frequency ]
|
||||||
- required: [ clocks ]
|
- required: [ clocks ]
|
||||||
|
|
||||||
- if:
|
- if:
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
@@ -60,12 +59,39 @@ allOf:
|
|||||||
items:
|
items:
|
||||||
- const: uartclk
|
- const: uartclk
|
||||||
- const: reg
|
- const: reg
|
||||||
else:
|
- if:
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
contains:
|
||||||
|
const: spacemit,k1-uart
|
||||||
|
then:
|
||||||
properties:
|
properties:
|
||||||
clock-names:
|
clock-names:
|
||||||
items:
|
items:
|
||||||
- const: core
|
- const: core
|
||||||
- const: bus
|
- const: bus
|
||||||
|
- if:
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
contains:
|
||||||
|
enum:
|
||||||
|
- spacemit,k1-uart
|
||||||
|
- nxp,lpc1850-uart
|
||||||
|
then:
|
||||||
|
required:
|
||||||
|
- clocks
|
||||||
|
- clock-names
|
||||||
|
properties:
|
||||||
|
clocks:
|
||||||
|
minItems: 2
|
||||||
|
clock-names:
|
||||||
|
minItems: 2
|
||||||
|
else:
|
||||||
|
properties:
|
||||||
|
clocks:
|
||||||
|
maxItems: 1
|
||||||
|
clock-names:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
@@ -162,6 +188,9 @@ properties:
|
|||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 2
|
maxItems: 2
|
||||||
oneOf:
|
oneOf:
|
||||||
|
- enum:
|
||||||
|
- main
|
||||||
|
- uart
|
||||||
- items:
|
- items:
|
||||||
- const: core
|
- const: core
|
||||||
- const: bus
|
- const: bus
|
||||||
@@ -264,29 +293,6 @@ required:
|
|||||||
- reg
|
- reg
|
||||||
- interrupts
|
- interrupts
|
||||||
|
|
||||||
if:
|
|
||||||
properties:
|
|
||||||
compatible:
|
|
||||||
contains:
|
|
||||||
enum:
|
|
||||||
- spacemit,k1-uart
|
|
||||||
- nxp,lpc1850-uart
|
|
||||||
then:
|
|
||||||
required:
|
|
||||||
- clocks
|
|
||||||
- clock-names
|
|
||||||
properties:
|
|
||||||
clocks:
|
|
||||||
minItems: 2
|
|
||||||
clock-names:
|
|
||||||
minItems: 2
|
|
||||||
else:
|
|
||||||
properties:
|
|
||||||
clocks:
|
|
||||||
maxItems: 1
|
|
||||||
clock-names:
|
|
||||||
maxItems: 1
|
|
||||||
|
|
||||||
unevaluatedProperties: false
|
unevaluatedProperties: false
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ properties:
|
|||||||
- const: dma_intr2
|
- const: dma_intr2
|
||||||
|
|
||||||
clocks:
|
clocks:
|
||||||
minItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
clock-names:
|
clock-names:
|
||||||
const: sw_baud
|
const: sw_baud
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
ALC5621/ALC5622/ALC5623 audio Codec
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
|
|
||||||
- compatible: "realtek,alc5623"
|
|
||||||
- reg: the I2C address of the device.
|
|
||||||
|
|
||||||
Optional properties:
|
|
||||||
|
|
||||||
- add-ctrl: Default register value for Reg-40h, Additional Control
|
|
||||||
Register. If absent or has the value of 0, the
|
|
||||||
register is untouched.
|
|
||||||
|
|
||||||
- jack-det-ctrl: Default register value for Reg-5Ah, Jack Detect
|
|
||||||
Control Register. If absent or has value 0, the
|
|
||||||
register is untouched.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
alc5621: alc5621@1a {
|
|
||||||
compatible = "alc5621";
|
|
||||||
reg = <0x1a>;
|
|
||||||
add-ctrl = <0x3700>;
|
|
||||||
jack-det-ctrl = <0x4810>;
|
|
||||||
};
|
|
||||||
@@ -15,6 +15,9 @@ properties:
|
|||||||
- asahi-kasei,ak4458
|
- asahi-kasei,ak4458
|
||||||
- asahi-kasei,ak4497
|
- asahi-kasei,ak4497
|
||||||
|
|
||||||
|
"#sound-dai-cells":
|
||||||
|
const: 0
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
@@ -46,6 +49,7 @@ required:
|
|||||||
- reg
|
- reg
|
||||||
|
|
||||||
allOf:
|
allOf:
|
||||||
|
- $ref: dai-common.yaml#
|
||||||
- if:
|
- if:
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
* Broadcom BCM2835 SoC I2S/PCM module
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible: "brcm,bcm2835-i2s"
|
|
||||||
- reg: Should contain PCM registers location and length.
|
|
||||||
- clocks: the (PCM) clock to use
|
|
||||||
- dmas: List of DMA controller phandle and DMA request line ordered pairs.
|
|
||||||
- dma-names: Identifier string for each DMA request line in the dmas property.
|
|
||||||
These strings correspond 1:1 with the ordered pairs in dmas.
|
|
||||||
|
|
||||||
One of the DMA channels will be responsible for transmission (should be
|
|
||||||
named "tx") and one for reception (should be named "rx").
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
bcm2835_i2s: i2s@7e203000 {
|
|
||||||
compatible = "brcm,bcm2835-i2s";
|
|
||||||
reg = <0x7e203000 0x24>;
|
|
||||||
clocks = <&clocks BCM2835_CLOCK_PCM>;
|
|
||||||
|
|
||||||
dmas = <&dma 2>,
|
|
||||||
<&dma 3>;
|
|
||||||
dma-names = "tx", "rx";
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/sound/brcm,bcm2835-i2s.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Broadcom BCM2835 SoC I2S/PCM module
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Florian Fainelli <florian.fainelli@broadcom.com>
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: brcm,bcm2835-i2s
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
dmas:
|
||||||
|
items:
|
||||||
|
- description: Transmission DMA controller phandle and request line.
|
||||||
|
- description: Reception DMA controller phandle and request line.
|
||||||
|
|
||||||
|
dma-names:
|
||||||
|
items:
|
||||||
|
- const: tx
|
||||||
|
- const: rx
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- clocks
|
||||||
|
- dmas
|
||||||
|
- dma-names
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/clock/bcm2835.h>
|
||||||
|
|
||||||
|
i2s@7e203000 {
|
||||||
|
compatible = "brcm,bcm2835-i2s";
|
||||||
|
reg = <0x7e203000 0x24>;
|
||||||
|
clocks = <&clocks BCM2835_CLOCK_PCM>;
|
||||||
|
dmas = <&dma 2>, <&dma 3>;
|
||||||
|
dma-names = "tx", "rx";
|
||||||
|
};
|
||||||
@@ -12,6 +12,22 @@ maintainers:
|
|||||||
- Matteo Martelli <matteomartelli3@gmail.com>
|
- Matteo Martelli <matteomartelli3@gmail.com>
|
||||||
- Binbin Zhou <zhoubinbin@loongson.cn>
|
- Binbin Zhou <zhoubinbin@loongson.cn>
|
||||||
|
|
||||||
|
description: |
|
||||||
|
Everest ES8311, ES8316 and ES8323 audio CODECs
|
||||||
|
|
||||||
|
Pins on the device (for linking into audio routes):
|
||||||
|
|
||||||
|
Outputs:
|
||||||
|
* LOUT: Left Analog Output
|
||||||
|
* ROUT: Right Analog Output
|
||||||
|
* MICBIAS: Microphone Bias
|
||||||
|
|
||||||
|
Inputs:
|
||||||
|
* MIC1P: Microphone 1 Positive Analog Input
|
||||||
|
* MIC1N: Microphone 1 Negative Analog Input
|
||||||
|
* MIC2P: Microphone 2 Positive Analog Input
|
||||||
|
* MIC2N: Microphone 2 Negative Analog Input
|
||||||
|
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: dai-common.yaml#
|
- $ref: dai-common.yaml#
|
||||||
|
|
||||||
|
|||||||
101
Documentation/devicetree/bindings/sound/foursemi,fs2105s.yaml
Normal file
101
Documentation/devicetree/bindings/sound/foursemi,fs2105s.yaml
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/sound/foursemi,fs2105s.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: FourSemi FS2104/5S Digital Audio Amplifier
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Nick Li <nick.li@foursemi.com>
|
||||||
|
|
||||||
|
description:
|
||||||
|
The FS2104 is a 15W Inductor-Less, Stereo, Closed-Loop,
|
||||||
|
Digital Input Class-D Power Amplifier with Enhanced Signal Processing.
|
||||||
|
The FS2105S is a 30W Inductor-Less, Stereo, Closed-Loop,
|
||||||
|
Digital Input Class-D Power Amplifier with Enhanced Signal Processing.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
oneOf:
|
||||||
|
- items:
|
||||||
|
- enum:
|
||||||
|
- foursemi,fs2104
|
||||||
|
- const: foursemi,fs2105s
|
||||||
|
- enum:
|
||||||
|
- foursemi,fs2105s
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
items:
|
||||||
|
- description: The clock of I2S BCLK
|
||||||
|
|
||||||
|
clock-names:
|
||||||
|
items:
|
||||||
|
- const: bclk
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
'#sound-dai-cells':
|
||||||
|
const: 0
|
||||||
|
|
||||||
|
pvdd-supply:
|
||||||
|
description:
|
||||||
|
Regulator for power supply(PVDD in datasheet).
|
||||||
|
|
||||||
|
dvdd-supply:
|
||||||
|
description:
|
||||||
|
Regulator for digital supply(DVDD in datasheet).
|
||||||
|
|
||||||
|
reset-gpios:
|
||||||
|
maxItems: 1
|
||||||
|
description:
|
||||||
|
It's the SDZ pin in datasheet, the pin is active low,
|
||||||
|
it will power down and reset the chip to shut down state.
|
||||||
|
|
||||||
|
firmware-name:
|
||||||
|
maxItems: 1
|
||||||
|
description: |
|
||||||
|
The firmware(*.bin) contains:
|
||||||
|
a. Register initialization settings
|
||||||
|
b. DSP effect parameters
|
||||||
|
c. Multi-scene sound effect configurations(optional)
|
||||||
|
It's gernerated by FourSemi's tuning tool.
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- '#sound-dai-cells'
|
||||||
|
- pvdd-supply
|
||||||
|
- dvdd-supply
|
||||||
|
- reset-gpios
|
||||||
|
- firmware-name
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: dai-common.yaml#
|
||||||
|
|
||||||
|
unevaluatedProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
i2c {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
audio-codec@68 {
|
||||||
|
compatible = "foursemi,fs2105s";
|
||||||
|
reg = <0x68>;
|
||||||
|
clocks = <&clocks 18>;
|
||||||
|
clock-names = "bclk";
|
||||||
|
#sound-dai-cells = <0>;
|
||||||
|
pvdd-supply = <&pvdd_supply>;
|
||||||
|
dvdd-supply = <&dvdd_supply>;
|
||||||
|
reset-gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||||
|
firmware-name = "fs2105s-btl-2p0-0s.bin";
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&fs210x_pins_default>;
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
Freescale i.MX audio complex with SGTL5000 codec
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
|
|
||||||
- compatible : "fsl,imx-audio-sgtl5000"
|
|
||||||
|
|
||||||
- model : The user-visible name of this sound complex
|
|
||||||
|
|
||||||
- ssi-controller : The phandle of the i.MX SSI controller
|
|
||||||
|
|
||||||
- audio-codec : The phandle of the SGTL5000 audio codec
|
|
||||||
|
|
||||||
- audio-routing : A list of the connections between audio components.
|
|
||||||
Each entry is a pair of strings, the first being the
|
|
||||||
connection's sink, the second being the connection's
|
|
||||||
source. Valid names could be power supplies, SGTL5000
|
|
||||||
pins, and the jacks on the board:
|
|
||||||
|
|
||||||
Power supplies:
|
|
||||||
* Mic Bias
|
|
||||||
|
|
||||||
SGTL5000 pins:
|
|
||||||
* MIC_IN
|
|
||||||
* LINE_IN
|
|
||||||
* HP_OUT
|
|
||||||
* LINE_OUT
|
|
||||||
|
|
||||||
Board connectors:
|
|
||||||
* Mic Jack
|
|
||||||
* Line In Jack
|
|
||||||
* Headphone Jack
|
|
||||||
* Line Out Jack
|
|
||||||
* Ext Spk
|
|
||||||
|
|
||||||
- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
|
|
||||||
|
|
||||||
- mux-ext-port : The external port of the i.MX audio muxer
|
|
||||||
|
|
||||||
Note: The AUDMUX port numbering should start at 1, which is consistent with
|
|
||||||
hardware manual.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "fsl,imx51-babbage-sgtl5000",
|
|
||||||
"fsl,imx-audio-sgtl5000";
|
|
||||||
model = "imx51-babbage-sgtl5000";
|
|
||||||
ssi-controller = <&ssi1>;
|
|
||||||
audio-codec = <&sgtl5000>;
|
|
||||||
audio-routing =
|
|
||||||
"MIC_IN", "Mic Jack",
|
|
||||||
"Mic Jack", "Mic Bias",
|
|
||||||
"Headphone Jack", "HP_OUT";
|
|
||||||
mux-int-port = <1>;
|
|
||||||
mux-ext-port = <3>;
|
|
||||||
};
|
|
||||||
@@ -23,6 +23,9 @@ properties:
|
|||||||
|
|
||||||
sound-name-prefix: true
|
sound-name-prefix: true
|
||||||
|
|
||||||
|
port:
|
||||||
|
$ref: /schemas/graph.yaml#/properties/port
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- "#sound-dai-cells"
|
- "#sound-dai-cells"
|
||||||
- compatible
|
- compatible
|
||||||
|
|||||||
@@ -9,6 +9,20 @@ title: NAU8825 audio CODEC
|
|||||||
maintainers:
|
maintainers:
|
||||||
- John Hsu <KCHSU0@nuvoton.com>
|
- John Hsu <KCHSU0@nuvoton.com>
|
||||||
|
|
||||||
|
description: |
|
||||||
|
NAU8825 audio CODEC
|
||||||
|
|
||||||
|
Pins on the device (for linking into audio routes):
|
||||||
|
|
||||||
|
Outputs:
|
||||||
|
* HPOL : Headphone Left Output
|
||||||
|
* HPOR : Headphone Right Output
|
||||||
|
* MICBIAS : Microphone Bias Output
|
||||||
|
|
||||||
|
Inputs:
|
||||||
|
* MICP : Analog Microphone Positive Input
|
||||||
|
* MICN : Analog Microphone Negative Input
|
||||||
|
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: dai-common.yaml#
|
- $ref: dai-common.yaml#
|
||||||
|
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
* Texas Instruments SoC with twl4030 based audio setups
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible: "ti,omap-twl4030"
|
|
||||||
- ti,model: Name of the sound card (for example "omap3beagle")
|
|
||||||
- ti,mcbsp: phandle for the McBSP node
|
|
||||||
|
|
||||||
Optional properties:
|
|
||||||
- ti,codec: phandle for the twl4030 audio node
|
|
||||||
- ti,mcbsp-voice: phandle for the McBSP node connected to the voice port of twl
|
|
||||||
- ti, jack-det-gpio: Jack detect GPIO
|
|
||||||
- ti,audio-routing: List of connections between audio components.
|
|
||||||
Each entry is a pair of strings, the first being the connection's sink,
|
|
||||||
the second being the connection's source.
|
|
||||||
If the routing is not provided all possible connection will be available
|
|
||||||
|
|
||||||
Available audio endpoints for the audio-routing table:
|
|
||||||
|
|
||||||
Board connectors:
|
|
||||||
* Headset Stereophone
|
|
||||||
* Earpiece Spk
|
|
||||||
* Handsfree Spk
|
|
||||||
* Ext Spk
|
|
||||||
* Main Mic
|
|
||||||
* Sub Mic
|
|
||||||
* Headset Mic
|
|
||||||
* Carkit Mic
|
|
||||||
* Digital0 Mic
|
|
||||||
* Digital1 Mic
|
|
||||||
* Line In
|
|
||||||
|
|
||||||
twl4030 pins:
|
|
||||||
* HSOL
|
|
||||||
* HSOR
|
|
||||||
* EARPIECE
|
|
||||||
* HFL
|
|
||||||
* HFR
|
|
||||||
* PREDRIVEL
|
|
||||||
* PREDRIVER
|
|
||||||
* CARKITL
|
|
||||||
* CARKITR
|
|
||||||
* MAINMIC
|
|
||||||
* SUBMIC
|
|
||||||
* HSMIC
|
|
||||||
* DIGIMIC0
|
|
||||||
* DIGIMIC1
|
|
||||||
* CARKITMIC
|
|
||||||
* AUXL
|
|
||||||
* AUXR
|
|
||||||
|
|
||||||
* Headset Mic Bias
|
|
||||||
* Mic Bias 1 /* Used for Main Mic or Digimic0 */
|
|
||||||
* Mic Bias 2 /* Used for Sub Mic or Digimic1 */
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "ti,omap-twl4030";
|
|
||||||
ti,model = "omap3beagle";
|
|
||||||
|
|
||||||
ti,mcbsp = <&mcbsp2>;
|
|
||||||
};
|
|
||||||
@@ -20,6 +20,7 @@ properties:
|
|||||||
- qcom,sc8280xp-lpass-va-macro
|
- qcom,sc8280xp-lpass-va-macro
|
||||||
- items:
|
- items:
|
||||||
- enum:
|
- enum:
|
||||||
|
- qcom,glymur-lpass-va-macro
|
||||||
- qcom,sm8650-lpass-va-macro
|
- qcom,sm8650-lpass-va-macro
|
||||||
- qcom,sm8750-lpass-va-macro
|
- qcom,sm8750-lpass-va-macro
|
||||||
- qcom,x1e80100-lpass-va-macro
|
- qcom,x1e80100-lpass-va-macro
|
||||||
@@ -79,12 +80,25 @@ allOf:
|
|||||||
compatible:
|
compatible:
|
||||||
contains:
|
contains:
|
||||||
const: qcom,sc7280-lpass-va-macro
|
const: qcom,sc7280-lpass-va-macro
|
||||||
|
|
||||||
|
then:
|
||||||
|
if:
|
||||||
|
required:
|
||||||
|
- power-domains
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
clocks:
|
clocks:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
clock-names:
|
clock-names:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
else:
|
||||||
|
properties:
|
||||||
|
clocks:
|
||||||
|
minItems: 3
|
||||||
|
maxItems: 3
|
||||||
|
clock-names:
|
||||||
|
minItems: 3
|
||||||
|
maxItems: 3
|
||||||
|
|
||||||
- if:
|
- if:
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ properties:
|
|||||||
- qcom,sc8280xp-lpass-wsa-macro
|
- qcom,sc8280xp-lpass-wsa-macro
|
||||||
- items:
|
- items:
|
||||||
- enum:
|
- enum:
|
||||||
|
- qcom,glymur-lpass-wsa-macro
|
||||||
- qcom,sm8650-lpass-wsa-macro
|
- qcom,sm8650-lpass-wsa-macro
|
||||||
- qcom,sm8750-lpass-wsa-macro
|
- qcom,sm8750-lpass-wsa-macro
|
||||||
- qcom,x1e80100-lpass-wsa-macro
|
- qcom,x1e80100-lpass-wsa-macro
|
||||||
|
|||||||
134
Documentation/devicetree/bindings/sound/qcom,pm4125-codec.yaml
Normal file
134
Documentation/devicetree/bindings/sound/qcom,pm4125-codec.yaml
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/sound/qcom,pm4125-codec.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Qualcomm PM4125 Audio Codec
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Alexey Klimov <alexey.klimov@linaro.org>
|
||||||
|
|
||||||
|
description:
|
||||||
|
The audio codec IC found on Qualcomm PM4125/PM2250 PMIC.
|
||||||
|
It has RX and TX Soundwire slave devices.
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: dai-common.yaml#
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: qcom,pm4125-codec
|
||||||
|
|
||||||
|
reg:
|
||||||
|
description:
|
||||||
|
Specifies the SPMI base address for the audio codec peripherals. The
|
||||||
|
address space contains reset register needed to power-on the codec.
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
reg-names:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
vdd-io-supply:
|
||||||
|
description: A reference to the 1.8V I/O supply
|
||||||
|
|
||||||
|
vdd-cp-supply:
|
||||||
|
description: A reference to the charge pump I/O supply
|
||||||
|
|
||||||
|
vdd-mic-bias-supply:
|
||||||
|
description: A reference to the 3.3V mic bias supply
|
||||||
|
|
||||||
|
vdd-pa-vpos-supply:
|
||||||
|
description: A reference to the PA VPOS supply
|
||||||
|
|
||||||
|
qcom,tx-device:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||||
|
description: A reference to Soundwire tx device phandle
|
||||||
|
|
||||||
|
qcom,rx-device:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||||
|
description: A reference to Soundwire rx device phandle
|
||||||
|
|
||||||
|
qcom,micbias1-microvolt:
|
||||||
|
description: micbias1 voltage
|
||||||
|
minimum: 1800000
|
||||||
|
maximum: 2850000
|
||||||
|
|
||||||
|
qcom,micbias2-microvolt:
|
||||||
|
description: micbias2 voltage
|
||||||
|
minimum: 1800000
|
||||||
|
maximum: 2850000
|
||||||
|
|
||||||
|
qcom,micbias3-microvolt:
|
||||||
|
description: micbias3 voltage
|
||||||
|
minimum: 1800000
|
||||||
|
maximum: 2850000
|
||||||
|
|
||||||
|
qcom,mbhc-buttons-vthreshold-microvolt:
|
||||||
|
description:
|
||||||
|
Array of 8 Voltage threshold values corresponding to headset
|
||||||
|
button0 - button7
|
||||||
|
minItems: 8
|
||||||
|
maxItems: 8
|
||||||
|
|
||||||
|
'#sound-dai-cells':
|
||||||
|
const: 1
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- vdd-io-supply
|
||||||
|
- vdd-cp-supply
|
||||||
|
- vdd-mic-bias-supply
|
||||||
|
- vdd-pa-vpos-supply
|
||||||
|
- qcom,tx-device
|
||||||
|
- qcom,rx-device
|
||||||
|
- qcom,micbias1-microvolt
|
||||||
|
- qcom,micbias2-microvolt
|
||||||
|
- qcom,micbias3-microvolt
|
||||||
|
- '#sound-dai-cells'
|
||||||
|
|
||||||
|
unevaluatedProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/spmi/spmi.h>
|
||||||
|
|
||||||
|
spmi {
|
||||||
|
#address-cells = <2>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
pmic {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
audio-codec@f000 {
|
||||||
|
compatible = "qcom,pm4125-codec";
|
||||||
|
reg = <0xf000>;
|
||||||
|
vdd-io-supply = <&pm4125_l15>;
|
||||||
|
vdd-cp-supply = <&pm4125_s4>;
|
||||||
|
vdd-pa-vpos-supply = <&pm4125_s4>;
|
||||||
|
vdd-mic-bias-supply = <&pm4125_l22>;
|
||||||
|
qcom,micbias1-microvolt = <1800000>;
|
||||||
|
qcom,micbias2-microvolt = <1800000>;
|
||||||
|
qcom,micbias3-microvolt = <1800000>;
|
||||||
|
qcom,rx-device = <&pm4125_rx>;
|
||||||
|
qcom,tx-device = <&pm4125_tx>;
|
||||||
|
#sound-dai-cells = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ... */
|
||||||
|
|
||||||
|
soundwire@a610000 {
|
||||||
|
reg = <0x0a610000 0x2000>;
|
||||||
|
#address-cells = <2>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
pm4125_rx: audio-codec@0,4 {
|
||||||
|
compatible = "sdw20217010c00";
|
||||||
|
reg = <0 4>;
|
||||||
|
qcom,rx-port-mapping = <1 3>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
...
|
||||||
79
Documentation/devicetree/bindings/sound/qcom,pm4125-sdw.yaml
Normal file
79
Documentation/devicetree/bindings/sound/qcom,pm4125-sdw.yaml
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/sound/qcom,pm4125-sdw.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Qualcomm SoundWire Slave devices on PM4125/PM2250 PMIC audio codec.
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Alexey Klimov <alexey.klimov@linaro.org>
|
||||||
|
|
||||||
|
description:
|
||||||
|
The audio codec IC found on Qualcomm PM4125/PM2250 PMICs.
|
||||||
|
It has RX and TX Soundwire slave devices.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: sdw20217010c00
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
qcom,tx-port-mapping:
|
||||||
|
description: |
|
||||||
|
Specifies static port mapping between device and host tx ports.
|
||||||
|
In the order of the device port index which are adc1_port, adc23_port,
|
||||||
|
dmic03_mbhc_port, dmic46_port.
|
||||||
|
Supports maximum 2 tx soundwire ports.
|
||||||
|
|
||||||
|
PM4125 TX Port 1 (ADC1,2 & DMIC0 & MBHC) <=> SWR0 Port 1
|
||||||
|
PM4125 TX Port 2 (ADC1 & DMIC0,1,2 & MBHC) <=> SWR0 Port 2
|
||||||
|
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||||
|
minItems: 2
|
||||||
|
maxItems: 2
|
||||||
|
items:
|
||||||
|
enum: [1, 2, 3, 4]
|
||||||
|
|
||||||
|
qcom,rx-port-mapping:
|
||||||
|
description: |
|
||||||
|
Specifies static port mapping between device and host rx ports.
|
||||||
|
In the order of device port index which are hph_port, clsh_port,
|
||||||
|
comp_port, lo_port, dsd port.
|
||||||
|
Supports maximum 2 rx soundwire ports.
|
||||||
|
|
||||||
|
PM4125 RX Port 1 (HPH_L/R) <==> SWR1 Port 1 (HPH_L/R)
|
||||||
|
PM4125 RX Port 2 (COMP_L/R) <==> SWR1 Port 3 (COMP_L/R)
|
||||||
|
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32-array
|
||||||
|
minItems: 2
|
||||||
|
maxItems: 2
|
||||||
|
items:
|
||||||
|
enum: [1, 2, 3, 4, 5]
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
|
||||||
|
oneOf:
|
||||||
|
- required:
|
||||||
|
- qcom,tx-port-mapping
|
||||||
|
- required:
|
||||||
|
- qcom,rx-port-mapping
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
soundwire@a610000 {
|
||||||
|
reg = <0x0a610000 0x2000>;
|
||||||
|
#address-cells = <2>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
pm4125_rx: codec@0,1 {
|
||||||
|
compatible = "sdw20217010c00";
|
||||||
|
reg = <0 1>;
|
||||||
|
qcom,rx-port-mapping = <1 3>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
...
|
||||||
@@ -31,6 +31,7 @@ properties:
|
|||||||
- fairphone,fp4-sndcard
|
- fairphone,fp4-sndcard
|
||||||
- fairphone,fp5-sndcard
|
- fairphone,fp5-sndcard
|
||||||
- qcom,apq8096-sndcard
|
- qcom,apq8096-sndcard
|
||||||
|
- qcom,glymur-sndcard
|
||||||
- qcom,qcm6490-idp-sndcard
|
- qcom,qcm6490-idp-sndcard
|
||||||
- qcom,qcs6490-rb3gen2-sndcard
|
- qcom,qcs6490-rb3gen2-sndcard
|
||||||
- qcom,qcs8275-sndcard
|
- qcom,qcs8275-sndcard
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ properties:
|
|||||||
description: GPIO spec for Powerdown/Shutdown line to use (pin SD_N)
|
description: GPIO spec for Powerdown/Shutdown line to use (pin SD_N)
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
|
reset-gpios:
|
||||||
|
description: Powerdown/Shutdown line to use (pin SD_N)
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
vdd-supply:
|
vdd-supply:
|
||||||
description: VDD Supply for the Codec
|
description: VDD Supply for the Codec
|
||||||
|
|
||||||
@@ -50,10 +54,15 @@ required:
|
|||||||
- compatible
|
- compatible
|
||||||
- reg
|
- reg
|
||||||
- vdd-supply
|
- vdd-supply
|
||||||
- powerdown-gpios
|
|
||||||
- "#thermal-sensor-cells"
|
- "#thermal-sensor-cells"
|
||||||
- "#sound-dai-cells"
|
- "#sound-dai-cells"
|
||||||
|
|
||||||
|
oneOf:
|
||||||
|
- required:
|
||||||
|
- powerdown-gpios
|
||||||
|
- required:
|
||||||
|
- reset-gpios
|
||||||
|
|
||||||
unevaluatedProperties: false
|
unevaluatedProperties: false
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
|
|||||||
54
Documentation/devicetree/bindings/sound/realtek,alc5623.yaml
Normal file
54
Documentation/devicetree/bindings/sound/realtek,alc5623.yaml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/sound/realtek,alc5623.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: ALC5621/ALC5623 Audio Codec
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Mahdi Khosravi <mmk1776@gmail.com>
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: dai-common.yaml#
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
enum:
|
||||||
|
- realtek,alc5621
|
||||||
|
- realtek,alc5623
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
add-ctrl:
|
||||||
|
description:
|
||||||
|
Default register value for Reg-40h, Additional Control Register.
|
||||||
|
If absent or zero, the register is left untouched.
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
|
||||||
|
jack-det-ctrl:
|
||||||
|
description:
|
||||||
|
Default register value for Reg-5Ah, Jack Detect Control Register.
|
||||||
|
If absent or zero, the register is left untouched.
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
|
||||||
|
unevaluatedProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
i2c {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
codec@1a {
|
||||||
|
compatible = "realtek,alc5623";
|
||||||
|
reg = <0x1a>;
|
||||||
|
add-ctrl = <0x3700>;
|
||||||
|
jack-det-ctrl = <0x4810>;
|
||||||
|
};
|
||||||
|
};
|
||||||
98
Documentation/devicetree/bindings/sound/ti,omap-twl4030.yaml
Normal file
98
Documentation/devicetree/bindings/sound/ti,omap-twl4030.yaml
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/sound/ti,omap-twl4030.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Texas Instruments SoC with twl4030 based audio setups
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Peter Ujfalusi <peter.ujfalusi@gmail.com>
|
||||||
|
|
||||||
|
description:
|
||||||
|
Audio setups on TI OMAP SoCs using TWL4030-family
|
||||||
|
audio codec connected via a McBSP port.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: ti,omap-twl4030
|
||||||
|
|
||||||
|
ti,model:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/string
|
||||||
|
description: Name of the sound card (for example "omap3beagle").
|
||||||
|
|
||||||
|
ti,mcbsp:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/phandle
|
||||||
|
description: phandle for the McBSP node.
|
||||||
|
|
||||||
|
ti,codec:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/phandle
|
||||||
|
description: phandle for the twl4030 audio node.
|
||||||
|
|
||||||
|
ti,mcbsp-voice:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/phandle
|
||||||
|
description: phandle to the McBSP node connected to the voice port.
|
||||||
|
|
||||||
|
ti,jack-det-gpio:
|
||||||
|
description: GPIO specifier for jack detection.
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
ti,audio-routing:
|
||||||
|
description: |
|
||||||
|
A list of audio routing connections. Each entry is a pair of strings,
|
||||||
|
with the first being the connection's sink and the second being the
|
||||||
|
source. If not provided, all possible connections are available.
|
||||||
|
|
||||||
|
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
|
||||||
|
items:
|
||||||
|
enum:
|
||||||
|
# Board Connectors
|
||||||
|
- Headset Stereophone
|
||||||
|
- Earpiece Spk
|
||||||
|
- Handsfree Spk
|
||||||
|
- Ext Spk
|
||||||
|
- Main Mic
|
||||||
|
- Sub Mic
|
||||||
|
- Headset Mic
|
||||||
|
- Carkit Mic
|
||||||
|
- Digital0 Mic
|
||||||
|
- Digital1 Mic
|
||||||
|
- Line In
|
||||||
|
|
||||||
|
# CODEC Pins
|
||||||
|
- HSOL
|
||||||
|
- HSOR
|
||||||
|
- EARPIECE
|
||||||
|
- HFL
|
||||||
|
- HFR
|
||||||
|
- PREDRIVEL
|
||||||
|
- PREDRIVER
|
||||||
|
- CARKITL
|
||||||
|
- CARKITR
|
||||||
|
- MAINMIC
|
||||||
|
- SUBMIC
|
||||||
|
- HSMIC
|
||||||
|
- DIGIMIC0
|
||||||
|
- DIGIMIC1
|
||||||
|
- CARKITMIC
|
||||||
|
- AUXL
|
||||||
|
- AUXR
|
||||||
|
|
||||||
|
# Headset Mic Bias
|
||||||
|
- Mic Bias 1 # Used for Main Mic or Digimic0
|
||||||
|
- Mic Bias 2 # Used for Sub Mic or Digimic1
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- ti,model
|
||||||
|
- ti,mcbsp
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
sound {
|
||||||
|
compatible = "ti,omap-twl4030";
|
||||||
|
ti,model = "omap3beagle";
|
||||||
|
ti,mcbsp = <&mcbsp2>;
|
||||||
|
};
|
||||||
55
Documentation/devicetree/bindings/sound/ti,pcm1754.yaml
Normal file
55
Documentation/devicetree/bindings/sound/ti,pcm1754.yaml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/sound/ti,pcm1754.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Texas Instruments PCM1754 Stereo DAC
|
||||||
|
|
||||||
|
description:
|
||||||
|
The PCM1754 is a simple stereo DAC that is controlled via hardware gpios.
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Stefan Kerkmann <s.kerkmann@pengutronix.de>
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: dai-common.yaml#
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
enum:
|
||||||
|
- ti,pcm1754
|
||||||
|
|
||||||
|
vcc-supply: true
|
||||||
|
|
||||||
|
'#sound-dai-cells':
|
||||||
|
const: 0
|
||||||
|
|
||||||
|
format-gpios:
|
||||||
|
maxItems: 1
|
||||||
|
description:
|
||||||
|
GPIO used to select the PCM format
|
||||||
|
|
||||||
|
mute-gpios:
|
||||||
|
maxItems: 1
|
||||||
|
description:
|
||||||
|
GPIO used to mute all outputs
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- '#sound-dai-cells'
|
||||||
|
- vcc-supply
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
codec {
|
||||||
|
compatible = "ti,pcm1754";
|
||||||
|
#sound-dai-cells = <0>;
|
||||||
|
|
||||||
|
vcc-supply = <&vcc_reg>;
|
||||||
|
mute-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
|
||||||
|
format-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/sound/ti,twl4030-audio.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Texas Instruments TWL4030-family Audio Module
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Peter Ujfalusi <peter.ujfalusi@gmail.com>
|
||||||
|
|
||||||
|
description:
|
||||||
|
The audio module within the TWL4030-family of companion chips consists
|
||||||
|
of an audio codec and a vibra driver. This binding describes the parent
|
||||||
|
node for these functions.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: ti,twl4030-audio
|
||||||
|
|
||||||
|
codec:
|
||||||
|
type: object
|
||||||
|
description: Node containing properties for the audio codec functionality.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
ti,digimic_delay:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
description:
|
||||||
|
Delay in milliseconds after enabling digital microphones to reduce
|
||||||
|
artifacts.
|
||||||
|
|
||||||
|
ti,ramp_delay_value:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
description:
|
||||||
|
Headset ramp delay configuration to reduce pop noise.
|
||||||
|
|
||||||
|
ti,hs_extmute:
|
||||||
|
type: boolean
|
||||||
|
description:
|
||||||
|
Enable the use of an external mute for headset pop reduction.
|
||||||
|
|
||||||
|
ti,hs_extmute_gpio:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/phandle-array
|
||||||
|
description:
|
||||||
|
The GPIO specifier for the external mute control.
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
ti,offset_cncl_path:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
description:
|
||||||
|
Offset cancellation path selection. Refer to the Technical
|
||||||
|
Reference Manual for valid values.
|
||||||
|
|
||||||
|
# The 'codec' node itself is optional, but if it exists, it can be empty.
|
||||||
|
# We don't require any of its sub-properties.
|
||||||
|
|
||||||
|
ti,enable-vibra:
|
||||||
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
enum: [0, 1]
|
||||||
|
description:
|
||||||
|
Enable or disable the vibra functionality.
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
i2c {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
twl: twl@48 {
|
||||||
|
reg = <0x48>;
|
||||||
|
interrupts = <7>; /* SYS_NIRQ cascaded to intc */
|
||||||
|
interrupt-parent = <&intc>;
|
||||||
|
|
||||||
|
twl_audio: audio {
|
||||||
|
compatible = "ti,twl4030-audio";
|
||||||
|
|
||||||
|
ti,enable-vibra = <1>;
|
||||||
|
|
||||||
|
codec {
|
||||||
|
ti,ramp_delay_value = <3>;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -9,6 +9,28 @@ title: Wolfson WM8960 audio codec
|
|||||||
maintainers:
|
maintainers:
|
||||||
- patches@opensource.cirrus.com
|
- patches@opensource.cirrus.com
|
||||||
|
|
||||||
|
description: |
|
||||||
|
Wolfson WM8960 audio codec
|
||||||
|
|
||||||
|
Pins on the device (for linking into audio routes):
|
||||||
|
|
||||||
|
Outputs:
|
||||||
|
* HP_L : Left Headphone/Line Output
|
||||||
|
* HP_R : Right Headphone/Line Output
|
||||||
|
* SPK_LP : Left Speaker Output (Positive)
|
||||||
|
* SPK_LN : Left Speaker Output (Negative)
|
||||||
|
* SPK_RP : Right Speaker Output (Positive)
|
||||||
|
* SPK_RN : Right Speaker Output (Negative)
|
||||||
|
* OUT3 : Mono, Left, Right or buffered midrail output for capless mode
|
||||||
|
|
||||||
|
Inputs:
|
||||||
|
* LINPUT1 : Left single-ended or negative differential microphone input
|
||||||
|
* RINPUT1 : Right single-ended or negative differential microphone input
|
||||||
|
* LINPUT2 : Left line input or positive differential microphone input
|
||||||
|
* RINPUT2 : Right line input or positive differential microphone input
|
||||||
|
* LINPUT3 : Left line input, positive differential microphone, or Jack Detect 2
|
||||||
|
* RINPUT3 : Right line input, positive differential microphone, or Jack Detect 3
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
const: wlf,wm8960
|
const: wlf,wm8960
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ properties:
|
|||||||
- enum:
|
- enum:
|
||||||
- fsl,imx7ulp-spi
|
- fsl,imx7ulp-spi
|
||||||
- fsl,imx8qxp-spi
|
- fsl,imx8qxp-spi
|
||||||
|
- nxp,s32g2-lpspi
|
||||||
- items:
|
- items:
|
||||||
- enum:
|
- enum:
|
||||||
- fsl,imx8ulp-spi
|
- fsl,imx8ulp-spi
|
||||||
@@ -27,6 +28,10 @@ properties:
|
|||||||
- fsl,imx94-spi
|
- fsl,imx94-spi
|
||||||
- fsl,imx95-spi
|
- fsl,imx95-spi
|
||||||
- const: fsl,imx7ulp-spi
|
- const: fsl,imx7ulp-spi
|
||||||
|
- items:
|
||||||
|
- const: nxp,s32g3-lpspi
|
||||||
|
- const: nxp,s32g2-lpspi
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
|
|||||||
@@ -507,6 +507,8 @@ patternProperties:
|
|||||||
description: Espressif Systems Co. Ltd.
|
description: Espressif Systems Co. Ltd.
|
||||||
"^est,.*":
|
"^est,.*":
|
||||||
description: ESTeem Wireless Modems
|
description: ESTeem Wireless Modems
|
||||||
|
"^eswin,.*":
|
||||||
|
description: Beijing ESWIN Technology Group Co. Ltd.
|
||||||
"^ettus,.*":
|
"^ettus,.*":
|
||||||
description: NI Ettus Research
|
description: NI Ettus Research
|
||||||
"^eukrea,.*":
|
"^eukrea,.*":
|
||||||
@@ -552,6 +554,8 @@ patternProperties:
|
|||||||
description: FocalTech Systems Co.,Ltd
|
description: FocalTech Systems Co.,Ltd
|
||||||
"^forlinx,.*":
|
"^forlinx,.*":
|
||||||
description: Baoding Forlinx Embedded Technology Co., Ltd.
|
description: Baoding Forlinx Embedded Technology Co., Ltd.
|
||||||
|
"^foursemi,.*":
|
||||||
|
description: Shanghai FourSemi Semiconductor Co.,Ltd.
|
||||||
"^freebox,.*":
|
"^freebox,.*":
|
||||||
description: Freebox SAS
|
description: Freebox SAS
|
||||||
"^freecom,.*":
|
"^freecom,.*":
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ attribute-sets:
|
|||||||
type: u32
|
type: u32
|
||||||
-
|
-
|
||||||
name: if-idx
|
name: if-idx
|
||||||
type: u32
|
type: s32
|
||||||
-
|
-
|
||||||
name: reset-reason
|
name: reset-reason
|
||||||
type: u32
|
type: u32
|
||||||
|
|||||||
@@ -742,7 +742,7 @@ The broadcast manager sends responses to user space in the same form:
|
|||||||
struct timeval ival1, ival2; /* count and subsequent interval */
|
struct timeval ival1, ival2; /* count and subsequent interval */
|
||||||
canid_t can_id; /* unique can_id for task */
|
canid_t can_id; /* unique can_id for task */
|
||||||
__u32 nframes; /* number of can_frames following */
|
__u32 nframes; /* number of can_frames following */
|
||||||
struct can_frame frames[0];
|
struct can_frame frames[];
|
||||||
};
|
};
|
||||||
|
|
||||||
The aligned payload 'frames' uses the same basic CAN frame structure defined
|
The aligned payload 'frames' uses the same basic CAN frame structure defined
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ address announcements. Typically, it is the client side that initiates subflows,
|
|||||||
and the server side that announces additional addresses via the ``ADD_ADDR`` and
|
and the server side that announces additional addresses via the ``ADD_ADDR`` and
|
||||||
``REMOVE_ADDR`` options.
|
``REMOVE_ADDR`` options.
|
||||||
|
|
||||||
Path managers are controlled by the ``net.mptcp.pm_type`` sysctl knob -- see
|
Path managers are controlled by the ``net.mptcp.path_manager`` sysctl knob --
|
||||||
mptcp-sysctl.rst. There are two types: the in-kernel one (type ``0``) where the
|
see mptcp-sysctl.rst. There are two types: the in-kernel one (``kernel``) where
|
||||||
same rules are applied for all the connections (see: ``ip mptcp``) ; and the
|
the same rules are applied for all the connections (see: ``ip mptcp``) ; and the
|
||||||
userspace one (type ``1``), controlled by a userspace daemon (i.e. `mptcpd
|
userspace one (``userspace``), controlled by a userspace daemon (i.e. `mptcpd
|
||||||
<https://mptcpd.mptcp.dev/>`_) where different rules can be applied for each
|
<https://mptcpd.mptcp.dev/>`_) where different rules can be applied for each
|
||||||
connection. The path managers can be controlled via a Netlink API; see
|
connection. The path managers can be controlled via a Netlink API; see
|
||||||
netlink_spec/mptcp_pm.rst.
|
netlink_spec/mptcp_pm.rst.
|
||||||
|
|||||||
@@ -433,9 +433,8 @@ Threaded NAPI
|
|||||||
|
|
||||||
Threaded NAPI is an operating mode that uses dedicated kernel
|
Threaded NAPI is an operating mode that uses dedicated kernel
|
||||||
threads rather than software IRQ context for NAPI processing.
|
threads rather than software IRQ context for NAPI processing.
|
||||||
The configuration is per netdevice and will affect all
|
Each threaded NAPI instance will spawn a separate thread
|
||||||
NAPI instances of that device. Each NAPI instance will spawn a separate
|
(called ``napi/${ifc-name}-${napi-id}``).
|
||||||
thread (called ``napi/${ifc-name}-${napi-id}``).
|
|
||||||
|
|
||||||
It is recommended to pin each kernel thread to a single CPU, the same
|
It is recommended to pin each kernel thread to a single CPU, the same
|
||||||
CPU as the CPU which services the interrupt. Note that the mapping
|
CPU as the CPU which services the interrupt. Note that the mapping
|
||||||
|
|||||||
@@ -131,8 +131,8 @@ The codec driver also supports the following ALSA PCM operations:-
|
|||||||
int (*prepare)(struct snd_pcm_substream *);
|
int (*prepare)(struct snd_pcm_substream *);
|
||||||
};
|
};
|
||||||
|
|
||||||
Please refer to the ALSA driver PCM documentation for details.
|
Please refer to the :doc:`ALSA driver PCM documentation
|
||||||
https://www.kernel.org/doc/html/latest/sound/kernel-api/writing-an-alsa-driver.html
|
<../kernel-api/writing-an-alsa-driver>` for details.
|
||||||
|
|
||||||
|
|
||||||
DAPM description
|
DAPM description
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ snd_soc_component_driver:-
|
|||||||
...
|
...
|
||||||
};
|
};
|
||||||
|
|
||||||
Please refer to the ALSA driver documentation for details of audio DMA.
|
Please refer to the :doc:`ALSA driver documentation
|
||||||
https://www.kernel.org/doc/html/latest/sound/kernel-api/writing-an-alsa-driver.html
|
<../kernel-api/writing-an-alsa-driver>` for details of audio DMA.
|
||||||
|
|
||||||
An example DMA driver is soc/pxa/pxa2xx-pcm.c
|
An example DMA driver is soc/pxa/pxa2xx-pcm.c
|
||||||
|
|
||||||
|
|||||||
65
MAINTAINERS
65
MAINTAINERS
@@ -931,13 +931,13 @@ F: Documentation/devicetree/bindings/dma/altr,msgdma.yaml
|
|||||||
F: drivers/dma/altera-msgdma.c
|
F: drivers/dma/altera-msgdma.c
|
||||||
|
|
||||||
ALTERA PIO DRIVER
|
ALTERA PIO DRIVER
|
||||||
M: Mun Yew Tham <mun.yew.tham@intel.com>
|
M: Adrian Ng <adrianhoyin.ng@altera.com>
|
||||||
L: linux-gpio@vger.kernel.org
|
L: linux-gpio@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/gpio/gpio-altera.c
|
F: drivers/gpio/gpio-altera.c
|
||||||
|
|
||||||
ALTERA TRIPLE SPEED ETHERNET DRIVER
|
ALTERA TRIPLE SPEED ETHERNET DRIVER
|
||||||
M: Joyce Ooi <joyce.ooi@intel.com>
|
M: Boon Khai Ng <boon.khai.ng@altera.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/net/ethernet/altera/
|
F: drivers/net/ethernet/altera/
|
||||||
@@ -3526,7 +3526,7 @@ F: Documentation/devicetree/bindings/arm/ti/nspire.yaml
|
|||||||
F: arch/arm/boot/dts/nspire/
|
F: arch/arm/boot/dts/nspire/
|
||||||
|
|
||||||
ARM/TOSHIBA VISCONTI ARCHITECTURE
|
ARM/TOSHIBA VISCONTI ARCHITECTURE
|
||||||
M: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
|
M: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
S: Supported
|
S: Supported
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti.git
|
||||||
@@ -3667,6 +3667,7 @@ F: drivers/virt/coco/arm-cca-guest/
|
|||||||
F: drivers/virt/coco/pkvm-guest/
|
F: drivers/virt/coco/pkvm-guest/
|
||||||
F: tools/testing/selftests/arm64/
|
F: tools/testing/selftests/arm64/
|
||||||
X: arch/arm64/boot/dts/
|
X: arch/arm64/boot/dts/
|
||||||
|
X: arch/arm64/configs/defconfig
|
||||||
|
|
||||||
ARROW SPEEDCHIPS XRS7000 SERIES ETHERNET SWITCH DRIVER
|
ARROW SPEEDCHIPS XRS7000 SERIES ETHERNET SWITCH DRIVER
|
||||||
M: George McCollister <george.mccollister@gmail.com>
|
M: George McCollister <george.mccollister@gmail.com>
|
||||||
@@ -4205,7 +4206,7 @@ W: http://www.baycom.org/~tom/ham/ham.html
|
|||||||
F: drivers/net/hamradio/baycom*
|
F: drivers/net/hamradio/baycom*
|
||||||
|
|
||||||
BCACHE (BLOCK LAYER CACHE)
|
BCACHE (BLOCK LAYER CACHE)
|
||||||
M: Coly Li <colyli@kernel.org>
|
M: Coly Li <colyli@fnnas.com>
|
||||||
M: Kent Overstreet <kent.overstreet@linux.dev>
|
M: Kent Overstreet <kent.overstreet@linux.dev>
|
||||||
L: linux-bcache@vger.kernel.org
|
L: linux-bcache@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@@ -4216,7 +4217,7 @@ F: drivers/md/bcache/
|
|||||||
BCACHEFS
|
BCACHEFS
|
||||||
M: Kent Overstreet <kent.overstreet@linux.dev>
|
M: Kent Overstreet <kent.overstreet@linux.dev>
|
||||||
L: linux-bcachefs@vger.kernel.org
|
L: linux-bcachefs@vger.kernel.org
|
||||||
S: Supported
|
S: Externally maintained
|
||||||
C: irc://irc.oftc.net/bcache
|
C: irc://irc.oftc.net/bcache
|
||||||
P: Documentation/filesystems/bcachefs/SubmittingPatches.rst
|
P: Documentation/filesystems/bcachefs/SubmittingPatches.rst
|
||||||
T: git https://evilpiepirate.org/git/bcachefs.git
|
T: git https://evilpiepirate.org/git/bcachefs.git
|
||||||
@@ -4682,7 +4683,6 @@ F: security/bpf/
|
|||||||
BPF [SELFTESTS] (Test Runners & Infrastructure)
|
BPF [SELFTESTS] (Test Runners & Infrastructure)
|
||||||
M: Andrii Nakryiko <andrii@kernel.org>
|
M: Andrii Nakryiko <andrii@kernel.org>
|
||||||
M: Eduard Zingerman <eddyz87@gmail.com>
|
M: Eduard Zingerman <eddyz87@gmail.com>
|
||||||
R: Mykola Lysenko <mykolal@fb.com>
|
|
||||||
L: bpf@vger.kernel.org
|
L: bpf@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: tools/testing/selftests/bpf/
|
F: tools/testing/selftests/bpf/
|
||||||
@@ -5258,7 +5258,6 @@ F: drivers/gpio/gpio-bt8xx.c
|
|||||||
|
|
||||||
BTRFS FILE SYSTEM
|
BTRFS FILE SYSTEM
|
||||||
M: Chris Mason <clm@fb.com>
|
M: Chris Mason <clm@fb.com>
|
||||||
M: Josef Bacik <josef@toxicpanda.com>
|
|
||||||
M: David Sterba <dsterba@suse.com>
|
M: David Sterba <dsterba@suse.com>
|
||||||
L: linux-btrfs@vger.kernel.org
|
L: linux-btrfs@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@@ -7239,15 +7238,15 @@ F: include/linux/swiotlb.h
|
|||||||
F: kernel/dma/
|
F: kernel/dma/
|
||||||
|
|
||||||
DMA MAPPING HELPERS DEVICE DRIVER API [RUST]
|
DMA MAPPING HELPERS DEVICE DRIVER API [RUST]
|
||||||
M: Abdiel Janulgue <abdiel.janulgue@gmail.com>
|
|
||||||
M: Danilo Krummrich <dakr@kernel.org>
|
M: Danilo Krummrich <dakr@kernel.org>
|
||||||
|
R: Abdiel Janulgue <abdiel.janulgue@gmail.com>
|
||||||
R: Daniel Almeida <daniel.almeida@collabora.com>
|
R: Daniel Almeida <daniel.almeida@collabora.com>
|
||||||
R: Robin Murphy <robin.murphy@arm.com>
|
R: Robin Murphy <robin.murphy@arm.com>
|
||||||
R: Andreas Hindborg <a.hindborg@kernel.org>
|
R: Andreas Hindborg <a.hindborg@kernel.org>
|
||||||
L: rust-for-linux@vger.kernel.org
|
L: rust-for-linux@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
W: https://rust-for-linux.com
|
W: https://rust-for-linux.com
|
||||||
T: git https://github.com/Rust-for-Linux/linux.git alloc-next
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
|
||||||
F: rust/helpers/dma.c
|
F: rust/helpers/dma.c
|
||||||
F: rust/kernel/dma.rs
|
F: rust/kernel/dma.rs
|
||||||
F: samples/rust/rust_dma.rs
|
F: samples/rust/rust_dma.rs
|
||||||
@@ -7820,7 +7819,7 @@ Q: https://patchwork.freedesktop.org/project/nouveau/
|
|||||||
Q: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests
|
Q: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests
|
||||||
B: https://gitlab.freedesktop.org/drm/nouveau/-/issues
|
B: https://gitlab.freedesktop.org/drm/nouveau/-/issues
|
||||||
C: irc://irc.oftc.net/nouveau
|
C: irc://irc.oftc.net/nouveau
|
||||||
T: git https://gitlab.freedesktop.org/drm/nouveau.git
|
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
|
||||||
F: drivers/gpu/drm/nouveau/
|
F: drivers/gpu/drm/nouveau/
|
||||||
F: include/uapi/drm/nouveau_drm.h
|
F: include/uapi/drm/nouveau_drm.h
|
||||||
|
|
||||||
@@ -8079,7 +8078,6 @@ F: Documentation/devicetree/bindings/gpu/
|
|||||||
F: Documentation/gpu/
|
F: Documentation/gpu/
|
||||||
F: drivers/gpu/drm/
|
F: drivers/gpu/drm/
|
||||||
F: drivers/gpu/vga/
|
F: drivers/gpu/vga/
|
||||||
F: rust/kernel/drm/
|
|
||||||
F: include/drm/drm
|
F: include/drm/drm
|
||||||
F: include/linux/vga*
|
F: include/linux/vga*
|
||||||
F: include/uapi/drm/
|
F: include/uapi/drm/
|
||||||
@@ -8091,11 +8089,21 @@ X: drivers/gpu/drm/i915/
|
|||||||
X: drivers/gpu/drm/kmb/
|
X: drivers/gpu/drm/kmb/
|
||||||
X: drivers/gpu/drm/mediatek/
|
X: drivers/gpu/drm/mediatek/
|
||||||
X: drivers/gpu/drm/msm/
|
X: drivers/gpu/drm/msm/
|
||||||
X: drivers/gpu/drm/nouveau/
|
X: drivers/gpu/drm/nova/
|
||||||
X: drivers/gpu/drm/radeon/
|
X: drivers/gpu/drm/radeon/
|
||||||
X: drivers/gpu/drm/tegra/
|
X: drivers/gpu/drm/tegra/
|
||||||
X: drivers/gpu/drm/xe/
|
X: drivers/gpu/drm/xe/
|
||||||
|
|
||||||
|
DRM DRIVERS AND COMMON INFRASTRUCTURE [RUST]
|
||||||
|
M: Danilo Krummrich <dakr@kernel.org>
|
||||||
|
M: Alice Ryhl <aliceryhl@google.com>
|
||||||
|
S: Supported
|
||||||
|
W: https://drm.pages.freedesktop.org/maintainer-tools/drm-rust.html
|
||||||
|
T: git https://gitlab.freedesktop.org/drm/rust/kernel.git
|
||||||
|
F: drivers/gpu/drm/nova/
|
||||||
|
F: drivers/gpu/nova-core/
|
||||||
|
F: rust/kernel/drm/
|
||||||
|
|
||||||
DRM DRIVERS FOR ALLWINNER A10
|
DRM DRIVERS FOR ALLWINNER A10
|
||||||
M: Maxime Ripard <mripard@kernel.org>
|
M: Maxime Ripard <mripard@kernel.org>
|
||||||
M: Chen-Yu Tsai <wens@csie.org>
|
M: Chen-Yu Tsai <wens@csie.org>
|
||||||
@@ -9584,6 +9592,14 @@ F: lib/tests/memcpy_kunit.c
|
|||||||
K: \bunsafe_memcpy\b
|
K: \bunsafe_memcpy\b
|
||||||
K: \b__NO_FORTIFY\b
|
K: \b__NO_FORTIFY\b
|
||||||
|
|
||||||
|
FOURSEMI AUDIO AMPLIFIER DRIVER
|
||||||
|
M: Nick Li <nick.li@foursemi.com>
|
||||||
|
L: linux-sound@vger.kernel.org
|
||||||
|
S: Maintained
|
||||||
|
F: Documentation/devicetree/bindings/sound/foursemi,fs2105s.yaml
|
||||||
|
F: sound/soc/codecs/fs-amp-lib.*
|
||||||
|
F: sound/soc/codecs/fs210x.*
|
||||||
|
|
||||||
FPGA DFL DRIVERS
|
FPGA DFL DRIVERS
|
||||||
M: Xu Yilun <yilun.xu@intel.com>
|
M: Xu Yilun <yilun.xu@intel.com>
|
||||||
R: Tom Rix <trix@redhat.com>
|
R: Tom Rix <trix@redhat.com>
|
||||||
@@ -10388,7 +10404,7 @@ S: Maintained
|
|||||||
F: drivers/input/touchscreen/goodix*
|
F: drivers/input/touchscreen/goodix*
|
||||||
|
|
||||||
GOOGLE ETHERNET DRIVERS
|
GOOGLE ETHERNET DRIVERS
|
||||||
M: Jeroen de Borst <jeroendb@google.com>
|
M: Joshua Washington <joshwash@google.com>
|
||||||
M: Harshitha Ramamurthy <hramamurthy@google.com>
|
M: Harshitha Ramamurthy <hramamurthy@google.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@@ -15740,13 +15756,6 @@ S: Supported
|
|||||||
W: http://www.melexis.com
|
W: http://www.melexis.com
|
||||||
F: drivers/iio/temperature/mlx90635.c
|
F: drivers/iio/temperature/mlx90635.c
|
||||||
|
|
||||||
MELFAS MIP4 TOUCHSCREEN DRIVER
|
|
||||||
M: Sangwon Jee <jeesw@melfas.com>
|
|
||||||
S: Supported
|
|
||||||
W: http://www.melfas.com
|
|
||||||
F: Documentation/devicetree/bindings/input/touchscreen/melfas_mip4.txt
|
|
||||||
F: drivers/input/touchscreen/melfas_mip4.c
|
|
||||||
|
|
||||||
MELLANOX BLUEFIELD I2C DRIVER
|
MELLANOX BLUEFIELD I2C DRIVER
|
||||||
M: Khalil Blaiech <kblaiech@nvidia.com>
|
M: Khalil Blaiech <kblaiech@nvidia.com>
|
||||||
M: Asmaa Mnebhi <asmaa@nvidia.com>
|
M: Asmaa Mnebhi <asmaa@nvidia.com>
|
||||||
@@ -16127,6 +16136,7 @@ M: Andrew Morton <akpm@linux-foundation.org>
|
|||||||
M: Mike Rapoport <rppt@kernel.org>
|
M: Mike Rapoport <rppt@kernel.org>
|
||||||
L: linux-mm@kvack.org
|
L: linux-mm@kvack.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock.git
|
||||||
F: include/linux/numa_memblks.h
|
F: include/linux/numa_memblks.h
|
||||||
F: mm/numa.c
|
F: mm/numa.c
|
||||||
F: mm/numa_emulation.c
|
F: mm/numa_emulation.c
|
||||||
@@ -17479,6 +17489,7 @@ NETFILTER
|
|||||||
M: Pablo Neira Ayuso <pablo@netfilter.org>
|
M: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||||
M: Jozsef Kadlecsik <kadlec@netfilter.org>
|
M: Jozsef Kadlecsik <kadlec@netfilter.org>
|
||||||
M: Florian Westphal <fw@strlen.de>
|
M: Florian Westphal <fw@strlen.de>
|
||||||
|
R: Phil Sutter <phil@nwl.cc>
|
||||||
L: netfilter-devel@vger.kernel.org
|
L: netfilter-devel@vger.kernel.org
|
||||||
L: coreteam@netfilter.org
|
L: coreteam@netfilter.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@@ -17848,9 +17859,9 @@ F: net/ipv6/syncookies.c
|
|||||||
F: net/ipv6/tcp*.c
|
F: net/ipv6/tcp*.c
|
||||||
|
|
||||||
NETWORKING [TLS]
|
NETWORKING [TLS]
|
||||||
M: Boris Pismenny <borisp@nvidia.com>
|
|
||||||
M: John Fastabend <john.fastabend@gmail.com>
|
M: John Fastabend <john.fastabend@gmail.com>
|
||||||
M: Jakub Kicinski <kuba@kernel.org>
|
M: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
M: Sabrina Dubroca <sd@queasysnail.net>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: include/net/tls.h
|
F: include/net/tls.h
|
||||||
@@ -20467,6 +20478,8 @@ F: include/dt-bindings/sound/qcom,wcd93*
|
|||||||
F: sound/soc/codecs/lpass-*.*
|
F: sound/soc/codecs/lpass-*.*
|
||||||
F: sound/soc/codecs/msm8916-wcd-analog.c
|
F: sound/soc/codecs/msm8916-wcd-analog.c
|
||||||
F: sound/soc/codecs/msm8916-wcd-digital.c
|
F: sound/soc/codecs/msm8916-wcd-digital.c
|
||||||
|
F: sound/soc/codecs/pm4125-sdw.c
|
||||||
|
F: sound/soc/codecs/pm4125.*
|
||||||
F: sound/soc/codecs/wcd-clsh-v2.*
|
F: sound/soc/codecs/wcd-clsh-v2.*
|
||||||
F: sound/soc/codecs/wcd-mbhc-v2.*
|
F: sound/soc/codecs/wcd-mbhc-v2.*
|
||||||
F: sound/soc/codecs/wcd93*.*
|
F: sound/soc/codecs/wcd93*.*
|
||||||
@@ -20878,8 +20891,8 @@ S: Maintained
|
|||||||
F: drivers/firmware/qcom/qcom_qseecom_uefisecapp.c
|
F: drivers/firmware/qcom/qcom_qseecom_uefisecapp.c
|
||||||
|
|
||||||
QUALCOMM RMNET DRIVER
|
QUALCOMM RMNET DRIVER
|
||||||
M: Subash Abhinov Kasiviswanathan <quic_subashab@quicinc.com>
|
M: Subash Abhinov Kasiviswanathan <subash.a.kasiviswanathan@oss.qualcomm.com>
|
||||||
M: Sean Tranchetti <quic_stranche@quicinc.com>
|
M: Sean Tranchetti <sean.tranchetti@oss.qualcomm.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
|
F: Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
|
||||||
@@ -24253,6 +24266,12 @@ S: Maintained
|
|||||||
F: Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
|
F: Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml
|
||||||
F: drivers/input/keyboard/sun4i-lradc-keys.c
|
F: drivers/input/keyboard/sun4i-lradc-keys.c
|
||||||
|
|
||||||
|
SUNDANCE NETWORK DRIVER
|
||||||
|
M: Denis Kirjanov <dkirjanov@suse.de>
|
||||||
|
L: netdev@vger.kernel.org
|
||||||
|
S: Maintained
|
||||||
|
F: drivers/net/ethernet/dlink/sundance.c
|
||||||
|
|
||||||
SUNPLUS ETHERNET DRIVER
|
SUNPLUS ETHERNET DRIVER
|
||||||
M: Wells Lu <wellslutw@gmail.com>
|
M: Wells Lu <wellslutw@gmail.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@
|
|||||||
VERSION = 6
|
VERSION = 6
|
||||||
PATCHLEVEL = 17
|
PATCHLEVEL = 17
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc3
|
EXTRAVERSION = -rc6
|
||||||
NAME = Baby Opossum Posse
|
NAME = Baby Opossum Posse
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
|
|||||||
@@ -387,6 +387,8 @@
|
|||||||
|
|
||||||
&sdmmc1 {
|
&sdmmc1 {
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
|
no-1-8-v;
|
||||||
|
sdhci-caps-mask = <0x0 0x00200000>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_sdmmc1_default>;
|
pinctrl-0 = <&pinctrl_sdmmc1_default>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
#ifndef __ASM_STACKTRACE_H
|
#ifndef __ASM_STACKTRACE_H
|
||||||
#define __ASM_STACKTRACE_H
|
#define __ASM_STACKTRACE_H
|
||||||
|
|
||||||
#include <asm/ptrace.h>
|
|
||||||
#include <linux/llist.h>
|
#include <linux/llist.h>
|
||||||
|
#include <asm/ptrace.h>
|
||||||
|
#include <asm/sections.h>
|
||||||
|
|
||||||
struct stackframe {
|
struct stackframe {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
config ARCH_MICROCHIP
|
||||||
|
bool
|
||||||
|
|
||||||
menuconfig ARCH_AT91
|
menuconfig ARCH_AT91
|
||||||
bool "AT91/Microchip SoCs"
|
bool "AT91/Microchip SoCs"
|
||||||
depends on (CPU_LITTLE_ENDIAN && (ARCH_MULTI_V4T || ARCH_MULTI_V5)) || \
|
depends on (CPU_LITTLE_ENDIAN && (ARCH_MULTI_V4T || ARCH_MULTI_V5)) || \
|
||||||
@@ -8,6 +11,7 @@ menuconfig ARCH_AT91
|
|||||||
select GPIOLIB
|
select GPIOLIB
|
||||||
select PINCTRL
|
select PINCTRL
|
||||||
select SOC_BUS
|
select SOC_BUS
|
||||||
|
select ARCH_MICROCHIP
|
||||||
|
|
||||||
if ARCH_AT91
|
if ARCH_AT91
|
||||||
config SOC_SAMV7
|
config SOC_SAMV7
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
#size-cells = <2>;
|
#size-cells = <2>;
|
||||||
|
|
||||||
aliases {
|
aliases {
|
||||||
|
serial0 = &uart0;
|
||||||
|
serial1 = &uart1;
|
||||||
|
serial2 = &uart2;
|
||||||
serial3 = &uart3;
|
serial3 = &uart3;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -555,6 +555,7 @@
|
|||||||
pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
|
pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
|
||||||
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
|
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
|
||||||
vmmc-supply = <®_usdhc2_vmmc>;
|
vmmc-supply = <®_usdhc2_vmmc>;
|
||||||
|
vqmmc-supply = <&ldo5>;
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -609,6 +609,7 @@
|
|||||||
pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
|
pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
|
||||||
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
|
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
|
||||||
vmmc-supply = <®_usdhc2_vmmc>;
|
vmmc-supply = <®_usdhc2_vmmc>;
|
||||||
|
vqmmc-supply = <&ldo5>;
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -467,6 +467,10 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
®_usdhc2_vqmmc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&sai5 {
|
&sai5 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_sai5>;
|
pinctrl-0 = <&pinctrl_sai5>;
|
||||||
@@ -876,8 +880,7 @@
|
|||||||
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d2>,
|
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d2>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d2>,
|
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d2>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d2>,
|
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d2>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d2>,
|
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d2>;
|
||||||
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
|
pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
|
||||||
@@ -886,8 +889,7 @@
|
|||||||
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>;
|
||||||
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
|
pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
|
||||||
@@ -896,8 +898,7 @@
|
|||||||
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>;
|
||||||
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl_usdhc2_gpio: usdhc2-gpiogrp {
|
pinctrl_usdhc2_gpio: usdhc2-gpiogrp {
|
||||||
|
|||||||
@@ -604,6 +604,10 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
®_usdhc2_vqmmc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&sai3 {
|
&sai3 {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_sai3>;
|
pinctrl-0 = <&pinctrl_sai3>;
|
||||||
@@ -983,8 +987,7 @@
|
|||||||
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d2>,
|
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d2>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d2>,
|
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d2>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d2>,
|
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d2>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d2>,
|
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d2>;
|
||||||
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
|
pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
|
||||||
@@ -993,8 +996,7 @@
|
|||||||
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>;
|
||||||
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
|
pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
|
||||||
@@ -1003,8 +1005,7 @@
|
|||||||
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA0__USDHC2_DATA0 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA1__USDHC2_DATA1 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA2__USDHC2_DATA2 0x1d4>,
|
||||||
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>,
|
<MX8MP_IOMUXC_SD2_DATA3__USDHC2_DATA3 0x1d4>;
|
||||||
<MX8MP_IOMUXC_GPIO1_IO04__USDHC2_VSELECT 0xc0>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl_usdhc2_gpio: usdhc2-gpiogrp {
|
pinctrl_usdhc2_gpio: usdhc2-gpiogrp {
|
||||||
|
|||||||
@@ -16,13 +16,18 @@
|
|||||||
reg = <0x0 0x40000000 0 0x80000000>;
|
reg = <0x0 0x40000000 0 0x80000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* identical to buck4_reg, but should never change */
|
reg_usdhc2_vqmmc: regulator-usdhc2-vqmmc {
|
||||||
reg_vcc3v3: regulator-vcc3v3 {
|
compatible = "regulator-gpio";
|
||||||
compatible = "regulator-fixed";
|
pinctrl-names = "default";
|
||||||
regulator-name = "VCC3V3";
|
pinctrl-0 = <&pinctrl_reg_usdhc2_vqmmc>;
|
||||||
regulator-min-microvolt = <3300000>;
|
regulator-name = "V_SD2";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
regulator-max-microvolt = <3300000>;
|
regulator-max-microvolt = <3300000>;
|
||||||
regulator-always-on;
|
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
|
||||||
|
states = <1800000 0x1>,
|
||||||
|
<3300000 0x0>;
|
||||||
|
vin-supply = <&ldo5_reg>;
|
||||||
|
status = "disabled";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -173,17 +178,21 @@
|
|||||||
read-only;
|
read-only;
|
||||||
reg = <0x53>;
|
reg = <0x53>;
|
||||||
pagesize = <16>;
|
pagesize = <16>;
|
||||||
vcc-supply = <®_vcc3v3>;
|
vcc-supply = <&buck4_reg>;
|
||||||
};
|
};
|
||||||
|
|
||||||
m24c64: eeprom@57 {
|
m24c64: eeprom@57 {
|
||||||
compatible = "atmel,24c64";
|
compatible = "atmel,24c64";
|
||||||
reg = <0x57>;
|
reg = <0x57>;
|
||||||
pagesize = <32>;
|
pagesize = <32>;
|
||||||
vcc-supply = <®_vcc3v3>;
|
vcc-supply = <&buck4_reg>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&usdhc2 {
|
||||||
|
vqmmc-supply = <®_usdhc2_vqmmc>;
|
||||||
|
};
|
||||||
|
|
||||||
&usdhc3 {
|
&usdhc3 {
|
||||||
pinctrl-names = "default", "state_100mhz", "state_200mhz";
|
pinctrl-names = "default", "state_100mhz", "state_200mhz";
|
||||||
pinctrl-0 = <&pinctrl_usdhc3>;
|
pinctrl-0 = <&pinctrl_usdhc3>;
|
||||||
@@ -193,7 +202,7 @@
|
|||||||
non-removable;
|
non-removable;
|
||||||
no-sd;
|
no-sd;
|
||||||
no-sdio;
|
no-sdio;
|
||||||
vmmc-supply = <®_vcc3v3>;
|
vmmc-supply = <&buck4_reg>;
|
||||||
vqmmc-supply = <&buck5_reg>;
|
vqmmc-supply = <&buck5_reg>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
@@ -233,6 +242,10 @@
|
|||||||
fsl,pins = <MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x10>;
|
fsl,pins = <MX8MP_IOMUXC_SD2_RESET_B__GPIO2_IO19 0x10>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pinctrl_reg_usdhc2_vqmmc: regusdhc2vqmmcgrp {
|
||||||
|
fsl,pins = <MX8MP_IOMUXC_GPIO1_IO04__GPIO1_IO04 0xc0>;
|
||||||
|
};
|
||||||
|
|
||||||
pinctrl_usdhc3: usdhc3grp {
|
pinctrl_usdhc3: usdhc3grp {
|
||||||
fsl,pins = <MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x194>,
|
fsl,pins = <MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x194>,
|
||||||
<MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d4>,
|
<MX8MP_IOMUXC_NAND_WP_B__USDHC3_CMD 0x1d4>,
|
||||||
|
|||||||
@@ -80,17 +80,17 @@
|
|||||||
flexcan1_phy: can-phy0 {
|
flexcan1_phy: can-phy0 {
|
||||||
compatible = "nxp,tjr1443";
|
compatible = "nxp,tjr1443";
|
||||||
#phy-cells = <0>;
|
#phy-cells = <0>;
|
||||||
max-bitrate = <1000000>;
|
max-bitrate = <8000000>;
|
||||||
enable-gpios = <&i2c6_pcal6416 6 GPIO_ACTIVE_HIGH>;
|
enable-gpios = <&i2c6_pcal6416 6 GPIO_ACTIVE_HIGH>;
|
||||||
standby-gpios = <&i2c6_pcal6416 5 GPIO_ACTIVE_HIGH>;
|
standby-gpios = <&i2c6_pcal6416 5 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
flexcan2_phy: can-phy1 {
|
flexcan2_phy: can-phy1 {
|
||||||
compatible = "nxp,tjr1443";
|
compatible = "nxp,tjr1443";
|
||||||
#phy-cells = <0>;
|
#phy-cells = <0>;
|
||||||
max-bitrate = <1000000>;
|
max-bitrate = <8000000>;
|
||||||
enable-gpios = <&i2c6_pcal6416 4 GPIO_ACTIVE_HIGH>;
|
enable-gpios = <&i2c4_gpio_expander_21 4 GPIO_ACTIVE_HIGH>;
|
||||||
standby-gpios = <&i2c6_pcal6416 3 GPIO_ACTIVE_HIGH>;
|
standby-gpios = <&i2c4_gpio_expander_21 3 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
reg_vref_1v8: regulator-1p8v {
|
reg_vref_1v8: regulator-1p8v {
|
||||||
|
|||||||
@@ -1843,7 +1843,7 @@
|
|||||||
<GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH>;
|
<GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&scmi_clk IMX95_CLK_VPU>,
|
clocks = <&scmi_clk IMX95_CLK_VPU>,
|
||||||
<&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_ENC>;
|
<&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_ENC>;
|
||||||
assigned-clocks = <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_DEC>;
|
assigned-clocks = <&vpu_blk_ctrl IMX95_CLK_VPUBLK_JPEG_ENC>;
|
||||||
assigned-clock-parents = <&scmi_clk IMX95_CLK_VPUJPEG>;
|
assigned-clock-parents = <&scmi_clk IMX95_CLK_VPUJPEG>;
|
||||||
power-domains = <&scmi_devpd IMX95_PD_VPU>;
|
power-domains = <&scmi_devpd IMX95_PD_VPU>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -609,7 +609,7 @@
|
|||||||
|
|
||||||
bluetooth {
|
bluetooth {
|
||||||
compatible = "brcm,bcm4345c5";
|
compatible = "brcm,bcm4345c5";
|
||||||
interrupts-extended = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
|
interrupts-extended = <&gpio3 RK_PA7 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
interrupt-names = "host-wakeup";
|
interrupt-names = "host-wakeup";
|
||||||
clocks = <&rk808 RK808_CLKOUT1>;
|
clocks = <&rk808 RK808_CLKOUT1>;
|
||||||
clock-names = "lpo";
|
clock-names = "lpo";
|
||||||
|
|||||||
@@ -959,6 +959,7 @@
|
|||||||
reg = <0>;
|
reg = <0>;
|
||||||
m25p,fast-read;
|
m25p,fast-read;
|
||||||
spi-max-frequency = <10000000>;
|
spi-max-frequency = <10000000>;
|
||||||
|
vcc-supply = <&vcc_3v0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -754,6 +754,7 @@
|
|||||||
compatible = "jedec,spi-nor";
|
compatible = "jedec,spi-nor";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
spi-max-frequency = <10000000>;
|
spi-max-frequency = <10000000>;
|
||||||
|
vcc-supply = <&vcc_1v8>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -302,8 +302,7 @@
|
|||||||
ð1m0_tx_bus2
|
ð1m0_tx_bus2
|
||||||
ð1m0_rx_bus2
|
ð1m0_rx_bus2
|
||||||
ð1m0_rgmii_clk
|
ð1m0_rgmii_clk
|
||||||
ð1m0_rgmii_bus
|
ð1m0_rgmii_bus>;
|
||||||
ðm0_clk1_25m_out>;
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -784,7 +783,6 @@
|
|||||||
rgmii_phy0: phy@1 {
|
rgmii_phy0: phy@1 {
|
||||||
compatible = "ethernet-phy-ieee802.3-c22";
|
compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
reg = <0x1>;
|
reg = <0x1>;
|
||||||
clocks = <&cru REFCLKO25M_GMAC0_OUT>;
|
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&gmac0_rst>;
|
pinctrl-0 = <&gmac0_rst>;
|
||||||
reset-assert-us = <20000>;
|
reset-assert-us = <20000>;
|
||||||
@@ -797,7 +795,6 @@
|
|||||||
rgmii_phy1: phy@1 {
|
rgmii_phy1: phy@1 {
|
||||||
compatible = "ethernet-phy-ieee802.3-c22";
|
compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
reg = <0x1>;
|
reg = <0x1>;
|
||||||
clocks = <&cru REFCLKO25M_GMAC1_OUT>;
|
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&gmac1_rst>;
|
pinctrl-0 = <&gmac1_rst>;
|
||||||
reset-assert-us = <20000>;
|
reset-assert-us = <20000>;
|
||||||
|
|||||||
@@ -250,6 +250,7 @@
|
|||||||
compatible = "belling,bl24c16a", "atmel,24c16";
|
compatible = "belling,bl24c16a", "atmel,24c16";
|
||||||
reg = <0x50>;
|
reg = <0x50>;
|
||||||
pagesize = <16>;
|
pagesize = <16>;
|
||||||
|
read-only;
|
||||||
vcc-supply = <&vcc_3v3_pmu>;
|
vcc-supply = <&vcc_3v3_pmu>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&hp_detect>;
|
pinctrl-0 = <&hp_detect>;
|
||||||
simple-audio-card,aux-devs = <&speaker_amp>, <&headphone_amp>;
|
simple-audio-card,aux-devs = <&speaker_amp>, <&headphone_amp>;
|
||||||
simple-audio-card,hp-det-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>;
|
simple-audio-card,hp-det-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
|
||||||
simple-audio-card,widgets =
|
simple-audio-card,widgets =
|
||||||
"Microphone", "Onboard Microphone",
|
"Microphone", "Onboard Microphone",
|
||||||
"Microphone", "Microphone Jack",
|
"Microphone", "Microphone Jack",
|
||||||
|
|||||||
@@ -365,6 +365,8 @@
|
|||||||
max-frequency = <200000000>;
|
max-frequency = <200000000>;
|
||||||
mmc-hs400-1_8v;
|
mmc-hs400-1_8v;
|
||||||
mmc-hs400-enhanced-strobe;
|
mmc-hs400-enhanced-strobe;
|
||||||
|
vmmc-supply = <&vcc_3v3_s3>;
|
||||||
|
vqmmc-supply = <&vcc_1v8_s3>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,22 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&pcie30phy {
|
||||||
|
data-lanes = <1 1 2 2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie3x2 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&pcie3x2_rst>;
|
||||||
|
reset-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||||
|
vpcie3v3-supply = <&vcc3v3_pcie30>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie3x4 {
|
||||||
|
num-lanes = <2>;
|
||||||
|
};
|
||||||
|
|
||||||
&pinctrl {
|
&pinctrl {
|
||||||
hdmirx {
|
hdmirx {
|
||||||
hdmirx_hpd: hdmirx-5v-detection {
|
hdmirx_hpd: hdmirx-5v-detection {
|
||||||
@@ -90,11 +106,23 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pcie3 {
|
||||||
|
pcie3x2_rst: pcie3x2-rst {
|
||||||
|
rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
sound {
|
sound {
|
||||||
hp_detect: hp-detect {
|
hp_detect: hp-detect {
|
||||||
rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
usb {
|
||||||
|
vcc5v0_host_en: vcc5v0-host-en {
|
||||||
|
rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&vcc3v3_pcie2x1l0 {
|
&vcc3v3_pcie2x1l0 {
|
||||||
@@ -103,3 +131,10 @@
|
|||||||
pinctrl-0 = <&pcie2_0_vcc3v3_en>;
|
pinctrl-0 = <&pcie2_0_vcc3v3_en>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&vcc5v0_host {
|
||||||
|
enable-active-high;
|
||||||
|
gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&vcc5v0_host_en>;
|
||||||
|
};
|
||||||
|
|||||||
@@ -320,9 +320,9 @@
|
|||||||
&i2c3 {
|
&i2c3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
es8388: audio-codec@10 {
|
es8388: audio-codec@11 {
|
||||||
compatible = "everest,es8388", "everest,es8328";
|
compatible = "everest,es8388", "everest,es8328";
|
||||||
reg = <0x10>;
|
reg = <0x11>;
|
||||||
clocks = <&cru I2S1_8CH_MCLKOUT>;
|
clocks = <&cru I2S1_8CH_MCLKOUT>;
|
||||||
AVDD-supply = <&vcc_3v3_s0>;
|
AVDD-supply = <&vcc_3v3_s0>;
|
||||||
DVDD-supply = <&vcc_1v8_s0>;
|
DVDD-supply = <&vcc_1v8_s0>;
|
||||||
|
|||||||
@@ -1160,115 +1160,8 @@ u64 kvm_vcpu_apply_reg_masks(const struct kvm_vcpu *, enum vcpu_sysreg, u64);
|
|||||||
__v; \
|
__v; \
|
||||||
})
|
})
|
||||||
|
|
||||||
u64 vcpu_read_sys_reg(const struct kvm_vcpu *vcpu, int reg);
|
u64 vcpu_read_sys_reg(const struct kvm_vcpu *, enum vcpu_sysreg);
|
||||||
void vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, int reg);
|
void vcpu_write_sys_reg(struct kvm_vcpu *, u64, enum vcpu_sysreg);
|
||||||
|
|
||||||
static inline bool __vcpu_read_sys_reg_from_cpu(int reg, u64 *val)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* *** VHE ONLY ***
|
|
||||||
*
|
|
||||||
* System registers listed in the switch are not saved on every
|
|
||||||
* exit from the guest but are only saved on vcpu_put.
|
|
||||||
*
|
|
||||||
* SYSREGS_ON_CPU *MUST* be checked before using this helper.
|
|
||||||
*
|
|
||||||
* Note that MPIDR_EL1 for the guest is set by KVM via VMPIDR_EL2 but
|
|
||||||
* should never be listed below, because the guest cannot modify its
|
|
||||||
* own MPIDR_EL1 and MPIDR_EL1 is accessed for VCPU A from VCPU B's
|
|
||||||
* thread when emulating cross-VCPU communication.
|
|
||||||
*/
|
|
||||||
if (!has_vhe())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
switch (reg) {
|
|
||||||
case SCTLR_EL1: *val = read_sysreg_s(SYS_SCTLR_EL12); break;
|
|
||||||
case CPACR_EL1: *val = read_sysreg_s(SYS_CPACR_EL12); break;
|
|
||||||
case TTBR0_EL1: *val = read_sysreg_s(SYS_TTBR0_EL12); break;
|
|
||||||
case TTBR1_EL1: *val = read_sysreg_s(SYS_TTBR1_EL12); break;
|
|
||||||
case TCR_EL1: *val = read_sysreg_s(SYS_TCR_EL12); break;
|
|
||||||
case TCR2_EL1: *val = read_sysreg_s(SYS_TCR2_EL12); break;
|
|
||||||
case PIR_EL1: *val = read_sysreg_s(SYS_PIR_EL12); break;
|
|
||||||
case PIRE0_EL1: *val = read_sysreg_s(SYS_PIRE0_EL12); break;
|
|
||||||
case POR_EL1: *val = read_sysreg_s(SYS_POR_EL12); break;
|
|
||||||
case ESR_EL1: *val = read_sysreg_s(SYS_ESR_EL12); break;
|
|
||||||
case AFSR0_EL1: *val = read_sysreg_s(SYS_AFSR0_EL12); break;
|
|
||||||
case AFSR1_EL1: *val = read_sysreg_s(SYS_AFSR1_EL12); break;
|
|
||||||
case FAR_EL1: *val = read_sysreg_s(SYS_FAR_EL12); break;
|
|
||||||
case MAIR_EL1: *val = read_sysreg_s(SYS_MAIR_EL12); break;
|
|
||||||
case VBAR_EL1: *val = read_sysreg_s(SYS_VBAR_EL12); break;
|
|
||||||
case CONTEXTIDR_EL1: *val = read_sysreg_s(SYS_CONTEXTIDR_EL12);break;
|
|
||||||
case TPIDR_EL0: *val = read_sysreg_s(SYS_TPIDR_EL0); break;
|
|
||||||
case TPIDRRO_EL0: *val = read_sysreg_s(SYS_TPIDRRO_EL0); break;
|
|
||||||
case TPIDR_EL1: *val = read_sysreg_s(SYS_TPIDR_EL1); break;
|
|
||||||
case AMAIR_EL1: *val = read_sysreg_s(SYS_AMAIR_EL12); break;
|
|
||||||
case CNTKCTL_EL1: *val = read_sysreg_s(SYS_CNTKCTL_EL12); break;
|
|
||||||
case ELR_EL1: *val = read_sysreg_s(SYS_ELR_EL12); break;
|
|
||||||
case SPSR_EL1: *val = read_sysreg_s(SYS_SPSR_EL12); break;
|
|
||||||
case PAR_EL1: *val = read_sysreg_par(); break;
|
|
||||||
case DACR32_EL2: *val = read_sysreg_s(SYS_DACR32_EL2); break;
|
|
||||||
case IFSR32_EL2: *val = read_sysreg_s(SYS_IFSR32_EL2); break;
|
|
||||||
case DBGVCR32_EL2: *val = read_sysreg_s(SYS_DBGVCR32_EL2); break;
|
|
||||||
case ZCR_EL1: *val = read_sysreg_s(SYS_ZCR_EL12); break;
|
|
||||||
case SCTLR2_EL1: *val = read_sysreg_s(SYS_SCTLR2_EL12); break;
|
|
||||||
default: return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool __vcpu_write_sys_reg_to_cpu(u64 val, int reg)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* *** VHE ONLY ***
|
|
||||||
*
|
|
||||||
* System registers listed in the switch are not restored on every
|
|
||||||
* entry to the guest but are only restored on vcpu_load.
|
|
||||||
*
|
|
||||||
* SYSREGS_ON_CPU *MUST* be checked before using this helper.
|
|
||||||
*
|
|
||||||
* Note that MPIDR_EL1 for the guest is set by KVM via VMPIDR_EL2 but
|
|
||||||
* should never be listed below, because the MPIDR should only be set
|
|
||||||
* once, before running the VCPU, and never changed later.
|
|
||||||
*/
|
|
||||||
if (!has_vhe())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
switch (reg) {
|
|
||||||
case SCTLR_EL1: write_sysreg_s(val, SYS_SCTLR_EL12); break;
|
|
||||||
case CPACR_EL1: write_sysreg_s(val, SYS_CPACR_EL12); break;
|
|
||||||
case TTBR0_EL1: write_sysreg_s(val, SYS_TTBR0_EL12); break;
|
|
||||||
case TTBR1_EL1: write_sysreg_s(val, SYS_TTBR1_EL12); break;
|
|
||||||
case TCR_EL1: write_sysreg_s(val, SYS_TCR_EL12); break;
|
|
||||||
case TCR2_EL1: write_sysreg_s(val, SYS_TCR2_EL12); break;
|
|
||||||
case PIR_EL1: write_sysreg_s(val, SYS_PIR_EL12); break;
|
|
||||||
case PIRE0_EL1: write_sysreg_s(val, SYS_PIRE0_EL12); break;
|
|
||||||
case POR_EL1: write_sysreg_s(val, SYS_POR_EL12); break;
|
|
||||||
case ESR_EL1: write_sysreg_s(val, SYS_ESR_EL12); break;
|
|
||||||
case AFSR0_EL1: write_sysreg_s(val, SYS_AFSR0_EL12); break;
|
|
||||||
case AFSR1_EL1: write_sysreg_s(val, SYS_AFSR1_EL12); break;
|
|
||||||
case FAR_EL1: write_sysreg_s(val, SYS_FAR_EL12); break;
|
|
||||||
case MAIR_EL1: write_sysreg_s(val, SYS_MAIR_EL12); break;
|
|
||||||
case VBAR_EL1: write_sysreg_s(val, SYS_VBAR_EL12); break;
|
|
||||||
case CONTEXTIDR_EL1: write_sysreg_s(val, SYS_CONTEXTIDR_EL12);break;
|
|
||||||
case TPIDR_EL0: write_sysreg_s(val, SYS_TPIDR_EL0); break;
|
|
||||||
case TPIDRRO_EL0: write_sysreg_s(val, SYS_TPIDRRO_EL0); break;
|
|
||||||
case TPIDR_EL1: write_sysreg_s(val, SYS_TPIDR_EL1); break;
|
|
||||||
case AMAIR_EL1: write_sysreg_s(val, SYS_AMAIR_EL12); break;
|
|
||||||
case CNTKCTL_EL1: write_sysreg_s(val, SYS_CNTKCTL_EL12); break;
|
|
||||||
case ELR_EL1: write_sysreg_s(val, SYS_ELR_EL12); break;
|
|
||||||
case SPSR_EL1: write_sysreg_s(val, SYS_SPSR_EL12); break;
|
|
||||||
case PAR_EL1: write_sysreg_s(val, SYS_PAR_EL1); break;
|
|
||||||
case DACR32_EL2: write_sysreg_s(val, SYS_DACR32_EL2); break;
|
|
||||||
case IFSR32_EL2: write_sysreg_s(val, SYS_IFSR32_EL2); break;
|
|
||||||
case DBGVCR32_EL2: write_sysreg_s(val, SYS_DBGVCR32_EL2); break;
|
|
||||||
case ZCR_EL1: write_sysreg_s(val, SYS_ZCR_EL12); break;
|
|
||||||
case SCTLR2_EL1: write_sysreg_s(val, SYS_SCTLR2_EL12); break;
|
|
||||||
default: return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct kvm_vm_stat {
|
struct kvm_vm_stat {
|
||||||
struct kvm_vm_stat_generic generic;
|
struct kvm_vm_stat_generic generic;
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu);
|
|||||||
int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa,
|
int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa,
|
||||||
phys_addr_t pa, unsigned long size, bool writable);
|
phys_addr_t pa, unsigned long size, bool writable);
|
||||||
|
|
||||||
|
int kvm_handle_guest_sea(struct kvm_vcpu *vcpu);
|
||||||
int kvm_handle_guest_abort(struct kvm_vcpu *vcpu);
|
int kvm_handle_guest_abort(struct kvm_vcpu *vcpu);
|
||||||
|
|
||||||
phys_addr_t kvm_mmu_get_httbr(void);
|
phys_addr_t kvm_mmu_get_httbr(void);
|
||||||
|
|||||||
@@ -355,6 +355,11 @@ static inline kvm_pte_t *kvm_dereference_pteref(struct kvm_pgtable_walker *walke
|
|||||||
return pteref;
|
return pteref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline kvm_pte_t *kvm_dereference_pteref_raw(kvm_pteref_t pteref)
|
||||||
|
{
|
||||||
|
return pteref;
|
||||||
|
}
|
||||||
|
|
||||||
static inline int kvm_pgtable_walk_begin(struct kvm_pgtable_walker *walker)
|
static inline int kvm_pgtable_walk_begin(struct kvm_pgtable_walker *walker)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -384,6 +389,11 @@ static inline kvm_pte_t *kvm_dereference_pteref(struct kvm_pgtable_walker *walke
|
|||||||
return rcu_dereference_check(pteref, !(walker->flags & KVM_PGTABLE_WALK_SHARED));
|
return rcu_dereference_check(pteref, !(walker->flags & KVM_PGTABLE_WALK_SHARED));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline kvm_pte_t *kvm_dereference_pteref_raw(kvm_pteref_t pteref)
|
||||||
|
{
|
||||||
|
return rcu_dereference_raw(pteref);
|
||||||
|
}
|
||||||
|
|
||||||
static inline int kvm_pgtable_walk_begin(struct kvm_pgtable_walker *walker)
|
static inline int kvm_pgtable_walk_begin(struct kvm_pgtable_walker *walker)
|
||||||
{
|
{
|
||||||
if (walker->flags & KVM_PGTABLE_WALK_SHARED)
|
if (walker->flags & KVM_PGTABLE_WALK_SHARED)
|
||||||
@@ -551,6 +561,26 @@ static inline int kvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm_s2
|
|||||||
*/
|
*/
|
||||||
void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt);
|
void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* kvm_pgtable_stage2_destroy_range() - Destroy the unlinked range of addresses.
|
||||||
|
* @pgt: Page-table structure initialised by kvm_pgtable_stage2_init*().
|
||||||
|
* @addr: Intermediate physical address at which to place the mapping.
|
||||||
|
* @size: Size of the mapping.
|
||||||
|
*
|
||||||
|
* The page-table is assumed to be unreachable by any hardware walkers prior
|
||||||
|
* to freeing and therefore no TLB invalidation is performed.
|
||||||
|
*/
|
||||||
|
void kvm_pgtable_stage2_destroy_range(struct kvm_pgtable *pgt,
|
||||||
|
u64 addr, u64 size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* kvm_pgtable_stage2_destroy_pgd() - Destroy the PGD of guest stage-2 page-table.
|
||||||
|
* @pgt: Page-table structure initialised by kvm_pgtable_stage2_init*().
|
||||||
|
*
|
||||||
|
* It is assumed that the rest of the page-table is freed before this operation.
|
||||||
|
*/
|
||||||
|
void kvm_pgtable_stage2_destroy_pgd(struct kvm_pgtable *pgt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kvm_pgtable_stage2_free_unlinked() - Free an unlinked stage-2 paging structure.
|
* kvm_pgtable_stage2_free_unlinked() - Free an unlinked stage-2 paging structure.
|
||||||
* @mm_ops: Memory management callbacks.
|
* @mm_ops: Memory management callbacks.
|
||||||
|
|||||||
@@ -179,7 +179,9 @@ struct pkvm_mapping {
|
|||||||
|
|
||||||
int pkvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm_s2_mmu *mmu,
|
int pkvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm_s2_mmu *mmu,
|
||||||
struct kvm_pgtable_mm_ops *mm_ops);
|
struct kvm_pgtable_mm_ops *mm_ops);
|
||||||
void pkvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt);
|
void pkvm_pgtable_stage2_destroy_range(struct kvm_pgtable *pgt,
|
||||||
|
u64 addr, u64 size);
|
||||||
|
void pkvm_pgtable_stage2_destroy_pgd(struct kvm_pgtable *pgt);
|
||||||
int pkvm_pgtable_stage2_map(struct kvm_pgtable *pgt, u64 addr, u64 size, u64 phys,
|
int pkvm_pgtable_stage2_map(struct kvm_pgtable *pgt, u64 addr, u64 size, u64 phys,
|
||||||
enum kvm_pgtable_prot prot, void *mc,
|
enum kvm_pgtable_prot prot, void *mc,
|
||||||
enum kvm_pgtable_walk_flags flags);
|
enum kvm_pgtable_walk_flags flags);
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
/* Copyright (C) 2018 - Arm Ltd */
|
|
||||||
|
|
||||||
#ifndef __ARM64_KVM_RAS_H__
|
|
||||||
#define __ARM64_KVM_RAS_H__
|
|
||||||
|
|
||||||
#include <linux/acpi.h>
|
|
||||||
#include <linux/errno.h>
|
|
||||||
#include <linux/types.h>
|
|
||||||
|
|
||||||
#include <asm/acpi.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Was this synchronous external abort a RAS notification?
|
|
||||||
* Returns '0' for errors handled by some RAS subsystem, or -ENOENT.
|
|
||||||
*/
|
|
||||||
static inline int kvm_handle_guest_sea(void)
|
|
||||||
{
|
|
||||||
/* apei_claim_sea(NULL) expects to mask interrupts itself */
|
|
||||||
lockdep_assert_irqs_enabled();
|
|
||||||
|
|
||||||
return apei_claim_sea(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* __ARM64_KVM_RAS_H__ */
|
|
||||||
@@ -17,6 +17,13 @@
|
|||||||
#include <linux/refcount.h>
|
#include <linux/refcount.h>
|
||||||
#include <asm/cpufeature.h>
|
#include <asm/cpufeature.h>
|
||||||
|
|
||||||
|
enum pgtable_type {
|
||||||
|
TABLE_PTE,
|
||||||
|
TABLE_PMD,
|
||||||
|
TABLE_PUD,
|
||||||
|
TABLE_P4D,
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
atomic64_t id;
|
atomic64_t id;
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ struct mod_arch_specific {
|
|||||||
|
|
||||||
/* for CONFIG_DYNAMIC_FTRACE */
|
/* for CONFIG_DYNAMIC_FTRACE */
|
||||||
struct plt_entry *ftrace_trampolines;
|
struct plt_entry *ftrace_trampolines;
|
||||||
|
struct plt_entry *init_ftrace_trampolines;
|
||||||
};
|
};
|
||||||
|
|
||||||
u64 module_emit_plt_entry(struct module *mod, Elf64_Shdr *sechdrs,
|
u64 module_emit_plt_entry(struct module *mod, Elf64_Shdr *sechdrs,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ SECTIONS {
|
|||||||
.plt 0 : { BYTE(0) }
|
.plt 0 : { BYTE(0) }
|
||||||
.init.plt 0 : { BYTE(0) }
|
.init.plt 0 : { BYTE(0) }
|
||||||
.text.ftrace_trampoline 0 : { BYTE(0) }
|
.text.ftrace_trampoline 0 : { BYTE(0) }
|
||||||
|
.init.text.ftrace_trampoline 0 : { BYTE(0) }
|
||||||
|
|
||||||
#ifdef CONFIG_KASAN_SW_TAGS
|
#ifdef CONFIG_KASAN_SW_TAGS
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1142,9 +1142,6 @@
|
|||||||
|
|
||||||
#define ARM64_FEATURE_FIELD_BITS 4
|
#define ARM64_FEATURE_FIELD_BITS 4
|
||||||
|
|
||||||
/* Defined for compatibility only, do not add new users. */
|
|
||||||
#define ARM64_FEATURE_MASK(x) (x##_MASK)
|
|
||||||
|
|
||||||
#ifdef __ASSEMBLY__
|
#ifdef __ASSEMBLY__
|
||||||
|
|
||||||
.macro mrs_s, rt, sreg
|
.macro mrs_s, rt, sreg
|
||||||
|
|||||||
@@ -17,7 +17,12 @@
|
|||||||
#ifndef __ASM_BITSPERLONG_H
|
#ifndef __ASM_BITSPERLONG_H
|
||||||
#define __ASM_BITSPERLONG_H
|
#define __ASM_BITSPERLONG_H
|
||||||
|
|
||||||
|
#if defined(__KERNEL__) && !defined(__aarch64__)
|
||||||
|
/* Used by the compat vDSO */
|
||||||
|
#define __BITS_PER_LONG 32
|
||||||
|
#else
|
||||||
#define __BITS_PER_LONG 64
|
#define __BITS_PER_LONG 64
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <asm-generic/bitsperlong.h>
|
#include <asm-generic/bitsperlong.h>
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,7 @@
|
|||||||
#include <asm/hwcap.h>
|
#include <asm/hwcap.h>
|
||||||
#include <asm/insn.h>
|
#include <asm/insn.h>
|
||||||
#include <asm/kvm_host.h>
|
#include <asm/kvm_host.h>
|
||||||
|
#include <asm/mmu.h>
|
||||||
#include <asm/mmu_context.h>
|
#include <asm/mmu_context.h>
|
||||||
#include <asm/mte.h>
|
#include <asm/mte.h>
|
||||||
#include <asm/hypervisor.h>
|
#include <asm/hypervisor.h>
|
||||||
@@ -1945,11 +1946,11 @@ static bool has_pmuv3(const struct arm64_cpu_capabilities *entry, int scope)
|
|||||||
extern
|
extern
|
||||||
void create_kpti_ng_temp_pgd(pgd_t *pgdir, phys_addr_t phys, unsigned long virt,
|
void create_kpti_ng_temp_pgd(pgd_t *pgdir, phys_addr_t phys, unsigned long virt,
|
||||||
phys_addr_t size, pgprot_t prot,
|
phys_addr_t size, pgprot_t prot,
|
||||||
phys_addr_t (*pgtable_alloc)(int), int flags);
|
phys_addr_t (*pgtable_alloc)(enum pgtable_type), int flags);
|
||||||
|
|
||||||
static phys_addr_t __initdata kpti_ng_temp_alloc;
|
static phys_addr_t __initdata kpti_ng_temp_alloc;
|
||||||
|
|
||||||
static phys_addr_t __init kpti_ng_pgd_alloc(int shift)
|
static phys_addr_t __init kpti_ng_pgd_alloc(enum pgtable_type type)
|
||||||
{
|
{
|
||||||
kpti_ng_temp_alloc -= PAGE_SIZE;
|
kpti_ng_temp_alloc -= PAGE_SIZE;
|
||||||
return kpti_ng_temp_alloc;
|
return kpti_ng_temp_alloc;
|
||||||
@@ -2269,6 +2270,24 @@ static void cpu_clear_disr(const struct arm64_cpu_capabilities *__unused)
|
|||||||
/* Firmware may have left a deferred SError in this register. */
|
/* Firmware may have left a deferred SError in this register. */
|
||||||
write_sysreg_s(0, SYS_DISR_EL1);
|
write_sysreg_s(0, SYS_DISR_EL1);
|
||||||
}
|
}
|
||||||
|
static bool has_rasv1p1(const struct arm64_cpu_capabilities *__unused, int scope)
|
||||||
|
{
|
||||||
|
const struct arm64_cpu_capabilities rasv1p1_caps[] = {
|
||||||
|
{
|
||||||
|
ARM64_CPUID_FIELDS(ID_AA64PFR0_EL1, RAS, V1P1)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ARM64_CPUID_FIELDS(ID_AA64PFR0_EL1, RAS, IMP)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ARM64_CPUID_FIELDS(ID_AA64PFR1_EL1, RAS_frac, RASv1p1)
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return (has_cpuid_feature(&rasv1p1_caps[0], scope) ||
|
||||||
|
(has_cpuid_feature(&rasv1p1_caps[1], scope) &&
|
||||||
|
has_cpuid_feature(&rasv1p1_caps[2], scope)));
|
||||||
|
}
|
||||||
#endif /* CONFIG_ARM64_RAS_EXTN */
|
#endif /* CONFIG_ARM64_RAS_EXTN */
|
||||||
|
|
||||||
#ifdef CONFIG_ARM64_PTR_AUTH
|
#ifdef CONFIG_ARM64_PTR_AUTH
|
||||||
@@ -2687,6 +2706,12 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
|||||||
.cpu_enable = cpu_clear_disr,
|
.cpu_enable = cpu_clear_disr,
|
||||||
ARM64_CPUID_FIELDS(ID_AA64PFR0_EL1, RAS, IMP)
|
ARM64_CPUID_FIELDS(ID_AA64PFR0_EL1, RAS, IMP)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.desc = "RASv1p1 Extension Support",
|
||||||
|
.capability = ARM64_HAS_RASV1P1_EXTN,
|
||||||
|
.type = ARM64_CPUCAP_SYSTEM_FEATURE,
|
||||||
|
.matches = has_rasv1p1,
|
||||||
|
},
|
||||||
#endif /* CONFIG_ARM64_RAS_EXTN */
|
#endif /* CONFIG_ARM64_RAS_EXTN */
|
||||||
#ifdef CONFIG_ARM64_AMU_EXTN
|
#ifdef CONFIG_ARM64_AMU_EXTN
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -258,10 +258,17 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
|
|||||||
return ftrace_modify_code(pc, 0, new, false);
|
return ftrace_modify_code(pc, 0, new, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct plt_entry *get_ftrace_plt(struct module *mod)
|
static struct plt_entry *get_ftrace_plt(struct module *mod, unsigned long addr)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_MODULES
|
#ifdef CONFIG_MODULES
|
||||||
struct plt_entry *plt = mod->arch.ftrace_trampolines;
|
struct plt_entry *plt = NULL;
|
||||||
|
|
||||||
|
if (within_module_mem_type(addr, mod, MOD_INIT_TEXT))
|
||||||
|
plt = mod->arch.init_ftrace_trampolines;
|
||||||
|
else if (within_module_mem_type(addr, mod, MOD_TEXT))
|
||||||
|
plt = mod->arch.ftrace_trampolines;
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return &plt[FTRACE_PLT_IDX];
|
return &plt[FTRACE_PLT_IDX];
|
||||||
#else
|
#else
|
||||||
@@ -332,7 +339,7 @@ static bool ftrace_find_callable_addr(struct dyn_ftrace *rec,
|
|||||||
if (WARN_ON(!mod))
|
if (WARN_ON(!mod))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
plt = get_ftrace_plt(mod);
|
plt = get_ftrace_plt(mod, pc);
|
||||||
if (!plt) {
|
if (!plt) {
|
||||||
pr_err("ftrace: no module PLT for %ps\n", (void *)*addr);
|
pr_err("ftrace: no module PLT for %ps\n", (void *)*addr);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ int load_other_segments(struct kimage *image,
|
|||||||
char *initrd, unsigned long initrd_len,
|
char *initrd, unsigned long initrd_len,
|
||||||
char *cmdline)
|
char *cmdline)
|
||||||
{
|
{
|
||||||
struct kexec_buf kbuf;
|
struct kexec_buf kbuf = {};
|
||||||
void *dtb = NULL;
|
void *dtb = NULL;
|
||||||
unsigned long initrd_load_addr = 0, dtb_len,
|
unsigned long initrd_load_addr = 0, dtb_len,
|
||||||
orig_segments = image->nr_segments;
|
orig_segments = image->nr_segments;
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
|
|||||||
unsigned long core_plts = 0;
|
unsigned long core_plts = 0;
|
||||||
unsigned long init_plts = 0;
|
unsigned long init_plts = 0;
|
||||||
Elf64_Sym *syms = NULL;
|
Elf64_Sym *syms = NULL;
|
||||||
Elf_Shdr *pltsec, *tramp = NULL;
|
Elf_Shdr *pltsec, *tramp = NULL, *init_tramp = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -298,6 +298,9 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
|
|||||||
else if (!strcmp(secstrings + sechdrs[i].sh_name,
|
else if (!strcmp(secstrings + sechdrs[i].sh_name,
|
||||||
".text.ftrace_trampoline"))
|
".text.ftrace_trampoline"))
|
||||||
tramp = sechdrs + i;
|
tramp = sechdrs + i;
|
||||||
|
else if (!strcmp(secstrings + sechdrs[i].sh_name,
|
||||||
|
".init.text.ftrace_trampoline"))
|
||||||
|
init_tramp = sechdrs + i;
|
||||||
else if (sechdrs[i].sh_type == SHT_SYMTAB)
|
else if (sechdrs[i].sh_type == SHT_SYMTAB)
|
||||||
syms = (Elf64_Sym *)sechdrs[i].sh_addr;
|
syms = (Elf64_Sym *)sechdrs[i].sh_addr;
|
||||||
}
|
}
|
||||||
@@ -363,5 +366,12 @@ int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
|
|||||||
tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry);
|
tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (init_tramp) {
|
||||||
|
init_tramp->sh_type = SHT_NOBITS;
|
||||||
|
init_tramp->sh_flags = SHF_EXECINSTR | SHF_ALLOC;
|
||||||
|
init_tramp->sh_addralign = __alignof__(struct plt_entry);
|
||||||
|
init_tramp->sh_size = NR_FTRACE_PLTS * sizeof(struct plt_entry);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -466,6 +466,17 @@ static int module_init_ftrace_plt(const Elf_Ehdr *hdr,
|
|||||||
__init_plt(&plts[FTRACE_PLT_IDX], FTRACE_ADDR);
|
__init_plt(&plts[FTRACE_PLT_IDX], FTRACE_ADDR);
|
||||||
|
|
||||||
mod->arch.ftrace_trampolines = plts;
|
mod->arch.ftrace_trampolines = plts;
|
||||||
|
|
||||||
|
s = find_section(hdr, sechdrs, ".init.text.ftrace_trampoline");
|
||||||
|
if (!s)
|
||||||
|
return -ENOEXEC;
|
||||||
|
|
||||||
|
plts = (void *)s->sh_addr;
|
||||||
|
|
||||||
|
__init_plt(&plts[FTRACE_PLT_IDX], FTRACE_ADDR);
|
||||||
|
|
||||||
|
mod->arch.init_ftrace_trampolines = plts;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2408,12 +2408,12 @@ static u64 get_hyp_id_aa64pfr0_el1(void)
|
|||||||
*/
|
*/
|
||||||
u64 val = read_sanitised_ftr_reg(SYS_ID_AA64PFR0_EL1);
|
u64 val = read_sanitised_ftr_reg(SYS_ID_AA64PFR0_EL1);
|
||||||
|
|
||||||
val &= ~(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV2) |
|
val &= ~(ID_AA64PFR0_EL1_CSV2 |
|
||||||
ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV3));
|
ID_AA64PFR0_EL1_CSV3);
|
||||||
|
|
||||||
val |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV2),
|
val |= FIELD_PREP(ID_AA64PFR0_EL1_CSV2,
|
||||||
arm64_get_spectre_v2_state() == SPECTRE_UNAFFECTED);
|
arm64_get_spectre_v2_state() == SPECTRE_UNAFFECTED);
|
||||||
val |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64PFR0_EL1_CSV3),
|
val |= FIELD_PREP(ID_AA64PFR0_EL1_CSV3,
|
||||||
arm64_get_meltdown_state() == SPECTRE_UNAFFECTED);
|
arm64_get_meltdown_state() == SPECTRE_UNAFFECTED);
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
|||||||
@@ -1420,10 +1420,10 @@ void __kvm_at_s12(struct kvm_vcpu *vcpu, u32 op, u64 vaddr)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we only have a single stage of translation (E2H=0 or
|
* If we only have a single stage of translation (EL2&0), exit
|
||||||
* TGE=1), exit early. Same thing if {VM,DC}=={0,0}.
|
* early. Same thing if {VM,DC}=={0,0}.
|
||||||
*/
|
*/
|
||||||
if (!vcpu_el2_e2h_is_set(vcpu) || vcpu_el2_tge_is_set(vcpu) ||
|
if (compute_translation_regime(vcpu, op) == TR_EL20 ||
|
||||||
!(vcpu_read_sys_reg(vcpu, HCR_EL2) & (HCR_VM | HCR_DC)))
|
!(vcpu_read_sys_reg(vcpu, HCR_EL2) & (HCR_VM | HCR_DC)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -2833,7 +2833,7 @@ int kvm_inject_nested_sea(struct kvm_vcpu *vcpu, bool iabt, u64 addr)
|
|||||||
iabt ? ESR_ELx_EC_IABT_LOW : ESR_ELx_EC_DABT_LOW);
|
iabt ? ESR_ELx_EC_IABT_LOW : ESR_ELx_EC_DABT_LOW);
|
||||||
esr |= ESR_ELx_FSC_EXTABT | ESR_ELx_IL;
|
esr |= ESR_ELx_FSC_EXTABT | ESR_ELx_IL;
|
||||||
|
|
||||||
vcpu_write_sys_reg(vcpu, FAR_EL2, addr);
|
vcpu_write_sys_reg(vcpu, addr, FAR_EL2);
|
||||||
|
|
||||||
if (__vcpu_sys_reg(vcpu, SCTLR2_EL2) & SCTLR2_EL1_EASE)
|
if (__vcpu_sys_reg(vcpu, SCTLR2_EL2) & SCTLR2_EL1_EASE)
|
||||||
return kvm_inject_nested(vcpu, esr, except_type_serror);
|
return kvm_inject_nested(vcpu, esr, except_type_serror);
|
||||||
|
|||||||
@@ -22,36 +22,28 @@
|
|||||||
|
|
||||||
static inline u64 __vcpu_read_sys_reg(const struct kvm_vcpu *vcpu, int reg)
|
static inline u64 __vcpu_read_sys_reg(const struct kvm_vcpu *vcpu, int reg)
|
||||||
{
|
{
|
||||||
u64 val;
|
if (has_vhe())
|
||||||
|
|
||||||
if (unlikely(vcpu_has_nv(vcpu)))
|
|
||||||
return vcpu_read_sys_reg(vcpu, reg);
|
return vcpu_read_sys_reg(vcpu, reg);
|
||||||
else if (vcpu_get_flag(vcpu, SYSREGS_ON_CPU) &&
|
|
||||||
__vcpu_read_sys_reg_from_cpu(reg, &val))
|
|
||||||
return val;
|
|
||||||
|
|
||||||
return __vcpu_sys_reg(vcpu, reg);
|
return __vcpu_sys_reg(vcpu, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void __vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, int reg)
|
static inline void __vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, int reg)
|
||||||
{
|
{
|
||||||
if (unlikely(vcpu_has_nv(vcpu)))
|
if (has_vhe())
|
||||||
vcpu_write_sys_reg(vcpu, val, reg);
|
vcpu_write_sys_reg(vcpu, val, reg);
|
||||||
else if (!vcpu_get_flag(vcpu, SYSREGS_ON_CPU) ||
|
else
|
||||||
!__vcpu_write_sys_reg_to_cpu(val, reg))
|
|
||||||
__vcpu_assign_sys_reg(vcpu, reg, val);
|
__vcpu_assign_sys_reg(vcpu, reg, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __vcpu_write_spsr(struct kvm_vcpu *vcpu, unsigned long target_mode,
|
static void __vcpu_write_spsr(struct kvm_vcpu *vcpu, unsigned long target_mode,
|
||||||
u64 val)
|
u64 val)
|
||||||
{
|
{
|
||||||
if (unlikely(vcpu_has_nv(vcpu))) {
|
if (has_vhe()) {
|
||||||
if (target_mode == PSR_MODE_EL1h)
|
if (target_mode == PSR_MODE_EL1h)
|
||||||
vcpu_write_sys_reg(vcpu, val, SPSR_EL1);
|
vcpu_write_sys_reg(vcpu, val, SPSR_EL1);
|
||||||
else
|
else
|
||||||
vcpu_write_sys_reg(vcpu, val, SPSR_EL2);
|
vcpu_write_sys_reg(vcpu, val, SPSR_EL2);
|
||||||
} else if (has_vhe()) {
|
|
||||||
write_sysreg_el1(val, SYS_SPSR);
|
|
||||||
} else {
|
} else {
|
||||||
__vcpu_assign_sys_reg(vcpu, SPSR_EL1, val);
|
__vcpu_assign_sys_reg(vcpu, SPSR_EL1, val);
|
||||||
}
|
}
|
||||||
@@ -59,7 +51,7 @@ static void __vcpu_write_spsr(struct kvm_vcpu *vcpu, unsigned long target_mode,
|
|||||||
|
|
||||||
static void __vcpu_write_spsr_abt(struct kvm_vcpu *vcpu, u64 val)
|
static void __vcpu_write_spsr_abt(struct kvm_vcpu *vcpu, u64 val)
|
||||||
{
|
{
|
||||||
if (has_vhe())
|
if (has_vhe() && vcpu_get_flag(vcpu, SYSREGS_ON_CPU))
|
||||||
write_sysreg(val, spsr_abt);
|
write_sysreg(val, spsr_abt);
|
||||||
else
|
else
|
||||||
vcpu->arch.ctxt.spsr_abt = val;
|
vcpu->arch.ctxt.spsr_abt = val;
|
||||||
@@ -67,7 +59,7 @@ static void __vcpu_write_spsr_abt(struct kvm_vcpu *vcpu, u64 val)
|
|||||||
|
|
||||||
static void __vcpu_write_spsr_und(struct kvm_vcpu *vcpu, u64 val)
|
static void __vcpu_write_spsr_und(struct kvm_vcpu *vcpu, u64 val)
|
||||||
{
|
{
|
||||||
if (has_vhe())
|
if (has_vhe() && vcpu_get_flag(vcpu, SYSREGS_ON_CPU))
|
||||||
write_sysreg(val, spsr_und);
|
write_sysreg(val, spsr_und);
|
||||||
else
|
else
|
||||||
vcpu->arch.ctxt.spsr_und = val;
|
vcpu->arch.ctxt.spsr_und = val;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ static inline __must_check bool nvhe_check_data_corruption(bool v)
|
|||||||
bool corruption = unlikely(condition); \
|
bool corruption = unlikely(condition); \
|
||||||
if (corruption) { \
|
if (corruption) { \
|
||||||
if (IS_ENABLED(CONFIG_BUG_ON_DATA_CORRUPTION)) { \
|
if (IS_ENABLED(CONFIG_BUG_ON_DATA_CORRUPTION)) { \
|
||||||
BUG_ON(1); \
|
BUG(); \
|
||||||
} else \
|
} else \
|
||||||
WARN_ON(1); \
|
WARN_ON(1); \
|
||||||
} \
|
} \
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ static void inject_undef64(struct kvm_vcpu *vcpu)
|
|||||||
|
|
||||||
*vcpu_pc(vcpu) = read_sysreg_el2(SYS_ELR);
|
*vcpu_pc(vcpu) = read_sysreg_el2(SYS_ELR);
|
||||||
*vcpu_cpsr(vcpu) = read_sysreg_el2(SYS_SPSR);
|
*vcpu_cpsr(vcpu) = read_sysreg_el2(SYS_SPSR);
|
||||||
|
__vcpu_assign_sys_reg(vcpu, read_sysreg_el1(SYS_VBAR), VBAR_EL1);
|
||||||
|
|
||||||
kvm_pend_exception(vcpu, EXCEPT_AA64_EL1_SYNC);
|
kvm_pend_exception(vcpu, EXCEPT_AA64_EL1_SYNC);
|
||||||
|
|
||||||
@@ -372,6 +373,9 @@ static const struct sys_reg_desc pvm_sys_reg_descs[] = {
|
|||||||
|
|
||||||
/* Debug and Trace Registers are restricted. */
|
/* Debug and Trace Registers are restricted. */
|
||||||
|
|
||||||
|
/* Group 1 ID registers */
|
||||||
|
HOST_HANDLED(SYS_REVIDR_EL1),
|
||||||
|
|
||||||
/* AArch64 mappings of the AArch32 ID registers */
|
/* AArch64 mappings of the AArch32 ID registers */
|
||||||
/* CRm=1 */
|
/* CRm=1 */
|
||||||
AARCH32(SYS_ID_PFR0_EL1),
|
AARCH32(SYS_ID_PFR0_EL1),
|
||||||
@@ -460,6 +464,7 @@ static const struct sys_reg_desc pvm_sys_reg_descs[] = {
|
|||||||
|
|
||||||
HOST_HANDLED(SYS_CCSIDR_EL1),
|
HOST_HANDLED(SYS_CCSIDR_EL1),
|
||||||
HOST_HANDLED(SYS_CLIDR_EL1),
|
HOST_HANDLED(SYS_CLIDR_EL1),
|
||||||
|
HOST_HANDLED(SYS_AIDR_EL1),
|
||||||
HOST_HANDLED(SYS_CSSELR_EL1),
|
HOST_HANDLED(SYS_CSSELR_EL1),
|
||||||
HOST_HANDLED(SYS_CTR_EL0),
|
HOST_HANDLED(SYS_CTR_EL0),
|
||||||
|
|
||||||
|
|||||||
@@ -1551,21 +1551,38 @@ static int stage2_free_walker(const struct kvm_pgtable_visit_ctx *ctx,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt)
|
void kvm_pgtable_stage2_destroy_range(struct kvm_pgtable *pgt,
|
||||||
|
u64 addr, u64 size)
|
||||||
{
|
{
|
||||||
size_t pgd_sz;
|
|
||||||
struct kvm_pgtable_walker walker = {
|
struct kvm_pgtable_walker walker = {
|
||||||
.cb = stage2_free_walker,
|
.cb = stage2_free_walker,
|
||||||
.flags = KVM_PGTABLE_WALK_LEAF |
|
.flags = KVM_PGTABLE_WALK_LEAF |
|
||||||
KVM_PGTABLE_WALK_TABLE_POST,
|
KVM_PGTABLE_WALK_TABLE_POST,
|
||||||
};
|
};
|
||||||
|
|
||||||
WARN_ON(kvm_pgtable_walk(pgt, 0, BIT(pgt->ia_bits), &walker));
|
WARN_ON(kvm_pgtable_walk(pgt, addr, size, &walker));
|
||||||
|
}
|
||||||
|
|
||||||
|
void kvm_pgtable_stage2_destroy_pgd(struct kvm_pgtable *pgt)
|
||||||
|
{
|
||||||
|
size_t pgd_sz;
|
||||||
|
|
||||||
pgd_sz = kvm_pgd_pages(pgt->ia_bits, pgt->start_level) * PAGE_SIZE;
|
pgd_sz = kvm_pgd_pages(pgt->ia_bits, pgt->start_level) * PAGE_SIZE;
|
||||||
pgt->mm_ops->free_pages_exact(kvm_dereference_pteref(&walker, pgt->pgd), pgd_sz);
|
|
||||||
|
/*
|
||||||
|
* Since the pgtable is unlinked at this point, and not shared with
|
||||||
|
* other walkers, safely deference pgd with kvm_dereference_pteref_raw()
|
||||||
|
*/
|
||||||
|
pgt->mm_ops->free_pages_exact(kvm_dereference_pteref_raw(pgt->pgd), pgd_sz);
|
||||||
pgt->pgd = NULL;
|
pgt->pgd = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt)
|
||||||
|
{
|
||||||
|
kvm_pgtable_stage2_destroy_range(pgt, 0, BIT(pgt->ia_bits));
|
||||||
|
kvm_pgtable_stage2_destroy_pgd(pgt);
|
||||||
|
}
|
||||||
|
|
||||||
void kvm_pgtable_stage2_free_unlinked(struct kvm_pgtable_mm_ops *mm_ops, void *pgtable, s8 level)
|
void kvm_pgtable_stage2_free_unlinked(struct kvm_pgtable_mm_ops *mm_ops, void *pgtable, s8 level)
|
||||||
{
|
{
|
||||||
kvm_pteref_t ptep = (kvm_pteref_t)pgtable;
|
kvm_pteref_t ptep = (kvm_pteref_t)pgtable;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ static bool __is_be(struct kvm_vcpu *vcpu)
|
|||||||
if (vcpu_mode_is_32bit(vcpu))
|
if (vcpu_mode_is_32bit(vcpu))
|
||||||
return !!(read_sysreg_el2(SYS_SPSR) & PSR_AA32_E_BIT);
|
return !!(read_sysreg_el2(SYS_SPSR) & PSR_AA32_E_BIT);
|
||||||
|
|
||||||
return !!(read_sysreg(SCTLR_EL1) & SCTLR_ELx_EE);
|
return !!(read_sysreg_el1(SYS_SCTLR) & SCTLR_ELx_EE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -43,8 +43,11 @@ DEFINE_PER_CPU(unsigned long, kvm_hyp_vector);
|
|||||||
*
|
*
|
||||||
* - API/APK: they are already accounted for by vcpu_load(), and can
|
* - API/APK: they are already accounted for by vcpu_load(), and can
|
||||||
* only take effect across a load/put cycle (such as ERET)
|
* only take effect across a load/put cycle (such as ERET)
|
||||||
|
*
|
||||||
|
* - FIEN: no way we let a guest have access to the RAS "Common Fault
|
||||||
|
* Injection" thing, whatever that does
|
||||||
*/
|
*/
|
||||||
#define NV_HCR_GUEST_EXCLUDE (HCR_TGE | HCR_API | HCR_APK)
|
#define NV_HCR_GUEST_EXCLUDE (HCR_TGE | HCR_API | HCR_APK | HCR_FIEN)
|
||||||
|
|
||||||
static u64 __compute_hcr(struct kvm_vcpu *vcpu)
|
static u64 __compute_hcr(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,19 +4,20 @@
|
|||||||
* Author: Christoffer Dall <c.dall@virtualopensystems.com>
|
* Author: Christoffer Dall <c.dall@virtualopensystems.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/acpi.h>
|
||||||
#include <linux/mman.h>
|
#include <linux/mman.h>
|
||||||
#include <linux/kvm_host.h>
|
#include <linux/kvm_host.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/hugetlb.h>
|
#include <linux/hugetlb.h>
|
||||||
#include <linux/sched/signal.h>
|
#include <linux/sched/signal.h>
|
||||||
#include <trace/events/kvm.h>
|
#include <trace/events/kvm.h>
|
||||||
|
#include <asm/acpi.h>
|
||||||
#include <asm/pgalloc.h>
|
#include <asm/pgalloc.h>
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/kvm_arm.h>
|
#include <asm/kvm_arm.h>
|
||||||
#include <asm/kvm_mmu.h>
|
#include <asm/kvm_mmu.h>
|
||||||
#include <asm/kvm_pgtable.h>
|
#include <asm/kvm_pgtable.h>
|
||||||
#include <asm/kvm_pkvm.h>
|
#include <asm/kvm_pkvm.h>
|
||||||
#include <asm/kvm_ras.h>
|
|
||||||
#include <asm/kvm_asm.h>
|
#include <asm/kvm_asm.h>
|
||||||
#include <asm/kvm_emulate.h>
|
#include <asm/kvm_emulate.h>
|
||||||
#include <asm/virt.h>
|
#include <asm/virt.h>
|
||||||
@@ -903,6 +904,38 @@ static int kvm_init_ipa_range(struct kvm_s2_mmu *mmu, unsigned long type)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Assume that @pgt is valid and unlinked from the KVM MMU to free the
|
||||||
|
* page-table without taking the kvm_mmu_lock and without performing any
|
||||||
|
* TLB invalidations.
|
||||||
|
*
|
||||||
|
* Also, the range of addresses can be large enough to cause need_resched
|
||||||
|
* warnings, for instance on CONFIG_PREEMPT_NONE kernels. Hence, invoke
|
||||||
|
* cond_resched() periodically to prevent hogging the CPU for a long time
|
||||||
|
* and schedule something else, if required.
|
||||||
|
*/
|
||||||
|
static void stage2_destroy_range(struct kvm_pgtable *pgt, phys_addr_t addr,
|
||||||
|
phys_addr_t end)
|
||||||
|
{
|
||||||
|
u64 next;
|
||||||
|
|
||||||
|
do {
|
||||||
|
next = stage2_range_addr_end(addr, end);
|
||||||
|
KVM_PGT_FN(kvm_pgtable_stage2_destroy_range)(pgt, addr,
|
||||||
|
next - addr);
|
||||||
|
if (next != end)
|
||||||
|
cond_resched();
|
||||||
|
} while (addr = next, addr != end);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void kvm_stage2_destroy(struct kvm_pgtable *pgt)
|
||||||
|
{
|
||||||
|
unsigned int ia_bits = VTCR_EL2_IPA(pgt->mmu->vtcr);
|
||||||
|
|
||||||
|
stage2_destroy_range(pgt, 0, BIT(ia_bits));
|
||||||
|
KVM_PGT_FN(kvm_pgtable_stage2_destroy_pgd)(pgt);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kvm_init_stage2_mmu - Initialise a S2 MMU structure
|
* kvm_init_stage2_mmu - Initialise a S2 MMU structure
|
||||||
* @kvm: The pointer to the KVM structure
|
* @kvm: The pointer to the KVM structure
|
||||||
@@ -979,7 +1012,7 @@ int kvm_init_stage2_mmu(struct kvm *kvm, struct kvm_s2_mmu *mmu, unsigned long t
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_destroy_pgtable:
|
out_destroy_pgtable:
|
||||||
KVM_PGT_FN(kvm_pgtable_stage2_destroy)(pgt);
|
kvm_stage2_destroy(pgt);
|
||||||
out_free_pgtable:
|
out_free_pgtable:
|
||||||
kfree(pgt);
|
kfree(pgt);
|
||||||
return err;
|
return err;
|
||||||
@@ -1076,7 +1109,7 @@ void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
|
|||||||
write_unlock(&kvm->mmu_lock);
|
write_unlock(&kvm->mmu_lock);
|
||||||
|
|
||||||
if (pgt) {
|
if (pgt) {
|
||||||
KVM_PGT_FN(kvm_pgtable_stage2_destroy)(pgt);
|
kvm_stage2_destroy(pgt);
|
||||||
kfree(pgt);
|
kfree(pgt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1811,6 +1844,19 @@ static void handle_access_fault(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa)
|
|||||||
read_unlock(&vcpu->kvm->mmu_lock);
|
read_unlock(&vcpu->kvm->mmu_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int kvm_handle_guest_sea(struct kvm_vcpu *vcpu)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Give APEI the opportunity to claim the abort before handling it
|
||||||
|
* within KVM. apei_claim_sea() expects to be called with IRQs enabled.
|
||||||
|
*/
|
||||||
|
lockdep_assert_irqs_enabled();
|
||||||
|
if (apei_claim_sea(NULL) == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return kvm_inject_serror(vcpu);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kvm_handle_guest_abort - handles all 2nd stage aborts
|
* kvm_handle_guest_abort - handles all 2nd stage aborts
|
||||||
* @vcpu: the VCPU pointer
|
* @vcpu: the VCPU pointer
|
||||||
@@ -1834,17 +1880,8 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu)
|
|||||||
gfn_t gfn;
|
gfn_t gfn;
|
||||||
int ret, idx;
|
int ret, idx;
|
||||||
|
|
||||||
/* Synchronous External Abort? */
|
if (kvm_vcpu_abt_issea(vcpu))
|
||||||
if (kvm_vcpu_abt_issea(vcpu)) {
|
return kvm_handle_guest_sea(vcpu);
|
||||||
/*
|
|
||||||
* For RAS the host kernel may handle this abort.
|
|
||||||
* There is no need to pass the error into the guest.
|
|
||||||
*/
|
|
||||||
if (kvm_handle_guest_sea())
|
|
||||||
return kvm_inject_serror(vcpu);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
esr = kvm_vcpu_get_esr(vcpu);
|
esr = kvm_vcpu_get_esr(vcpu);
|
||||||
|
|
||||||
|
|||||||
@@ -1287,7 +1287,10 @@ int kvm_handle_vncr_abort(struct kvm_vcpu *vcpu)
|
|||||||
struct vncr_tlb *vt = vcpu->arch.vncr_tlb;
|
struct vncr_tlb *vt = vcpu->arch.vncr_tlb;
|
||||||
u64 esr = kvm_vcpu_get_esr(vcpu);
|
u64 esr = kvm_vcpu_get_esr(vcpu);
|
||||||
|
|
||||||
BUG_ON(!(esr & ESR_ELx_VNCR_SHIFT));
|
WARN_ON_ONCE(!(esr & ESR_ELx_VNCR));
|
||||||
|
|
||||||
|
if (kvm_vcpu_abt_issea(vcpu))
|
||||||
|
return kvm_handle_guest_sea(vcpu);
|
||||||
|
|
||||||
if (esr_fsc_is_permission_fault(esr)) {
|
if (esr_fsc_is_permission_fault(esr)) {
|
||||||
inject_vncr_perm(vcpu);
|
inject_vncr_perm(vcpu);
|
||||||
|
|||||||
@@ -316,9 +316,16 @@ static int __pkvm_pgtable_stage2_unmap(struct kvm_pgtable *pgt, u64 start, u64 e
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pkvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt)
|
void pkvm_pgtable_stage2_destroy_range(struct kvm_pgtable *pgt,
|
||||||
|
u64 addr, u64 size)
|
||||||
{
|
{
|
||||||
__pkvm_pgtable_stage2_unmap(pgt, 0, ~(0ULL));
|
__pkvm_pgtable_stage2_unmap(pgt, addr, addr + size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void pkvm_pgtable_stage2_destroy_pgd(struct kvm_pgtable *pgt)
|
||||||
|
{
|
||||||
|
/* Expected to be called after all pKVM mappings have been released. */
|
||||||
|
WARN_ON_ONCE(!RB_EMPTY_ROOT(&pgt->pkvm_mappings.rb_root));
|
||||||
}
|
}
|
||||||
|
|
||||||
int pkvm_pgtable_stage2_map(struct kvm_pgtable *pgt, u64 addr, u64 size,
|
int pkvm_pgtable_stage2_map(struct kvm_pgtable *pgt, u64 addr, u64 size,
|
||||||
|
|||||||
@@ -82,43 +82,105 @@ static bool write_to_read_only(struct kvm_vcpu *vcpu,
|
|||||||
"sys_reg write to read-only register");
|
"sys_reg write to read-only register");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PURE_EL2_SYSREG(el2) \
|
enum sr_loc_attr {
|
||||||
case el2: { \
|
SR_LOC_MEMORY = 0, /* Register definitely in memory */
|
||||||
*el1r = el2; \
|
SR_LOC_LOADED = BIT(0), /* Register on CPU, unless it cannot */
|
||||||
return true; \
|
SR_LOC_MAPPED = BIT(1), /* Register in a different CPU register */
|
||||||
}
|
SR_LOC_XLATED = BIT(2), /* Register translated to fit another reg */
|
||||||
|
SR_LOC_SPECIAL = BIT(3), /* Demanding register, implies loaded */
|
||||||
|
};
|
||||||
|
|
||||||
#define MAPPED_EL2_SYSREG(el2, el1, fn) \
|
struct sr_loc {
|
||||||
case el2: { \
|
enum sr_loc_attr loc;
|
||||||
*xlate = fn; \
|
enum vcpu_sysreg map_reg;
|
||||||
*el1r = el1; \
|
u64 (*xlate)(u64);
|
||||||
return true; \
|
};
|
||||||
}
|
|
||||||
|
|
||||||
static bool get_el2_to_el1_mapping(unsigned int reg,
|
static enum sr_loc_attr locate_direct_register(const struct kvm_vcpu *vcpu,
|
||||||
unsigned int *el1r, u64 (**xlate)(u64))
|
enum vcpu_sysreg reg)
|
||||||
{
|
{
|
||||||
switch (reg) {
|
switch (reg) {
|
||||||
PURE_EL2_SYSREG( VPIDR_EL2 );
|
case SCTLR_EL1:
|
||||||
PURE_EL2_SYSREG( VMPIDR_EL2 );
|
case CPACR_EL1:
|
||||||
PURE_EL2_SYSREG( ACTLR_EL2 );
|
case TTBR0_EL1:
|
||||||
PURE_EL2_SYSREG( HCR_EL2 );
|
case TTBR1_EL1:
|
||||||
PURE_EL2_SYSREG( MDCR_EL2 );
|
case TCR_EL1:
|
||||||
PURE_EL2_SYSREG( HSTR_EL2 );
|
case TCR2_EL1:
|
||||||
PURE_EL2_SYSREG( HACR_EL2 );
|
case PIR_EL1:
|
||||||
PURE_EL2_SYSREG( VTTBR_EL2 );
|
case PIRE0_EL1:
|
||||||
PURE_EL2_SYSREG( VTCR_EL2 );
|
case POR_EL1:
|
||||||
PURE_EL2_SYSREG( TPIDR_EL2 );
|
case ESR_EL1:
|
||||||
PURE_EL2_SYSREG( HPFAR_EL2 );
|
case AFSR0_EL1:
|
||||||
PURE_EL2_SYSREG( HCRX_EL2 );
|
case AFSR1_EL1:
|
||||||
PURE_EL2_SYSREG( HFGRTR_EL2 );
|
case FAR_EL1:
|
||||||
PURE_EL2_SYSREG( HFGWTR_EL2 );
|
case MAIR_EL1:
|
||||||
PURE_EL2_SYSREG( HFGITR_EL2 );
|
case VBAR_EL1:
|
||||||
PURE_EL2_SYSREG( HDFGRTR_EL2 );
|
case CONTEXTIDR_EL1:
|
||||||
PURE_EL2_SYSREG( HDFGWTR_EL2 );
|
case AMAIR_EL1:
|
||||||
PURE_EL2_SYSREG( HAFGRTR_EL2 );
|
case CNTKCTL_EL1:
|
||||||
PURE_EL2_SYSREG( CNTVOFF_EL2 );
|
case ELR_EL1:
|
||||||
PURE_EL2_SYSREG( CNTHCTL_EL2 );
|
case SPSR_EL1:
|
||||||
|
case ZCR_EL1:
|
||||||
|
case SCTLR2_EL1:
|
||||||
|
/*
|
||||||
|
* EL1 registers which have an ELx2 mapping are loaded if
|
||||||
|
* we're not in hypervisor context.
|
||||||
|
*/
|
||||||
|
return is_hyp_ctxt(vcpu) ? SR_LOC_MEMORY : SR_LOC_LOADED;
|
||||||
|
|
||||||
|
case TPIDR_EL0:
|
||||||
|
case TPIDRRO_EL0:
|
||||||
|
case TPIDR_EL1:
|
||||||
|
case PAR_EL1:
|
||||||
|
case DACR32_EL2:
|
||||||
|
case IFSR32_EL2:
|
||||||
|
case DBGVCR32_EL2:
|
||||||
|
/* These registers are always loaded, no matter what */
|
||||||
|
return SR_LOC_LOADED;
|
||||||
|
|
||||||
|
default:
|
||||||
|
/* Non-mapped EL2 registers are by definition in memory. */
|
||||||
|
return SR_LOC_MEMORY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void locate_mapped_el2_register(const struct kvm_vcpu *vcpu,
|
||||||
|
enum vcpu_sysreg reg,
|
||||||
|
enum vcpu_sysreg map_reg,
|
||||||
|
u64 (*xlate)(u64),
|
||||||
|
struct sr_loc *loc)
|
||||||
|
{
|
||||||
|
if (!is_hyp_ctxt(vcpu)) {
|
||||||
|
loc->loc = SR_LOC_MEMORY;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
loc->loc = SR_LOC_LOADED | SR_LOC_MAPPED;
|
||||||
|
loc->map_reg = map_reg;
|
||||||
|
|
||||||
|
WARN_ON(locate_direct_register(vcpu, map_reg) != SR_LOC_MEMORY);
|
||||||
|
|
||||||
|
if (xlate != NULL && !vcpu_el2_e2h_is_set(vcpu)) {
|
||||||
|
loc->loc |= SR_LOC_XLATED;
|
||||||
|
loc->xlate = xlate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MAPPED_EL2_SYSREG(r, m, t) \
|
||||||
|
case r: { \
|
||||||
|
locate_mapped_el2_register(vcpu, r, m, t, loc); \
|
||||||
|
break; \
|
||||||
|
}
|
||||||
|
|
||||||
|
static void locate_register(const struct kvm_vcpu *vcpu, enum vcpu_sysreg reg,
|
||||||
|
struct sr_loc *loc)
|
||||||
|
{
|
||||||
|
if (!vcpu_get_flag(vcpu, SYSREGS_ON_CPU)) {
|
||||||
|
loc->loc = SR_LOC_MEMORY;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (reg) {
|
||||||
MAPPED_EL2_SYSREG(SCTLR_EL2, SCTLR_EL1,
|
MAPPED_EL2_SYSREG(SCTLR_EL2, SCTLR_EL1,
|
||||||
translate_sctlr_el2_to_sctlr_el1 );
|
translate_sctlr_el2_to_sctlr_el1 );
|
||||||
MAPPED_EL2_SYSREG(CPTR_EL2, CPACR_EL1,
|
MAPPED_EL2_SYSREG(CPTR_EL2, CPACR_EL1,
|
||||||
@@ -144,125 +206,189 @@ static bool get_el2_to_el1_mapping(unsigned int reg,
|
|||||||
MAPPED_EL2_SYSREG(ZCR_EL2, ZCR_EL1, NULL );
|
MAPPED_EL2_SYSREG(ZCR_EL2, ZCR_EL1, NULL );
|
||||||
MAPPED_EL2_SYSREG(CONTEXTIDR_EL2, CONTEXTIDR_EL1, NULL );
|
MAPPED_EL2_SYSREG(CONTEXTIDR_EL2, CONTEXTIDR_EL1, NULL );
|
||||||
MAPPED_EL2_SYSREG(SCTLR2_EL2, SCTLR2_EL1, NULL );
|
MAPPED_EL2_SYSREG(SCTLR2_EL2, SCTLR2_EL1, NULL );
|
||||||
|
case CNTHCTL_EL2:
|
||||||
|
/* CNTHCTL_EL2 is super special, until we support NV2.1 */
|
||||||
|
loc->loc = ((is_hyp_ctxt(vcpu) && vcpu_el2_e2h_is_set(vcpu)) ?
|
||||||
|
SR_LOC_SPECIAL : SR_LOC_MEMORY);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
loc->loc = locate_direct_register(vcpu, reg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 vcpu_read_sys_reg(const struct kvm_vcpu *vcpu, int reg)
|
static u64 read_sr_from_cpu(enum vcpu_sysreg reg)
|
||||||
{
|
{
|
||||||
u64 val = 0x8badf00d8badf00d;
|
u64 val = 0x8badf00d8badf00d;
|
||||||
u64 (*xlate)(u64) = NULL;
|
|
||||||
unsigned int el1r;
|
|
||||||
|
|
||||||
if (!vcpu_get_flag(vcpu, SYSREGS_ON_CPU))
|
switch (reg) {
|
||||||
goto memory_read;
|
case SCTLR_EL1: val = read_sysreg_s(SYS_SCTLR_EL12); break;
|
||||||
|
case CPACR_EL1: val = read_sysreg_s(SYS_CPACR_EL12); break;
|
||||||
|
case TTBR0_EL1: val = read_sysreg_s(SYS_TTBR0_EL12); break;
|
||||||
|
case TTBR1_EL1: val = read_sysreg_s(SYS_TTBR1_EL12); break;
|
||||||
|
case TCR_EL1: val = read_sysreg_s(SYS_TCR_EL12); break;
|
||||||
|
case TCR2_EL1: val = read_sysreg_s(SYS_TCR2_EL12); break;
|
||||||
|
case PIR_EL1: val = read_sysreg_s(SYS_PIR_EL12); break;
|
||||||
|
case PIRE0_EL1: val = read_sysreg_s(SYS_PIRE0_EL12); break;
|
||||||
|
case POR_EL1: val = read_sysreg_s(SYS_POR_EL12); break;
|
||||||
|
case ESR_EL1: val = read_sysreg_s(SYS_ESR_EL12); break;
|
||||||
|
case AFSR0_EL1: val = read_sysreg_s(SYS_AFSR0_EL12); break;
|
||||||
|
case AFSR1_EL1: val = read_sysreg_s(SYS_AFSR1_EL12); break;
|
||||||
|
case FAR_EL1: val = read_sysreg_s(SYS_FAR_EL12); break;
|
||||||
|
case MAIR_EL1: val = read_sysreg_s(SYS_MAIR_EL12); break;
|
||||||
|
case VBAR_EL1: val = read_sysreg_s(SYS_VBAR_EL12); break;
|
||||||
|
case CONTEXTIDR_EL1: val = read_sysreg_s(SYS_CONTEXTIDR_EL12);break;
|
||||||
|
case AMAIR_EL1: val = read_sysreg_s(SYS_AMAIR_EL12); break;
|
||||||
|
case CNTKCTL_EL1: val = read_sysreg_s(SYS_CNTKCTL_EL12); break;
|
||||||
|
case ELR_EL1: val = read_sysreg_s(SYS_ELR_EL12); break;
|
||||||
|
case SPSR_EL1: val = read_sysreg_s(SYS_SPSR_EL12); break;
|
||||||
|
case ZCR_EL1: val = read_sysreg_s(SYS_ZCR_EL12); break;
|
||||||
|
case SCTLR2_EL1: val = read_sysreg_s(SYS_SCTLR2_EL12); break;
|
||||||
|
case TPIDR_EL0: val = read_sysreg_s(SYS_TPIDR_EL0); break;
|
||||||
|
case TPIDRRO_EL0: val = read_sysreg_s(SYS_TPIDRRO_EL0); break;
|
||||||
|
case TPIDR_EL1: val = read_sysreg_s(SYS_TPIDR_EL1); break;
|
||||||
|
case PAR_EL1: val = read_sysreg_par(); break;
|
||||||
|
case DACR32_EL2: val = read_sysreg_s(SYS_DACR32_EL2); break;
|
||||||
|
case IFSR32_EL2: val = read_sysreg_s(SYS_IFSR32_EL2); break;
|
||||||
|
case DBGVCR32_EL2: val = read_sysreg_s(SYS_DBGVCR32_EL2); break;
|
||||||
|
default: WARN_ON_ONCE(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (unlikely(get_el2_to_el1_mapping(reg, &el1r, &xlate))) {
|
return val;
|
||||||
if (!is_hyp_ctxt(vcpu))
|
}
|
||||||
goto memory_read;
|
|
||||||
|
static void write_sr_to_cpu(enum vcpu_sysreg reg, u64 val)
|
||||||
|
{
|
||||||
|
switch (reg) {
|
||||||
|
case SCTLR_EL1: write_sysreg_s(val, SYS_SCTLR_EL12); break;
|
||||||
|
case CPACR_EL1: write_sysreg_s(val, SYS_CPACR_EL12); break;
|
||||||
|
case TTBR0_EL1: write_sysreg_s(val, SYS_TTBR0_EL12); break;
|
||||||
|
case TTBR1_EL1: write_sysreg_s(val, SYS_TTBR1_EL12); break;
|
||||||
|
case TCR_EL1: write_sysreg_s(val, SYS_TCR_EL12); break;
|
||||||
|
case TCR2_EL1: write_sysreg_s(val, SYS_TCR2_EL12); break;
|
||||||
|
case PIR_EL1: write_sysreg_s(val, SYS_PIR_EL12); break;
|
||||||
|
case PIRE0_EL1: write_sysreg_s(val, SYS_PIRE0_EL12); break;
|
||||||
|
case POR_EL1: write_sysreg_s(val, SYS_POR_EL12); break;
|
||||||
|
case ESR_EL1: write_sysreg_s(val, SYS_ESR_EL12); break;
|
||||||
|
case AFSR0_EL1: write_sysreg_s(val, SYS_AFSR0_EL12); break;
|
||||||
|
case AFSR1_EL1: write_sysreg_s(val, SYS_AFSR1_EL12); break;
|
||||||
|
case FAR_EL1: write_sysreg_s(val, SYS_FAR_EL12); break;
|
||||||
|
case MAIR_EL1: write_sysreg_s(val, SYS_MAIR_EL12); break;
|
||||||
|
case VBAR_EL1: write_sysreg_s(val, SYS_VBAR_EL12); break;
|
||||||
|
case CONTEXTIDR_EL1: write_sysreg_s(val, SYS_CONTEXTIDR_EL12);break;
|
||||||
|
case AMAIR_EL1: write_sysreg_s(val, SYS_AMAIR_EL12); break;
|
||||||
|
case CNTKCTL_EL1: write_sysreg_s(val, SYS_CNTKCTL_EL12); break;
|
||||||
|
case ELR_EL1: write_sysreg_s(val, SYS_ELR_EL12); break;
|
||||||
|
case SPSR_EL1: write_sysreg_s(val, SYS_SPSR_EL12); break;
|
||||||
|
case ZCR_EL1: write_sysreg_s(val, SYS_ZCR_EL12); break;
|
||||||
|
case SCTLR2_EL1: write_sysreg_s(val, SYS_SCTLR2_EL12); break;
|
||||||
|
case TPIDR_EL0: write_sysreg_s(val, SYS_TPIDR_EL0); break;
|
||||||
|
case TPIDRRO_EL0: write_sysreg_s(val, SYS_TPIDRRO_EL0); break;
|
||||||
|
case TPIDR_EL1: write_sysreg_s(val, SYS_TPIDR_EL1); break;
|
||||||
|
case PAR_EL1: write_sysreg_s(val, SYS_PAR_EL1); break;
|
||||||
|
case DACR32_EL2: write_sysreg_s(val, SYS_DACR32_EL2); break;
|
||||||
|
case IFSR32_EL2: write_sysreg_s(val, SYS_IFSR32_EL2); break;
|
||||||
|
case DBGVCR32_EL2: write_sysreg_s(val, SYS_DBGVCR32_EL2); break;
|
||||||
|
default: WARN_ON_ONCE(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
u64 vcpu_read_sys_reg(const struct kvm_vcpu *vcpu, enum vcpu_sysreg reg)
|
||||||
|
{
|
||||||
|
struct sr_loc loc = {};
|
||||||
|
|
||||||
|
locate_register(vcpu, reg, &loc);
|
||||||
|
|
||||||
|
WARN_ON_ONCE(!has_vhe() && loc.loc != SR_LOC_MEMORY);
|
||||||
|
|
||||||
|
if (loc.loc & SR_LOC_SPECIAL) {
|
||||||
|
u64 val;
|
||||||
|
|
||||||
|
WARN_ON_ONCE(loc.loc & ~SR_LOC_SPECIAL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CNTHCTL_EL2 requires some special treatment to
|
* CNTHCTL_EL2 requires some special treatment to account
|
||||||
* account for the bits that can be set via CNTKCTL_EL1.
|
* for the bits that can be set via CNTKCTL_EL1 when E2H==1.
|
||||||
*/
|
*/
|
||||||
switch (reg) {
|
switch (reg) {
|
||||||
case CNTHCTL_EL2:
|
case CNTHCTL_EL2:
|
||||||
if (vcpu_el2_e2h_is_set(vcpu)) {
|
|
||||||
val = read_sysreg_el1(SYS_CNTKCTL);
|
val = read_sysreg_el1(SYS_CNTKCTL);
|
||||||
val &= CNTKCTL_VALID_BITS;
|
val &= CNTKCTL_VALID_BITS;
|
||||||
val |= __vcpu_sys_reg(vcpu, reg) & ~CNTKCTL_VALID_BITS;
|
val |= __vcpu_sys_reg(vcpu, reg) & ~CNTKCTL_VALID_BITS;
|
||||||
return val;
|
return val;
|
||||||
|
default:
|
||||||
|
WARN_ON_ONCE(1);
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
if (loc.loc & SR_LOC_LOADED) {
|
||||||
* If this register does not have an EL1 counterpart,
|
enum vcpu_sysreg map_reg = reg;
|
||||||
* then read the stored EL2 version.
|
|
||||||
*/
|
|
||||||
if (reg == el1r)
|
|
||||||
goto memory_read;
|
|
||||||
|
|
||||||
/*
|
if (loc.loc & SR_LOC_MAPPED)
|
||||||
* If we have a non-VHE guest and that the sysreg
|
map_reg = loc.map_reg;
|
||||||
* requires translation to be used at EL1, use the
|
|
||||||
* in-memory copy instead.
|
if (!(loc.loc & SR_LOC_XLATED)) {
|
||||||
*/
|
u64 val = read_sr_from_cpu(map_reg);
|
||||||
if (!vcpu_el2_e2h_is_set(vcpu) && xlate)
|
|
||||||
goto memory_read;
|
|
||||||
|
|
||||||
/* Get the current version of the EL1 counterpart. */
|
|
||||||
WARN_ON(!__vcpu_read_sys_reg_from_cpu(el1r, &val));
|
|
||||||
if (reg >= __SANITISED_REG_START__)
|
if (reg >= __SANITISED_REG_START__)
|
||||||
val = kvm_vcpu_apply_reg_masks(vcpu, reg, val);
|
val = kvm_vcpu_apply_reg_masks(vcpu, reg, val);
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* EL1 register can't be on the CPU if the guest is in vEL2. */
|
|
||||||
if (unlikely(is_hyp_ctxt(vcpu)))
|
|
||||||
goto memory_read;
|
|
||||||
|
|
||||||
if (__vcpu_read_sys_reg_from_cpu(reg, &val))
|
|
||||||
return val;
|
|
||||||
|
|
||||||
memory_read:
|
|
||||||
return __vcpu_sys_reg(vcpu, reg);
|
return __vcpu_sys_reg(vcpu, reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, int reg)
|
void vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, enum vcpu_sysreg reg)
|
||||||
{
|
{
|
||||||
u64 (*xlate)(u64) = NULL;
|
struct sr_loc loc = {};
|
||||||
unsigned int el1r;
|
|
||||||
|
|
||||||
if (!vcpu_get_flag(vcpu, SYSREGS_ON_CPU))
|
locate_register(vcpu, reg, &loc);
|
||||||
goto memory_write;
|
|
||||||
|
|
||||||
if (unlikely(get_el2_to_el1_mapping(reg, &el1r, &xlate))) {
|
WARN_ON_ONCE(!has_vhe() && loc.loc != SR_LOC_MEMORY);
|
||||||
if (!is_hyp_ctxt(vcpu))
|
|
||||||
goto memory_write;
|
|
||||||
|
|
||||||
/*
|
if (loc.loc & SR_LOC_SPECIAL) {
|
||||||
* Always store a copy of the write to memory to avoid having
|
|
||||||
* to reverse-translate virtual EL2 system registers for a
|
WARN_ON_ONCE(loc.loc & ~SR_LOC_SPECIAL);
|
||||||
* non-VHE guest hypervisor.
|
|
||||||
*/
|
|
||||||
__vcpu_assign_sys_reg(vcpu, reg, val);
|
|
||||||
|
|
||||||
switch (reg) {
|
switch (reg) {
|
||||||
case CNTHCTL_EL2:
|
case CNTHCTL_EL2:
|
||||||
/*
|
/*
|
||||||
* If E2H=0, CNHTCTL_EL2 is a pure shadow register.
|
* If E2H=1, some of the bits are backed by
|
||||||
* Otherwise, some of the bits are backed by
|
|
||||||
* CNTKCTL_EL1, while the rest is kept in memory.
|
* CNTKCTL_EL1, while the rest is kept in memory.
|
||||||
* Yes, this is fun stuff.
|
* Yes, this is fun stuff.
|
||||||
*/
|
*/
|
||||||
if (vcpu_el2_e2h_is_set(vcpu))
|
|
||||||
write_sysreg_el1(val, SYS_CNTKCTL);
|
write_sysreg_el1(val, SYS_CNTKCTL);
|
||||||
return;
|
break;
|
||||||
|
default:
|
||||||
|
WARN_ON_ONCE(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No EL1 counterpart? We're done here.? */
|
if (loc.loc & SR_LOC_LOADED) {
|
||||||
if (reg == el1r)
|
enum vcpu_sysreg map_reg = reg;
|
||||||
return;
|
u64 xlated_val;
|
||||||
|
|
||||||
if (!vcpu_el2_e2h_is_set(vcpu) && xlate)
|
if (reg >= __SANITISED_REG_START__)
|
||||||
val = xlate(val);
|
val = kvm_vcpu_apply_reg_masks(vcpu, reg, val);
|
||||||
|
|
||||||
/* Redirect this to the EL1 version of the register. */
|
if (loc.loc & SR_LOC_MAPPED)
|
||||||
WARN_ON(!__vcpu_write_sys_reg_to_cpu(val, el1r));
|
map_reg = loc.map_reg;
|
||||||
return;
|
|
||||||
|
if (loc.loc & SR_LOC_XLATED)
|
||||||
|
xlated_val = loc.xlate(val);
|
||||||
|
else
|
||||||
|
xlated_val = val;
|
||||||
|
|
||||||
|
write_sr_to_cpu(map_reg, xlated_val);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fall through to write the backing store anyway, which
|
||||||
|
* allows translated registers to be directly read without a
|
||||||
|
* reverse translation.
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EL1 register can't be on the CPU if the guest is in vEL2. */
|
|
||||||
if (unlikely(is_hyp_ctxt(vcpu)))
|
|
||||||
goto memory_write;
|
|
||||||
|
|
||||||
if (__vcpu_write_sys_reg_to_cpu(val, reg))
|
|
||||||
return;
|
|
||||||
|
|
||||||
memory_write:
|
|
||||||
__vcpu_assign_sys_reg(vcpu, reg, val);
|
__vcpu_assign_sys_reg(vcpu, reg, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1584,6 +1710,7 @@ static u8 pmuver_to_perfmon(u8 pmuver)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static u64 sanitise_id_aa64pfr0_el1(const struct kvm_vcpu *vcpu, u64 val);
|
static u64 sanitise_id_aa64pfr0_el1(const struct kvm_vcpu *vcpu, u64 val);
|
||||||
|
static u64 sanitise_id_aa64pfr1_el1(const struct kvm_vcpu *vcpu, u64 val);
|
||||||
static u64 sanitise_id_aa64dfr0_el1(const struct kvm_vcpu *vcpu, u64 val);
|
static u64 sanitise_id_aa64dfr0_el1(const struct kvm_vcpu *vcpu, u64 val);
|
||||||
|
|
||||||
/* Read a sanitised cpufeature ID register by sys_reg_desc */
|
/* Read a sanitised cpufeature ID register by sys_reg_desc */
|
||||||
@@ -1606,19 +1733,7 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu,
|
|||||||
val = sanitise_id_aa64pfr0_el1(vcpu, val);
|
val = sanitise_id_aa64pfr0_el1(vcpu, val);
|
||||||
break;
|
break;
|
||||||
case SYS_ID_AA64PFR1_EL1:
|
case SYS_ID_AA64PFR1_EL1:
|
||||||
if (!kvm_has_mte(vcpu->kvm)) {
|
val = sanitise_id_aa64pfr1_el1(vcpu, val);
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_MTE);
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_MTE_frac);
|
|
||||||
}
|
|
||||||
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_SME);
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_RNDR_trap);
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_NMI);
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_GCS);
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_THE);
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_MTEX);
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_PFAR);
|
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64PFR1_EL1_MPAM_frac);
|
|
||||||
break;
|
break;
|
||||||
case SYS_ID_AA64PFR2_EL1:
|
case SYS_ID_AA64PFR2_EL1:
|
||||||
val &= ID_AA64PFR2_EL1_FPMR |
|
val &= ID_AA64PFR2_EL1_FPMR |
|
||||||
@@ -1628,18 +1743,18 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu,
|
|||||||
break;
|
break;
|
||||||
case SYS_ID_AA64ISAR1_EL1:
|
case SYS_ID_AA64ISAR1_EL1:
|
||||||
if (!vcpu_has_ptrauth(vcpu))
|
if (!vcpu_has_ptrauth(vcpu))
|
||||||
val &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_APA) |
|
val &= ~(ID_AA64ISAR1_EL1_APA |
|
||||||
ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_API) |
|
ID_AA64ISAR1_EL1_API |
|
||||||
ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_GPA) |
|
ID_AA64ISAR1_EL1_GPA |
|
||||||
ARM64_FEATURE_MASK(ID_AA64ISAR1_EL1_GPI));
|
ID_AA64ISAR1_EL1_GPI);
|
||||||
break;
|
break;
|
||||||
case SYS_ID_AA64ISAR2_EL1:
|
case SYS_ID_AA64ISAR2_EL1:
|
||||||
if (!vcpu_has_ptrauth(vcpu))
|
if (!vcpu_has_ptrauth(vcpu))
|
||||||
val &= ~(ARM64_FEATURE_MASK(ID_AA64ISAR2_EL1_APA3) |
|
val &= ~(ID_AA64ISAR2_EL1_APA3 |
|
||||||
ARM64_FEATURE_MASK(ID_AA64ISAR2_EL1_GPA3));
|
ID_AA64ISAR2_EL1_GPA3);
|
||||||
if (!cpus_have_final_cap(ARM64_HAS_WFXT) ||
|
if (!cpus_have_final_cap(ARM64_HAS_WFXT) ||
|
||||||
has_broken_cntvoff())
|
has_broken_cntvoff())
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_AA64ISAR2_EL1_WFxT);
|
val &= ~ID_AA64ISAR2_EL1_WFxT;
|
||||||
break;
|
break;
|
||||||
case SYS_ID_AA64ISAR3_EL1:
|
case SYS_ID_AA64ISAR3_EL1:
|
||||||
val &= ID_AA64ISAR3_EL1_FPRCVT | ID_AA64ISAR3_EL1_FAMINMAX;
|
val &= ID_AA64ISAR3_EL1_FPRCVT | ID_AA64ISAR3_EL1_FAMINMAX;
|
||||||
@@ -1655,7 +1770,7 @@ static u64 __kvm_read_sanitised_id_reg(const struct kvm_vcpu *vcpu,
|
|||||||
ID_AA64MMFR3_EL1_S1PIE;
|
ID_AA64MMFR3_EL1_S1PIE;
|
||||||
break;
|
break;
|
||||||
case SYS_ID_MMFR4_EL1:
|
case SYS_ID_MMFR4_EL1:
|
||||||
val &= ~ARM64_FEATURE_MASK(ID_MMFR4_EL1_CCIDX);
|
val &= ~ID_MMFR4_EL1_CCIDX;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1836,6 +1951,31 @@ static u64 sanitise_id_aa64pfr0_el1(const struct kvm_vcpu *vcpu, u64 val)
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static u64 sanitise_id_aa64pfr1_el1(const struct kvm_vcpu *vcpu, u64 val)
|
||||||
|
{
|
||||||
|
u64 pfr0 = read_sanitised_ftr_reg(SYS_ID_AA64PFR0_EL1);
|
||||||
|
|
||||||
|
if (!kvm_has_mte(vcpu->kvm)) {
|
||||||
|
val &= ~ID_AA64PFR1_EL1_MTE;
|
||||||
|
val &= ~ID_AA64PFR1_EL1_MTE_frac;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(cpus_have_final_cap(ARM64_HAS_RASV1P1_EXTN) &&
|
||||||
|
SYS_FIELD_GET(ID_AA64PFR0_EL1, RAS, pfr0) == ID_AA64PFR0_EL1_RAS_IMP))
|
||||||
|
val &= ~ID_AA64PFR1_EL1_RAS_frac;
|
||||||
|
|
||||||
|
val &= ~ID_AA64PFR1_EL1_SME;
|
||||||
|
val &= ~ID_AA64PFR1_EL1_RNDR_trap;
|
||||||
|
val &= ~ID_AA64PFR1_EL1_NMI;
|
||||||
|
val &= ~ID_AA64PFR1_EL1_GCS;
|
||||||
|
val &= ~ID_AA64PFR1_EL1_THE;
|
||||||
|
val &= ~ID_AA64PFR1_EL1_MTEX;
|
||||||
|
val &= ~ID_AA64PFR1_EL1_PFAR;
|
||||||
|
val &= ~ID_AA64PFR1_EL1_MPAM_frac;
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
static u64 sanitise_id_aa64dfr0_el1(const struct kvm_vcpu *vcpu, u64 val)
|
static u64 sanitise_id_aa64dfr0_el1(const struct kvm_vcpu *vcpu, u64 val)
|
||||||
{
|
{
|
||||||
val = ID_REG_LIMIT_FIELD_ENUM(val, ID_AA64DFR0_EL1, DebugVer, V8P8);
|
val = ID_REG_LIMIT_FIELD_ENUM(val, ID_AA64DFR0_EL1, DebugVer, V8P8);
|
||||||
@@ -2697,6 +2837,18 @@ static bool access_ras(struct kvm_vcpu *vcpu,
|
|||||||
struct kvm *kvm = vcpu->kvm;
|
struct kvm *kvm = vcpu->kvm;
|
||||||
|
|
||||||
switch(reg_to_encoding(r)) {
|
switch(reg_to_encoding(r)) {
|
||||||
|
case SYS_ERXPFGCDN_EL1:
|
||||||
|
case SYS_ERXPFGCTL_EL1:
|
||||||
|
case SYS_ERXPFGF_EL1:
|
||||||
|
case SYS_ERXMISC2_EL1:
|
||||||
|
case SYS_ERXMISC3_EL1:
|
||||||
|
if (!(kvm_has_feat(kvm, ID_AA64PFR0_EL1, RAS, V1P1) ||
|
||||||
|
(kvm_has_feat_enum(kvm, ID_AA64PFR0_EL1, RAS, IMP) &&
|
||||||
|
kvm_has_feat(kvm, ID_AA64PFR1_EL1, RAS_frac, RASv1p1)))) {
|
||||||
|
kvm_inject_undefined(vcpu);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (!kvm_has_feat(kvm, ID_AA64PFR0_EL1, RAS, IMP)) {
|
if (!kvm_has_feat(kvm, ID_AA64PFR0_EL1, RAS, IMP)) {
|
||||||
kvm_inject_undefined(vcpu);
|
kvm_inject_undefined(vcpu);
|
||||||
@@ -2929,7 +3081,6 @@ static const struct sys_reg_desc sys_reg_descs[] = {
|
|||||||
~(ID_AA64PFR0_EL1_AMU |
|
~(ID_AA64PFR0_EL1_AMU |
|
||||||
ID_AA64PFR0_EL1_MPAM |
|
ID_AA64PFR0_EL1_MPAM |
|
||||||
ID_AA64PFR0_EL1_SVE |
|
ID_AA64PFR0_EL1_SVE |
|
||||||
ID_AA64PFR0_EL1_RAS |
|
|
||||||
ID_AA64PFR0_EL1_AdvSIMD |
|
ID_AA64PFR0_EL1_AdvSIMD |
|
||||||
ID_AA64PFR0_EL1_FP)),
|
ID_AA64PFR0_EL1_FP)),
|
||||||
ID_FILTERED(ID_AA64PFR1_EL1, id_aa64pfr1_el1,
|
ID_FILTERED(ID_AA64PFR1_EL1, id_aa64pfr1_el1,
|
||||||
@@ -2943,7 +3094,6 @@ static const struct sys_reg_desc sys_reg_descs[] = {
|
|||||||
ID_AA64PFR1_EL1_SME |
|
ID_AA64PFR1_EL1_SME |
|
||||||
ID_AA64PFR1_EL1_RES0 |
|
ID_AA64PFR1_EL1_RES0 |
|
||||||
ID_AA64PFR1_EL1_MPAM_frac |
|
ID_AA64PFR1_EL1_MPAM_frac |
|
||||||
ID_AA64PFR1_EL1_RAS_frac |
|
|
||||||
ID_AA64PFR1_EL1_MTE)),
|
ID_AA64PFR1_EL1_MTE)),
|
||||||
ID_WRITABLE(ID_AA64PFR2_EL1,
|
ID_WRITABLE(ID_AA64PFR2_EL1,
|
||||||
ID_AA64PFR2_EL1_FPMR |
|
ID_AA64PFR2_EL1_FPMR |
|
||||||
@@ -3063,8 +3213,13 @@ static const struct sys_reg_desc sys_reg_descs[] = {
|
|||||||
{ SYS_DESC(SYS_ERXCTLR_EL1), access_ras },
|
{ SYS_DESC(SYS_ERXCTLR_EL1), access_ras },
|
||||||
{ SYS_DESC(SYS_ERXSTATUS_EL1), access_ras },
|
{ SYS_DESC(SYS_ERXSTATUS_EL1), access_ras },
|
||||||
{ SYS_DESC(SYS_ERXADDR_EL1), access_ras },
|
{ SYS_DESC(SYS_ERXADDR_EL1), access_ras },
|
||||||
|
{ SYS_DESC(SYS_ERXPFGF_EL1), access_ras },
|
||||||
|
{ SYS_DESC(SYS_ERXPFGCTL_EL1), access_ras },
|
||||||
|
{ SYS_DESC(SYS_ERXPFGCDN_EL1), access_ras },
|
||||||
{ SYS_DESC(SYS_ERXMISC0_EL1), access_ras },
|
{ SYS_DESC(SYS_ERXMISC0_EL1), access_ras },
|
||||||
{ SYS_DESC(SYS_ERXMISC1_EL1), access_ras },
|
{ SYS_DESC(SYS_ERXMISC1_EL1), access_ras },
|
||||||
|
{ SYS_DESC(SYS_ERXMISC2_EL1), access_ras },
|
||||||
|
{ SYS_DESC(SYS_ERXMISC3_EL1), access_ras },
|
||||||
|
|
||||||
MTE_REG(TFSR_EL1),
|
MTE_REG(TFSR_EL1),
|
||||||
MTE_REG(TFSRE0_EL1),
|
MTE_REG(TFSRE0_EL1),
|
||||||
|
|||||||
@@ -50,6 +50,14 @@ bool vgic_has_its(struct kvm *kvm)
|
|||||||
|
|
||||||
bool vgic_supports_direct_msis(struct kvm *kvm)
|
bool vgic_supports_direct_msis(struct kvm *kvm)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Deliberately conflate vLPI and vSGI support on GICv4.1 hardware,
|
||||||
|
* indirectly allowing userspace to control whether or not vPEs are
|
||||||
|
* allocated for the VM.
|
||||||
|
*/
|
||||||
|
if (system_supports_direct_sgis() && !vgic_supports_direct_sgis(kvm))
|
||||||
|
return false;
|
||||||
|
|
||||||
return kvm_vgic_global_state.has_gicv4 && vgic_has_its(kvm);
|
return kvm_vgic_global_state.has_gicv4 && vgic_has_its(kvm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1091,7 +1091,7 @@ int vgic_register_dist_iodev(struct kvm *kvm, gpa_t dist_base_address,
|
|||||||
len = vgic_v3_init_dist_iodev(io_device);
|
len = vgic_v3_init_dist_iodev(io_device);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG_ON(1);
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
io_device->base_addr = dist_base_address;
|
io_device->base_addr = dist_base_address;
|
||||||
|
|||||||
@@ -396,15 +396,7 @@ bool vgic_supports_direct_sgis(struct kvm *kvm);
|
|||||||
|
|
||||||
static inline bool vgic_supports_direct_irqs(struct kvm *kvm)
|
static inline bool vgic_supports_direct_irqs(struct kvm *kvm)
|
||||||
{
|
{
|
||||||
/*
|
return vgic_supports_direct_msis(kvm) || vgic_supports_direct_sgis(kvm);
|
||||||
* Deliberately conflate vLPI and vSGI support on GICv4.1 hardware,
|
|
||||||
* indirectly allowing userspace to control whether or not vPEs are
|
|
||||||
* allocated for the VM.
|
|
||||||
*/
|
|
||||||
if (system_supports_direct_sgis())
|
|
||||||
return vgic_supports_direct_sgis(kvm);
|
|
||||||
|
|
||||||
return vgic_supports_direct_msis(kvm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int vgic_v4_init(struct kvm *kvm);
|
int vgic_v4_init(struct kvm *kvm);
|
||||||
|
|||||||
@@ -47,13 +47,6 @@
|
|||||||
#define NO_CONT_MAPPINGS BIT(1)
|
#define NO_CONT_MAPPINGS BIT(1)
|
||||||
#define NO_EXEC_MAPPINGS BIT(2) /* assumes FEAT_HPDS is not used */
|
#define NO_EXEC_MAPPINGS BIT(2) /* assumes FEAT_HPDS is not used */
|
||||||
|
|
||||||
enum pgtable_type {
|
|
||||||
TABLE_PTE,
|
|
||||||
TABLE_PMD,
|
|
||||||
TABLE_PUD,
|
|
||||||
TABLE_P4D,
|
|
||||||
};
|
|
||||||
|
|
||||||
u64 kimage_voffset __ro_after_init;
|
u64 kimage_voffset __ro_after_init;
|
||||||
EXPORT_SYMBOL(kimage_voffset);
|
EXPORT_SYMBOL(kimage_voffset);
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ HAS_S1PIE
|
|||||||
HAS_S1POE
|
HAS_S1POE
|
||||||
HAS_SCTLR2
|
HAS_SCTLR2
|
||||||
HAS_RAS_EXTN
|
HAS_RAS_EXTN
|
||||||
|
HAS_RASV1P1_EXTN
|
||||||
HAS_RNG
|
HAS_RNG
|
||||||
HAS_SB
|
HAS_SB
|
||||||
HAS_STAGE2_FWB
|
HAS_STAGE2_FWB
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ CONFIG_DM9102=m
|
|||||||
CONFIG_ULI526X=m
|
CONFIG_ULI526X=m
|
||||||
CONFIG_PCMCIA_XIRCOM=m
|
CONFIG_PCMCIA_XIRCOM=m
|
||||||
CONFIG_DL2K=m
|
CONFIG_DL2K=m
|
||||||
|
CONFIG_SUNDANCE=m
|
||||||
CONFIG_PCMCIA_FMVJ18X=m
|
CONFIG_PCMCIA_FMVJ18X=m
|
||||||
CONFIG_E100=m
|
CONFIG_E100=m
|
||||||
CONFIG_E1000=m
|
CONFIG_E1000=m
|
||||||
|
|||||||
@@ -243,13 +243,13 @@ $(obj)/wrapper.a: $(obj-wlib) FORCE
|
|||||||
hostprogs := addnote hack-coff mktree
|
hostprogs := addnote hack-coff mktree
|
||||||
|
|
||||||
targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) zImage.lds
|
targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) zImage.lds
|
||||||
extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
|
always-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
|
||||||
$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
|
$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
|
||||||
|
|
||||||
dtstree := $(src)/dts
|
dtstree := $(src)/dts
|
||||||
|
|
||||||
wrapper := $(src)/wrapper
|
wrapper := $(src)/wrapper
|
||||||
wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
|
wrapperbits := $(always-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
|
||||||
$(wrapper) FORCE
|
$(wrapper) FORCE
|
||||||
|
|
||||||
#############
|
#############
|
||||||
@@ -456,7 +456,7 @@ WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
|
|||||||
WRAPPER_BINDIR := /usr/sbin
|
WRAPPER_BINDIR := /usr/sbin
|
||||||
INSTALL := install
|
INSTALL := install
|
||||||
|
|
||||||
extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
|
extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(always-y))
|
||||||
hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs))
|
hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs))
|
||||||
wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
|
wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
|
||||||
dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))
|
dts-installed := $(patsubst $(dtstree)/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(dtstree)/*.dts))
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user