mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-31 00:39:57 +00:00
arm: update Android common kernel
Update ACK to 5.15 and remove the 5.10 recipe Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com> Change-Id: I7d86367533248312bb7a54ba39166ddee5a025ef Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
committed by
Jon Mason
parent
1bc064e020
commit
3921257e9b
@@ -23,7 +23,6 @@ UBOOT_SIGN_KEYDIR = "${DEPLOY_DIR_IMAGE}/keys"
|
|||||||
FIT_GENERATE_KEYS = "1"
|
FIT_GENERATE_KEYS = "1"
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-arm64-ack"
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-arm64-ack"
|
||||||
PREFERRED_VERSION_linux-arm64-ack ?= "5.10"
|
|
||||||
|
|
||||||
# OP-TEE
|
# OP-TEE
|
||||||
PREFERRED_VERSION_optee-os ?= "3.18%"
|
PREFERRED_VERSION_optee-os ?= "3.18%"
|
||||||
|
|||||||
@@ -3,7 +3,11 @@ kconf non-hardware tc/dhcp.cfg
|
|||||||
kconf non-hardware tc/devtmpfs.cfg
|
kconf non-hardware tc/devtmpfs.cfg
|
||||||
kconf non-hardware tc/gralloc.cfg
|
kconf non-hardware tc/gralloc.cfg
|
||||||
kconf non-hardware tc/mali.cfg
|
kconf non-hardware tc/mali.cfg
|
||||||
kconf non-hardware tc/tee.cfg
|
kconf non-hardware tc/ffa.cfg
|
||||||
|
kconf non-hardware tc/optee.cfg
|
||||||
kconf non-hardware tc/virtio.cfg
|
kconf non-hardware tc/virtio.cfg
|
||||||
|
kconf non-hardware tc/autofdo.cfg
|
||||||
kconf non-hardware tc/ci700.cfg
|
kconf non-hardware tc/ci700.cfg
|
||||||
kconf non-hardware tc/trusty.cfg
|
kconf non-hardware tc/trusty.cfg
|
||||||
|
kconf non-hardware tc/disable_mpam.cfg
|
||||||
|
kconf non-hardware tc/disable_btf.cfg
|
||||||
|
|||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
CONFIG_DEBUG_INFO_BTF=n
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
CONFIG_ARM64_MPAM=n
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
CONFIG_ARM_FFA_TRANSPORT=y
|
||||||
-1
@@ -1,3 +1,2 @@
|
|||||||
CONFIG_TEE=y
|
CONFIG_TEE=y
|
||||||
CONFIG_OPTEE=y
|
CONFIG_OPTEE=y
|
||||||
CONFIG_ARM_FFA_TRANSPORT=y
|
|
||||||
@@ -141,53 +141,50 @@ KCONFIG_MODE:sgi575 = "--alldefconfig"
|
|||||||
#
|
#
|
||||||
COMPATIBLE_MACHINE:tc = "(tc0|tc1)"
|
COMPATIBLE_MACHINE:tc = "(tc0|tc1)"
|
||||||
KCONFIG_MODE:tc = "--alldefconfig"
|
KCONFIG_MODE:tc = "--alldefconfig"
|
||||||
FILESEXTRAPATHS:prepend:tc := "${ARMBSPFILESPATHS}:${THISDIR}/linux-arm64-ack-5.10/tc:"
|
FILESEXTRAPATHS:prepend:tc := "${ARMBSPFILESPATHS}:${THISDIR}/linux-arm64-ack-5.15/tc:"
|
||||||
SRC_URI:append:tc = " \
|
SRC_URI:append:tc = " \
|
||||||
file://gki_defconfig \
|
file://gki_defconfig \
|
||||||
file://0001-drm-Add-component-aware-simple-encoder.patch \
|
file://0001-drm-Add-component-aware-simple-encoder.patch \
|
||||||
|
file://0001-drm-komeda-Fix-handling-of-atomic-commits-in-the-ato.patch \
|
||||||
file://0002-drm-arm-komeda-add-RENDER-capability-to-the-device-n.patch \
|
file://0002-drm-arm-komeda-add-RENDER-capability-to-the-device-n.patch \
|
||||||
file://0003-dt-bindings-mailbox-arm-mhuv2-Add-bindings.patch \
|
file://0003-firmware-arm_ffa-Fix-uuid-argument-passed-to-ffa_par.patch \
|
||||||
file://0004-mailbox-arm_mhuv2-Add-driver.patch \
|
file://0004-firmware-arm_ffa-Add-ffa_dev_get_drvdata.patch \
|
||||||
file://0005-mailbox-arm_mhuv2-Fix-sparse-warnings.patch \
|
file://0005-firmware-arm_ffa-extern-ffa_bus_type.patch \
|
||||||
file://0006-mailbox-arm_mhuv2-make-remove-callback-return-void.patch \
|
file://0006-firmware-arm_ffa-Fix-FFA_MEM_SHARE-and-FFA_MEM_FRAG_.patch \
|
||||||
file://0007-mailbox-arm_mhuv2-Skip-calling-kfree-with-invalid-po.patch \
|
file://0007-Revert-optee-use-driver-internal-tee_context-for-som.patch \
|
||||||
file://0008-firmware-arm_ffa-Backport-of-arm_ffa-driver.patch \
|
file://0008-tee-add-sec_world_id-to-struct-tee_shm.patch \
|
||||||
file://0009-tee-add-sec_world_id-to-struct-tee_shm.patch \
|
file://0009-optee-simplify-optee_release.patch \
|
||||||
file://0010-optee-simplify-optee_release.patch \
|
file://0010-optee-refactor-driver-with-internal-callbacks.patch \
|
||||||
file://0011-optee-sync-OP-TEE-headers.patch \
|
file://0011-optee-isolate-smc-abi.patch \
|
||||||
file://0012-optee-refactor-driver-with-internal-callbacks.patch \
|
file://0012-optee-add-FF-A-support.patch \
|
||||||
file://0013-optee-add-a-FF-A-memory-pool.patch \
|
file://0013-optee-smc_abi.c-add-missing-include-linux-mm.h.patch \
|
||||||
file://0014-optee-add-FF-A-support.patch \
|
file://0014-optee-Fix-spelling-mistake-reclain-reclaim.patch \
|
||||||
file://0015-coresight-etm4x-Save-restore-TRFCR_EL1.patch \
|
file://0015-optee-fix-kfree-NULL-pointer.patch \
|
||||||
file://0016-coresight-etm4x-Use-Trace-Filtering-controls-dynamic.patch \
|
file://0016-perf-arm-cmn-Account-for-NUMA-affinity.patch \
|
||||||
file://0017-perf-arm-cmn-Use-irq_set_affinity.patch \
|
file://0017-perf-arm-cmn-Drop-compile-test-restriction.patch \
|
||||||
file://0018-perf-arm-cmn-Fix-CPU-hotplug-unregistration.patch \
|
file://0018-perf-arm-cmn-Refactor-node-ID-handling.patch \
|
||||||
file://0019-perf-arm-cmn-Account-for-NUMA-affinity.patch \
|
file://0019-perf-arm-cmn-Streamline-node-iteration.patch \
|
||||||
file://0020-perf-arm-cmn-Drop-compile-test-restriction.patch \
|
file://0020-perf-arm-cmn-Refactor-DTM-handling.patch \
|
||||||
file://0021-perf-arm-cmn-Refactor-node-ID-handling.patch \
|
file://0021-perf-arm-cmn-Optimise-DTM-counter-reads.patch \
|
||||||
file://0022-perf-arm-cmn-Streamline-node-iteration.patch \
|
file://0022-perf-arm-cmn-Optimise-DTC-counter-accesses.patch \
|
||||||
file://0023-drivers-perf-arm-cmn-Add-space-after.patch \
|
file://0023-perf-arm-cmn-Move-group-validation-data-off-stack.patch \
|
||||||
file://0024-perf-arm-cmn-Refactor-DTM-handling.patch \
|
file://0024-perf-arm-cmn-Demarcate-CMN-600-specifics.patch \
|
||||||
file://0025-perf-arm-cmn-Optimise-DTM-counter-reads.patch \
|
file://0025-perf-arm-cmn-Support-new-IP-features.patch \
|
||||||
file://0026-perf-arm-cmn-Optimise-DTC-counter-accesses.patch \
|
file://0026-perf-arm-cmn-Add-CI-700-Support.patch \
|
||||||
file://0027-perf-arm-cmn-Move-group-validation-data-off-stack.patch \
|
file://0027-ANDROID-trusty-Backport-of-trusty-driver.patch \
|
||||||
file://0028-perf-arm-cmn-Demarcate-CMN-600-specifics.patch \
|
file://0028-ANDROID-trusty-Remove-FFA-specific-initilization.patch \
|
||||||
file://0029-perf-arm-cmn-Support-new-IP-features.patch \
|
file://0029-ANDROID-trusty-Rename-transfer-memory-function-to-le.patch \
|
||||||
file://0030-perf-arm-cmn-Add-CI-700-Support.patch \
|
file://0030-ANDROID-trusty-Separate-out-SMC-based-transport.patch \
|
||||||
file://0031-firmware-arm_ffa-Fix-uuid-argument-passed-to-ffa_par.patch \
|
file://0031-ANDROID-trusty-Modify-device-compatible-string.patch \
|
||||||
file://0032-firmware-arm_ffa-Add-ffa_dev_get_drvdata.patch \
|
file://0032-ANDROID-trusty-Add-transport-descriptor.patch \
|
||||||
file://0033-firmware-arm_ffa-extern-ffa_bus_type.patch \
|
file://0033-ANDROID-trusty-Add-trusty-ffa-driver.patch \
|
||||||
file://0034-firmware-arm_ffa-Fix-FFA_MEM_SHARE-and-FFA_MEM_FRAG_.patch \
|
file://0034-ANDROID-trusty-ffa-Add-support-for-FFA-memory-operat.patch \
|
||||||
file://0035-ANDROID-trusty-Backport-of-trusty-driver.patch \
|
file://0035-ANDROID-trusty-ffa-Enable-FFA-transport-for-both-mem.patch \
|
||||||
file://0036-ANDROID-trusty-Remove-FFA-specific-initilization.patch \
|
file://0036-ANDROID-trusty-Make-trusty-transports-configurable.patch \
|
||||||
file://0037-ANDROID-trusty-Rename-transfer-memory-function-to-le.patch \
|
file://0037-ANDROID-trusty-log-include-panic_notifier.h.patch \
|
||||||
file://0038-ANDROID-trusty-Separate-out-SMC-based-transport.patch \
|
file://0038-ANDROID-trusty-ipc-fix-VIRTIO_ID_TRUSTY_IPC-ID.patch \
|
||||||
file://0039-ANDROID-trusty-Modify-device-compatible-string.patch \
|
file://0039-gki_config-add-tc-disable_mpam.patch \
|
||||||
file://0040-ANDROID-trusty-Add-transport-descriptor.patch \
|
file://0040-ANDROID-KVM-arm64-disable-FFA-driver-at-EL2.patch \
|
||||||
file://0041-ANDROID-trusty-Add-trusty-ffa-driver.patch \
|
|
||||||
file://0042-ANDROID-trusty-ffa-Add-support-for-FFA-memory-operat.patch \
|
|
||||||
file://0043-ANDROID-trusty-ffa-Enable-FFA-transport-for-both-mem.patch \
|
|
||||||
file://0044-ANDROID-trusty-Make-trusty-transports-configurable.patch \
|
|
||||||
file://init_disassemble_info-signature-changes-causes-compile-failures.patch \
|
file://init_disassemble_info-signature-changes-causes-compile-failures.patch \
|
||||||
"
|
"
|
||||||
KERNEL_FEATURES:append:tc = " bsp/arm-platforms/tc.scc"
|
KERNEL_FEATURES:append:tc = " bsp/arm-platforms/tc.scc"
|
||||||
|
|||||||
-241
@@ -1,241 +0,0 @@
|
|||||||
From cdda49168d42c897574388356555f8130c021bb5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Viresh Kumar <viresh.kumar@linaro.org>
|
|
||||||
Date: Tue, 17 Nov 2020 15:32:05 +0530
|
|
||||||
Subject: [PATCH 03/22] dt-bindings: mailbox : arm,mhuv2: Add bindings
|
|
||||||
|
|
||||||
This patch adds device tree binding for ARM Message Handling Unit (MHU)
|
|
||||||
controller version 2.
|
|
||||||
|
|
||||||
Based on earlier work by Morten Borup Petersen.
|
|
||||||
|
|
||||||
Reviewed-by: Rob Herring <robh@kernel.org>
|
|
||||||
Co-developed-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
|
|
||||||
Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
|
|
||||||
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
|
||||||
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://lkml.org/lkml/2020/11/17/234]
|
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
|
||||||
---
|
|
||||||
.../bindings/mailbox/arm,mhuv2.yaml | 209 ++++++++++++++++++
|
|
||||||
1 file changed, 209 insertions(+)
|
|
||||||
create mode 100644 Documentation/devicetree/bindings/mailbox/arm,mhuv2.yaml
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/mailbox/arm,mhuv2.yaml b/Documentation/devicetree/bindings/mailbox/arm,mhuv2.yaml
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..6608545ea66f
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/Documentation/devicetree/bindings/mailbox/arm,mhuv2.yaml
|
|
||||||
@@ -0,0 +1,209 @@
|
|
||||||
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
||||||
+%YAML 1.2
|
|
||||||
+---
|
|
||||||
+$id: http://devicetree.org/schemas/mailbox/arm,mhuv2.yaml#
|
|
||||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
||||||
+
|
|
||||||
+title: ARM MHUv2 Mailbox Controller
|
|
||||||
+
|
|
||||||
+maintainers:
|
|
||||||
+ - Tushar Khandelwal <tushar.khandelwal@arm.com>
|
|
||||||
+ - Viresh Kumar <viresh.kumar@linaro.org>
|
|
||||||
+
|
|
||||||
+description: |
|
|
||||||
+ The Arm Message Handling Unit (MHU) Version 2 is a mailbox controller that has
|
|
||||||
+ between 1 and 124 channel windows (each 32-bit wide) to provide unidirectional
|
|
||||||
+ communication with remote processor(s), where the number of channel windows
|
|
||||||
+ are implementation dependent.
|
|
||||||
+
|
|
||||||
+ Given the unidirectional nature of the controller, an MHUv2 mailbox may only
|
|
||||||
+ be written to or read from. If a pair of MHU controllers is implemented
|
|
||||||
+ between two processing elements to provide bidirectional communication, these
|
|
||||||
+ must be specified as two separate mailboxes.
|
|
||||||
+
|
|
||||||
+ If the interrupts property is present in device tree node, then its treated as
|
|
||||||
+ a "receiver" mailbox, otherwise a "sender".
|
|
||||||
+
|
|
||||||
+ An MHU controller must be specified along with the supported transport
|
|
||||||
+ protocols. The transport protocols determine the method of data transmission
|
|
||||||
+ as well as the number of provided mailbox channels.
|
|
||||||
+
|
|
||||||
+ Following are the possible transport protocols.
|
|
||||||
+
|
|
||||||
+ - Data-transfer: Each transfer is made of one or more words, using one or more
|
|
||||||
+ channel windows.
|
|
||||||
+
|
|
||||||
+ - Doorbell: Each transfer is made up of single bit flag, using any one of the
|
|
||||||
+ bits in a channel window. A channel window can support up to 32 doorbells
|
|
||||||
+ and the entire window shall be used in doorbell protocol. Optionally, data
|
|
||||||
+ may be transmitted through a shared memory region, wherein the MHU is used
|
|
||||||
+ strictly as an interrupt generation mechanism but that is out of the scope
|
|
||||||
+ of these bindings.
|
|
||||||
+
|
|
||||||
+# We need a select here so we don't match all nodes with 'arm,primecell'
|
|
||||||
+select:
|
|
||||||
+ properties:
|
|
||||||
+ compatible:
|
|
||||||
+ contains:
|
|
||||||
+ enum:
|
|
||||||
+ - arm,mhuv2-tx
|
|
||||||
+ - arm,mhuv2-rx
|
|
||||||
+ required:
|
|
||||||
+ - compatible
|
|
||||||
+
|
|
||||||
+properties:
|
|
||||||
+ compatible:
|
|
||||||
+ oneOf:
|
|
||||||
+ - description: Sender mode
|
|
||||||
+ items:
|
|
||||||
+ - const: arm,mhuv2-tx
|
|
||||||
+ - const: arm,primecell
|
|
||||||
+
|
|
||||||
+ - description: Receiver-mode
|
|
||||||
+ items:
|
|
||||||
+ - const: arm,mhuv2-rx
|
|
||||||
+ - const: arm,primecell
|
|
||||||
+
|
|
||||||
+ reg:
|
|
||||||
+ maxItems: 1
|
|
||||||
+
|
|
||||||
+ interrupts:
|
|
||||||
+ description: |
|
|
||||||
+ The MHUv2 controller always implements an interrupt in the "receiver"
|
|
||||||
+ mode, while the interrupt in the "sender" mode was not available in the
|
|
||||||
+ version MHUv2.0, but the later versions do have it.
|
|
||||||
+ maxItems: 1
|
|
||||||
+
|
|
||||||
+ clocks:
|
|
||||||
+ maxItems: 1
|
|
||||||
+
|
|
||||||
+ clock-names:
|
|
||||||
+ maxItems: 1
|
|
||||||
+
|
|
||||||
+ arm,mhuv2-protocols:
|
|
||||||
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
|
|
||||||
+ description: |
|
|
||||||
+ The MHUv2 controller may contain up to 124 channel windows (each 32-bit
|
|
||||||
+ wide). The hardware and the DT bindings allows any combination of those to
|
|
||||||
+ be used for various transport protocols.
|
|
||||||
+
|
|
||||||
+ This property allows a platform to describe how these channel windows are
|
|
||||||
+ used in various transport protocols. The entries in this property shall be
|
|
||||||
+ present as an array of tuples, where each tuple describes details about
|
|
||||||
+ one of the transport protocol being implemented over some channel
|
|
||||||
+ window(s).
|
|
||||||
+
|
|
||||||
+ The first field of a tuple signifies the transfer protocol, 0 is reserved
|
|
||||||
+ for doorbell protocol, and 1 is reserved for data-transfer protocol.
|
|
||||||
+ Using any other value in the first field of a tuple makes it invalid.
|
|
||||||
+
|
|
||||||
+ The second field of a tuple signifies the number of channel windows where
|
|
||||||
+ the protocol would be used and should be set to a non zero value. For
|
|
||||||
+ doorbell protocol this field signifies the number of 32-bit channel
|
|
||||||
+ windows that implement the doorbell protocol. For data-transfer protocol,
|
|
||||||
+ this field signifies the number of 32-bit channel windows that implement
|
|
||||||
+ the data-transfer protocol.
|
|
||||||
+
|
|
||||||
+ The total number of channel windows specified here shouldn't be more than
|
|
||||||
+ the ones implemented by the platform, though one can specify lesser number
|
|
||||||
+ of windows here than what the platform implements.
|
|
||||||
+
|
|
||||||
+ mhu: mailbox@2b1f0000 {
|
|
||||||
+ ...
|
|
||||||
+
|
|
||||||
+ arm,mhuv2-protocols = <0 2>, <1 1>, <1 5>, <1 7>;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ The above example defines the protocols of an ARM MHUv2 mailbox
|
|
||||||
+ controller, where a total of 15 channel windows are used. The first two
|
|
||||||
+ windows are used in doorbell protocol (64 doorbells), followed by 1, 5 and
|
|
||||||
+ 7 windows (separately) used in data-transfer protocol.
|
|
||||||
+
|
|
||||||
+ minItems: 1
|
|
||||||
+ maxItems: 124
|
|
||||||
+ items:
|
|
||||||
+ items:
|
|
||||||
+ - enum: [ 0, 1 ]
|
|
||||||
+ - minimum: 0
|
|
||||||
+ maximum: 124
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+ '#mbox-cells':
|
|
||||||
+ description: |
|
|
||||||
+ It is always set to 2. The first argument in the consumers 'mboxes'
|
|
||||||
+ property represents the channel window group, which may be used in
|
|
||||||
+ doorbell, or data-transfer protocol, and the second argument (only
|
|
||||||
+ relevant in doorbell protocol, should be 0 otherwise) represents the
|
|
||||||
+ doorbell number within the 32 bit wide channel window.
|
|
||||||
+
|
|
||||||
+ From the example given above for arm,mhuv2-protocols, here is how a client
|
|
||||||
+ node can reference them.
|
|
||||||
+
|
|
||||||
+ mboxes = <&mhu 0 5>; // Channel Window Group 0, doorbell 5.
|
|
||||||
+ mboxes = <&mhu 1 7>; // Channel Window Group 1, doorbell 7.
|
|
||||||
+ mboxes = <&mhu 2 0>; // Channel Window Group 2, data transfer protocol with 1 window.
|
|
||||||
+ mboxes = <&mhu 3 0>; // Channel Window Group 3, data transfer protocol with 5 windows.
|
|
||||||
+ mboxes = <&mhu 4 0>; // Channel Window Group 4, data transfer protocol with 7 windows.
|
|
||||||
+
|
|
||||||
+ const: 2
|
|
||||||
+
|
|
||||||
+if:
|
|
||||||
+ # Interrupt is compulsory for receiver
|
|
||||||
+ properties:
|
|
||||||
+ compatible:
|
|
||||||
+ contains:
|
|
||||||
+ const: arm,mhuv2-rx
|
|
||||||
+then:
|
|
||||||
+ required:
|
|
||||||
+ - interrupts
|
|
||||||
+
|
|
||||||
+required:
|
|
||||||
+ - compatible
|
|
||||||
+ - reg
|
|
||||||
+ - '#mbox-cells'
|
|
||||||
+ - arm,mhuv2-protocols
|
|
||||||
+
|
|
||||||
+additionalProperties: false
|
|
||||||
+
|
|
||||||
+examples:
|
|
||||||
+ # Multiple transport protocols implemented by the mailbox controllers
|
|
||||||
+ - |
|
|
||||||
+ soc {
|
|
||||||
+ #address-cells = <2>;
|
|
||||||
+ #size-cells = <2>;
|
|
||||||
+
|
|
||||||
+ mhu_tx: mailbox@2b1f0000 {
|
|
||||||
+ #mbox-cells = <2>;
|
|
||||||
+ compatible = "arm,mhuv2-tx", "arm,primecell";
|
|
||||||
+ reg = <0 0x2b1f0000 0 0x1000>;
|
|
||||||
+ clocks = <&clock 0>;
|
|
||||||
+ clock-names = "apb_pclk";
|
|
||||||
+ interrupts = <0 45 4>;
|
|
||||||
+ arm,mhuv2-protocols = <1 5>, <1 2>, <1 5>, <1 7>, <0 2>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ mhu_rx: mailbox@2b1f1000 {
|
|
||||||
+ #mbox-cells = <2>;
|
|
||||||
+ compatible = "arm,mhuv2-rx", "arm,primecell";
|
|
||||||
+ reg = <0 0x2b1f1000 0 0x1000>;
|
|
||||||
+ clocks = <&clock 0>;
|
|
||||||
+ clock-names = "apb_pclk";
|
|
||||||
+ interrupts = <0 46 4>;
|
|
||||||
+ arm,mhuv2-protocols = <1 1>, <1 7>, <0 2>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ mhu_client: scb@2e000000 {
|
|
||||||
+ compatible = "fujitsu,mb86s70-scb-1.0";
|
|
||||||
+ reg = <0 0x2e000000 0 0x4000>;
|
|
||||||
+
|
|
||||||
+ mboxes =
|
|
||||||
+ //data-transfer protocol with 5 windows, mhu-tx
|
|
||||||
+ <&mhu_tx 2 0>,
|
|
||||||
+ //data-transfer protocol with 7 windows, mhu-tx
|
|
||||||
+ <&mhu_tx 3 0>,
|
|
||||||
+ //doorbell protocol channel 4, doorbell 27, mhu-tx
|
|
||||||
+ <&mhu_tx 4 27>,
|
|
||||||
+ //data-transfer protocol with 1 window, mhu-rx
|
|
||||||
+ <&mhu_rx 0 0>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
-1256
File diff suppressed because it is too large
Load Diff
-114
@@ -1,114 +0,0 @@
|
|||||||
From 1c75e7d566e29258e9daf7b1548f2d681efb4aea Mon Sep 17 00:00:00 2001
|
|
||||||
From: Viresh Kumar <viresh.kumar@linaro.org>
|
|
||||||
Date: Wed, 30 Dec 2020 10:12:04 +0530
|
|
||||||
Subject: [PATCH 05/22] mailbox: arm_mhuv2: Fix sparse warnings
|
|
||||||
|
|
||||||
This patch fixes a bunch of sparse warnings in the newly added arm_mhuv2
|
|
||||||
driver.
|
|
||||||
|
|
||||||
drivers/mailbox/arm_mhuv2.c:506:24: warning: incorrect type in argument 1 (different address spaces)
|
|
||||||
drivers/mailbox/arm_mhuv2.c:506:24: expected void const volatile [noderef] __iomem *addr
|
|
||||||
drivers/mailbox/arm_mhuv2.c:506:24: got unsigned int [usertype] *
|
|
||||||
drivers/mailbox/arm_mhuv2.c:547:42: warning: incorrect type in argument 2 (different address spaces)
|
|
||||||
drivers/mailbox/arm_mhuv2.c:547:42: expected unsigned int [usertype] *reg
|
|
||||||
drivers/mailbox/arm_mhuv2.c:547:42: got unsigned int [noderef] __iomem *
|
|
||||||
drivers/mailbox/arm_mhuv2.c:625:42: warning: incorrect type in argument 2 (different address spaces)
|
|
||||||
drivers/mailbox/arm_mhuv2.c:625:42: expected unsigned int [usertype] *reg
|
|
||||||
drivers/mailbox/arm_mhuv2.c:625:42: got unsigned int [noderef] __iomem *
|
|
||||||
drivers/mailbox/arm_mhuv2.c:972:24: warning: dereference of noderef expression
|
|
||||||
drivers/mailbox/arm_mhuv2.c:973:22: warning: dereference of noderef expression
|
|
||||||
drivers/mailbox/arm_mhuv2.c:993:25: warning: dereference of noderef expression
|
|
||||||
drivers/mailbox/arm_mhuv2.c:1026:24: warning: dereference of noderef expression
|
|
||||||
drivers/mailbox/arm_mhuv2.c:1027:22: warning: dereference of noderef expression
|
|
||||||
drivers/mailbox/arm_mhuv2.c:1048:17: warning: dereference of noderef expression
|
|
||||||
|
|
||||||
Reported-by: kernel test robot <lkp@intel.com>
|
|
||||||
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
|
||||||
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://lkml.org/lkml/2021/2/9/428]
|
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
|
||||||
---
|
|
||||||
drivers/mailbox/arm_mhuv2.c | 22 +++++++++++-----------
|
|
||||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/mailbox/arm_mhuv2.c b/drivers/mailbox/arm_mhuv2.c
|
|
||||||
index 67fb10885bb4..8223c1005254 100644
|
|
||||||
--- a/drivers/mailbox/arm_mhuv2.c
|
|
||||||
+++ b/drivers/mailbox/arm_mhuv2.c
|
|
||||||
@@ -238,19 +238,19 @@ struct mhuv2_mbox_chan_priv {
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Macro for reading a bitfield within a physically mapped packed struct */
|
|
||||||
-#define readl_relaxed_bitfield(_regptr, _field) \
|
|
||||||
+#define readl_relaxed_bitfield(_regptr, _type, _field) \
|
|
||||||
({ \
|
|
||||||
u32 _regval; \
|
|
||||||
_regval = readl_relaxed((_regptr)); \
|
|
||||||
- (*(typeof((_regptr)))(&_regval))._field; \
|
|
||||||
+ (*(_type *)(&_regval))._field; \
|
|
||||||
})
|
|
||||||
|
|
||||||
/* Macro for writing a bitfield within a physically mapped packed struct */
|
|
||||||
-#define writel_relaxed_bitfield(_value, _regptr, _field) \
|
|
||||||
+#define writel_relaxed_bitfield(_value, _regptr, _type, _field) \
|
|
||||||
({ \
|
|
||||||
u32 _regval; \
|
|
||||||
_regval = readl_relaxed(_regptr); \
|
|
||||||
- (*(typeof(_regptr))(&_regval))._field = _value; \
|
|
||||||
+ (*(_type *)(&_regval))._field = _value; \
|
|
||||||
writel_relaxed(_regval, _regptr); \
|
|
||||||
})
|
|
||||||
|
|
||||||
@@ -496,7 +496,7 @@ static const struct mhuv2_protocol_ops mhuv2_data_transfer_ops = {
|
|
||||||
|
|
||||||
/* Interrupt handlers */
|
|
||||||
|
|
||||||
-static struct mbox_chan *get_irq_chan_comb(struct mhuv2 *mhu, u32 *reg)
|
|
||||||
+static struct mbox_chan *get_irq_chan_comb(struct mhuv2 *mhu, u32 __iomem *reg)
|
|
||||||
{
|
|
||||||
struct mbox_chan *chans = mhu->mbox.chans;
|
|
||||||
int channel = 0, i, offset = 0, windows, protocol, ch_wn;
|
|
||||||
@@ -969,8 +969,8 @@ static int mhuv2_tx_init(struct amba_device *adev, struct mhuv2 *mhu,
|
|
||||||
mhu->mbox.ops = &mhuv2_sender_ops;
|
|
||||||
mhu->send = reg;
|
|
||||||
|
|
||||||
- mhu->windows = readl_relaxed_bitfield(&mhu->send->mhu_cfg, num_ch);
|
|
||||||
- mhu->minor = readl_relaxed_bitfield(&mhu->send->aidr, arch_minor_rev);
|
|
||||||
+ mhu->windows = readl_relaxed_bitfield(&mhu->send->mhu_cfg, struct mhu_cfg_t, num_ch);
|
|
||||||
+ mhu->minor = readl_relaxed_bitfield(&mhu->send->aidr, struct aidr_t, arch_minor_rev);
|
|
||||||
|
|
||||||
spin_lock_init(&mhu->doorbell_pending_lock);
|
|
||||||
|
|
||||||
@@ -990,7 +990,7 @@ static int mhuv2_tx_init(struct amba_device *adev, struct mhuv2 *mhu,
|
|
||||||
mhu->mbox.txdone_poll = false;
|
|
||||||
mhu->irq = adev->irq[0];
|
|
||||||
|
|
||||||
- writel_relaxed_bitfield(1, &mhu->send->int_en, chcomb);
|
|
||||||
+ writel_relaxed_bitfield(1, &mhu->send->int_en, struct int_en_t, chcomb);
|
|
||||||
|
|
||||||
/* Disable all channel interrupts */
|
|
||||||
for (i = 0; i < mhu->windows; i++)
|
|
||||||
@@ -1023,8 +1023,8 @@ static int mhuv2_rx_init(struct amba_device *adev, struct mhuv2 *mhu,
|
|
||||||
mhu->mbox.ops = &mhuv2_receiver_ops;
|
|
||||||
mhu->recv = reg;
|
|
||||||
|
|
||||||
- mhu->windows = readl_relaxed_bitfield(&mhu->recv->mhu_cfg, num_ch);
|
|
||||||
- mhu->minor = readl_relaxed_bitfield(&mhu->recv->aidr, arch_minor_rev);
|
|
||||||
+ mhu->windows = readl_relaxed_bitfield(&mhu->recv->mhu_cfg, struct mhu_cfg_t, num_ch);
|
|
||||||
+ mhu->minor = readl_relaxed_bitfield(&mhu->recv->aidr, struct aidr_t, arch_minor_rev);
|
|
||||||
|
|
||||||
mhu->irq = adev->irq[0];
|
|
||||||
if (!mhu->irq) {
|
|
||||||
@@ -1045,7 +1045,7 @@ static int mhuv2_rx_init(struct amba_device *adev, struct mhuv2 *mhu,
|
|
||||||
writel_relaxed(0xFFFFFFFF, &mhu->recv->ch_wn[i].mask_set);
|
|
||||||
|
|
||||||
if (mhu->minor)
|
|
||||||
- writel_relaxed_bitfield(1, &mhu->recv->int_en, chcomb);
|
|
||||||
+ writel_relaxed_bitfield(1, &mhu->recv->int_en, struct int_en_t, chcomb);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
-47
@@ -1,47 +0,0 @@
|
|||||||
From 107f39e7741bb77688df47ce3f56b25cceb301c3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
|
|
||||||
Date: Tue, 2 Feb 2021 20:43:08 +0100
|
|
||||||
Subject: [PATCH 06/22] mailbox: arm_mhuv2: make remove callback return void
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
My build tests failed to catch that amba driver that would have needed
|
|
||||||
adaption in commit 3fd269e74f2f ("amba: Make the remove callback return
|
|
||||||
void"). Change the remove function to make the driver build again.
|
|
||||||
|
|
||||||
Reported-by: kernel test robot <lkp@intel.com>
|
|
||||||
Fixes: 3fd269e74f2f ("amba: Make the remove callback return void")
|
|
||||||
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
|
||||||
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
|
|
||||||
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://lkml.org/lkml/2021/2/2/1525]
|
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
|
||||||
---
|
|
||||||
drivers/mailbox/arm_mhuv2.c | 4 +---
|
|
||||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/mailbox/arm_mhuv2.c b/drivers/mailbox/arm_mhuv2.c
|
|
||||||
index 8223c1005254..cdfb1939fabf 100644
|
|
||||||
--- a/drivers/mailbox/arm_mhuv2.c
|
|
||||||
+++ b/drivers/mailbox/arm_mhuv2.c
|
|
||||||
@@ -1095,14 +1095,12 @@ static int mhuv2_probe(struct amba_device *adev, const struct amba_id *id)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int mhuv2_remove(struct amba_device *adev)
|
|
||||||
+static void mhuv2_remove(struct amba_device *adev)
|
|
||||||
{
|
|
||||||
struct mhuv2 *mhu = amba_get_drvdata(adev);
|
|
||||||
|
|
||||||
if (mhu->frame == SENDER_FRAME)
|
|
||||||
writel_relaxed(0x0, &mhu->send->access_request);
|
|
||||||
-
|
|
||||||
- return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct amba_id mhuv2_ids[] = {
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
-41
@@ -1,41 +0,0 @@
|
|||||||
From 81d76e92b03a6f33acefd8aef168948c5f595205 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Viresh Kumar <viresh.kumar@linaro.org>
|
|
||||||
Date: Mon, 22 Feb 2021 12:48:06 +0530
|
|
||||||
Subject: [PATCH 07/22] mailbox: arm_mhuv2: Skip calling kfree() with invalid
|
|
||||||
pointer
|
|
||||||
|
|
||||||
It is possible that 'data' passed to kfree() is set to a error value
|
|
||||||
instead of allocated space. Make sure it doesn't get called with invalid
|
|
||||||
pointer.
|
|
||||||
|
|
||||||
Fixes: 5a6338cce9f4 ("mailbox: arm_mhuv2: Add driver")
|
|
||||||
Cc: v5.11 <stable@vger.kernel.org> # v5.11
|
|
||||||
Reported-by: kernel test robot <lkp@intel.com>
|
|
||||||
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
|
|
||||||
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
|
||||||
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://lkml.org/lkml/2021/2/22/57]
|
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
|
||||||
---
|
|
||||||
drivers/mailbox/arm_mhuv2.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/mailbox/arm_mhuv2.c b/drivers/mailbox/arm_mhuv2.c
|
|
||||||
index cdfb1939fabf..d997f8ebfa98 100644
|
|
||||||
--- a/drivers/mailbox/arm_mhuv2.c
|
|
||||||
+++ b/drivers/mailbox/arm_mhuv2.c
|
|
||||||
@@ -699,7 +699,9 @@ static irqreturn_t mhuv2_receiver_interrupt(int irq, void *arg)
|
|
||||||
ret = IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
- kfree(data);
|
|
||||||
+ if (!IS_ERR(data))
|
|
||||||
+ kfree(data);
|
|
||||||
+
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
-1684
File diff suppressed because it is too large
Load Diff
-644
@@ -1,644 +0,0 @@
|
|||||||
From 1e43bd55c951da0610230c4f28a8ebdd13b30733 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jens Wiklander <jens.wiklander@linaro.org>
|
|
||||||
Date: Wed, 20 Jan 2021 11:14:12 +0100
|
|
||||||
Subject: [PATCH 16/22] optee: sync OP-TEE headers
|
|
||||||
|
|
||||||
Pulls in updates in the internal headers from OP-TEE OS [1]. A few
|
|
||||||
defines has been shortened, hence the changes in rpc.c. Defines not used
|
|
||||||
by the driver in tee_rpc_cmd.h has been filtered out.
|
|
||||||
|
|
||||||
Note that this does not change the ABI.
|
|
||||||
|
|
||||||
Link: [1] https://github.com/OP-TEE/optee_os
|
|
||||||
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
|
|
||||||
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
||||||
Change-Id: I5d20a22a3f38bfc9d232279d5f00505c4d3ba965
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.13-rc7&id=617d8e8b347edcee6da38df0aeb671fc9c9ba19c]
|
|
||||||
---
|
|
||||||
drivers/tee/optee/optee_msg.h | 156 ++----------------------------
|
|
||||||
drivers/tee/optee/optee_rpc_cmd.h | 103 ++++++++++++++++++++
|
|
||||||
drivers/tee/optee/optee_smc.h | 70 +++++++++-----
|
|
||||||
drivers/tee/optee/rpc.c | 39 ++++----
|
|
||||||
4 files changed, 179 insertions(+), 189 deletions(-)
|
|
||||||
create mode 100644 drivers/tee/optee/optee_rpc_cmd.h
|
|
||||||
|
|
||||||
diff --git a/drivers/tee/optee/optee_msg.h b/drivers/tee/optee/optee_msg.h
|
|
||||||
index c7ac7d02d6cc..5bef6a0165db 100644
|
|
||||||
--- a/drivers/tee/optee/optee_msg.h
|
|
||||||
+++ b/drivers/tee/optee/optee_msg.h
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
|
|
||||||
/*
|
|
||||||
- * Copyright (c) 2015-2019, Linaro Limited
|
|
||||||
+ * Copyright (c) 2015-2021, Linaro Limited
|
|
||||||
*/
|
|
||||||
#ifndef _OPTEE_MSG_H
|
|
||||||
#define _OPTEE_MSG_H
|
|
||||||
@@ -12,11 +12,9 @@
|
|
||||||
* This file defines the OP-TEE message protocol (ABI) used to communicate
|
|
||||||
* with an instance of OP-TEE running in secure world.
|
|
||||||
*
|
|
||||||
- * This file is divided into three sections.
|
|
||||||
+ * This file is divided into two sections.
|
|
||||||
* 1. Formatting of messages.
|
|
||||||
* 2. Requests from normal world
|
|
||||||
- * 3. Requests from secure world, Remote Procedure Call (RPC), handled by
|
|
||||||
- * tee-supplicant.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*****************************************************************************
|
|
||||||
@@ -54,8 +52,8 @@
|
|
||||||
* Every entry in buffer should point to a 4k page beginning (12 least
|
|
||||||
* significant bits must be equal to zero).
|
|
||||||
*
|
|
||||||
- * 12 least significant bints of optee_msg_param.u.tmem.buf_ptr should hold page
|
|
||||||
- * offset of the user buffer.
|
|
||||||
+ * 12 least significant bits of optee_msg_param.u.tmem.buf_ptr should hold
|
|
||||||
+ * page offset of user buffer.
|
|
||||||
*
|
|
||||||
* So, entries should be placed like members of this structure:
|
|
||||||
*
|
|
||||||
@@ -178,17 +176,9 @@ struct optee_msg_param {
|
|
||||||
* @params: the parameters supplied to the OS Command
|
|
||||||
*
|
|
||||||
* All normal calls to Trusted OS uses this struct. If cmd requires further
|
|
||||||
- * information than what these field holds it can be passed as a parameter
|
|
||||||
+ * information than what these fields hold it can be passed as a parameter
|
|
||||||
* tagged as meta (setting the OPTEE_MSG_ATTR_META bit in corresponding
|
|
||||||
- * attrs field). All parameters tagged as meta has to come first.
|
|
||||||
- *
|
|
||||||
- * Temp memref parameters can be fragmented if supported by the Trusted OS
|
|
||||||
- * (when optee_smc.h is bearer of this protocol this is indicated with
|
|
||||||
- * OPTEE_SMC_SEC_CAP_UNREGISTERED_SHM). If a logical memref parameter is
|
|
||||||
- * fragmented then has all but the last fragment the
|
|
||||||
- * OPTEE_MSG_ATTR_FRAGMENT bit set in attrs. Even if a memref is fragmented
|
|
||||||
- * it will still be presented as a single logical memref to the Trusted
|
|
||||||
- * Application.
|
|
||||||
+ * attrs field). All parameters tagged as meta have to come first.
|
|
||||||
*/
|
|
||||||
struct optee_msg_arg {
|
|
||||||
u32 cmd;
|
|
||||||
@@ -292,15 +282,12 @@ struct optee_msg_arg {
|
|
||||||
* OPTEE_MSG_CMD_REGISTER_SHM registers a shared memory reference. The
|
|
||||||
* information is passed as:
|
|
||||||
* [in] param[0].attr OPTEE_MSG_ATTR_TYPE_TMEM_INPUT
|
|
||||||
- * [| OPTEE_MSG_ATTR_FRAGMENT]
|
|
||||||
+ * [| OPTEE_MSG_ATTR_NONCONTIG]
|
|
||||||
* [in] param[0].u.tmem.buf_ptr physical address (of first fragment)
|
|
||||||
* [in] param[0].u.tmem.size size (of first fragment)
|
|
||||||
* [in] param[0].u.tmem.shm_ref holds shared memory reference
|
|
||||||
- * ...
|
|
||||||
- * The shared memory can optionally be fragmented, temp memrefs can follow
|
|
||||||
- * each other with all but the last with the OPTEE_MSG_ATTR_FRAGMENT bit set.
|
|
||||||
*
|
|
||||||
- * OPTEE_MSG_CMD_UNREGISTER_SHM unregisteres a previously registered shared
|
|
||||||
+ * OPTEE_MSG_CMD_UNREGISTER_SHM unregisters a previously registered shared
|
|
||||||
* memory reference. The information is passed as:
|
|
||||||
* [in] param[0].attr OPTEE_MSG_ATTR_TYPE_RMEM_INPUT
|
|
||||||
* [in] param[0].u.rmem.shm_ref holds shared memory reference
|
|
||||||
@@ -315,131 +302,4 @@ struct optee_msg_arg {
|
|
||||||
#define OPTEE_MSG_CMD_UNREGISTER_SHM 5
|
|
||||||
#define OPTEE_MSG_FUNCID_CALL_WITH_ARG 0x0004
|
|
||||||
|
|
||||||
-/*****************************************************************************
|
|
||||||
- * Part 3 - Requests from secure world, RPC
|
|
||||||
- *****************************************************************************/
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * All RPC is done with a struct optee_msg_arg as bearer of information,
|
|
||||||
- * struct optee_msg_arg::arg holds values defined by OPTEE_MSG_RPC_CMD_* below
|
|
||||||
- *
|
|
||||||
- * RPC communication with tee-supplicant is reversed compared to normal
|
|
||||||
- * client communication desribed above. The supplicant receives requests
|
|
||||||
- * and sends responses.
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Load a TA into memory, defined in tee-supplicant
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_LOAD_TA 0
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Reserved
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_RPMB 1
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * File system access, defined in tee-supplicant
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_FS 2
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Get time
|
|
||||||
- *
|
|
||||||
- * Returns number of seconds and nano seconds since the Epoch,
|
|
||||||
- * 1970-01-01 00:00:00 +0000 (UTC).
|
|
||||||
- *
|
|
||||||
- * [out] param[0].u.value.a Number of seconds
|
|
||||||
- * [out] param[0].u.value.b Number of nano seconds.
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_GET_TIME 3
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Wait queue primitive, helper for secure world to implement a wait queue.
|
|
||||||
- *
|
|
||||||
- * If secure world need to wait for a secure world mutex it issues a sleep
|
|
||||||
- * request instead of spinning in secure world. Conversely is a wakeup
|
|
||||||
- * request issued when a secure world mutex with a thread waiting thread is
|
|
||||||
- * unlocked.
|
|
||||||
- *
|
|
||||||
- * Waiting on a key
|
|
||||||
- * [in] param[0].u.value.a OPTEE_MSG_RPC_WAIT_QUEUE_SLEEP
|
|
||||||
- * [in] param[0].u.value.b wait key
|
|
||||||
- *
|
|
||||||
- * Waking up a key
|
|
||||||
- * [in] param[0].u.value.a OPTEE_MSG_RPC_WAIT_QUEUE_WAKEUP
|
|
||||||
- * [in] param[0].u.value.b wakeup key
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_WAIT_QUEUE 4
|
|
||||||
-#define OPTEE_MSG_RPC_WAIT_QUEUE_SLEEP 0
|
|
||||||
-#define OPTEE_MSG_RPC_WAIT_QUEUE_WAKEUP 1
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Suspend execution
|
|
||||||
- *
|
|
||||||
- * [in] param[0].value .a number of milliseconds to suspend
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_SUSPEND 5
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Allocate a piece of shared memory
|
|
||||||
- *
|
|
||||||
- * Shared memory can optionally be fragmented, to support that additional
|
|
||||||
- * spare param entries are allocated to make room for eventual fragments.
|
|
||||||
- * The spare param entries has .attr = OPTEE_MSG_ATTR_TYPE_NONE when
|
|
||||||
- * unused. All returned temp memrefs except the last should have the
|
|
||||||
- * OPTEE_MSG_ATTR_FRAGMENT bit set in the attr field.
|
|
||||||
- *
|
|
||||||
- * [in] param[0].u.value.a type of memory one of
|
|
||||||
- * OPTEE_MSG_RPC_SHM_TYPE_* below
|
|
||||||
- * [in] param[0].u.value.b requested size
|
|
||||||
- * [in] param[0].u.value.c required alignment
|
|
||||||
- *
|
|
||||||
- * [out] param[0].u.tmem.buf_ptr physical address (of first fragment)
|
|
||||||
- * [out] param[0].u.tmem.size size (of first fragment)
|
|
||||||
- * [out] param[0].u.tmem.shm_ref shared memory reference
|
|
||||||
- * ...
|
|
||||||
- * [out] param[n].u.tmem.buf_ptr physical address
|
|
||||||
- * [out] param[n].u.tmem.size size
|
|
||||||
- * [out] param[n].u.tmem.shm_ref shared memory reference (same value
|
|
||||||
- * as in param[n-1].u.tmem.shm_ref)
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_SHM_ALLOC 6
|
|
||||||
-/* Memory that can be shared with a non-secure user space application */
|
|
||||||
-#define OPTEE_MSG_RPC_SHM_TYPE_APPL 0
|
|
||||||
-/* Memory only shared with non-secure kernel */
|
|
||||||
-#define OPTEE_MSG_RPC_SHM_TYPE_KERNEL 1
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Free shared memory previously allocated with OPTEE_MSG_RPC_CMD_SHM_ALLOC
|
|
||||||
- *
|
|
||||||
- * [in] param[0].u.value.a type of memory one of
|
|
||||||
- * OPTEE_MSG_RPC_SHM_TYPE_* above
|
|
||||||
- * [in] param[0].u.value.b value of shared memory reference
|
|
||||||
- * returned in param[0].u.tmem.shm_ref
|
|
||||||
- * above
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_SHM_FREE 7
|
|
||||||
-
|
|
||||||
-/*
|
|
||||||
- * Access a device on an i2c bus
|
|
||||||
- *
|
|
||||||
- * [in] param[0].u.value.a mode: RD(0), WR(1)
|
|
||||||
- * [in] param[0].u.value.b i2c adapter
|
|
||||||
- * [in] param[0].u.value.c i2c chip
|
|
||||||
- *
|
|
||||||
- * [in] param[1].u.value.a i2c control flags
|
|
||||||
- *
|
|
||||||
- * [in/out] memref[2] buffer to exchange the transfer data
|
|
||||||
- * with the secure world
|
|
||||||
- *
|
|
||||||
- * [out] param[3].u.value.a bytes transferred by the driver
|
|
||||||
- */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_I2C_TRANSFER 21
|
|
||||||
-/* I2C master transfer modes */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_I2C_TRANSFER_RD 0
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_I2C_TRANSFER_WR 1
|
|
||||||
-/* I2C master control flags */
|
|
||||||
-#define OPTEE_MSG_RPC_CMD_I2C_FLAGS_TEN_BIT BIT(0)
|
|
||||||
-
|
|
||||||
#endif /* _OPTEE_MSG_H */
|
|
||||||
diff --git a/drivers/tee/optee/optee_rpc_cmd.h b/drivers/tee/optee/optee_rpc_cmd.h
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..b8275140cef8
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/drivers/tee/optee/optee_rpc_cmd.h
|
|
||||||
@@ -0,0 +1,103 @@
|
|
||||||
+/* SPDX-License-Identifier: BSD-2-Clause */
|
|
||||||
+/*
|
|
||||||
+ * Copyright (c) 2016-2021, Linaro Limited
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef __OPTEE_RPC_CMD_H
|
|
||||||
+#define __OPTEE_RPC_CMD_H
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * All RPC is done with a struct optee_msg_arg as bearer of information,
|
|
||||||
+ * struct optee_msg_arg::arg holds values defined by OPTEE_RPC_CMD_* below.
|
|
||||||
+ * Only the commands handled by the kernel driver are defined here.
|
|
||||||
+ *
|
|
||||||
+ * RPC communication with tee-supplicant is reversed compared to normal
|
|
||||||
+ * client communication described above. The supplicant receives requests
|
|
||||||
+ * and sends responses.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Get time
|
|
||||||
+ *
|
|
||||||
+ * Returns number of seconds and nano seconds since the Epoch,
|
|
||||||
+ * 1970-01-01 00:00:00 +0000 (UTC).
|
|
||||||
+ *
|
|
||||||
+ * [out] value[0].a Number of seconds
|
|
||||||
+ * [out] value[0].b Number of nano seconds.
|
|
||||||
+ */
|
|
||||||
+#define OPTEE_RPC_CMD_GET_TIME 3
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Wait queue primitive, helper for secure world to implement a wait queue.
|
|
||||||
+ *
|
|
||||||
+ * If secure world needs to wait for a secure world mutex it issues a sleep
|
|
||||||
+ * request instead of spinning in secure world. Conversely is a wakeup
|
|
||||||
+ * request issued when a secure world mutex with a thread waiting thread is
|
|
||||||
+ * unlocked.
|
|
||||||
+ *
|
|
||||||
+ * Waiting on a key
|
|
||||||
+ * [in] value[0].a OPTEE_RPC_WAIT_QUEUE_SLEEP
|
|
||||||
+ * [in] value[0].b Wait key
|
|
||||||
+ *
|
|
||||||
+ * Waking up a key
|
|
||||||
+ * [in] value[0].a OPTEE_RPC_WAIT_QUEUE_WAKEUP
|
|
||||||
+ * [in] value[0].b Wakeup key
|
|
||||||
+ */
|
|
||||||
+#define OPTEE_RPC_CMD_WAIT_QUEUE 4
|
|
||||||
+#define OPTEE_RPC_WAIT_QUEUE_SLEEP 0
|
|
||||||
+#define OPTEE_RPC_WAIT_QUEUE_WAKEUP 1
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Suspend execution
|
|
||||||
+ *
|
|
||||||
+ * [in] value[0].a Number of milliseconds to suspend
|
|
||||||
+ */
|
|
||||||
+#define OPTEE_RPC_CMD_SUSPEND 5
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Allocate a piece of shared memory
|
|
||||||
+ *
|
|
||||||
+ * [in] value[0].a Type of memory one of
|
|
||||||
+ * OPTEE_RPC_SHM_TYPE_* below
|
|
||||||
+ * [in] value[0].b Requested size
|
|
||||||
+ * [in] value[0].c Required alignment
|
|
||||||
+ * [out] memref[0] Buffer
|
|
||||||
+ */
|
|
||||||
+#define OPTEE_RPC_CMD_SHM_ALLOC 6
|
|
||||||
+/* Memory that can be shared with a non-secure user space application */
|
|
||||||
+#define OPTEE_RPC_SHM_TYPE_APPL 0
|
|
||||||
+/* Memory only shared with non-secure kernel */
|
|
||||||
+#define OPTEE_RPC_SHM_TYPE_KERNEL 1
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Free shared memory previously allocated with OPTEE_RPC_CMD_SHM_ALLOC
|
|
||||||
+ *
|
|
||||||
+ * [in] value[0].a Type of memory one of
|
|
||||||
+ * OPTEE_RPC_SHM_TYPE_* above
|
|
||||||
+ * [in] value[0].b Value of shared memory reference or cookie
|
|
||||||
+ */
|
|
||||||
+#define OPTEE_RPC_CMD_SHM_FREE 7
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Issue master requests (read and write operations) to an I2C chip.
|
|
||||||
+ *
|
|
||||||
+ * [in] value[0].a Transfer mode (OPTEE_RPC_I2C_TRANSFER_*)
|
|
||||||
+ * [in] value[0].b The I2C bus (a.k.a adapter).
|
|
||||||
+ * 16 bit field.
|
|
||||||
+ * [in] value[0].c The I2C chip (a.k.a address).
|
|
||||||
+ * 16 bit field (either 7 or 10 bit effective).
|
|
||||||
+ * [in] value[1].a The I2C master control flags (ie, 10 bit address).
|
|
||||||
+ * 16 bit field.
|
|
||||||
+ * [in/out] memref[2] Buffer used for data transfers.
|
|
||||||
+ * [out] value[3].a Number of bytes transferred by the REE.
|
|
||||||
+ */
|
|
||||||
+#define OPTEE_RPC_CMD_I2C_TRANSFER 21
|
|
||||||
+
|
|
||||||
+/* I2C master transfer modes */
|
|
||||||
+#define OPTEE_RPC_I2C_TRANSFER_RD 0
|
|
||||||
+#define OPTEE_RPC_I2C_TRANSFER_WR 1
|
|
||||||
+
|
|
||||||
+/* I2C master control flags */
|
|
||||||
+#define OPTEE_RPC_I2C_FLAGS_TEN_BIT BIT(0)
|
|
||||||
+
|
|
||||||
+#endif /*__OPTEE_RPC_CMD_H*/
|
|
||||||
diff --git a/drivers/tee/optee/optee_smc.h b/drivers/tee/optee/optee_smc.h
|
|
||||||
index 777ad54d4c2c..821e1c30c150 100644
|
|
||||||
--- a/drivers/tee/optee/optee_smc.h
|
|
||||||
+++ b/drivers/tee/optee/optee_smc.h
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */
|
|
||||||
/*
|
|
||||||
- * Copyright (c) 2015-2019, Linaro Limited
|
|
||||||
+ * Copyright (c) 2015-2021, Linaro Limited
|
|
||||||
*/
|
|
||||||
#ifndef OPTEE_SMC_H
|
|
||||||
#define OPTEE_SMC_H
|
|
||||||
@@ -39,10 +39,10 @@
|
|
||||||
/*
|
|
||||||
* Function specified by SMC Calling convention
|
|
||||||
*
|
|
||||||
- * Return one of the following UIDs if using API specified in this file
|
|
||||||
- * without further extentions:
|
|
||||||
- * 65cb6b93-af0c-4617-8ed6-644a8d1140f8
|
|
||||||
- * see also OPTEE_SMC_UID_* in optee_msg.h
|
|
||||||
+ * Return the following UID if using API specified in this file
|
|
||||||
+ * without further extensions:
|
|
||||||
+ * 384fb3e0-e7f8-11e3-af63-0002a5d5c51b.
|
|
||||||
+ * see also OPTEE_MSG_UID_* in optee_msg.h
|
|
||||||
*/
|
|
||||||
#define OPTEE_SMC_FUNCID_CALLS_UID OPTEE_MSG_FUNCID_CALLS_UID
|
|
||||||
#define OPTEE_SMC_CALLS_UID \
|
|
||||||
@@ -53,7 +53,7 @@
|
|
||||||
/*
|
|
||||||
* Function specified by SMC Calling convention
|
|
||||||
*
|
|
||||||
- * Returns 2.0 if using API specified in this file without further extentions.
|
|
||||||
+ * Returns 2.0 if using API specified in this file without further extensions.
|
|
||||||
* see also OPTEE_MSG_REVISION_* in optee_msg.h
|
|
||||||
*/
|
|
||||||
#define OPTEE_SMC_FUNCID_CALLS_REVISION OPTEE_MSG_FUNCID_CALLS_REVISION
|
|
||||||
@@ -109,8 +109,8 @@ struct optee_smc_call_get_os_revision_result {
|
|
||||||
*
|
|
||||||
* Call register usage:
|
|
||||||
* a0 SMC Function ID, OPTEE_SMC*CALL_WITH_ARG
|
|
||||||
- * a1 Upper 32bit of a 64bit physical pointer to a struct optee_msg_arg
|
|
||||||
- * a2 Lower 32bit of a 64bit physical pointer to a struct optee_msg_arg
|
|
||||||
+ * a1 Upper 32 bits of a 64-bit physical pointer to a struct optee_msg_arg
|
|
||||||
+ * a2 Lower 32 bits of a 64-bit physical pointer to a struct optee_msg_arg
|
|
||||||
* a3 Cache settings, not used if physical pointer is in a predefined shared
|
|
||||||
* memory area else per OPTEE_SMC_SHM_*
|
|
||||||
* a4-6 Not used
|
|
||||||
@@ -214,8 +214,9 @@ struct optee_smc_get_shm_config_result {
|
|
||||||
* secure world accepts command buffers located in any parts of non-secure RAM
|
|
||||||
*/
|
|
||||||
#define OPTEE_SMC_SEC_CAP_DYNAMIC_SHM BIT(2)
|
|
||||||
-
|
|
||||||
-/* Secure world supports Shared Memory with a NULL buffer reference */
|
|
||||||
+/* Secure world is built with virtualization support */
|
|
||||||
+#define OPTEE_SMC_SEC_CAP_VIRTUALIZATION BIT(3)
|
|
||||||
+/* Secure world supports Shared Memory with a NULL reference */
|
|
||||||
#define OPTEE_SMC_SEC_CAP_MEMREF_NULL BIT(4)
|
|
||||||
|
|
||||||
#define OPTEE_SMC_FUNCID_EXCHANGE_CAPABILITIES 9
|
|
||||||
@@ -245,8 +246,8 @@ struct optee_smc_exchange_capabilities_result {
|
|
||||||
*
|
|
||||||
* Normal return register usage:
|
|
||||||
* a0 OPTEE_SMC_RETURN_OK
|
|
||||||
- * a1 Upper 32bit of a 64bit Shared memory cookie
|
|
||||||
- * a2 Lower 32bit of a 64bit Shared memory cookie
|
|
||||||
+ * a1 Upper 32 bits of a 64-bit Shared memory cookie
|
|
||||||
+ * a2 Lower 32 bits of a 64-bit Shared memory cookie
|
|
||||||
* a3-7 Preserved
|
|
||||||
*
|
|
||||||
* Cache empty return register usage:
|
|
||||||
@@ -293,6 +294,31 @@ struct optee_smc_disable_shm_cache_result {
|
|
||||||
#define OPTEE_SMC_ENABLE_SHM_CACHE \
|
|
||||||
OPTEE_SMC_FAST_CALL_VAL(OPTEE_SMC_FUNCID_ENABLE_SHM_CACHE)
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * Query OP-TEE about number of supported threads
|
|
||||||
+ *
|
|
||||||
+ * Normal World OS or Hypervisor issues this call to find out how many
|
|
||||||
+ * threads OP-TEE supports. That is how many standard calls can be issued
|
|
||||||
+ * in parallel before OP-TEE will return OPTEE_SMC_RETURN_ETHREAD_LIMIT.
|
|
||||||
+ *
|
|
||||||
+ * Call requests usage:
|
|
||||||
+ * a0 SMC Function ID, OPTEE_SMC_GET_THREAD_COUNT
|
|
||||||
+ * a1-6 Not used
|
|
||||||
+ * a7 Hypervisor Client ID register
|
|
||||||
+ *
|
|
||||||
+ * Normal return register usage:
|
|
||||||
+ * a0 OPTEE_SMC_RETURN_OK
|
|
||||||
+ * a1 Number of threads
|
|
||||||
+ * a2-7 Preserved
|
|
||||||
+ *
|
|
||||||
+ * Error return:
|
|
||||||
+ * a0 OPTEE_SMC_RETURN_UNKNOWN_FUNCTION Requested call is not implemented
|
|
||||||
+ * a1-7 Preserved
|
|
||||||
+ */
|
|
||||||
+#define OPTEE_SMC_FUNCID_GET_THREAD_COUNT 15
|
|
||||||
+#define OPTEE_SMC_GET_THREAD_COUNT \
|
|
||||||
+ OPTEE_SMC_FAST_CALL_VAL(OPTEE_SMC_FUNCID_GET_THREAD_COUNT)
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Resume from RPC (for example after processing a foreign interrupt)
|
|
||||||
*
|
|
||||||
@@ -341,16 +367,16 @@ struct optee_smc_disable_shm_cache_result {
|
|
||||||
*
|
|
||||||
* "Return" register usage:
|
|
||||||
* a0 SMC Function ID, OPTEE_SMC_CALL_RETURN_FROM_RPC.
|
|
||||||
- * a1 Upper 32bits of 64bit physical pointer to allocated
|
|
||||||
+ * a1 Upper 32 bits of 64-bit physical pointer to allocated
|
|
||||||
* memory, (a1 == 0 && a2 == 0) if size was 0 or if memory can't
|
|
||||||
* be allocated.
|
|
||||||
- * a2 Lower 32bits of 64bit physical pointer to allocated
|
|
||||||
+ * a2 Lower 32 bits of 64-bit physical pointer to allocated
|
|
||||||
* memory, (a1 == 0 && a2 == 0) if size was 0 or if memory can't
|
|
||||||
* be allocated
|
|
||||||
* a3 Preserved
|
|
||||||
- * a4 Upper 32bits of 64bit Shared memory cookie used when freeing
|
|
||||||
+ * a4 Upper 32 bits of 64-bit Shared memory cookie used when freeing
|
|
||||||
* the memory or doing an RPC
|
|
||||||
- * a5 Lower 32bits of 64bit Shared memory cookie used when freeing
|
|
||||||
+ * a5 Lower 32 bits of 64-bit Shared memory cookie used when freeing
|
|
||||||
* the memory or doing an RPC
|
|
||||||
* a6-7 Preserved
|
|
||||||
*/
|
|
||||||
@@ -363,9 +389,9 @@ struct optee_smc_disable_shm_cache_result {
|
|
||||||
*
|
|
||||||
* "Call" register usage:
|
|
||||||
* a0 This value, OPTEE_SMC_RETURN_RPC_FREE
|
|
||||||
- * a1 Upper 32bits of 64bit shared memory cookie belonging to this
|
|
||||||
+ * a1 Upper 32 bits of 64-bit shared memory cookie belonging to this
|
|
||||||
* argument memory
|
|
||||||
- * a2 Lower 32bits of 64bit shared memory cookie belonging to this
|
|
||||||
+ * a2 Lower 32 bits of 64-bit shared memory cookie belonging to this
|
|
||||||
* argument memory
|
|
||||||
* a3-7 Resume information, must be preserved
|
|
||||||
*
|
|
||||||
@@ -379,7 +405,7 @@ struct optee_smc_disable_shm_cache_result {
|
|
||||||
OPTEE_SMC_RPC_VAL(OPTEE_SMC_RPC_FUNC_FREE)
|
|
||||||
|
|
||||||
/*
|
|
||||||
- * Deliver foreign interrupt to normal world.
|
|
||||||
+ * Deliver a foreign interrupt in normal world.
|
|
||||||
*
|
|
||||||
* "Call" register usage:
|
|
||||||
* a0 OPTEE_SMC_RETURN_RPC_FOREIGN_INTR
|
|
||||||
@@ -389,7 +415,7 @@ struct optee_smc_disable_shm_cache_result {
|
|
||||||
* a0 SMC Function ID, OPTEE_SMC_CALL_RETURN_FROM_RPC.
|
|
||||||
* a1-7 Preserved
|
|
||||||
*/
|
|
||||||
-#define OPTEE_SMC_RPC_FUNC_FOREIGN_INTR 4
|
|
||||||
+#define OPTEE_SMC_RPC_FUNC_FOREIGN_INTR 4
|
|
||||||
#define OPTEE_SMC_RETURN_RPC_FOREIGN_INTR \
|
|
||||||
OPTEE_SMC_RPC_VAL(OPTEE_SMC_RPC_FUNC_FOREIGN_INTR)
|
|
||||||
|
|
||||||
@@ -405,10 +431,10 @@ struct optee_smc_disable_shm_cache_result {
|
|
||||||
*
|
|
||||||
* "Call" register usage:
|
|
||||||
* a0 OPTEE_SMC_RETURN_RPC_CMD
|
|
||||||
- * a1 Upper 32bit of a 64bit Shared memory cookie holding a
|
|
||||||
+ * a1 Upper 32 bits of a 64-bit Shared memory cookie holding a
|
|
||||||
* struct optee_msg_arg, must be preserved, only the data should
|
|
||||||
* be updated
|
|
||||||
- * a2 Lower 32bit of a 64bit Shared memory cookie holding a
|
|
||||||
+ * a2 Lower 32 bits of a 64-bit Shared memory cookie holding a
|
|
||||||
* struct optee_msg_arg, must be preserved, only the data should
|
|
||||||
* be updated
|
|
||||||
* a3-7 Resume information, must be preserved
|
|
||||||
diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
|
|
||||||
index 6cbb3643c6c4..1849180b0278 100644
|
|
||||||
--- a/drivers/tee/optee/rpc.c
|
|
||||||
+++ b/drivers/tee/optee/rpc.c
|
|
||||||
@@ -12,6 +12,7 @@
|
|
||||||
#include <linux/tee_drv.h>
|
|
||||||
#include "optee_private.h"
|
|
||||||
#include "optee_smc.h"
|
|
||||||
+#include "optee_rpc_cmd.h"
|
|
||||||
|
|
||||||
struct wq_entry {
|
|
||||||
struct list_head link;
|
|
||||||
@@ -90,7 +91,7 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx,
|
|
||||||
if (!adapter)
|
|
||||||
goto bad;
|
|
||||||
|
|
||||||
- if (params[1].u.value.a & OPTEE_MSG_RPC_CMD_I2C_FLAGS_TEN_BIT) {
|
|
||||||
+ if (params[1].u.value.a & OPTEE_RPC_I2C_FLAGS_TEN_BIT) {
|
|
||||||
if (!i2c_check_functionality(adapter,
|
|
||||||
I2C_FUNC_10BIT_ADDR)) {
|
|
||||||
i2c_put_adapter(adapter);
|
|
||||||
@@ -105,10 +106,10 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx,
|
|
||||||
msg.len = params[2].u.memref.size;
|
|
||||||
|
|
||||||
switch (params[0].u.value.a) {
|
|
||||||
- case OPTEE_MSG_RPC_CMD_I2C_TRANSFER_RD:
|
|
||||||
+ case OPTEE_RPC_I2C_TRANSFER_RD:
|
|
||||||
msg.flags |= I2C_M_RD;
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_CMD_I2C_TRANSFER_WR:
|
|
||||||
+ case OPTEE_RPC_I2C_TRANSFER_WR:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
i2c_put_adapter(adapter);
|
|
||||||
@@ -195,10 +196,10 @@ static void handle_rpc_func_cmd_wq(struct optee *optee,
|
|
||||||
goto bad;
|
|
||||||
|
|
||||||
switch (arg->params[0].u.value.a) {
|
|
||||||
- case OPTEE_MSG_RPC_WAIT_QUEUE_SLEEP:
|
|
||||||
+ case OPTEE_RPC_WAIT_QUEUE_SLEEP:
|
|
||||||
wq_sleep(&optee->wait_queue, arg->params[0].u.value.b);
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_WAIT_QUEUE_WAKEUP:
|
|
||||||
+ case OPTEE_RPC_WAIT_QUEUE_WAKEUP:
|
|
||||||
wq_wakeup(&optee->wait_queue, arg->params[0].u.value.b);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
@@ -268,11 +269,11 @@ static struct tee_shm *cmd_alloc_suppl(struct tee_context *ctx, size_t sz)
|
|
||||||
struct tee_shm *shm;
|
|
||||||
|
|
||||||
param.attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT;
|
|
||||||
- param.u.value.a = OPTEE_MSG_RPC_SHM_TYPE_APPL;
|
|
||||||
+ param.u.value.a = OPTEE_RPC_SHM_TYPE_APPL;
|
|
||||||
param.u.value.b = sz;
|
|
||||||
param.u.value.c = 0;
|
|
||||||
|
|
||||||
- ret = optee_supp_thrd_req(ctx, OPTEE_MSG_RPC_CMD_SHM_ALLOC, 1, ¶m);
|
|
||||||
+ ret = optee_supp_thrd_req(ctx, OPTEE_RPC_CMD_SHM_ALLOC, 1, ¶m);
|
|
||||||
if (ret)
|
|
||||||
return ERR_PTR(-ENOMEM);
|
|
||||||
|
|
||||||
@@ -309,10 +310,10 @@ static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
|
|
||||||
|
|
||||||
sz = arg->params[0].u.value.b;
|
|
||||||
switch (arg->params[0].u.value.a) {
|
|
||||||
- case OPTEE_MSG_RPC_SHM_TYPE_APPL:
|
|
||||||
+ case OPTEE_RPC_SHM_TYPE_APPL:
|
|
||||||
shm = cmd_alloc_suppl(ctx, sz);
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_SHM_TYPE_KERNEL:
|
|
||||||
+ case OPTEE_RPC_SHM_TYPE_KERNEL:
|
|
||||||
shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
@@ -384,7 +385,7 @@ static void cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm)
|
|
||||||
struct tee_param param;
|
|
||||||
|
|
||||||
param.attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT;
|
|
||||||
- param.u.value.a = OPTEE_MSG_RPC_SHM_TYPE_APPL;
|
|
||||||
+ param.u.value.a = OPTEE_RPC_SHM_TYPE_APPL;
|
|
||||||
param.u.value.b = tee_shm_get_id(shm);
|
|
||||||
param.u.value.c = 0;
|
|
||||||
|
|
||||||
@@ -401,7 +402,7 @@ static void cmd_free_suppl(struct tee_context *ctx, struct tee_shm *shm)
|
|
||||||
*/
|
|
||||||
tee_shm_put(shm);
|
|
||||||
|
|
||||||
- optee_supp_thrd_req(ctx, OPTEE_MSG_RPC_CMD_SHM_FREE, 1, ¶m);
|
|
||||||
+ optee_supp_thrd_req(ctx, OPTEE_RPC_CMD_SHM_FREE, 1, ¶m);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void handle_rpc_func_cmd_shm_free(struct tee_context *ctx,
|
|
||||||
@@ -419,10 +420,10 @@ static void handle_rpc_func_cmd_shm_free(struct tee_context *ctx,
|
|
||||||
|
|
||||||
shm = (struct tee_shm *)(unsigned long)arg->params[0].u.value.b;
|
|
||||||
switch (arg->params[0].u.value.a) {
|
|
||||||
- case OPTEE_MSG_RPC_SHM_TYPE_APPL:
|
|
||||||
+ case OPTEE_RPC_SHM_TYPE_APPL:
|
|
||||||
cmd_free_suppl(ctx, shm);
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_SHM_TYPE_KERNEL:
|
|
||||||
+ case OPTEE_RPC_SHM_TYPE_KERNEL:
|
|
||||||
tee_shm_free(shm);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
@@ -459,23 +460,23 @@ static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (arg->cmd) {
|
|
||||||
- case OPTEE_MSG_RPC_CMD_GET_TIME:
|
|
||||||
+ case OPTEE_RPC_CMD_GET_TIME:
|
|
||||||
handle_rpc_func_cmd_get_time(arg);
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_CMD_WAIT_QUEUE:
|
|
||||||
+ case OPTEE_RPC_CMD_WAIT_QUEUE:
|
|
||||||
handle_rpc_func_cmd_wq(optee, arg);
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_CMD_SUSPEND:
|
|
||||||
+ case OPTEE_RPC_CMD_SUSPEND:
|
|
||||||
handle_rpc_func_cmd_wait(arg);
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_CMD_SHM_ALLOC:
|
|
||||||
+ case OPTEE_RPC_CMD_SHM_ALLOC:
|
|
||||||
free_pages_list(call_ctx);
|
|
||||||
handle_rpc_func_cmd_shm_alloc(ctx, arg, call_ctx);
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_CMD_SHM_FREE:
|
|
||||||
+ case OPTEE_RPC_CMD_SHM_FREE:
|
|
||||||
handle_rpc_func_cmd_shm_free(ctx, arg);
|
|
||||||
break;
|
|
||||||
- case OPTEE_MSG_RPC_CMD_I2C_TRANSFER:
|
|
||||||
+ case OPTEE_RPC_CMD_I2C_TRANSFER:
|
|
||||||
handle_rpc_func_cmd_i2c_transfer(ctx, arg);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
-131
@@ -1,131 +0,0 @@
|
|||||||
From eafffa586795e3cb485310fbd287322c9c7dc3bb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jens Wiklander <jens.wiklander@linaro.org>
|
|
||||||
Date: Thu, 25 Mar 2021 15:08:52 +0100
|
|
||||||
Subject: [PATCH 18/22] optee: add a FF-A memory pool
|
|
||||||
|
|
||||||
Adds a memory pool to be used when the driver uses FF-A [1] as transport
|
|
||||||
layer.
|
|
||||||
|
|
||||||
[1] https://developer.arm.com/documentation/den0077/latest
|
|
||||||
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
||||||
|
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
|
||||||
---
|
|
||||||
drivers/tee/optee/shm_pool.c | 65 +++++++++++++++++++++++++++++++++---
|
|
||||||
drivers/tee/optee/shm_pool.h | 1 +
|
|
||||||
2 files changed, 61 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/tee/optee/shm_pool.c b/drivers/tee/optee/shm_pool.c
|
|
||||||
index d767eebf30bd..d2116cb39c8b 100644
|
|
||||||
--- a/drivers/tee/optee/shm_pool.c
|
|
||||||
+++ b/drivers/tee/optee/shm_pool.c
|
|
||||||
@@ -12,8 +12,14 @@
|
|
||||||
#include "optee_smc.h"
|
|
||||||
#include "shm_pool.h"
|
|
||||||
|
|
||||||
-static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
|
|
||||||
- struct tee_shm *shm, size_t size)
|
|
||||||
+static int
|
|
||||||
+pool_op_alloc_helper(struct tee_shm_pool_mgr *poolm,
|
|
||||||
+ struct tee_shm *shm, size_t size,
|
|
||||||
+ int (*shm_register)(struct tee_context *ctx,
|
|
||||||
+ struct tee_shm *shm,
|
|
||||||
+ struct page **pages,
|
|
||||||
+ size_t num_pages,
|
|
||||||
+ unsigned long start))
|
|
||||||
{
|
|
||||||
unsigned int order = get_order(size);
|
|
||||||
struct page *page;
|
|
||||||
@@ -27,7 +33,7 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
|
|
||||||
shm->paddr = page_to_phys(page);
|
|
||||||
shm->size = PAGE_SIZE << order;
|
|
||||||
|
|
||||||
- if (shm->flags & TEE_SHM_DMA_BUF) {
|
|
||||||
+ if (shm_register) {
|
|
||||||
unsigned int nr_pages = 1 << order, i;
|
|
||||||
struct page **pages;
|
|
||||||
|
|
||||||
@@ -41,14 +47,23 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
|
|
||||||
}
|
|
||||||
|
|
||||||
shm->flags |= TEE_SHM_REGISTER;
|
|
||||||
- rc = optee_shm_register(shm->ctx, shm, pages, nr_pages,
|
|
||||||
- (unsigned long)shm->kaddr);
|
|
||||||
+ rc = shm_register(shm->ctx, shm, pages, nr_pages,
|
|
||||||
+ (unsigned long)shm->kaddr);
|
|
||||||
kfree(pages);
|
|
||||||
}
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
|
|
||||||
+ struct tee_shm *shm, size_t size)
|
|
||||||
+{
|
|
||||||
+ if (!(shm->flags & TEE_SHM_DMA_BUF))
|
|
||||||
+ return pool_op_alloc_helper(poolm, shm, size, NULL);
|
|
||||||
+
|
|
||||||
+ return pool_op_alloc_helper(poolm, shm, size, optee_shm_register);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void pool_op_free(struct tee_shm_pool_mgr *poolm,
|
|
||||||
struct tee_shm *shm)
|
|
||||||
{
|
|
||||||
@@ -87,3 +102,43 @@ struct tee_shm_pool_mgr *optee_shm_pool_alloc_pages(void)
|
|
||||||
|
|
||||||
return mgr;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+#ifdef CONFIG_ARM_FFA_TRANSPORT
|
|
||||||
+static int pool_ffa_op_alloc(struct tee_shm_pool_mgr *poolm,
|
|
||||||
+ struct tee_shm *shm, size_t size)
|
|
||||||
+{
|
|
||||||
+ return pool_op_alloc_helper(poolm, shm, size, optee_ffa_shm_register);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void pool_ffa_op_free(struct tee_shm_pool_mgr *poolm,
|
|
||||||
+ struct tee_shm *shm)
|
|
||||||
+{
|
|
||||||
+ optee_ffa_shm_unregister(shm->ctx, shm);
|
|
||||||
+ free_pages((unsigned long)shm->kaddr, get_order(shm->size));
|
|
||||||
+ shm->kaddr = NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct tee_shm_pool_mgr_ops pool_ffa_ops = {
|
|
||||||
+ .alloc = pool_ffa_op_alloc,
|
|
||||||
+ .free = pool_ffa_op_free,
|
|
||||||
+ .destroy_poolmgr = pool_op_destroy_poolmgr,
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * optee_ffa_shm_pool_alloc_pages() - create page-based allocator pool
|
|
||||||
+ *
|
|
||||||
+ * This pool is used with OP-TEE over FF-A. In this case command buffers
|
|
||||||
+ * and such are allocated from kernel's own memory.
|
|
||||||
+ */
|
|
||||||
+struct tee_shm_pool_mgr *optee_ffa_shm_pool_alloc_pages(void)
|
|
||||||
+{
|
|
||||||
+ struct tee_shm_pool_mgr *mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
|
|
||||||
+
|
|
||||||
+ if (!mgr)
|
|
||||||
+ return ERR_PTR(-ENOMEM);
|
|
||||||
+
|
|
||||||
+ mgr->ops = &pool_ffa_ops;
|
|
||||||
+
|
|
||||||
+ return mgr;
|
|
||||||
+}
|
|
||||||
+#endif /*CONFIG_ARM_FFA_TRANSPORT*/
|
|
||||||
diff --git a/drivers/tee/optee/shm_pool.h b/drivers/tee/optee/shm_pool.h
|
|
||||||
index 28109d991c4b..34c5fd74a3ff 100644
|
|
||||||
--- a/drivers/tee/optee/shm_pool.h
|
|
||||||
+++ b/drivers/tee/optee/shm_pool.h
|
|
||||||
@@ -10,5 +10,6 @@
|
|
||||||
#include <linux/tee_drv.h>
|
|
||||||
|
|
||||||
struct tee_shm_pool_mgr *optee_shm_pool_alloc_pages(void);
|
|
||||||
+struct tee_shm_pool_mgr *optee_ffa_shm_pool_alloc_pages(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
||||||
-181
@@ -1,181 +0,0 @@
|
|||||||
From 7150eac72ee0c2c7da03f53a90a871c3d6d4e538 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Suzuki K Poulose <suzuki.poulose@arm.com>
|
|
||||||
Date: Tue, 14 Sep 2021 11:26:32 +0100
|
|
||||||
Subject: [PATCH 1/2] coresight: etm4x: Save restore TRFCR_EL1
|
|
||||||
|
|
||||||
When the CPU enters a low power mode, the TRFCR_EL1 contents could be
|
|
||||||
reset. Thus we need to save/restore the TRFCR_EL1 along with the ETM4x
|
|
||||||
registers to allow the tracing.
|
|
||||||
|
|
||||||
The TRFCR related helpers are in a new header file, as we need to use
|
|
||||||
them for TRBE in the later patches.
|
|
||||||
|
|
||||||
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
|
|
||||||
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
|
|
||||||
Cc: Mike Leach <mike.leach@linaro.org>
|
|
||||||
Cc: Leo Yan <leo.yan@linaro.org>
|
|
||||||
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
|
|
||||||
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
|
|
||||||
Link: https://lore.kernel.org/r/20210914102641.1852544-2-suzuki.poulose@arm.com
|
|
||||||
[Fixed cosmetic details]
|
|
||||||
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=937d3f58cacf377cab7c32e475e1ffa91d611dce]
|
|
||||||
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
|
|
||||||
---
|
|
||||||
.../coresight/coresight-etm4x-core.c | 43 +++++++++++++------
|
|
||||||
drivers/hwtracing/coresight/coresight-etm4x.h | 2 +
|
|
||||||
.../coresight/coresight-self-hosted-trace.h | 24 +++++++++++
|
|
||||||
3 files changed, 57 insertions(+), 12 deletions(-)
|
|
||||||
create mode 100644 drivers/hwtracing/coresight/coresight-self-hosted-trace.h
|
|
||||||
|
|
||||||
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
|
|
||||||
index 90827077d2f9..b78080d169f8 100644
|
|
||||||
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
|
|
||||||
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
|
|
||||||
@@ -39,6 +39,7 @@
|
|
||||||
|
|
||||||
#include "coresight-etm4x.h"
|
|
||||||
#include "coresight-etm-perf.h"
|
|
||||||
+#include "coresight-self-hosted-trace.h"
|
|
||||||
|
|
||||||
static int boot_enable;
|
|
||||||
module_param(boot_enable, int, 0444);
|
|
||||||
@@ -990,7 +991,7 @@ static void cpu_enable_tracing(struct etmv4_drvdata *drvdata)
|
|
||||||
if (is_kernel_in_hyp_mode())
|
|
||||||
trfcr |= TRFCR_EL2_CX;
|
|
||||||
|
|
||||||
- write_sysreg_s(trfcr, SYS_TRFCR_EL1);
|
|
||||||
+ write_trfcr(trfcr);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void etm4_init_arch_data(void *info)
|
|
||||||
@@ -1528,7 +1529,7 @@ static void etm4_init_trace_id(struct etmv4_drvdata *drvdata)
|
|
||||||
drvdata->trcid = coresight_get_trace_id(drvdata->cpu);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int etm4_cpu_save(struct etmv4_drvdata *drvdata)
|
|
||||||
+static int __etm4_cpu_save(struct etmv4_drvdata *drvdata)
|
|
||||||
{
|
|
||||||
int i, ret = 0;
|
|
||||||
struct etmv4_save_state *state;
|
|
||||||
@@ -1667,7 +1668,23 @@ static int etm4_cpu_save(struct etmv4_drvdata *drvdata)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void etm4_cpu_restore(struct etmv4_drvdata *drvdata)
|
|
||||||
+static int etm4_cpu_save(struct etmv4_drvdata *drvdata)
|
|
||||||
+{
|
|
||||||
+ int ret = 0;
|
|
||||||
+
|
|
||||||
+ /* Save the TRFCR irrespective of whether the ETM is ON */
|
|
||||||
+ if (drvdata->trfc)
|
|
||||||
+ drvdata->save_trfcr = read_trfcr();
|
|
||||||
+ /*
|
|
||||||
+ * Save and restore the ETM Trace registers only if
|
|
||||||
+ * the ETM is active.
|
|
||||||
+ */
|
|
||||||
+ if (local_read(&drvdata->mode) && drvdata->save_state)
|
|
||||||
+ ret = __etm4_cpu_save(drvdata);
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void __etm4_cpu_restore(struct etmv4_drvdata *drvdata)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
struct etmv4_save_state *state = drvdata->save_state;
|
|
||||||
@@ -1763,6 +1780,14 @@ static void etm4_cpu_restore(struct etmv4_drvdata *drvdata)
|
|
||||||
etm4_cs_lock(drvdata, csa);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void etm4_cpu_restore(struct etmv4_drvdata *drvdata)
|
|
||||||
+{
|
|
||||||
+ if (drvdata->trfc)
|
|
||||||
+ write_trfcr(drvdata->save_trfcr);
|
|
||||||
+ if (drvdata->state_needs_restore)
|
|
||||||
+ __etm4_cpu_restore(drvdata);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int etm4_cpu_pm_notify(struct notifier_block *nb, unsigned long cmd,
|
|
||||||
void *v)
|
|
||||||
{
|
|
||||||
@@ -1774,23 +1799,17 @@ static int etm4_cpu_pm_notify(struct notifier_block *nb, unsigned long cmd,
|
|
||||||
|
|
||||||
drvdata = etmdrvdata[cpu];
|
|
||||||
|
|
||||||
- if (!drvdata->save_state)
|
|
||||||
- return NOTIFY_OK;
|
|
||||||
-
|
|
||||||
if (WARN_ON_ONCE(drvdata->cpu != cpu))
|
|
||||||
return NOTIFY_BAD;
|
|
||||||
|
|
||||||
switch (cmd) {
|
|
||||||
case CPU_PM_ENTER:
|
|
||||||
- /* save the state if self-hosted coresight is in use */
|
|
||||||
- if (local_read(&drvdata->mode))
|
|
||||||
- if (etm4_cpu_save(drvdata))
|
|
||||||
- return NOTIFY_BAD;
|
|
||||||
+ if (etm4_cpu_save(drvdata))
|
|
||||||
+ return NOTIFY_BAD;
|
|
||||||
break;
|
|
||||||
case CPU_PM_EXIT:
|
|
||||||
case CPU_PM_ENTER_FAILED:
|
|
||||||
- if (drvdata->state_needs_restore)
|
|
||||||
- etm4_cpu_restore(drvdata);
|
|
||||||
+ etm4_cpu_restore(drvdata);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return NOTIFY_DONE;
|
|
||||||
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
|
|
||||||
index e5b79bdb9851..82cba16b73a6 100644
|
|
||||||
--- a/drivers/hwtracing/coresight/coresight-etm4x.h
|
|
||||||
+++ b/drivers/hwtracing/coresight/coresight-etm4x.h
|
|
||||||
@@ -921,6 +921,7 @@ struct etmv4_save_state {
|
|
||||||
* @lpoverride: If the implementation can support low-power state over.
|
|
||||||
* @trfc: If the implementation supports Arm v8.4 trace filter controls.
|
|
||||||
* @config: structure holding configuration parameters.
|
|
||||||
+ * @save_trfcr: Saved TRFCR_EL1 register during a CPU PM event.
|
|
||||||
* @save_state: State to be preserved across power loss
|
|
||||||
* @state_needs_restore: True when there is context to restore after PM exit
|
|
||||||
* @skip_power_up: Indicates if an implementation can skip powering up
|
|
||||||
@@ -973,6 +974,7 @@ struct etmv4_drvdata {
|
|
||||||
bool lpoverride;
|
|
||||||
bool trfc;
|
|
||||||
struct etmv4_config config;
|
|
||||||
+ u64 save_trfcr;
|
|
||||||
struct etmv4_save_state *save_state;
|
|
||||||
bool state_needs_restore;
|
|
||||||
bool skip_power_up;
|
|
||||||
diff --git a/drivers/hwtracing/coresight/coresight-self-hosted-trace.h b/drivers/hwtracing/coresight/coresight-self-hosted-trace.h
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..303d71911870
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/drivers/hwtracing/coresight/coresight-self-hosted-trace.h
|
|
||||||
@@ -0,0 +1,24 @@
|
|
||||||
+/* SPDX-License-Identifier: GPL-2.0-only */
|
|
||||||
+/*
|
|
||||||
+ * Arm v8 Self-Hosted trace support.
|
|
||||||
+ *
|
|
||||||
+ * Copyright (C) 2021 ARM Ltd.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef __CORESIGHT_SELF_HOSTED_TRACE_H
|
|
||||||
+#define __CORESIGHT_SELF_HOSTED_TRACE_H
|
|
||||||
+
|
|
||||||
+#include <asm/sysreg.h>
|
|
||||||
+
|
|
||||||
+static inline u64 read_trfcr(void)
|
|
||||||
+{
|
|
||||||
+ return read_sysreg_s(SYS_TRFCR_EL1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static inline void write_trfcr(u64 val)
|
|
||||||
+{
|
|
||||||
+ write_sysreg_s(val, SYS_TRFCR_EL1);
|
|
||||||
+ isb();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#endif /* __CORESIGHT_SELF_HOSTED_TRACE_H */
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
-227
@@ -1,227 +0,0 @@
|
|||||||
From 55228b0522bfb7d945019a8931742ab9b063b6c9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Suzuki K Poulose <suzuki.poulose@arm.com>
|
|
||||||
Date: Tue, 14 Sep 2021 11:26:33 +0100
|
|
||||||
Subject: [PATCH 2/2] coresight: etm4x: Use Trace Filtering controls
|
|
||||||
dynamically
|
|
||||||
|
|
||||||
The Trace Filtering support (FEAT_TRF) ensures that the ETM
|
|
||||||
can be prohibited from generating any trace for a given EL.
|
|
||||||
This is much stricter knob, than the TRCVICTLR exception level
|
|
||||||
masks, which doesn't prevent the ETM from generating Context
|
|
||||||
packets for an "excluded" EL. At the moment, we do a onetime
|
|
||||||
enable trace at user and kernel and leave it untouched for the
|
|
||||||
kernel life time. This implies that the ETM could potentially
|
|
||||||
generate trace packets containing the kernel addresses, and
|
|
||||||
thus leaking the kernel virtual address in the trace.
|
|
||||||
|
|
||||||
This patch makes the switch dynamic, by honoring the filters
|
|
||||||
set by the user and enforcing them in the TRFCR controls.
|
|
||||||
We also rename the cpu_enable_tracing() appropriately to
|
|
||||||
cpu_detect_trace_filtering() and the drvdata member
|
|
||||||
trfc => trfcr to indicate the "value" of the TRFCR_EL1.
|
|
||||||
|
|
||||||
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
|
|
||||||
Cc: Al Grant <al.grant@arm.com>
|
|
||||||
Cc: Mike Leach <mike.leach@linaro.org>
|
|
||||||
Cc: Leo Yan <leo.yan@linaro.org>
|
|
||||||
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
|
|
||||||
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
|
|
||||||
Link: https://lore.kernel.org/r/20210914102641.1852544-3-suzuki.poulose@arm.com
|
|
||||||
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5f6fd1aa8cc147b111af1a833574487a87237dc0]
|
|
||||||
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
|
|
||||||
---
|
|
||||||
.../coresight/coresight-etm4x-core.c | 63 ++++++++++++++-----
|
|
||||||
drivers/hwtracing/coresight/coresight-etm4x.h | 7 ++-
|
|
||||||
.../coresight/coresight-self-hosted-trace.h | 7 +++
|
|
||||||
3 files changed, 59 insertions(+), 18 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c
|
|
||||||
index b78080d169f8..b804d4413b43 100644
|
|
||||||
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
|
|
||||||
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
|
|
||||||
@@ -237,6 +237,45 @@ struct etm4_enable_arg {
|
|
||||||
int rc;
|
|
||||||
};
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * etm4x_prohibit_trace - Prohibit the CPU from tracing at all ELs.
|
|
||||||
+ * When the CPU supports FEAT_TRF, we could move the ETM to a trace
|
|
||||||
+ * prohibited state by filtering the Exception levels via TRFCR_EL1.
|
|
||||||
+ */
|
|
||||||
+static void etm4x_prohibit_trace(struct etmv4_drvdata *drvdata)
|
|
||||||
+{
|
|
||||||
+ /* If the CPU doesn't support FEAT_TRF, nothing to do */
|
|
||||||
+ if (!drvdata->trfcr)
|
|
||||||
+ return;
|
|
||||||
+ cpu_prohibit_trace();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * etm4x_allow_trace - Allow CPU tracing in the respective ELs,
|
|
||||||
+ * as configured by the drvdata->config.mode for the current
|
|
||||||
+ * session. Even though we have TRCVICTLR bits to filter the
|
|
||||||
+ * trace in the ELs, it doesn't prevent the ETM from generating
|
|
||||||
+ * a packet (e.g, TraceInfo) that might contain the addresses from
|
|
||||||
+ * the excluded levels. Thus we use the additional controls provided
|
|
||||||
+ * via the Trace Filtering controls (FEAT_TRF) to make sure no trace
|
|
||||||
+ * is generated for the excluded ELs.
|
|
||||||
+ */
|
|
||||||
+static void etm4x_allow_trace(struct etmv4_drvdata *drvdata)
|
|
||||||
+{
|
|
||||||
+ u64 trfcr = drvdata->trfcr;
|
|
||||||
+
|
|
||||||
+ /* If the CPU doesn't support FEAT_TRF, nothing to do */
|
|
||||||
+ if (!trfcr)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ if (drvdata->config.mode & ETM_MODE_EXCL_KERN)
|
|
||||||
+ trfcr &= ~TRFCR_ELx_ExTRE;
|
|
||||||
+ if (drvdata->config.mode & ETM_MODE_EXCL_USER)
|
|
||||||
+ trfcr &= ~TRFCR_ELx_E0TRE;
|
|
||||||
+
|
|
||||||
+ write_trfcr(trfcr);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
#ifdef CONFIG_ETM4X_IMPDEF_FEATURE
|
|
||||||
|
|
||||||
#define HISI_HIP08_AMBA_ID 0x000b6d01
|
|
||||||
@@ -441,6 +480,7 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata)
|
|
||||||
if (etm4x_is_ete(drvdata))
|
|
||||||
etm4x_relaxed_write32(csa, TRCRSR_TA, TRCRSR);
|
|
||||||
|
|
||||||
+ etm4x_allow_trace(drvdata);
|
|
||||||
/* Enable the trace unit */
|
|
||||||
etm4x_relaxed_write32(csa, 1, TRCPRGCTLR);
|
|
||||||
|
|
||||||
@@ -724,7 +764,6 @@ static int etm4_enable(struct coresight_device *csdev,
|
|
||||||
static void etm4_disable_hw(void *info)
|
|
||||||
{
|
|
||||||
u32 control;
|
|
||||||
- u64 trfcr;
|
|
||||||
struct etmv4_drvdata *drvdata = info;
|
|
||||||
struct etmv4_config *config = &drvdata->config;
|
|
||||||
struct coresight_device *csdev = drvdata->csdev;
|
|
||||||
@@ -751,12 +790,7 @@ static void etm4_disable_hw(void *info)
|
|
||||||
* If the CPU supports v8.4 Trace filter Control,
|
|
||||||
* set the ETM to trace prohibited region.
|
|
||||||
*/
|
|
||||||
- if (drvdata->trfc) {
|
|
||||||
- trfcr = read_sysreg_s(SYS_TRFCR_EL1);
|
|
||||||
- write_sysreg_s(trfcr & ~(TRFCR_ELx_ExTRE | TRFCR_ELx_E0TRE),
|
|
||||||
- SYS_TRFCR_EL1);
|
|
||||||
- isb();
|
|
||||||
- }
|
|
||||||
+ etm4x_prohibit_trace(drvdata);
|
|
||||||
/*
|
|
||||||
* Make sure everything completes before disabling, as recommended
|
|
||||||
* by section 7.3.77 ("TRCVICTLR, ViewInst Main Control Register,
|
|
||||||
@@ -772,9 +806,6 @@ static void etm4_disable_hw(void *info)
|
|
||||||
if (coresight_timeout(csa, TRCSTATR, TRCSTATR_PMSTABLE_BIT, 1))
|
|
||||||
dev_err(etm_dev,
|
|
||||||
"timeout while waiting for PM stable Trace Status\n");
|
|
||||||
- if (drvdata->trfc)
|
|
||||||
- write_sysreg_s(trfcr, SYS_TRFCR_EL1);
|
|
||||||
-
|
|
||||||
/* read the status of the single shot comparators */
|
|
||||||
for (i = 0; i < drvdata->nr_ss_cmp; i++) {
|
|
||||||
config->ss_status[i] =
|
|
||||||
@@ -969,15 +1000,15 @@ static bool etm4_init_csdev_access(struct etmv4_drvdata *drvdata,
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void cpu_enable_tracing(struct etmv4_drvdata *drvdata)
|
|
||||||
+static void cpu_detect_trace_filtering(struct etmv4_drvdata *drvdata)
|
|
||||||
{
|
|
||||||
u64 dfr0 = read_sysreg(id_aa64dfr0_el1);
|
|
||||||
u64 trfcr;
|
|
||||||
|
|
||||||
+ drvdata->trfcr = 0;
|
|
||||||
if (!cpuid_feature_extract_unsigned_field(dfr0, ID_AA64DFR0_TRACE_FILT_SHIFT))
|
|
||||||
return;
|
|
||||||
|
|
||||||
- drvdata->trfc = true;
|
|
||||||
/*
|
|
||||||
* If the CPU supports v8.4 SelfHosted Tracing, enable
|
|
||||||
* tracing at the kernel EL and EL0, forcing to use the
|
|
||||||
@@ -991,7 +1022,7 @@ static void cpu_enable_tracing(struct etmv4_drvdata *drvdata)
|
|
||||||
if (is_kernel_in_hyp_mode())
|
|
||||||
trfcr |= TRFCR_EL2_CX;
|
|
||||||
|
|
||||||
- write_trfcr(trfcr);
|
|
||||||
+ drvdata->trfcr = trfcr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void etm4_init_arch_data(void *info)
|
|
||||||
@@ -1177,7 +1208,7 @@ static void etm4_init_arch_data(void *info)
|
|
||||||
/* NUMCNTR, bits[30:28] number of counters available for tracing */
|
|
||||||
drvdata->nr_cntr = BMVAL(etmidr5, 28, 30);
|
|
||||||
etm4_cs_lock(drvdata, csa);
|
|
||||||
- cpu_enable_tracing(drvdata);
|
|
||||||
+ cpu_detect_trace_filtering(drvdata);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline u32 etm4_get_victlr_access_type(struct etmv4_config *config)
|
|
||||||
@@ -1673,7 +1704,7 @@ static int etm4_cpu_save(struct etmv4_drvdata *drvdata)
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
/* Save the TRFCR irrespective of whether the ETM is ON */
|
|
||||||
- if (drvdata->trfc)
|
|
||||||
+ if (drvdata->trfcr)
|
|
||||||
drvdata->save_trfcr = read_trfcr();
|
|
||||||
/*
|
|
||||||
* Save and restore the ETM Trace registers only if
|
|
||||||
@@ -1782,7 +1813,7 @@ static void __etm4_cpu_restore(struct etmv4_drvdata *drvdata)
|
|
||||||
|
|
||||||
static void etm4_cpu_restore(struct etmv4_drvdata *drvdata)
|
|
||||||
{
|
|
||||||
- if (drvdata->trfc)
|
|
||||||
+ if (drvdata->trfcr)
|
|
||||||
write_trfcr(drvdata->save_trfcr);
|
|
||||||
if (drvdata->state_needs_restore)
|
|
||||||
__etm4_cpu_restore(drvdata);
|
|
||||||
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
|
|
||||||
index 82cba16b73a6..3c4d69b096ca 100644
|
|
||||||
--- a/drivers/hwtracing/coresight/coresight-etm4x.h
|
|
||||||
+++ b/drivers/hwtracing/coresight/coresight-etm4x.h
|
|
||||||
@@ -919,7 +919,10 @@ struct etmv4_save_state {
|
|
||||||
* @nooverflow: Indicate if overflow prevention is supported.
|
|
||||||
* @atbtrig: If the implementation can support ATB triggers
|
|
||||||
* @lpoverride: If the implementation can support low-power state over.
|
|
||||||
- * @trfc: If the implementation supports Arm v8.4 trace filter controls.
|
|
||||||
+ * @trfcr: If the CPU supports FEAT_TRF, value of the TRFCR_ELx that
|
|
||||||
+ * allows tracing at all ELs. We don't want to compute this
|
|
||||||
+ * at runtime, due to the additional setting of TRFCR_CX when
|
|
||||||
+ * in EL2. Otherwise, 0.
|
|
||||||
* @config: structure holding configuration parameters.
|
|
||||||
* @save_trfcr: Saved TRFCR_EL1 register during a CPU PM event.
|
|
||||||
* @save_state: State to be preserved across power loss
|
|
||||||
@@ -972,7 +975,7 @@ struct etmv4_drvdata {
|
|
||||||
bool nooverflow;
|
|
||||||
bool atbtrig;
|
|
||||||
bool lpoverride;
|
|
||||||
- bool trfc;
|
|
||||||
+ u64 trfcr;
|
|
||||||
struct etmv4_config config;
|
|
||||||
u64 save_trfcr;
|
|
||||||
struct etmv4_save_state *save_state;
|
|
||||||
diff --git a/drivers/hwtracing/coresight/coresight-self-hosted-trace.h b/drivers/hwtracing/coresight/coresight-self-hosted-trace.h
|
|
||||||
index 303d71911870..23f05df3f173 100644
|
|
||||||
--- a/drivers/hwtracing/coresight/coresight-self-hosted-trace.h
|
|
||||||
+++ b/drivers/hwtracing/coresight/coresight-self-hosted-trace.h
|
|
||||||
@@ -21,4 +21,11 @@ static inline void write_trfcr(u64 val)
|
|
||||||
isb();
|
|
||||||
}
|
|
||||||
|
|
||||||
+static inline void cpu_prohibit_trace(void)
|
|
||||||
+{
|
|
||||||
+ u64 trfcr = read_trfcr();
|
|
||||||
+
|
|
||||||
+ /* Prohibit tracing at EL0 & the kernel EL */
|
|
||||||
+ write_trfcr(trfcr & ~(TRFCR_ELx_ExTRE | TRFCR_ELx_E0TRE));
|
|
||||||
+}
|
|
||||||
#endif /* __CORESIGHT_SELF_HOSTED_TRACE_H */
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
-74
@@ -1,74 +0,0 @@
|
|||||||
From ad3c5d9224ffcd7b2e083f03441c6188d2bbef67 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Gleixner <tglx@linutronix.de>
|
|
||||||
Date: Tue, 18 May 2021 11:17:28 +0200
|
|
||||||
Subject: [PATCH 01/14] perf/arm-cmn: Use irq_set_affinity()
|
|
||||||
|
|
||||||
The driver uses irq_set_affinity_hint() to set the affinity for the PMU
|
|
||||||
interrupts, which relies on the undocumented side effect that this function
|
|
||||||
actually sets the affinity under the hood.
|
|
||||||
|
|
||||||
Setting an hint is clearly not a guarantee and for these PMU interrupts an
|
|
||||||
affinity hint, which is supposed to guide userspace for setting affinity,
|
|
||||||
is beyond pointless, because the affinity of these interrupts cannot be
|
|
||||||
modified from user space.
|
|
||||||
|
|
||||||
Aside of that the error checks are bogus because the only error which is
|
|
||||||
returned from irq_set_affinity_hint() is when there is no irq descriptor
|
|
||||||
for the interrupt number, but not when the affinity set fails. That's on
|
|
||||||
purpose because the hint can point to an offline CPU.
|
|
||||||
|
|
||||||
Replace the mindless abuse with irq_set_affinity().
|
|
||||||
|
|
||||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
||||||
|
|
||||||
Link: https://lore.kernel.org/r/20210518093118.277228577@linutronix.de
|
|
||||||
Signed-off-by: Will Deacon <will@kernel.org>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://lore.kernel.org/r/20210518093118.277228577@linutronix.de]
|
|
||||||
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|
||||||
---
|
|
||||||
drivers/perf/arm-cmn.c | 9 ++-------
|
|
||||||
1 file changed, 2 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
|
||||||
index 46defb1dcf86..38fa6f89d0bc 100644
|
|
||||||
--- a/drivers/perf/arm-cmn.c
|
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
|
||||||
@@ -1162,7 +1162,7 @@ static int arm_cmn_pmu_offline_cpu(unsigned int cpu, struct hlist_node *node)
|
|
||||||
|
|
||||||
perf_pmu_migrate_context(&cmn->pmu, cpu, target);
|
|
||||||
for (i = 0; i < cmn->num_dtcs; i++)
|
|
||||||
- irq_set_affinity_hint(cmn->dtc[i].irq, cpumask_of(target));
|
|
||||||
+ irq_set_affinity(cmn->dtc[i].irq, cpumask_of(target));
|
|
||||||
cmn->cpu = target;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1222,7 +1222,7 @@ static int arm_cmn_init_irqs(struct arm_cmn *cmn)
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
- err = irq_set_affinity_hint(irq, cpumask_of(cmn->cpu));
|
|
||||||
+ err = irq_set_affinity(irq, cpumask_of(cmn->cpu));
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
next:
|
|
||||||
@@ -1568,16 +1568,11 @@ static int arm_cmn_probe(struct platform_device *pdev)
|
|
||||||
static int arm_cmn_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct arm_cmn *cmn = platform_get_drvdata(pdev);
|
|
||||||
- int i;
|
|
||||||
|
|
||||||
writel_relaxed(0, cmn->dtc[0].base + CMN_DT_DTC_CTL);
|
|
||||||
|
|
||||||
perf_pmu_unregister(&cmn->pmu);
|
|
||||||
cpuhp_state_remove_instance(arm_cmn_hp_state, &cmn->cpuhp_node);
|
|
||||||
-
|
|
||||||
- for (i = 0; i < cmn->num_dtcs; i++)
|
|
||||||
- irq_set_affinity_hint(cmn->dtc[i].irq, NULL);
|
|
||||||
-
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
From 249304c3517a38863c8e45e63d509d01bd67dead Mon Sep 17 00:00:00 2001
|
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
|
||||||
Date: Fri, 3 Dec 2021 11:44:50 +0000
|
|
||||||
Subject: [PATCH 02/14] perf/arm-cmn: Fix CPU hotplug unregistration
|
|
||||||
|
|
||||||
Attempting to migrate the PMU context after we've unregistered the PMU
|
|
||||||
device, or especially if we never successfully registered it in the
|
|
||||||
first place, is a woefully bad idea. It's also fundamentally pointless
|
|
||||||
anyway. Make sure to unregister an instance from the hotplug handler
|
|
||||||
*without* invoking the teardown callback.
|
|
||||||
|
|
||||||
Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver")
|
|
||||||
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://lore.kernel.org/r/2c221d745544774e4b07583b65b5d4d94f7e0fe4.1638530442.git.robin.murphy@arm.com]
|
|
||||||
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|
||||||
---
|
|
||||||
drivers/perf/arm-cmn.c | 5 +++--
|
|
||||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
|
||||||
index 38fa6f89d0bc..fe7f3e945481 100644
|
|
||||||
--- a/drivers/perf/arm-cmn.c
|
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
|
||||||
@@ -1561,7 +1561,8 @@ static int arm_cmn_probe(struct platform_device *pdev)
|
|
||||||
|
|
||||||
err = perf_pmu_register(&cmn->pmu, name, -1);
|
|
||||||
if (err)
|
|
||||||
- cpuhp_state_remove_instance(arm_cmn_hp_state, &cmn->cpuhp_node);
|
|
||||||
+ cpuhp_state_remove_instance_nocalls(arm_cmn_hp_state, &cmn->cpuhp_node);
|
|
||||||
+
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1572,7 +1573,7 @@ static int arm_cmn_remove(struct platform_device *pdev)
|
|
||||||
writel_relaxed(0, cmn->dtc[0].base + CMN_DT_DTC_CTL);
|
|
||||||
|
|
||||||
perf_pmu_unregister(&cmn->pmu);
|
|
||||||
- cpuhp_state_remove_instance(arm_cmn_hp_state, &cmn->cpuhp_node);
|
|
||||||
+ cpuhp_state_remove_instance_nocalls(arm_cmn_hp_state, &cmn->cpuhp_node);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
From c3e137a2231f434f623593b6951c7575d22e1cdb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Junhao He <hejunhao2@hisilicon.com>
|
|
||||||
Date: Tue, 11 May 2021 20:27:33 +0800
|
|
||||||
Subject: [PATCH 07/14] drivers/perf: arm-cmn: Add space after ','
|
|
||||||
|
|
||||||
Fix a warning from checkpatch.pl.
|
|
||||||
|
|
||||||
ERROR: space required after that ',' (ctx:VxV)
|
|
||||||
|
|
||||||
Signed-off-by: Junhao He <hejunhao2@hisilicon.com>
|
|
||||||
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://lore.kernel.org/all/1620736054-58412-4-git-send-email-f.fangjian@huawei.com]
|
|
||||||
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|
||||||
---
|
|
||||||
drivers/perf/arm-cmn.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
|
||||||
index 77ebed7fae08..e9f27f7776a2 100644
|
|
||||||
--- a/drivers/perf/arm-cmn.c
|
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
#define CMN_CI_CHILD_COUNT GENMASK_ULL(15, 0)
|
|
||||||
#define CMN_CI_CHILD_PTR_OFFSET GENMASK_ULL(31, 16)
|
|
||||||
|
|
||||||
-#define CMN_CHILD_NODE_ADDR GENMASK(27,0)
|
|
||||||
+#define CMN_CHILD_NODE_ADDR GENMASK(27, 0)
|
|
||||||
#define CMN_CHILD_NODE_EXTERNAL BIT(31)
|
|
||||||
|
|
||||||
#define CMN_ADDR_NODE_PTR GENMASK(27, 14)
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
+11
-9
@@ -1,7 +1,7 @@
|
|||||||
From 39e6b51150c36dd659b85de0c4339594da389da9 Mon Sep 17 00:00:00 2001
|
From 5c07d2e7bf1634743249178bf2ca2a06779e6e7a Mon Sep 17 00:00:00 2001
|
||||||
From: Tushar Khandelwal <tushar.khandelwal@arm.com>
|
From: Tushar Khandelwal <tushar.khandelwal@arm.com>
|
||||||
Date: Tue, 16 Jun 2020 12:39:06 +0000
|
Date: Tue, 16 Jun 2020 12:39:06 +0000
|
||||||
Subject: [PATCH 01/22] drm: Add component-aware simple encoder
|
Subject: [PATCH 01/40] drm: Add component-aware simple encoder
|
||||||
|
|
||||||
This is a simple DRM encoder that gets its connector timings information
|
This is a simple DRM encoder that gets its connector timings information
|
||||||
from a OF subnode in the device tree and exposes that as a "discovered"
|
from a OF subnode in the device tree and exposes that as a "discovered"
|
||||||
@@ -13,6 +13,8 @@ Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
|
|||||||
|
|
||||||
Upstream-Status: Backport [https://git.linaro.org/landing-teams/working/arm/kernel-release.git/commit/?h=latest-armlt&id=15283f7be4b1e586702551e85b4caf06531ac2fc]
|
Upstream-Status: Backport [https://git.linaro.org/landing-teams/working/arm/kernel-release.git/commit/?h=latest-armlt&id=15283f7be4b1e586702551e85b4caf06531ac2fc]
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Change-Id: Ic68cbba7da7d36ee23359ff53bf30eb44cb78661
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
drivers/gpu/drm/Kconfig | 11 +
|
drivers/gpu/drm/Kconfig | 11 +
|
||||||
drivers/gpu/drm/Makefile | 2 +
|
drivers/gpu/drm/Makefile | 2 +
|
||||||
@@ -21,10 +23,10 @@ Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
|||||||
create mode 100644 drivers/gpu/drm/drm_virtual_encoder.c
|
create mode 100644 drivers/gpu/drm/drm_virtual_encoder.c
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
|
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
|
||||||
index ca868271f4c4..6ae8ba3ca7b3 100644
|
index cea777ae7fb9..2468ec7155ef 100644
|
||||||
--- a/drivers/gpu/drm/Kconfig
|
--- a/drivers/gpu/drm/Kconfig
|
||||||
+++ b/drivers/gpu/drm/Kconfig
|
+++ b/drivers/gpu/drm/Kconfig
|
||||||
@@ -300,6 +300,17 @@ config DRM_VKMS
|
@@ -291,6 +291,17 @@ config DRM_VKMS
|
||||||
|
|
||||||
If M is selected the module will be called vkms.
|
If M is selected the module will be called vkms.
|
||||||
|
|
||||||
@@ -43,10 +45,10 @@ index ca868271f4c4..6ae8ba3ca7b3 100644
|
|||||||
|
|
||||||
source "drivers/gpu/drm/rockchip/Kconfig"
|
source "drivers/gpu/drm/rockchip/Kconfig"
|
||||||
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
|
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
|
||||||
index 81569009f884..a3429152c613 100644
|
index ad1112154898..361999b7d063 100644
|
||||||
--- a/drivers/gpu/drm/Makefile
|
--- a/drivers/gpu/drm/Makefile
|
||||||
+++ b/drivers/gpu/drm/Makefile
|
+++ b/drivers/gpu/drm/Makefile
|
||||||
@@ -56,6 +56,8 @@ drm_kms_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o
|
@@ -59,6 +59,8 @@ drm_kms_helper-$(CONFIG_DRM_DP_CEC) += drm_dp_cec.o
|
||||||
|
|
||||||
obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
|
obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
|
||||||
obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/
|
obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/
|
||||||
@@ -57,7 +59,7 @@ index 81569009f884..a3429152c613 100644
|
|||||||
obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
|
obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
|
||||||
diff --git a/drivers/gpu/drm/drm_virtual_encoder.c b/drivers/gpu/drm/drm_virtual_encoder.c
|
diff --git a/drivers/gpu/drm/drm_virtual_encoder.c b/drivers/gpu/drm/drm_virtual_encoder.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..2f65c6b47d00
|
index 000000000000..39a902ecfe32
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/gpu/drm/drm_virtual_encoder.c
|
+++ b/drivers/gpu/drm/drm_virtual_encoder.c
|
||||||
@@ -0,0 +1,299 @@
|
@@ -0,0 +1,299 @@
|
||||||
@@ -167,7 +169,7 @@ index 000000000000..2f65c6b47d00
|
|||||||
+
|
+
|
||||||
+struct drm_encoder *
|
+struct drm_encoder *
|
||||||
+drm_virtcon_atomic_best_encoder(struct drm_connector *connector,
|
+drm_virtcon_atomic_best_encoder(struct drm_connector *connector,
|
||||||
+ struct drm_connector_state *connector_state)
|
+ struct drm_atomic_state *state)
|
||||||
+{
|
+{
|
||||||
+ struct drm_virt_priv *priv = connector_to_drm_virt_priv(connector);
|
+ struct drm_virt_priv *priv = connector_to_drm_virt_priv(connector);
|
||||||
+
|
+
|
||||||
@@ -361,5 +363,5 @@ index 000000000000..2f65c6b47d00
|
|||||||
+MODULE_DESCRIPTION("Virtual DRM Encoder");
|
+MODULE_DESCRIPTION("Virtual DRM Encoder");
|
||||||
+MODULE_LICENSE("GPL v2");
|
+MODULE_LICENSE("GPL v2");
|
||||||
--
|
--
|
||||||
2.17.1
|
2.34.1
|
||||||
|
|
||||||
+115
@@ -0,0 +1,115 @@
|
|||||||
|
From 3bfadb22e58bdf7691f80f403dd85794f2b86ad6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Liviu Dudau <liviu.dudau@arm.com>
|
||||||
|
Date: Fri, 8 Jul 2022 16:39:21 +0100
|
||||||
|
Subject: [PATCH] drm/komeda: Fix handling of atomic commits in the
|
||||||
|
atomic_commit_tail hook
|
||||||
|
|
||||||
|
Komeda driver relies on the generic DRM atomic helper functions to handle
|
||||||
|
commits. It only implements an atomic_commit_tail hook for the
|
||||||
|
mode_config_helper_funcs and even that one is pretty close to the generic
|
||||||
|
implementation with the exception of additional dma_fence signalling.
|
||||||
|
|
||||||
|
What the generic helper framework doesn't do is waiting for the actual
|
||||||
|
hardware to signal that the commit parameters have been written into the
|
||||||
|
appropriate registers. As we signal CRTC events only on the irq handlers,
|
||||||
|
we need to flush the configuration and wait for the hardware to respond.
|
||||||
|
|
||||||
|
Add the Komeda specific implementation for atomic_commit_hw_done() that
|
||||||
|
flushes and waits for flip done before calling drm_atomic_helper_commit_hw_done().
|
||||||
|
|
||||||
|
The fix was prompted by a patch from Carsten Haitzler where he was trying to
|
||||||
|
solve the same issue but in a different way that I think can lead to wrong
|
||||||
|
event signaling to userspace.
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://patchwork.freedesktop.org/patch/msgid/20220722122139.288486-1-liviu.dudau@arm.com]
|
||||||
|
Reported-by: Carsten Haitzler <carsten.haitzler@arm.com>
|
||||||
|
Tested-by: Carsten Haitzler <carsten.haitzler@arm.com>
|
||||||
|
Reviewed-by: Carsten Haitzler <carsten.haitzler@arm.com>
|
||||||
|
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
|
||||||
|
Link: https://patchwork.freedesktop.org/patch/msgid/20220722122139.288486-1-liviu.dudau@arm.com
|
||||||
|
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
|
||||||
|
Change-Id: I0bd92150120eb929692c1d38c4d1077d38401cdd
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
|
---
|
||||||
|
.../gpu/drm/arm/display/komeda/komeda_crtc.c | 4 ++--
|
||||||
|
.../gpu/drm/arm/display/komeda/komeda_kms.c | 21 ++++++++++++++++++-
|
||||||
|
.../gpu/drm/arm/display/komeda/komeda_kms.h | 2 ++
|
||||||
|
3 files changed, 24 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
|
||||||
|
index 59172acb9738..292f533d8cf0 100644
|
||||||
|
--- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
|
||||||
|
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
|
||||||
|
@@ -235,7 +235,7 @@ void komeda_crtc_handle_event(struct komeda_crtc *kcrtc,
|
||||||
|
crtc->state->event = NULL;
|
||||||
|
drm_crtc_send_vblank_event(crtc, event);
|
||||||
|
} else {
|
||||||
|
- DRM_WARN("CRTC[%d]: FLIP happen but no pending commit.\n",
|
||||||
|
+ DRM_WARN("CRTC[%d]: FLIP happened but no pending commit.\n",
|
||||||
|
drm_crtc_index(&kcrtc->base));
|
||||||
|
}
|
||||||
|
spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
|
||||||
|
@@ -286,7 +286,7 @@ komeda_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||||
|
komeda_crtc_do_flush(crtc, old);
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void
|
||||||
|
+void
|
||||||
|
komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc,
|
||||||
|
struct completion *input_flip_done)
|
||||||
|
{
|
||||||
|
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
||||||
|
index 8b2be8a9a27d..c434fb43d82c 100644
|
||||||
|
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
||||||
|
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
||||||
|
@@ -69,6 +69,25 @@ static const struct drm_driver komeda_kms_driver = {
|
||||||
|
.minor = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
+static void komeda_kms_atomic_commit_hw_done(struct drm_atomic_state *state)
|
||||||
|
+{
|
||||||
|
+ struct drm_device *dev = state->dev;
|
||||||
|
+ struct komeda_kms_dev *kms = to_kdev(dev);
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < kms->n_crtcs; i++) {
|
||||||
|
+ struct komeda_crtc *kcrtc = &kms->crtcs[i];
|
||||||
|
+
|
||||||
|
+ if (kcrtc->base.state->active) {
|
||||||
|
+ struct completion *flip_done = NULL;
|
||||||
|
+ if (kcrtc->base.state->event)
|
||||||
|
+ flip_done = kcrtc->base.state->event->base.completion;
|
||||||
|
+ komeda_crtc_flush_and_wait_for_flip_done(kcrtc, flip_done);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ drm_atomic_helper_commit_hw_done(state);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void komeda_kms_commit_tail(struct drm_atomic_state *old_state)
|
||||||
|
{
|
||||||
|
struct drm_device *dev = old_state->dev;
|
||||||
|
@@ -81,7 +100,7 @@ static void komeda_kms_commit_tail(struct drm_atomic_state *old_state)
|
||||||
|
|
||||||
|
drm_atomic_helper_commit_modeset_enables(dev, old_state);
|
||||||
|
|
||||||
|
- drm_atomic_helper_commit_hw_done(old_state);
|
||||||
|
+ komeda_kms_atomic_commit_hw_done(old_state);
|
||||||
|
|
||||||
|
drm_atomic_helper_wait_for_flip_done(dev, old_state);
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
|
||||||
|
index 456f3c435719..bf6e8fba5061 100644
|
||||||
|
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
|
||||||
|
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.h
|
||||||
|
@@ -182,6 +182,8 @@ void komeda_kms_cleanup_private_objs(struct komeda_kms_dev *kms);
|
||||||
|
|
||||||
|
void komeda_crtc_handle_event(struct komeda_crtc *kcrtc,
|
||||||
|
struct komeda_events *evts);
|
||||||
|
+void komeda_crtc_flush_and_wait_for_flip_done(struct komeda_crtc *kcrtc,
|
||||||
|
+ struct completion *input_flip_done);
|
||||||
|
|
||||||
|
struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev);
|
||||||
|
void komeda_kms_detach(struct komeda_kms_dev *kms);
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
+7
-6
@@ -1,7 +1,7 @@
|
|||||||
From 1b2c200673b4a08324f3a6575b30bd16030ed586 Mon Sep 17 00:00:00 2001
|
From 97bdf703e47606d15cd04f1aa5490bcaed842ae3 Mon Sep 17 00:00:00 2001
|
||||||
From: Tushar Khandelwal <tushar.khandelwal@arm.com>
|
From: Tushar Khandelwal <tushar.khandelwal@arm.com>
|
||||||
Date: Wed, 17 Jun 2020 10:49:26 +0000
|
Date: Wed, 17 Jun 2020 10:49:26 +0000
|
||||||
Subject: [PATCH 02/22] drm: arm: komeda: add RENDER capability to the device
|
Subject: [PATCH 02/40] drm: arm: komeda: add RENDER capability to the device
|
||||||
node
|
node
|
||||||
|
|
||||||
this is required to make this driver work with android framework
|
this is required to make this driver work with android framework
|
||||||
@@ -10,23 +10,24 @@ Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
|
|||||||
|
|
||||||
Upstream-Status: Inappropriate [Product specific configuration]
|
Upstream-Status: Inappropriate [Product specific configuration]
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 2 +-
|
drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
||||||
index 1f6682032ca4..9d1a1942e673 100644
|
index 93b7f09b96ca..8b2be8a9a27d 100644
|
||||||
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
--- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
||||||
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c
|
||||||
@@ -59,7 +59,7 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data)
|
@@ -58,7 +58,7 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct drm_driver komeda_kms_driver = {
|
static const struct drm_driver komeda_kms_driver = {
|
||||||
- .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
|
- .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
|
||||||
+ .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | DRIVER_RENDER,
|
+ .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | DRIVER_RENDER,
|
||||||
.lastclose = drm_fb_helper_lastclose,
|
.lastclose = drm_fb_helper_lastclose,
|
||||||
DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(komeda_gem_cma_dumb_create),
|
DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(komeda_gem_cma_dumb_create),
|
||||||
.fops = &komeda_cma_fops,
|
.fops = &komeda_cma_fops,
|
||||||
--
|
--
|
||||||
2.17.1
|
2.34.1
|
||||||
|
|
||||||
+6
-5
@@ -1,21 +1,22 @@
|
|||||||
From 4d0a8147477699d40a02f121e7c72b21547273cf Mon Sep 17 00:00:00 2001
|
From 6b9cf2d89db4fc10b930b8d8f8fce3a0d00fecf8 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Thu, 13 Jan 2022 20:14:25 +0000
|
Date: Thu, 13 Jan 2022 20:14:25 +0000
|
||||||
Subject: [PATCH 19/32] firmware: arm_ffa: Fix uuid argument passed to
|
Subject: [PATCH 03/40] firmware: arm_ffa: Fix uuid argument passed to
|
||||||
ffa_partition_probe
|
ffa_partition_probe
|
||||||
|
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Ib2749ec3e02da5bb6d835f7dbf2d608c41fad1f2
|
Change-Id: Ib2749ec3e02da5bb6d835f7dbf2d608c41fad1f2
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
drivers/firmware/arm_ffa/driver.c | 2 +-
|
drivers/firmware/arm_ffa/driver.c | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
|
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
|
||||||
index 14f900047ac0..8fa1785afd42 100644
|
index fc6d3b9bd472..d3d53fbd3d29 100644
|
||||||
--- a/drivers/firmware/arm_ffa/driver.c
|
--- a/drivers/firmware/arm_ffa/driver.c
|
||||||
+++ b/drivers/firmware/arm_ffa/driver.c
|
+++ b/drivers/firmware/arm_ffa/driver.c
|
||||||
@@ -582,7 +582,7 @@ static int ffa_partition_info_get(const char *uuid_str,
|
@@ -501,7 +501,7 @@ static int ffa_partition_info_get(const char *uuid_str,
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,5 +26,5 @@ index 14f900047ac0..8fa1785afd42 100644
|
|||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+6
-5
@@ -1,20 +1,21 @@
|
|||||||
From 9acd4425667e240603ec196d8b64b2b25879805e Mon Sep 17 00:00:00 2001
|
From 9fe23341c66deefb1f953d7ca642f928d8a50c6e Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Thu, 13 Jan 2022 22:22:28 +0000
|
Date: Thu, 13 Jan 2022 22:22:28 +0000
|
||||||
Subject: [PATCH 20/32] firmware: arm_ffa: Add ffa_dev_get_drvdata
|
Subject: [PATCH 04/40] firmware: arm_ffa: Add ffa_dev_get_drvdata
|
||||||
|
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Icd09d686cab9922563b1deda5276307ea5d94923
|
Change-Id: Icd09d686cab9922563b1deda5276307ea5d94923
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
include/linux/arm_ffa.h | 7 ++++++-
|
include/linux/arm_ffa.h | 7 ++++++-
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
|
diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
|
||||||
index 85651e41ded8..e5c76c1ef9ed 100644
|
index f0cb5b72b87b..06dc83d38779 100644
|
||||||
--- a/include/linux/arm_ffa.h
|
--- a/include/linux/arm_ffa.h
|
||||||
+++ b/include/linux/arm_ffa.h
|
+++ b/include/linux/arm_ffa.h
|
||||||
@@ -38,7 +38,12 @@ struct ffa_driver {
|
@@ -129,7 +129,12 @@ struct ffa_driver {
|
||||||
|
|
||||||
static inline void ffa_dev_set_drvdata(struct ffa_device *fdev, void *data)
|
static inline void ffa_dev_set_drvdata(struct ffa_device *fdev, void *data)
|
||||||
{
|
{
|
||||||
@@ -29,5 +30,5 @@ index 85651e41ded8..e5c76c1ef9ed 100644
|
|||||||
|
|
||||||
#if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
|
#if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+6
-5
@@ -1,22 +1,23 @@
|
|||||||
From 7a9298916fe892ddac5fe4e0a13a566b1636f542 Mon Sep 17 00:00:00 2001
|
From 53e29fa837f36f3a699f7ada50dd08e43028a9c7 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Thu, 13 Jan 2022 22:23:52 +0000
|
Date: Thu, 13 Jan 2022 22:23:52 +0000
|
||||||
Subject: [PATCH 21/32] firmware: arm_ffa: extern ffa_bus_type
|
Subject: [PATCH 05/40] firmware: arm_ffa: extern ffa_bus_type
|
||||||
|
|
||||||
extern ffa_bus_type so that SP driver can use it in bus_find_device call.
|
extern ffa_bus_type so that SP driver can use it in bus_find_device call.
|
||||||
|
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Ib7a6a563aa35627a545f82c796816a5f72c80d70
|
Change-Id: Ib7a6a563aa35627a545f82c796816a5f72c80d70
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
include/linux/arm_ffa.h | 2 ++
|
include/linux/arm_ffa.h | 2 ++
|
||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
|
diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
|
||||||
index e5c76c1ef9ed..4eb7e03ca560 100644
|
index 06dc83d38779..d5c0a0c37fbe 100644
|
||||||
--- a/include/linux/arm_ffa.h
|
--- a/include/linux/arm_ffa.h
|
||||||
+++ b/include/linux/arm_ffa.h
|
+++ b/include/linux/arm_ffa.h
|
||||||
@@ -88,6 +88,8 @@ const struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev)
|
@@ -179,6 +179,8 @@ const struct ffa_dev_ops *ffa_dev_ops_get(struct ffa_device *dev)
|
||||||
#define ffa_unregister(driver) \
|
#define ffa_unregister(driver) \
|
||||||
ffa_driver_unregister(driver)
|
ffa_driver_unregister(driver)
|
||||||
|
|
||||||
@@ -26,5 +27,5 @@ index e5c76c1ef9ed..4eb7e03ca560 100644
|
|||||||
* module_ffa_driver() - Helper macro for registering a psa_ffa driver
|
* module_ffa_driver() - Helper macro for registering a psa_ffa driver
|
||||||
* @__ffa_driver: ffa_driver structure
|
* @__ffa_driver: ffa_driver structure
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+7
-6
@@ -1,7 +1,7 @@
|
|||||||
From e0b9971db819fb9ed9b08a5d3f6f2a4565e92a1a Mon Sep 17 00:00:00 2001
|
From 47cd54d908380de17d84a852625ef3a1ff92f496 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Fri, 14 Jan 2022 12:23:04 +0000
|
Date: Fri, 14 Jan 2022 12:23:04 +0000
|
||||||
Subject: [PATCH 22/32] firmware: arm_ffa: Fix FFA_MEM_SHARE and
|
Subject: [PATCH 06/40] firmware: arm_ffa: Fix FFA_MEM_SHARE and
|
||||||
FFA_MEM_FRAG_TX
|
FFA_MEM_FRAG_TX
|
||||||
|
|
||||||
FFA memory share on success might return FFA_MEM_FRAG_RX. In that case
|
FFA memory share on success might return FFA_MEM_FRAG_RX. In that case
|
||||||
@@ -13,15 +13,16 @@ check for this return code.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: I7ef44742d53a9e75d8587d1213be98a1352f16d4
|
Change-Id: I7ef44742d53a9e75d8587d1213be98a1352f16d4
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
drivers/firmware/arm_ffa/driver.c | 12 ++++++++----
|
drivers/firmware/arm_ffa/driver.c | 12 ++++++++----
|
||||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
|
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
|
||||||
index 8fa1785afd42..a3b1df6d7f3c 100644
|
index d3d53fbd3d29..de6641912768 100644
|
||||||
--- a/drivers/firmware/arm_ffa/driver.c
|
--- a/drivers/firmware/arm_ffa/driver.c
|
||||||
+++ b/drivers/firmware/arm_ffa/driver.c
|
+++ b/drivers/firmware/arm_ffa/driver.c
|
||||||
@@ -398,11 +398,15 @@ static int ffa_mem_first_frag(u32 func_id, phys_addr_t buf, u32 buf_sz,
|
@@ -317,11 +317,15 @@ static int ffa_mem_first_frag(u32 func_id, phys_addr_t buf, u32 buf_sz,
|
||||||
if (ret.a0 == FFA_ERROR)
|
if (ret.a0 == FFA_ERROR)
|
||||||
return ffa_to_linux_errno((int)ret.a2);
|
return ffa_to_linux_errno((int)ret.a2);
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ index 8fa1785afd42..a3b1df6d7f3c 100644
|
|||||||
|
|
||||||
return frag_len;
|
return frag_len;
|
||||||
}
|
}
|
||||||
@@ -426,7 +430,7 @@ static int ffa_mem_next_frag(u64 handle, u32 frag_len)
|
@@ -345,7 +349,7 @@ static int ffa_mem_next_frag(u64 handle, u32 frag_len)
|
||||||
if (ret.a0 == FFA_ERROR)
|
if (ret.a0 == FFA_ERROR)
|
||||||
return ffa_to_linux_errno((int)ret.a2);
|
return ffa_to_linux_errno((int)ret.a2);
|
||||||
|
|
||||||
@@ -50,5 +51,5 @@ index 8fa1785afd42..a3b1df6d7f3c 100644
|
|||||||
|
|
||||||
return ret.a3;
|
return ret.a3;
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+111
@@ -0,0 +1,111 @@
|
|||||||
|
From 96e0bd88e2fb4fcb1625240ef36bccf0383633f6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Date: Tue, 17 May 2022 16:53:56 +0100
|
||||||
|
Subject: [PATCH 07/40] Revert "optee: use driver internal tee_context for some
|
||||||
|
rpc"
|
||||||
|
|
||||||
|
This reverts commit 2922aff4339712ef004451715e94bdbd55fe38ed.
|
||||||
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
|
---
|
||||||
|
drivers/tee/optee/core.c | 8 --------
|
||||||
|
drivers/tee/optee/optee_private.h | 2 --
|
||||||
|
drivers/tee/optee/rpc.c | 8 +++-----
|
||||||
|
3 files changed, 3 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
|
||||||
|
index 50c0d839fe75..5363ebebfc35 100644
|
||||||
|
--- a/drivers/tee/optee/core.c
|
||||||
|
+++ b/drivers/tee/optee/core.c
|
||||||
|
@@ -588,7 +588,6 @@ static int optee_remove(struct platform_device *pdev)
|
||||||
|
/* Unregister OP-TEE specific client devices on TEE bus */
|
||||||
|
optee_unregister_devices();
|
||||||
|
|
||||||
|
- teedev_close_context(optee->ctx);
|
||||||
|
/*
|
||||||
|
* Ask OP-TEE to free all cached shared memory objects to decrease
|
||||||
|
* reference counters and also avoid wild pointers in secure world
|
||||||
|
@@ -634,7 +633,6 @@ static int optee_probe(struct platform_device *pdev)
|
||||||
|
struct optee *optee = NULL;
|
||||||
|
void *memremaped_shm = NULL;
|
||||||
|
struct tee_device *teedev;
|
||||||
|
- struct tee_context *ctx;
|
||||||
|
u32 sec_caps;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
@@ -721,12 +719,6 @@ static int optee_probe(struct platform_device *pdev)
|
||||||
|
optee_supp_init(&optee->supp);
|
||||||
|
optee->memremaped_shm = memremaped_shm;
|
||||||
|
optee->pool = pool;
|
||||||
|
- ctx = teedev_open(optee->teedev);
|
||||||
|
- if (IS_ERR(ctx)) {
|
||||||
|
- rc = PTR_ERR(ctx);
|
||||||
|
- goto err;
|
||||||
|
- }
|
||||||
|
- optee->ctx = ctx;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ensure that there are no pre-existing shm objects before enabling
|
||||||
|
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
|
||||||
|
index ea09533e30cd..f6bb4a763ba9 100644
|
||||||
|
--- a/drivers/tee/optee/optee_private.h
|
||||||
|
+++ b/drivers/tee/optee/optee_private.h
|
||||||
|
@@ -70,7 +70,6 @@ struct optee_supp {
|
||||||
|
* struct optee - main service struct
|
||||||
|
* @supp_teedev: supplicant device
|
||||||
|
* @teedev: client device
|
||||||
|
- * @ctx: driver internal TEE context
|
||||||
|
* @invoke_fn: function to issue smc or hvc
|
||||||
|
* @call_queue: queue of threads waiting to call @invoke_fn
|
||||||
|
* @wait_queue: queue of threads from secure world waiting for a
|
||||||
|
@@ -88,7 +87,6 @@ struct optee {
|
||||||
|
struct tee_device *supp_teedev;
|
||||||
|
struct tee_device *teedev;
|
||||||
|
optee_invoke_fn *invoke_fn;
|
||||||
|
- struct tee_context *ctx;
|
||||||
|
struct optee_call_queue call_queue;
|
||||||
|
struct optee_wait_queue wait_queue;
|
||||||
|
struct optee_supp supp;
|
||||||
|
diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
|
||||||
|
index 456833d82007..efbaff7ad7e5 100644
|
||||||
|
--- a/drivers/tee/optee/rpc.c
|
||||||
|
+++ b/drivers/tee/optee/rpc.c
|
||||||
|
@@ -285,7 +285,6 @@ static struct tee_shm *cmd_alloc_suppl(struct tee_context *ctx, size_t sz)
|
||||||
|
}
|
||||||
|
|
||||||
|
static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
|
||||||
|
- struct optee *optee,
|
||||||
|
struct optee_msg_arg *arg,
|
||||||
|
struct optee_call_ctx *call_ctx)
|
||||||
|
{
|
||||||
|
@@ -315,8 +314,7 @@ static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
|
||||||
|
shm = cmd_alloc_suppl(ctx, sz);
|
||||||
|
break;
|
||||||
|
case OPTEE_RPC_SHM_TYPE_KERNEL:
|
||||||
|
- shm = tee_shm_alloc(optee->ctx, sz,
|
||||||
|
- TEE_SHM_MAPPED | TEE_SHM_PRIV);
|
||||||
|
+ shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED | TEE_SHM_PRIV);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
|
||||||
|
@@ -473,7 +471,7 @@ static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,
|
||||||
|
break;
|
||||||
|
case OPTEE_RPC_CMD_SHM_ALLOC:
|
||||||
|
free_pages_list(call_ctx);
|
||||||
|
- handle_rpc_func_cmd_shm_alloc(ctx, optee, arg, call_ctx);
|
||||||
|
+ handle_rpc_func_cmd_shm_alloc(ctx, arg, call_ctx);
|
||||||
|
break;
|
||||||
|
case OPTEE_RPC_CMD_SHM_FREE:
|
||||||
|
handle_rpc_func_cmd_shm_free(ctx, arg);
|
||||||
|
@@ -504,7 +502,7 @@ void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,
|
||||||
|
|
||||||
|
switch (OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0)) {
|
||||||
|
case OPTEE_SMC_RPC_FUNC_ALLOC:
|
||||||
|
- shm = tee_shm_alloc(optee->ctx, param->a1,
|
||||||
|
+ shm = tee_shm_alloc(ctx, param->a1,
|
||||||
|
TEE_SHM_MAPPED | TEE_SHM_PRIV);
|
||||||
|
if (!IS_ERR(shm) && !tee_shm_get_pa(shm, 0, &pa)) {
|
||||||
|
reg_pair_from_64(¶m->a1, ¶m->a2, pa);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+10
-9
@@ -1,26 +1,27 @@
|
|||||||
From 812d2a649a9cc2a0004cbde2b3e411b46ec84af4 Mon Sep 17 00:00:00 2001
|
From 04f76b1e265b37ab8a3acf4bbf64d1efd69a6c73 Mon Sep 17 00:00:00 2001
|
||||||
From: Jens Wiklander <jens.wiklander@linaro.org>
|
From: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
Date: Thu, 25 Mar 2021 15:08:44 +0100
|
Date: Thu, 25 Mar 2021 15:08:44 +0100
|
||||||
Subject: [PATCH 14/22] tee: add sec_world_id to struct tee_shm
|
Subject: [PATCH 08/40] tee: add sec_world_id to struct tee_shm
|
||||||
|
|
||||||
Adds sec_world_id to struct tee_shm which describes a shared memory
|
Adds sec_world_id to struct tee_shm which describes a shared memory
|
||||||
object. sec_world_id can be used by a driver to store an id assigned by
|
object. sec_world_id can be used by a driver to store an id assigned by
|
||||||
secure world.
|
secure world.
|
||||||
|
|
||||||
|
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
|
||||||
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
|
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
include/linux/tee_drv.h | 7 ++++++-
|
include/linux/tee_drv.h | 7 ++++++-
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h
|
diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h
|
||||||
index cdd049a724b1..93d836fded8b 100644
|
index 38b701b7af4c..5e1533ee3785 100644
|
||||||
--- a/include/linux/tee_drv.h
|
--- a/include/linux/tee_drv.h
|
||||||
+++ b/include/linux/tee_drv.h
|
+++ b/include/linux/tee_drv.h
|
||||||
@@ -196,7 +196,11 @@ int tee_session_calc_client_uuid(uuid_t *uuid, u32 connection_method,
|
@@ -197,7 +197,11 @@ int tee_session_calc_client_uuid(uuid_t *uuid, u32 connection_method,
|
||||||
* @num_pages: number of locked pages
|
* @num_pages: number of locked pages
|
||||||
* @dmabuf: dmabuf used to for exporting to user space
|
* @refcount: reference counter
|
||||||
* @flags: defined by TEE_SHM_* in tee_drv.h
|
* @flags: defined by TEE_SHM_* in tee_drv.h
|
||||||
- * @id: unique id of a shared memory object on this device
|
- * @id: unique id of a shared memory object on this device
|
||||||
+ * @id: unique id of a shared memory object on this device, shared
|
+ * @id: unique id of a shared memory object on this device, shared
|
||||||
@@ -31,8 +32,8 @@ index cdd049a724b1..93d836fded8b 100644
|
|||||||
*
|
*
|
||||||
* This pool is only supposed to be accessed directly from the TEE
|
* This pool is only supposed to be accessed directly from the TEE
|
||||||
* subsystem and from drivers that implements their own shm pool manager.
|
* subsystem and from drivers that implements their own shm pool manager.
|
||||||
@@ -212,6 +216,7 @@ struct tee_shm {
|
@@ -213,6 +217,7 @@ struct tee_shm {
|
||||||
struct dma_buf *dmabuf;
|
refcount_t refcount;
|
||||||
u32 flags;
|
u32 flags;
|
||||||
int id;
|
int id;
|
||||||
+ u64 sec_world_id;
|
+ u64 sec_world_id;
|
||||||
@@ -40,5 +41,5 @@ index cdd049a724b1..93d836fded8b 100644
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
--
|
--
|
||||||
2.17.1
|
2.34.1
|
||||||
|
|
||||||
+16
-14
@@ -1,7 +1,7 @@
|
|||||||
From cb4f6a55b9c61a82a65edcd4b18c505d92480710 Mon Sep 17 00:00:00 2001
|
From 5a2565d002084a4c6b80329a4a23cb6c98c4f344 Mon Sep 17 00:00:00 2001
|
||||||
From: Jens Wiklander <jens.wiklander@linaro.org>
|
From: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
Date: Thu, 25 Mar 2021 15:08:46 +0100
|
Date: Thu, 25 Mar 2021 15:08:46 +0100
|
||||||
Subject: [PATCH 15/22] optee: simplify optee_release()
|
Subject: [PATCH 09/40] optee: simplify optee_release()
|
||||||
|
|
||||||
Simplifies optee_release() with a new helper function,
|
Simplifies optee_release() with a new helper function,
|
||||||
optee_close_session_helper() which has been factored out from
|
optee_close_session_helper() which has been factored out from
|
||||||
@@ -9,20 +9,21 @@ optee_close_session().
|
|||||||
|
|
||||||
A separate optee_release_supp() is added for the supplicant device.
|
A separate optee_release_supp() is added for the supplicant device.
|
||||||
|
|
||||||
|
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
|
||||||
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
|
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
drivers/tee/optee/call.c | 31 ++++++++++-------
|
drivers/tee/optee/call.c | 31 ++++++++++-------
|
||||||
drivers/tee/optee/core.c | 55 +++++++++++--------------------
|
drivers/tee/optee/core.c | 56 +++++++++++--------------------
|
||||||
drivers/tee/optee/optee_private.h | 1 +
|
drivers/tee/optee/optee_private.h | 1 +
|
||||||
3 files changed, 39 insertions(+), 48 deletions(-)
|
3 files changed, 39 insertions(+), 49 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
|
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
|
||||||
index 0790de29f0ca..1b339b743ff5 100644
|
index 945f03da0223..103976df2062 100644
|
||||||
--- a/drivers/tee/optee/call.c
|
--- a/drivers/tee/optee/call.c
|
||||||
+++ b/drivers/tee/optee/call.c
|
+++ b/drivers/tee/optee/call.c
|
||||||
@@ -285,12 +285,28 @@ int optee_open_session(struct tee_context *ctx,
|
@@ -288,12 +288,28 @@ int optee_open_session(struct tee_context *ctx,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +54,7 @@ index 0790de29f0ca..1b339b743ff5 100644
|
|||||||
struct optee_session *sess;
|
struct optee_session *sess;
|
||||||
|
|
||||||
/* Check that the session is valid and remove it from the list */
|
/* Check that the session is valid and remove it from the list */
|
||||||
@@ -303,16 +319,7 @@ int optee_close_session(struct tee_context *ctx, u32 session)
|
@@ -306,16 +322,7 @@ int optee_close_session(struct tee_context *ctx, u32 session)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
kfree(sess);
|
kfree(sess);
|
||||||
|
|
||||||
@@ -72,10 +73,10 @@ index 0790de29f0ca..1b339b743ff5 100644
|
|||||||
|
|
||||||
int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
||||||
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
|
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
|
||||||
index 63542c1cc291..e39c6d290d83 100644
|
index 5363ebebfc35..79f67a79e7b7 100644
|
||||||
--- a/drivers/tee/optee/core.c
|
--- a/drivers/tee/optee/core.c
|
||||||
+++ b/drivers/tee/optee/core.c
|
+++ b/drivers/tee/optee/core.c
|
||||||
@@ -263,59 +263,42 @@ static int optee_open(struct tee_context *ctx)
|
@@ -264,60 +264,42 @@ static int optee_open(struct tee_context *ctx)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,7 +97,8 @@ index 63542c1cc291..e39c6d290d83 100644
|
|||||||
if (!ctxdata)
|
if (!ctxdata)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
- shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg), TEE_SHM_MAPPED);
|
- shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg),
|
||||||
|
- TEE_SHM_MAPPED | TEE_SHM_PRIV);
|
||||||
- if (!IS_ERR(shm)) {
|
- if (!IS_ERR(shm)) {
|
||||||
- arg = tee_shm_get_va(shm, 0);
|
- arg = tee_shm_get_va(shm, 0);
|
||||||
- /*
|
- /*
|
||||||
@@ -153,7 +155,7 @@ index 63542c1cc291..e39c6d290d83 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct tee_driver_ops optee_ops = {
|
static const struct tee_driver_ops optee_ops = {
|
||||||
@@ -339,7 +322,7 @@ static const struct tee_desc optee_desc = {
|
@@ -341,7 +323,7 @@ static const struct tee_desc optee_desc = {
|
||||||
static const struct tee_driver_ops optee_supp_ops = {
|
static const struct tee_driver_ops optee_supp_ops = {
|
||||||
.get_version = optee_get_version,
|
.get_version = optee_get_version,
|
||||||
.open = optee_open,
|
.open = optee_open,
|
||||||
@@ -163,7 +165,7 @@ index 63542c1cc291..e39c6d290d83 100644
|
|||||||
.supp_send = optee_supp_send,
|
.supp_send = optee_supp_send,
|
||||||
.shm_register = optee_shm_register_supp,
|
.shm_register = optee_shm_register_supp,
|
||||||
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
|
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
|
||||||
index e25b216a14ef..2b63b796645e 100644
|
index f6bb4a763ba9..a55793f9f6eb 100644
|
||||||
--- a/drivers/tee/optee/optee_private.h
|
--- a/drivers/tee/optee/optee_private.h
|
||||||
+++ b/drivers/tee/optee/optee_private.h
|
+++ b/drivers/tee/optee/optee_private.h
|
||||||
@@ -152,6 +152,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg);
|
@@ -152,6 +152,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg);
|
||||||
@@ -175,5 +177,5 @@ index e25b216a14ef..2b63b796645e 100644
|
|||||||
int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
||||||
struct tee_param *param);
|
struct tee_param *param);
|
||||||
--
|
--
|
||||||
2.17.1
|
2.34.1
|
||||||
|
|
||||||
+40
-39
@@ -1,7 +1,7 @@
|
|||||||
From abda5d14075802b84fe9e38f77bfdc371606172c Mon Sep 17 00:00:00 2001
|
From cbb24d5b6b4e6704da79bb3df76179a88a6ee14f Mon Sep 17 00:00:00 2001
|
||||||
From: Jens Wiklander <jens.wiklander@linaro.org>
|
From: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
Date: Thu, 25 Mar 2021 15:08:50 +0100
|
Date: Thu, 25 Mar 2021 15:08:50 +0100
|
||||||
Subject: [PATCH 17/22] optee: refactor driver with internal callbacks
|
Subject: [PATCH 10/40] optee: refactor driver with internal callbacks
|
||||||
|
|
||||||
The OP-TEE driver is refactored with three internal callbacks replacing
|
The OP-TEE driver is refactored with three internal callbacks replacing
|
||||||
direct calls to optee_from_msg_param(), optee_to_msg_param() and
|
direct calls to optee_from_msg_param(), optee_to_msg_param() and
|
||||||
@@ -14,9 +14,10 @@ This refactoring makes room for using other primitives to communicate
|
|||||||
with OP-TEE in secure world while being able to reuse as much as
|
with OP-TEE in secure world while being able to reuse as much as
|
||||||
possible from the present driver.
|
possible from the present driver.
|
||||||
|
|
||||||
|
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
|
||||||
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
|
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
drivers/tee/optee/call.c | 86 +++++++++--------
|
drivers/tee/optee/call.c | 86 +++++++++--------
|
||||||
drivers/tee/optee/core.c | 148 ++++++++++++++++++++----------
|
drivers/tee/optee/core.c | 148 ++++++++++++++++++++----------
|
||||||
@@ -25,7 +26,7 @@ Upstream-Status: Pending [Not submitted to upstream yet]
|
|||||||
4 files changed, 182 insertions(+), 106 deletions(-)
|
4 files changed, 182 insertions(+), 106 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
|
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
|
||||||
index 1b339b743ff5..e7b93153252c 100644
|
index 103976df2062..ddedde45f1ee 100644
|
||||||
--- a/drivers/tee/optee/call.c
|
--- a/drivers/tee/optee/call.c
|
||||||
+++ b/drivers/tee/optee/call.c
|
+++ b/drivers/tee/optee/call.c
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
@@ -36,7 +37,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
*/
|
*/
|
||||||
#include <linux/arm-smccc.h>
|
#include <linux/arm-smccc.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
@@ -116,20 +116,25 @@ static struct optee_session *find_session(struct optee_context_data *ctxdata,
|
@@ -118,20 +118,25 @@ static struct optee_session *find_session(struct optee_context_data *ctxdata,
|
||||||
/**
|
/**
|
||||||
* optee_do_call_with_arg() - Do an SMC to OP-TEE in secure world
|
* optee_do_call_with_arg() - Do an SMC to OP-TEE in secure world
|
||||||
* @ctx: calling context
|
* @ctx: calling context
|
||||||
@@ -65,7 +66,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
|
|
||||||
param.a0 = OPTEE_SMC_CALL_WITH_ARG;
|
param.a0 = OPTEE_SMC_CALL_WITH_ARG;
|
||||||
reg_pair_from_64(¶m.a1, ¶m.a2, parg);
|
reg_pair_from_64(¶m.a1, ¶m.a2, parg);
|
||||||
@@ -157,7 +162,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
|
@@ -160,7 +165,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
|
||||||
param.a3 = res.a3;
|
param.a3 = res.a3;
|
||||||
optee_handle_rpc(ctx, ¶m, &call_ctx);
|
optee_handle_rpc(ctx, ¶m, &call_ctx);
|
||||||
} else {
|
} else {
|
||||||
@@ -74,7 +75,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,14 +174,12 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
|
@@ -172,14 +177,12 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg)
|
||||||
*/
|
*/
|
||||||
optee_cq_wait_final(&optee->call_queue, &w);
|
optee_cq_wait_final(&optee->call_queue, &w);
|
||||||
|
|
||||||
@@ -91,7 +92,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
struct tee_shm *shm;
|
struct tee_shm *shm;
|
||||||
struct optee_msg_arg *ma;
|
struct optee_msg_arg *ma;
|
||||||
|
|
||||||
@@ -187,22 +190,13 @@ static struct tee_shm *get_msg_arg(struct tee_context *ctx, size_t num_params,
|
@@ -190,22 +193,13 @@ static struct tee_shm *get_msg_arg(struct tee_context *ctx, size_t num_params,
|
||||||
|
|
||||||
ma = tee_shm_get_va(shm, 0);
|
ma = tee_shm_get_va(shm, 0);
|
||||||
if (IS_ERR(ma)) {
|
if (IS_ERR(ma)) {
|
||||||
@@ -116,7 +117,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
|
|
||||||
return shm;
|
return shm;
|
||||||
}
|
}
|
||||||
@@ -211,16 +205,16 @@ int optee_open_session(struct tee_context *ctx,
|
@@ -214,16 +208,16 @@ int optee_open_session(struct tee_context *ctx,
|
||||||
struct tee_ioctl_open_session_arg *arg,
|
struct tee_ioctl_open_session_arg *arg,
|
||||||
struct tee_param *param)
|
struct tee_param *param)
|
||||||
{
|
{
|
||||||
@@ -135,7 +136,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
if (IS_ERR(shm))
|
if (IS_ERR(shm))
|
||||||
return PTR_ERR(shm);
|
return PTR_ERR(shm);
|
||||||
|
|
||||||
@@ -244,7 +238,8 @@ int optee_open_session(struct tee_context *ctx,
|
@@ -247,7 +241,8 @@ int optee_open_session(struct tee_context *ctx,
|
||||||
goto out;
|
goto out;
|
||||||
export_uuid(msg_arg->params[1].u.octets, &client_uuid);
|
export_uuid(msg_arg->params[1].u.octets, &client_uuid);
|
||||||
|
|
||||||
@@ -145,7 +146,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
if (rc)
|
if (rc)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@@ -254,7 +249,7 @@ int optee_open_session(struct tee_context *ctx,
|
@@ -257,7 +252,7 @@ int optee_open_session(struct tee_context *ctx,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,7 +155,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
msg_arg->ret = TEEC_ERROR_COMMUNICATION;
|
msg_arg->ret = TEEC_ERROR_COMMUNICATION;
|
||||||
msg_arg->ret_origin = TEEC_ORIGIN_COMMS;
|
msg_arg->ret_origin = TEEC_ORIGIN_COMMS;
|
||||||
}
|
}
|
||||||
@@ -269,7 +264,8 @@ int optee_open_session(struct tee_context *ctx,
|
@@ -272,7 +267,8 @@ int optee_open_session(struct tee_context *ctx,
|
||||||
kfree(sess);
|
kfree(sess);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +165,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
arg->ret = TEEC_ERROR_COMMUNICATION;
|
arg->ret = TEEC_ERROR_COMMUNICATION;
|
||||||
arg->ret_origin = TEEC_ORIGIN_COMMS;
|
arg->ret_origin = TEEC_ORIGIN_COMMS;
|
||||||
/* Close session again to avoid leakage */
|
/* Close session again to avoid leakage */
|
||||||
@@ -288,16 +284,16 @@ int optee_open_session(struct tee_context *ctx,
|
@@ -291,16 +287,16 @@ int optee_open_session(struct tee_context *ctx,
|
||||||
int optee_close_session_helper(struct tee_context *ctx, u32 session)
|
int optee_close_session_helper(struct tee_context *ctx, u32 session)
|
||||||
{
|
{
|
||||||
struct tee_shm *shm;
|
struct tee_shm *shm;
|
||||||
@@ -184,7 +185,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
|
|
||||||
tee_shm_free(shm);
|
tee_shm_free(shm);
|
||||||
|
|
||||||
@@ -325,10 +321,10 @@ int optee_close_session(struct tee_context *ctx, u32 session)
|
@@ -328,10 +324,10 @@ int optee_close_session(struct tee_context *ctx, u32 session)
|
||||||
int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
||||||
struct tee_param *param)
|
struct tee_param *param)
|
||||||
{
|
{
|
||||||
@@ -196,7 +197,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
struct optee_session *sess;
|
struct optee_session *sess;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@@ -339,7 +335,7 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
@@ -342,7 +338,7 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
||||||
if (!sess)
|
if (!sess)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@@ -205,7 +206,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
if (IS_ERR(shm))
|
if (IS_ERR(shm))
|
||||||
return PTR_ERR(shm);
|
return PTR_ERR(shm);
|
||||||
msg_arg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND;
|
msg_arg->cmd = OPTEE_MSG_CMD_INVOKE_COMMAND;
|
||||||
@@ -347,16 +343,18 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
@@ -350,16 +346,18 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
||||||
msg_arg->session = arg->session;
|
msg_arg->session = arg->session;
|
||||||
msg_arg->cancel_id = arg->cancel_id;
|
msg_arg->cancel_id = arg->cancel_id;
|
||||||
|
|
||||||
@@ -227,7 +228,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
msg_arg->ret = TEEC_ERROR_COMMUNICATION;
|
msg_arg->ret = TEEC_ERROR_COMMUNICATION;
|
||||||
msg_arg->ret_origin = TEEC_ORIGIN_COMMS;
|
msg_arg->ret_origin = TEEC_ORIGIN_COMMS;
|
||||||
}
|
}
|
||||||
@@ -370,10 +368,10 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
@@ -373,10 +371,10 @@ int optee_invoke_func(struct tee_context *ctx, struct tee_ioctl_invoke_arg *arg,
|
||||||
|
|
||||||
int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
|
int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
|
||||||
{
|
{
|
||||||
@@ -239,7 +240,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
struct optee_session *sess;
|
struct optee_session *sess;
|
||||||
|
|
||||||
/* Check that the session is valid */
|
/* Check that the session is valid */
|
||||||
@@ -383,14 +381,14 @@ int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
|
@@ -386,14 +384,14 @@ int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session)
|
||||||
if (!sess)
|
if (!sess)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
@@ -256,7 +257,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
|
|
||||||
tee_shm_free(shm);
|
tee_shm_free(shm);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -589,10 +587,10 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
@@ -622,10 +620,10 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
||||||
struct page **pages, size_t num_pages,
|
struct page **pages, size_t num_pages,
|
||||||
unsigned long start)
|
unsigned long start)
|
||||||
{
|
{
|
||||||
@@ -269,7 +270,7 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (!num_pages)
|
if (!num_pages)
|
||||||
@@ -606,7 +604,7 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
@@ -639,7 +637,7 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
||||||
if (!pages_list)
|
if (!pages_list)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@@ -278,16 +279,16 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
if (IS_ERR(shm_arg)) {
|
if (IS_ERR(shm_arg)) {
|
||||||
rc = PTR_ERR(shm_arg);
|
rc = PTR_ERR(shm_arg);
|
||||||
goto out;
|
goto out;
|
||||||
@@ -627,7 +625,7 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
@@ -660,7 +658,7 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
||||||
msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) |
|
msg_arg->params->u.tmem.buf_ptr = virt_to_phys(pages_list) |
|
||||||
(tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1));
|
(tee_shm_get_page_offset(shm) & (OPTEE_MSG_NONCONTIG_PAGE_SIZE - 1));
|
||||||
|
|
||||||
- if (optee_do_call_with_arg(ctx, msg_parg) ||
|
- if (optee_do_call_with_arg(ctx, msg_parg) ||
|
||||||
+ if (optee->ops->do_call_with_arg(ctx, shm) ||
|
+ if (optee->ops->do_call_with_arg(ctx, shm_arg) ||
|
||||||
msg_arg->ret != TEEC_SUCCESS)
|
msg_arg->ret != TEEC_SUCCESS)
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
|
|
||||||
@@ -639,12 +637,12 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
@@ -672,12 +670,12 @@ int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
||||||
|
|
||||||
int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
|
int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
|
||||||
{
|
{
|
||||||
@@ -303,17 +304,17 @@ index 1b339b743ff5..e7b93153252c 100644
|
|||||||
if (IS_ERR(shm_arg))
|
if (IS_ERR(shm_arg))
|
||||||
return PTR_ERR(shm_arg);
|
return PTR_ERR(shm_arg);
|
||||||
|
|
||||||
@@ -653,7 +651,7 @@ int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
|
@@ -686,7 +684,7 @@ int optee_shm_unregister(struct tee_context *ctx, struct tee_shm *shm)
|
||||||
msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
|
msg_arg->params[0].attr = OPTEE_MSG_ATTR_TYPE_RMEM_INPUT;
|
||||||
msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm;
|
msg_arg->params[0].u.rmem.shm_ref = (unsigned long)shm;
|
||||||
|
|
||||||
- if (optee_do_call_with_arg(ctx, msg_parg) ||
|
- if (optee_do_call_with_arg(ctx, msg_parg) ||
|
||||||
+ if (optee->ops->do_call_with_arg(ctx, shm) ||
|
+ if (optee->ops->do_call_with_arg(ctx, shm_arg) ||
|
||||||
msg_arg->ret != TEEC_SUCCESS)
|
msg_arg->ret != TEEC_SUCCESS)
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
tee_shm_free(shm_arg);
|
tee_shm_free(shm_arg);
|
||||||
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
|
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
|
||||||
index e39c6d290d83..ab602bb8e14a 100644
|
index 79f67a79e7b7..26492d3115f5 100644
|
||||||
--- a/drivers/tee/optee/core.c
|
--- a/drivers/tee/optee/core.c
|
||||||
+++ b/drivers/tee/optee/core.c
|
+++ b/drivers/tee/optee/core.c
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
@@ -324,7 +325,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
@@ -26,21 +26,87 @@
|
@@ -27,21 +27,87 @@
|
||||||
|
|
||||||
#define OPTEE_SHM_NUM_PRIV_PAGES CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
|
#define OPTEE_SHM_NUM_PRIV_PAGES CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
|
||||||
|
|
||||||
@@ -416,7 +417,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
|
|
||||||
for (n = 0; n < num_params; n++) {
|
for (n = 0; n < num_params; n++) {
|
||||||
struct tee_param *p = params + n;
|
struct tee_param *p = params + n;
|
||||||
@@ -55,48 +121,19 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
|
@@ -56,48 +122,19 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
|
||||||
case OPTEE_MSG_ATTR_TYPE_VALUE_INPUT:
|
case OPTEE_MSG_ATTR_TYPE_VALUE_INPUT:
|
||||||
case OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT:
|
case OPTEE_MSG_ATTR_TYPE_VALUE_OUTPUT:
|
||||||
case OPTEE_MSG_ATTR_TYPE_VALUE_INOUT:
|
case OPTEE_MSG_ATTR_TYPE_VALUE_INOUT:
|
||||||
@@ -468,7 +469,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -106,6 +143,16 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
|
@@ -107,6 +144,16 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -485,7 +486,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
static int to_msg_param_tmp_mem(struct optee_msg_param *mp,
|
static int to_msg_param_tmp_mem(struct optee_msg_param *mp,
|
||||||
const struct tee_param *p)
|
const struct tee_param *p)
|
||||||
{
|
{
|
||||||
@@ -148,13 +195,15 @@ static int to_msg_param_reg_mem(struct optee_msg_param *mp,
|
@@ -149,13 +196,15 @@ static int to_msg_param_reg_mem(struct optee_msg_param *mp,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optee_to_msg_param() - convert from struct tee_params to OPTEE_MSG parameters
|
* optee_to_msg_param() - convert from struct tee_params to OPTEE_MSG parameters
|
||||||
@@ -503,7 +504,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
size_t n;
|
size_t n;
|
||||||
@@ -171,11 +220,7 @@ int optee_to_msg_param(struct optee_msg_param *msg_params, size_t num_params,
|
@@ -172,11 +221,7 @@ int optee_to_msg_param(struct optee_msg_param *msg_params, size_t num_params,
|
||||||
case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT:
|
case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT:
|
||||||
case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT:
|
case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_OUTPUT:
|
||||||
case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT:
|
case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT:
|
||||||
@@ -516,7 +517,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
break;
|
break;
|
||||||
case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT:
|
case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT:
|
||||||
case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
|
case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
|
||||||
@@ -301,7 +346,7 @@ static void optee_release_supp(struct tee_context *ctx)
|
@@ -302,7 +347,7 @@ static void optee_release_supp(struct tee_context *ctx)
|
||||||
optee_supp_release(&optee->supp);
|
optee_supp_release(&optee->supp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -525,7 +526,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
.get_version = optee_get_version,
|
.get_version = optee_get_version,
|
||||||
.open = optee_open,
|
.open = optee_open,
|
||||||
.release = optee_release,
|
.release = optee_release,
|
||||||
@@ -313,9 +358,9 @@ static const struct tee_driver_ops optee_ops = {
|
@@ -314,9 +359,9 @@ static const struct tee_driver_ops optee_ops = {
|
||||||
.shm_unregister = optee_shm_unregister,
|
.shm_unregister = optee_shm_unregister,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -537,7 +538,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -336,6 +381,12 @@ static const struct tee_desc optee_supp_desc = {
|
@@ -337,6 +382,12 @@ static const struct tee_desc optee_supp_desc = {
|
||||||
.flags = TEE_DESC_PRIVILEGED,
|
.flags = TEE_DESC_PRIVILEGED,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -550,7 +551,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
static bool optee_msg_api_uid_is_optee_api(optee_invoke_fn *invoke_fn)
|
static bool optee_msg_api_uid_is_optee_api(optee_invoke_fn *invoke_fn)
|
||||||
{
|
{
|
||||||
struct arm_smccc_res res;
|
struct arm_smccc_res res;
|
||||||
@@ -637,10 +688,11 @@ static int optee_probe(struct platform_device *pdev)
|
@@ -670,10 +721,11 @@ static int optee_probe(struct platform_device *pdev)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,7 +565,7 @@ index e39c6d290d83..ab602bb8e14a 100644
|
|||||||
rc = PTR_ERR(teedev);
|
rc = PTR_ERR(teedev);
|
||||||
goto err;
|
goto err;
|
||||||
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
|
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h
|
||||||
index 2b63b796645e..c5741e96e967 100644
|
index a55793f9f6eb..beca97017996 100644
|
||||||
--- a/drivers/tee/optee/optee_private.h
|
--- a/drivers/tee/optee/optee_private.h
|
||||||
+++ b/drivers/tee/optee/optee_private.h
|
+++ b/drivers/tee/optee/optee_private.h
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
@@ -627,7 +628,7 @@ index 2b63b796645e..c5741e96e967 100644
|
|||||||
int optee_open_session(struct tee_context *ctx,
|
int optee_open_session(struct tee_context *ctx,
|
||||||
struct tee_ioctl_open_session_arg *arg,
|
struct tee_ioctl_open_session_arg *arg,
|
||||||
struct tee_param *param);
|
struct tee_param *param);
|
||||||
@@ -171,11 +197,6 @@ int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
|
@@ -172,11 +198,6 @@ int optee_shm_register_supp(struct tee_context *ctx, struct tee_shm *shm,
|
||||||
unsigned long start);
|
unsigned long start);
|
||||||
int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm);
|
int optee_shm_unregister_supp(struct tee_context *ctx, struct tee_shm *shm);
|
||||||
|
|
||||||
@@ -640,7 +641,7 @@ index 2b63b796645e..c5741e96e967 100644
|
|||||||
void optee_free_pages_list(void *array, size_t num_entries);
|
void optee_free_pages_list(void *array, size_t num_entries);
|
||||||
void optee_fill_pages_list(u64 *dst, struct page **pages, int num_pages,
|
void optee_fill_pages_list(u64 *dst, struct page **pages, int num_pages,
|
||||||
diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
|
diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c
|
||||||
index 1849180b0278..39562fb6841e 100644
|
index efbaff7ad7e5..309258d47790 100644
|
||||||
--- a/drivers/tee/optee/rpc.c
|
--- a/drivers/tee/optee/rpc.c
|
||||||
+++ b/drivers/tee/optee/rpc.c
|
+++ b/drivers/tee/optee/rpc.c
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
@@ -717,5 +718,5 @@ index 1849180b0278..39562fb6841e 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.17.1
|
2.34.1
|
||||||
|
|
||||||
+3168
File diff suppressed because it is too large
Load Diff
+707
-621
File diff suppressed because it is too large
Load Diff
+63
@@ -0,0 +1,63 @@
|
|||||||
|
From 61c33344f747deac2860571ef965c20f9170efea Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
|
Date: Thu, 21 Oct 2021 14:55:39 +0200
|
||||||
|
Subject: [PATCH 13/40] optee: smc_abi.c: add missing #include <linux/mm.h>
|
||||||
|
|
||||||
|
Adds missing #include <linux/mm.h> drivers/tee/optee/smc_abi.c to fix
|
||||||
|
compile errors like:
|
||||||
|
drivers/tee/optee/smc_abi.c:405:15: error: implicit
|
||||||
|
declaration of function 'page_to_section'
|
||||||
|
[-Werror,-Wimplicit-function-declaration]
|
||||||
|
optee_page = page_to_phys(*pages) +
|
||||||
|
^
|
||||||
|
arch/arm/include/asm/memory.h:148:43: note: expanded from
|
||||||
|
macro 'page_to_phys'
|
||||||
|
^
|
||||||
|
include/asm-generic/memory_model.h:52:21: note: expanded
|
||||||
|
from macro 'page_to_pfn'
|
||||||
|
^
|
||||||
|
include/asm-generic/memory_model.h:35:14: note: expanded
|
||||||
|
from macro '__page_to_pfn'
|
||||||
|
int __sec = page_to_section(__pg); \
|
||||||
|
^
|
||||||
|
drivers/tee/optee/smc_abi.c:405:15: note: did you mean
|
||||||
|
'__nr_to_section'?
|
||||||
|
arch/arm/include/asm/memory.h:148:43: note: expanded from
|
||||||
|
macro 'page_to_phys'
|
||||||
|
^
|
||||||
|
include/asm-generic/memory_model.h:52:21: note: expanded
|
||||||
|
from macro 'page_to_pfn'
|
||||||
|
^
|
||||||
|
include/asm-generic/memory_model.h:35:14: note: expanded
|
||||||
|
from macro '__page_to_pfn'
|
||||||
|
int __sec = page_to_section(__pg); \
|
||||||
|
^
|
||||||
|
include/linux/mmzone.h:1365:35: note: '__nr_to_section'
|
||||||
|
declared here
|
||||||
|
static inline struct mem_section *__nr_to_section(unsigned long nr)
|
||||||
|
|
||||||
|
Fixes: c51a564a5b48 ("optee: isolate smc abi")
|
||||||
|
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
|
Link: https://lore.kernel.org/r/20211021125539.3858495-1-jens.wiklander@linaro.org'
|
||||||
|
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||||
|
Upstream-Status: Backport [https://lore.kernel.org/r/20211021125539.3858495-1-jens.wiklander@linaro.org]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
|
---
|
||||||
|
drivers/tee/optee/smc_abi.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
|
||||||
|
index 9a787fb4f5e5..6196d7c3888f 100644
|
||||||
|
--- a/drivers/tee/optee/smc_abi.c
|
||||||
|
+++ b/drivers/tee/optee/smc_abi.c
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
#include <linux/errno.h>
|
||||||
|
#include <linux/io.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
+#include <linux/mm.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_platform.h>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
From bf890db9200464083c44987cd41c034b1019fc5a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Colin Ian King <colin.i.king@googlemail.com>
|
||||||
|
Date: Sat, 23 Oct 2021 12:52:09 +0100
|
||||||
|
Subject: [PATCH 14/40] optee: Fix spelling mistake "reclain" -> "reclaim"
|
||||||
|
|
||||||
|
There are spelling mistakes in pr_err error messages. Fix them.
|
||||||
|
|
||||||
|
Fixes: 4615e5a34b95 ("optee: add FF-A support")
|
||||||
|
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
|
||||||
|
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
|
||||||
|
[jw: added a fixes]
|
||||||
|
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
|
---
|
||||||
|
drivers/tee/optee/ffa_abi.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
|
||||||
|
index 6defd1ec982a..45424824e0f9 100644
|
||||||
|
--- a/drivers/tee/optee/ffa_abi.c
|
||||||
|
+++ b/drivers/tee/optee/ffa_abi.c
|
||||||
|
@@ -333,7 +333,7 @@ static int optee_ffa_shm_unregister(struct tee_context *ctx,
|
||||||
|
|
||||||
|
rc = ffa_ops->memory_reclaim(global_handle, 0);
|
||||||
|
if (rc)
|
||||||
|
- pr_err("mem_reclain: 0x%llx %d", global_handle, rc);
|
||||||
|
+ pr_err("mem_reclaim: 0x%llx %d", global_handle, rc);
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
@@ -355,7 +355,7 @@ static int optee_ffa_shm_unregister_supp(struct tee_context *ctx,
|
||||||
|
optee_shm_rem_ffa_handle(optee, global_handle);
|
||||||
|
rc = ffa_ops->memory_reclaim(global_handle, 0);
|
||||||
|
if (rc)
|
||||||
|
- pr_err("mem_reclain: 0x%llx %d", global_handle, rc);
|
||||||
|
+ pr_err("mem_reclaim: 0x%llx %d", global_handle, rc);
|
||||||
|
|
||||||
|
shm->sec_world_id = 0;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
From 9f3b899a2e8bf79f572f408bfd86836578f46106 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lv Ruyi <lv.ruyi@zte.com.cn>
|
||||||
|
Date: Thu, 4 Nov 2021 11:30:47 +0000
|
||||||
|
Subject: [PATCH 15/40] optee: fix kfree NULL pointer
|
||||||
|
|
||||||
|
This patch fixes the following Coccinelle error:
|
||||||
|
drivers/tee/optee/ffa_abi.c: 877: ERROR optee is NULL but dereferenced.
|
||||||
|
|
||||||
|
If memory allocation fails, optee is null pointer. the code will goto err
|
||||||
|
and release optee.
|
||||||
|
|
||||||
|
Fixes: 4615e5a34b95 ("optee: add FF-A support")
|
||||||
|
Reported-by: Zeal Robot <zealci@zte.com.cn>
|
||||||
|
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
|
||||||
|
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
|
||||||
|
[jw: removed the redundant braces]
|
||||||
|
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
||||||
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
|
---
|
||||||
|
drivers/tee/optee/ffa_abi.c | 7 +++----
|
||||||
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
|
||||||
|
index 45424824e0f9..d8c8683863aa 100644
|
||||||
|
--- a/drivers/tee/optee/ffa_abi.c
|
||||||
|
+++ b/drivers/tee/optee/ffa_abi.c
|
||||||
|
@@ -810,10 +810,9 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
optee = kzalloc(sizeof(*optee), GFP_KERNEL);
|
||||||
|
- if (!optee) {
|
||||||
|
- rc = -ENOMEM;
|
||||||
|
- goto err;
|
||||||
|
- }
|
||||||
|
+ if (!optee)
|
||||||
|
+ return -ENOMEM;
|
||||||
|
+
|
||||||
|
optee->pool = optee_ffa_config_dyn_shm();
|
||||||
|
if (IS_ERR(optee->pool)) {
|
||||||
|
rc = PTR_ERR(optee->pool);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From c4b023618252ad8c03b7ae2cc411718af285bf66 Mon Sep 17 00:00:00 2001
|
From a52e1e964aa4f2592ebffb30df048cc85fa5a02c Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:51 +0000
|
Date: Fri, 3 Dec 2021 11:44:51 +0000
|
||||||
Subject: [PATCH 03/14] perf/arm-cmn: Account for NUMA affinity
|
Subject: [PATCH 16/40] perf/arm-cmn: Account for NUMA affinity
|
||||||
|
|
||||||
On a system with multiple CMN meshes, ideally we'd want to access each
|
On a system with multiple CMN meshes, ideally we'd want to access each
|
||||||
PMU from within its own mesh, rather than with a long CML round-trip,
|
PMU from within its own mesh, rather than with a long CML round-trip,
|
||||||
@@ -21,7 +21,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 38 insertions(+), 13 deletions(-)
|
1 file changed, 38 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index fe7f3e945481..2146d1c0103f 100644
|
index 400eb7f579dc..02b898dbba91 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -1147,23 +1147,47 @@ static int arm_cmn_commit_txn(struct pmu *pmu)
|
@@ -1147,23 +1147,47 @@ static int arm_cmn_commit_txn(struct pmu *pmu)
|
||||||
@@ -103,5 +103,5 @@ index fe7f3e945481..2146d1c0103f 100644
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
From c3b11ad7a7e3e154a17f36c6768deab9227e28de Mon Sep 17 00:00:00 2001
|
From 16cf1b5483d4cbad8ee52fcc9945abcea6492bd1 Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:52 +0000
|
Date: Fri, 3 Dec 2021 11:44:52 +0000
|
||||||
Subject: [PATCH 04/14] perf/arm-cmn: Drop compile-test restriction
|
Subject: [PATCH 17/40] perf/arm-cmn: Drop compile-test restriction
|
||||||
|
|
||||||
Although CMN is currently (and overwhelmingly likely to remain) deployed
|
Although CMN is currently (and overwhelmingly likely to remain) deployed
|
||||||
in arm64-only (modulo userspace) systems, the 64-bit "dependency" for
|
in arm64-only (modulo userspace) systems, the 64-bit "dependency" for
|
||||||
@@ -22,7 +22,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
2 files changed, 14 insertions(+), 13 deletions(-)
|
2 files changed, 14 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
|
diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig
|
||||||
index 130327ff0b0e..828a042d6a07 100644
|
index 77522e5efe11..e453915ebc84 100644
|
||||||
--- a/drivers/perf/Kconfig
|
--- a/drivers/perf/Kconfig
|
||||||
+++ b/drivers/perf/Kconfig
|
+++ b/drivers/perf/Kconfig
|
||||||
@@ -43,7 +43,7 @@ config ARM_CCN
|
@@ -43,7 +43,7 @@ config ARM_CCN
|
||||||
@@ -35,7 +35,7 @@ index 130327ff0b0e..828a042d6a07 100644
|
|||||||
Support for PMU events monitoring on the Arm CMN-600 Coherent Mesh
|
Support for PMU events monitoring on the Arm CMN-600 Coherent Mesh
|
||||||
Network interconnect.
|
Network interconnect.
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index 2146d1c0103f..e9af79b5f3de 100644
|
index 02b898dbba91..1d52fcfe3a0d 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -7,6 +7,7 @@
|
@@ -7,6 +7,7 @@
|
||||||
@@ -85,5 +85,5 @@ index 2146d1c0103f..e9af79b5f3de 100644
|
|||||||
#define CMN_EVENT_WP_COMBINE(event) FIELD_GET(CMN_CONFIG_WP_COMBINE, (event)->attr.config)
|
#define CMN_EVENT_WP_COMBINE(event) FIELD_GET(CMN_CONFIG_WP_COMBINE, (event)->attr.config)
|
||||||
#define CMN_EVENT_WP_DEV_SEL(event) FIELD_GET(CMN_CONFIG_WP_DEV_SEL, (event)->attr.config)
|
#define CMN_EVENT_WP_DEV_SEL(event) FIELD_GET(CMN_CONFIG_WP_DEV_SEL, (event)->attr.config)
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 4f4a4cd7c79396fa72870ff712d15e82ebff80cf Mon Sep 17 00:00:00 2001
|
From 762ba0fb54d97c08c35fbe2745c19fd4a74ded0d Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:53 +0000
|
Date: Fri, 3 Dec 2021 11:44:53 +0000
|
||||||
Subject: [PATCH 05/14] perf/arm-cmn: Refactor node ID handling
|
Subject: [PATCH 18/40] perf/arm-cmn: Refactor node ID handling
|
||||||
|
|
||||||
Add a bit more abstraction for the places where we decompose node IDs.
|
Add a bit more abstraction for the places where we decompose node IDs.
|
||||||
This will help keep things nice and manageable when we come to add yet
|
This will help keep things nice and manageable when we come to add yet
|
||||||
@@ -21,7 +21,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 56 insertions(+), 38 deletions(-)
|
1 file changed, 56 insertions(+), 38 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index e9af79b5f3de..cee301fe0f7e 100644
|
index 1d52fcfe3a0d..adf50d613734 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -255,6 +255,58 @@ struct arm_cmn {
|
@@ -255,6 +255,58 @@ struct arm_cmn {
|
||||||
@@ -151,5 +151,5 @@ index e9af79b5f3de..cee301fe0f7e 100644
|
|||||||
if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event))) {
|
if (arm_cmn_is_occup_event(type, CMN_EVENT_EVENTID(event))) {
|
||||||
int occupid = CMN_EVENT_OCCUPID(event);
|
int occupid = CMN_EVENT_OCCUPID(event);
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 1b8e1ce0ebaa02c4cb7fa615b28c6905b0884e41 Mon Sep 17 00:00:00 2001
|
From ca15b67dc746c13a8231d11a3e2925f128982a7d Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:54 +0000
|
Date: Fri, 3 Dec 2021 11:44:54 +0000
|
||||||
Subject: [PATCH 06/14] perf/arm-cmn: Streamline node iteration
|
Subject: [PATCH 19/40] perf/arm-cmn: Streamline node iteration
|
||||||
|
|
||||||
Refactor the places where we scan through the set of nodes to switch
|
Refactor the places where we scan through the set of nodes to switch
|
||||||
from explicit array indexing to pointer-based iteration. This leads to
|
from explicit array indexing to pointer-based iteration. This leads to
|
||||||
@@ -21,7 +21,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 20 insertions(+), 13 deletions(-)
|
1 file changed, 20 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index cee301fe0f7e..77ebed7fae08 100644
|
index adf50d613734..da7bf779fec2 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -299,11 +299,11 @@ static struct arm_cmn_node *arm_cmn_node_to_xp(struct arm_cmn_node *dn)
|
@@ -299,11 +299,11 @@ static struct arm_cmn_node *arm_cmn_node_to_xp(struct arm_cmn_node *dn)
|
||||||
@@ -114,5 +114,5 @@ index cee301fe0f7e..77ebed7fae08 100644
|
|||||||
* If mesh_x wasn't set during discovery then we never saw
|
* If mesh_x wasn't set during discovery then we never saw
|
||||||
* an XP at (0,1), thus we must have an Nx1 configuration.
|
* an XP at (0,1), thus we must have an Nx1 configuration.
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 79bbc3eeee54b2e039dd4822e4a643e71adfbb04 Mon Sep 17 00:00:00 2001
|
From a4c8c0c804b1a92373faceda9350512f2139562a Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:55 +0000
|
Date: Fri, 3 Dec 2021 11:44:55 +0000
|
||||||
Subject: [PATCH 08/14] perf/arm-cmn: Refactor DTM handling
|
Subject: [PATCH 20/40] perf/arm-cmn: Refactor DTM handling
|
||||||
|
|
||||||
Untangle DTMs from XPs into a dedicated abstraction. This helps make
|
Untangle DTMs from XPs into a dedicated abstraction. This helps make
|
||||||
things a little more obvious and robust, but primarily paves the way
|
things a little more obvious and robust, but primarily paves the way
|
||||||
@@ -18,7 +18,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 87 insertions(+), 82 deletions(-)
|
1 file changed, 87 insertions(+), 82 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index e9f27f7776a2..2ae3e92690a7 100644
|
index da7bf779fec2..8b98ca9666d0 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -35,14 +35,9 @@
|
@@ -35,14 +35,9 @@
|
||||||
@@ -402,5 +402,5 @@ index e9f27f7776a2..2ae3e92690a7 100644
|
|||||||
child_count = FIELD_GET(CMN_CI_CHILD_COUNT, reg);
|
child_count = FIELD_GET(CMN_CI_CHILD_COUNT, reg);
|
||||||
child_poff = FIELD_GET(CMN_CI_CHILD_PTR_OFFSET, reg);
|
child_poff = FIELD_GET(CMN_CI_CHILD_PTR_OFFSET, reg);
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From a63878c01597e21451c2b3f239cbf0a2fbdeeadf Mon Sep 17 00:00:00 2001
|
From 2919ec562ca976a0ae5f70b264379b3d45abdaf5 Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:56 +0000
|
Date: Fri, 3 Dec 2021 11:44:56 +0000
|
||||||
Subject: [PATCH 09/14] perf/arm-cmn: Optimise DTM counter reads
|
Subject: [PATCH 21/40] perf/arm-cmn: Optimise DTM counter reads
|
||||||
|
|
||||||
When multiple nodes of the same type are connected to the same XP
|
When multiple nodes of the same type are connected to the same XP
|
||||||
(particularly in CAL configurations), it seems that they are likely
|
(particularly in CAL configurations), it seems that they are likely
|
||||||
@@ -20,7 +20,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 9 insertions(+), 8 deletions(-)
|
1 file changed, 9 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index 2ae3e92690a7..5fa31ebc1fce 100644
|
index 8b98ca9666d0..005a0d83bcac 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -690,18 +690,19 @@ static void arm_cmn_pmu_disable(struct pmu *pmu)
|
@@ -690,18 +690,19 @@ static void arm_cmn_pmu_disable(struct pmu *pmu)
|
||||||
@@ -52,5 +52,5 @@ index 2ae3e92690a7..5fa31ebc1fce 100644
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 782b7cd98e6a6b8c5fcd9e20f5c534617b1f04d3 Mon Sep 17 00:00:00 2001
|
From 1cf0522e9b4cdad7609c6ce31e848c3d8f2932d5 Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:57 +0000
|
Date: Fri, 3 Dec 2021 11:44:57 +0000
|
||||||
Subject: [PATCH 10/14] perf/arm-cmn: Optimise DTC counter accesses
|
Subject: [PATCH 22/40] perf/arm-cmn: Optimise DTC counter accesses
|
||||||
|
|
||||||
In cases where we do know which DTC domain a node belongs to, we can
|
In cases where we do know which DTC domain a node belongs to, we can
|
||||||
skip initialising or reading the global count in DTCs where we know
|
skip initialising or reading the global count in DTCs where we know
|
||||||
@@ -23,7 +23,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 12 insertions(+), 17 deletions(-)
|
1 file changed, 12 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index 5fa31ebc1fce..2204d6500814 100644
|
index 005a0d83bcac..acff8683af2c 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -193,7 +193,7 @@ struct arm_cmn_node {
|
@@ -193,7 +193,7 @@ struct arm_cmn_node {
|
||||||
@@ -107,5 +107,5 @@ index 5fa31ebc1fce..2204d6500814 100644
|
|||||||
arm_cmn_init_dtm(dtm++, xp);
|
arm_cmn_init_dtm(dtm++, xp);
|
||||||
|
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From d919e8bcbb790018e097cb8a01e7c840dcdb82aa Mon Sep 17 00:00:00 2001
|
From 118a6499d8c5d940210c6543309addc97b48122c Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:58 +0000
|
Date: Fri, 3 Dec 2021 11:44:58 +0000
|
||||||
Subject: [PATCH 11/14] perf/arm-cmn: Move group validation data off-stack
|
Subject: [PATCH 23/40] perf/arm-cmn: Move group validation data off-stack
|
||||||
|
|
||||||
With the value of CMN_MAX_DTMS increasing significantly, our validation
|
With the value of CMN_MAX_DTMS increasing significantly, our validation
|
||||||
data structure is set to get quite big. Technically we could pack it at
|
data structure is set to get quite big. Technically we could pack it at
|
||||||
@@ -21,7 +21,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 25 insertions(+), 18 deletions(-)
|
1 file changed, 25 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index 2204d6500814..b89a081d26ff 100644
|
index acff8683af2c..d2dd02f040b8 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -876,8 +876,8 @@ static int arm_cmn_validate_group(struct perf_event *event)
|
@@ -876,8 +876,8 @@ static int arm_cmn_validate_group(struct perf_event *event)
|
||||||
@@ -104,5 +104,5 @@ index 2204d6500814..b89a081d26ff 100644
|
|||||||
|
|
||||||
static int arm_cmn_event_init(struct perf_event *event)
|
static int arm_cmn_event_init(struct perf_event *event)
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From 7400784247be42beb996f7538547c56acd6cfa0c Mon Sep 17 00:00:00 2001
|
From 86d66852aa85254b823578537f8e125915375d0b Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:44:59 +0000
|
Date: Fri, 3 Dec 2021 11:44:59 +0000
|
||||||
Subject: [PATCH 12/14] perf/arm-cmn: Demarcate CMN-600 specifics
|
Subject: [PATCH 24/40] perf/arm-cmn: Demarcate CMN-600 specifics
|
||||||
|
|
||||||
In preparation for supporting newer CMN products, let's introduce a
|
In preparation for supporting newer CMN products, let's introduce a
|
||||||
means to differentiate the features and events which are specific to a
|
means to differentiate the features and events which are specific to a
|
||||||
@@ -21,7 +21,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 162 insertions(+), 151 deletions(-)
|
1 file changed, 162 insertions(+), 151 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index b89a081d26ff..92ff273fbe58 100644
|
index d2dd02f040b8..ce94f923a607 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -151,7 +151,12 @@
|
@@ -151,7 +151,12 @@
|
||||||
@@ -462,5 +462,5 @@ index b89a081d26ff..92ff273fbe58 100644
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(acpi, arm_cmn_acpi_match);
|
MODULE_DEVICE_TABLE(acpi, arm_cmn_acpi_match);
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+13
-15
@@ -1,7 +1,7 @@
|
|||||||
From a10c446ba1f7516c16dd6400c9a7f5e203779a5d Mon Sep 17 00:00:00 2001
|
From 821c1c36ba8883a8709bbbcdf4ebc716e69da991 Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:45:00 +0000
|
Date: Fri, 3 Dec 2021 11:45:00 +0000
|
||||||
Subject: [PATCH 13/14] perf/arm-cmn: Support new IP features
|
Subject: [PATCH 25/40] perf/arm-cmn: Support new IP features
|
||||||
|
|
||||||
The second generation of CMN IPs add new node types and significantly
|
The second generation of CMN IPs add new node types and significantly
|
||||||
expand the configuration space with options for extra device ports on
|
expand the configuration space with options for extra device ports on
|
||||||
@@ -13,13 +13,15 @@ it around as necessary, and handling (most of) the new choices.
|
|||||||
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
|
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
|
||||||
Link: https://lore.kernel.org/r/e58b495bcc7deec3882be4bac910ed0bf6979674.1638530442.git.robin.murphy@arm.com
|
Link: https://lore.kernel.org/r/e58b495bcc7deec3882be4bac910ed0bf6979674.1638530442.git.robin.murphy@arm.com
|
||||||
Signed-off-by: Will Deacon <will@kernel.org>
|
Signed-off-by: Will Deacon <will@kernel.org>
|
||||||
|
Upstream-Status = Backport [https://lore.kernel.org/r/e58b495bcc7deec3882be4bac910ed0bf6979674.1638530442.git.robin.murphy@arm.com]
|
||||||
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
---
|
---
|
||||||
drivers/perf/arm-cmn.c | 222 ++++++++++++++++++++++++++++++++---------
|
drivers/perf/arm-cmn.c | 218 ++++++++++++++++++++++++++++++++---------
|
||||||
1 file changed, 173 insertions(+), 49 deletions(-)
|
1 file changed, 171 insertions(+), 47 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index 92ff273fbe58..871c86687379 100644
|
index ce94f923a607..0a3f33a83c01 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -24,7 +24,10 @@
|
@@ -24,7 +24,10 @@
|
||||||
@@ -191,19 +193,15 @@ index 92ff273fbe58..871c86687379 100644
|
|||||||
{
|
{
|
||||||
return (type == CMN_TYPE_DVM && id == 0x05) ||
|
return (type == CMN_TYPE_DVM && id == 0x05) ||
|
||||||
(type == CMN_TYPE_HNF && id == 0x0f);
|
(type == CMN_TYPE_HNF && id == 0x0f);
|
||||||
@@ -375,9 +420,9 @@ static ssize_t arm_cmn_event_show(struct device *dev,
|
@@ -375,7 +420,7 @@ static ssize_t arm_cmn_event_show(struct device *dev,
|
||||||
"type=0x%x,eventid=0x%x,wp_dev_sel=?,wp_chn_sel=?,wp_grp=?,wp_val=?,wp_mask=?\n",
|
"type=0x%x,eventid=0x%x,wp_dev_sel=?,wp_chn_sel=?,wp_grp=?,wp_val=?,wp_mask=?\n",
|
||||||
eattr->type, eattr->eventid);
|
eattr->type, eattr->eventid);
|
||||||
|
|
||||||
- if (arm_cmn_is_occup_event(eattr->type, eattr->eventid))
|
- if (arm_cmn_is_occup_event(eattr->type, eattr->eventid))
|
||||||
- return snprintf(buf, PAGE_SIZE, "type=0x%x,eventid=0x%x,occupid=0x%x\n",
|
|
||||||
- eattr->type, eattr->eventid, eattr->occupid);
|
|
||||||
+ if (arm_cmn_is_occup_event(eattr->model, eattr->type, eattr->eventid))
|
+ if (arm_cmn_is_occup_event(eattr->model, eattr->type, eattr->eventid))
|
||||||
+ return sysfs_emit(buf, "type=0x%x,eventid=0x%x,occupid=0x%x\n",
|
return sysfs_emit(buf, "type=0x%x,eventid=0x%x,occupid=0x%x\n",
|
||||||
+ eattr->type, eattr->eventid, eattr->occupid);
|
eattr->type, eattr->eventid, eattr->occupid);
|
||||||
|
|
||||||
return snprintf(buf, PAGE_SIZE, "type=0x%x,eventid=0x%x\n",
|
|
||||||
eattr->type, eattr->eventid);
|
|
||||||
@@ -390,25 +435,36 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
|
@@ -390,25 +435,36 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
|
||||||
struct device *dev = kobj_to_dev(kobj);
|
struct device *dev = kobj_to_dev(kobj);
|
||||||
struct arm_cmn *cmn = to_cmn(dev_get_drvdata(dev));
|
struct arm_cmn *cmn = to_cmn(dev_get_drvdata(dev));
|
||||||
@@ -545,5 +543,5 @@ index 92ff273fbe58..871c86687379 100644
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
From f5d0979c2385c3ef43d6f2af07c14ee897835e2c Mon Sep 17 00:00:00 2001
|
From 806c281f4307dd321fe8a38ce557e8c983c3ce84 Mon Sep 17 00:00:00 2001
|
||||||
From: Robin Murphy <robin.murphy@arm.com>
|
From: Robin Murphy <robin.murphy@arm.com>
|
||||||
Date: Fri, 3 Dec 2021 11:45:02 +0000
|
Date: Fri, 3 Dec 2021 11:45:02 +0000
|
||||||
Subject: [PATCH 14/14] perf/arm-cmn: Add CI-700 Support
|
Subject: [PATCH 26/40] perf/arm-cmn: Add CI-700 Support
|
||||||
|
|
||||||
Add the identifiers and events for the CI-700 coherent interconnect.
|
Add the identifiers and events for the CI-700 coherent interconnect.
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
|||||||
1 file changed, 53 insertions(+), 4 deletions(-)
|
1 file changed, 53 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
|
||||||
index 871c86687379..e0f78b6c643c 100644
|
index 0a3f33a83c01..28ab87a6cde4 100644
|
||||||
--- a/drivers/perf/arm-cmn.c
|
--- a/drivers/perf/arm-cmn.c
|
||||||
+++ b/drivers/perf/arm-cmn.c
|
+++ b/drivers/perf/arm-cmn.c
|
||||||
@@ -175,6 +175,7 @@
|
@@ -175,6 +175,7 @@
|
||||||
@@ -146,5 +146,5 @@ index 871c86687379..e0f78b6c643c 100644
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, arm_cmn_of_match);
|
MODULE_DEVICE_TABLE(of, arm_cmn_of_match);
|
||||||
--
|
--
|
||||||
2.25.1
|
2.34.1
|
||||||
|
|
||||||
+17
-16
@@ -1,7 +1,7 @@
|
|||||||
From 3e1e61f54538e8ce4bcbb5a9a213624eafcae514 Mon Sep 17 00:00:00 2001
|
From 8db3072225e852c2ef8bcc6c95f5b22f05104f35 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
|
From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
|
||||||
Date: Mon, 18 Nov 2013 20:46:48 -0800
|
Date: Mon, 18 Nov 2013 20:46:48 -0800
|
||||||
Subject: [PATCH 18/32] ANDROID: trusty: Backport of trusty driver
|
Subject: [PATCH 27/40] ANDROID: trusty: Backport of trusty driver
|
||||||
|
|
||||||
This adds Trusty driver from android-trusty-5.10
|
This adds Trusty driver from android-trusty-5.10
|
||||||
|
|
||||||
@@ -38,6 +38,7 @@ e80d87f422fd ANDROID: trusty: Add trusty-ipc driver
|
|||||||
Upstream-Status: Backport
|
Upstream-Status: Backport
|
||||||
Change-Id: I91f71b891a1091383a298e7fb2f9030382a19ca5
|
Change-Id: I91f71b891a1091383a298e7fb2f9030382a19ca5
|
||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
|
||||||
---
|
---
|
||||||
.../devicetree/bindings/trusty/trusty-irq.txt | 67 +
|
.../devicetree/bindings/trusty/trusty-irq.txt | 67 +
|
||||||
.../devicetree/bindings/trusty/trusty-smc.txt | 6 +
|
.../devicetree/bindings/trusty/trusty-smc.txt | 6 +
|
||||||
@@ -507,10 +508,10 @@ index 000000000000..166eef1797fd
|
|||||||
+# CONFIG_LTO_CLANG is not set
|
+# CONFIG_LTO_CLANG is not set
|
||||||
+# CONFIG_LTO_CLANG_FULL is not set
|
+# CONFIG_LTO_CLANG_FULL is not set
|
||||||
diff --git a/drivers/Kconfig b/drivers/Kconfig
|
diff --git a/drivers/Kconfig b/drivers/Kconfig
|
||||||
index dcecc9f6e33f..2e9abcc98126 100644
|
index 0d399ddaa185..e346c35f42b4 100644
|
||||||
--- a/drivers/Kconfig
|
--- a/drivers/Kconfig
|
||||||
+++ b/drivers/Kconfig
|
+++ b/drivers/Kconfig
|
||||||
@@ -86,6 +86,8 @@ source "drivers/hwmon/Kconfig"
|
@@ -85,6 +85,8 @@ source "drivers/hwmon/Kconfig"
|
||||||
|
|
||||||
source "drivers/thermal/Kconfig"
|
source "drivers/thermal/Kconfig"
|
||||||
|
|
||||||
@@ -520,10 +521,10 @@ index dcecc9f6e33f..2e9abcc98126 100644
|
|||||||
|
|
||||||
source "drivers/ssb/Kconfig"
|
source "drivers/ssb/Kconfig"
|
||||||
diff --git a/drivers/Makefile b/drivers/Makefile
|
diff --git a/drivers/Makefile b/drivers/Makefile
|
||||||
index 576228037718..7d15799dbe77 100644
|
index a110338c860c..d3165b877622 100644
|
||||||
--- a/drivers/Makefile
|
--- a/drivers/Makefile
|
||||||
+++ b/drivers/Makefile
|
+++ b/drivers/Makefile
|
||||||
@@ -118,6 +118,7 @@ obj-$(CONFIG_W1) += w1/
|
@@ -117,6 +117,7 @@ obj-$(CONFIG_W1) += w1/
|
||||||
obj-y += power/
|
obj-y += power/
|
||||||
obj-$(CONFIG_HWMON) += hwmon/
|
obj-$(CONFIG_HWMON) += hwmon/
|
||||||
obj-$(CONFIG_THERMAL) += thermal/
|
obj-$(CONFIG_THERMAL) += thermal/
|
||||||
@@ -8083,17 +8084,17 @@ index 000000000000..af91035484f1
|
|||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h
|
diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h
|
||||||
index b052355ac7a3..cf6b95d9a1ec 100644
|
index 80d76b75bccd..909905cd7618 100644
|
||||||
--- a/include/uapi/linux/virtio_ids.h
|
--- a/include/uapi/linux/virtio_ids.h
|
||||||
+++ b/include/uapi/linux/virtio_ids.h
|
+++ b/include/uapi/linux/virtio_ids.h
|
||||||
@@ -39,6 +39,7 @@
|
@@ -42,6 +42,7 @@
|
||||||
#define VIRTIO_ID_9P 9 /* 9p virtio console */
|
#define VIRTIO_ID_RPROC_SERIAL 11 /* virtio remoteproc serial link */
|
||||||
#define VIRTIO_ID_RPROC_SERIAL 11 /* virtio remoteproc serial link */
|
#define VIRTIO_ID_CAIF 12 /* Virtio caif */
|
||||||
#define VIRTIO_ID_CAIF 12 /* Virtio caif */
|
#define VIRTIO_ID_MEMORY_BALLOON 13 /* virtio memory balloon */
|
||||||
+#define VIRTIO_ID_TRUSTY_IPC 13 /* virtio trusty ipc */
|
+#define VIRTIO_ID_TRUSTY_IPC 13 /* virtio trusty ipc */
|
||||||
#define VIRTIO_ID_GPU 16 /* virtio GPU */
|
#define VIRTIO_ID_GPU 16 /* virtio GPU */
|
||||||
#define VIRTIO_ID_INPUT 18 /* virtio input */
|
#define VIRTIO_ID_CLOCK 17 /* virtio clock/timer */
|
||||||
#define VIRTIO_ID_VSOCK 19 /* virtio vsock transport */
|
#define VIRTIO_ID_INPUT 18 /* virtio input */
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From 8318af58a0f5d29352d3c84be6b20fe6d1ca352f Mon Sep 17 00:00:00 2001
|
From 1ecad11415cff1f4a1f098ddb224293fcc8df4a1 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Fri, 14 Jan 2022 13:41:26 +0000
|
Date: Fri, 14 Jan 2022 13:41:26 +0000
|
||||||
Subject: [PATCH 23/32] ANDROID: trusty: Remove FFA specific initilization
|
Subject: [PATCH 28/40] ANDROID: trusty: Remove FFA specific initilization
|
||||||
|
|
||||||
Remove FFA specific initialization and its arm_ffa.h file from Trusty
|
Remove FFA specific initialization and its arm_ffa.h file from Trusty
|
||||||
driver. These changes are done so that Trusty can use ARM FFA driver
|
driver. These changes are done so that Trusty can use ARM FFA driver
|
||||||
@@ -10,6 +10,7 @@ and its related header files.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Iaad473659de94930cdf78cd7201f016d59cee8d7
|
Change-Id: Iaad473659de94930cdf78cd7201f016d59cee8d7
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
drivers/trusty/trusty-mem.c | 37 ---
|
drivers/trusty/trusty-mem.c | 37 ---
|
||||||
drivers/trusty/trusty.c | 286 +---------------
|
drivers/trusty/trusty.c | 286 +---------------
|
||||||
@@ -1072,5 +1073,5 @@ index efbb36999a8b..272d96c1c696 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From 804ef860d9757cbe31b606fd5ec68cc5454c88f8 Mon Sep 17 00:00:00 2001
|
From 162daf58abe2d00b9279fce143595b6ff546f803 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Tue, 18 Jan 2022 18:27:09 +0000
|
Date: Tue, 18 Jan 2022 18:27:09 +0000
|
||||||
Subject: [PATCH 24/32] ANDROID: trusty: Rename transfer memory function to
|
Subject: [PATCH 29/40] ANDROID: trusty: Rename transfer memory function to
|
||||||
lend memory
|
lend memory
|
||||||
|
|
||||||
Renaming trusty_transfer_memory to trusty_lend_memory allows Trusty
|
Renaming trusty_transfer_memory to trusty_lend_memory allows Trusty
|
||||||
@@ -13,6 +13,7 @@ Define TRUSTY_DEFAULT_MEM_OBJ_TAG as 0 and use that in existing calls.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Ie165a609cc4398bb916967595d0b748d54d75faf
|
Change-Id: Ie165a609cc4398bb916967595d0b748d54d75faf
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
drivers/trusty/trusty-ipc.c | 14 ++++++++----
|
drivers/trusty/trusty-ipc.c | 14 ++++++++----
|
||||||
drivers/trusty/trusty-test.c | 3 ++-
|
drivers/trusty/trusty-test.c | 3 ++-
|
||||||
@@ -187,5 +188,5 @@ index 272d96c1c696..27f635f2d12d 100644
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From 844cdefb8b0f6b1f75cf4cbaa2d9260959a26e02 Mon Sep 17 00:00:00 2001
|
From 41cab33091954ec655e7fe567c345f5a44fea122 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Fri, 14 Jan 2022 14:02:39 +0000
|
Date: Fri, 14 Jan 2022 14:02:39 +0000
|
||||||
Subject: [PATCH 25/32] ANDROID: trusty: Separate out SMC based transport
|
Subject: [PATCH 30/40] ANDROID: trusty: Separate out SMC based transport
|
||||||
|
|
||||||
This commit refactors SMC based transport operation like
|
This commit refactors SMC based transport operation like
|
||||||
smc_fastcalls, smc memory operations in a separate file.
|
smc_fastcalls, smc memory operations in a separate file.
|
||||||
@@ -9,6 +9,7 @@ smc_fastcalls, smc memory operations in a separate file.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Iebee505b7172f6247186e3bf1e0b50740b2e4dfa
|
Change-Id: Iebee505b7172f6247186e3bf1e0b50740b2e4dfa
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
drivers/trusty/Makefile | 1 +
|
drivers/trusty/Makefile | 1 +
|
||||||
drivers/trusty/trusty-private.h | 61 ++++++++++++++
|
drivers/trusty/trusty-private.h | 61 ++++++++++++++
|
||||||
@@ -491,5 +492,5 @@ index 6bd30bc1bbc9..0486827a45ca 100644
|
|||||||
s->dev->dma_parms = NULL;
|
s->dev->dma_parms = NULL;
|
||||||
kfree(s->version_str);
|
kfree(s->version_str);
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From 5566c2a41443e26068fe3a8e4a8e4b0c3a4e8ed6 Mon Sep 17 00:00:00 2001
|
From d022d0c3c6cadacf8a3a5fd2bb42c465834eef26 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Fri, 14 Jan 2022 14:22:42 +0000
|
Date: Fri, 14 Jan 2022 14:22:42 +0000
|
||||||
Subject: [PATCH 26/32] ANDROID: trusty: Modify device compatible string
|
Subject: [PATCH 31/40] ANDROID: trusty: Modify device compatible string
|
||||||
|
|
||||||
Drop smc keyword from device tree node as Trusty can use SMC or FFA
|
Drop smc keyword from device tree node as Trusty can use SMC or FFA
|
||||||
based transport.
|
based transport.
|
||||||
@@ -9,6 +9,7 @@ based transport.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Id99b52f32a2122434a22f1991c0b4cd52b0676ed
|
Change-Id: Id99b52f32a2122434a22f1991c0b4cd52b0676ed
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
Documentation/devicetree/bindings/trusty/trusty-irq.txt | 2 +-
|
Documentation/devicetree/bindings/trusty/trusty-irq.txt | 2 +-
|
||||||
Documentation/devicetree/bindings/trusty/trusty-smc.txt | 2 +-
|
Documentation/devicetree/bindings/trusty/trusty-smc.txt | 2 +-
|
||||||
@@ -52,5 +53,5 @@ index 0486827a45ca..757dd7b2c527 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From 27248b5c8cb5c1a59b08e46eb3ab918867282c1c Mon Sep 17 00:00:00 2001
|
From e7fe12a5a7e3eac7a7d549ef9a7d88e9baba1832 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Fri, 14 Jan 2022 17:52:33 +0000
|
Date: Fri, 14 Jan 2022 17:52:33 +0000
|
||||||
Subject: [PATCH 27/32] ANDROID: trusty: Add transport descriptor
|
Subject: [PATCH 32/40] ANDROID: trusty: Add transport descriptor
|
||||||
|
|
||||||
Use transport descriptor to hold transport specific operations. This
|
Use transport descriptor to hold transport specific operations. This
|
||||||
helps to add new transport to Trusty core.
|
helps to add new transport to Trusty core.
|
||||||
@@ -9,6 +9,7 @@ helps to add new transport to Trusty core.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Ibbde50de0302f6d259a7d572f0910067ce712b37
|
Change-Id: Ibbde50de0302f6d259a7d572f0910067ce712b37
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
drivers/trusty/trusty-private.h | 20 +++++++++-
|
drivers/trusty/trusty-private.h | 20 +++++++++-
|
||||||
drivers/trusty/trusty-smc.c | 6 +++
|
drivers/trusty/trusty-smc.c | 6 +++
|
||||||
@@ -205,5 +206,5 @@ index 757dd7b2c527..ec0fccfaa24c 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From 3104eb14f62df1c7c4b9038eb914514b0ff371dc Mon Sep 17 00:00:00 2001
|
From 34236d8df51d00d1167481760fda5abb56850765 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Fri, 14 Jan 2022 18:47:08 +0000
|
Date: Fri, 14 Jan 2022 18:47:08 +0000
|
||||||
Subject: [PATCH 28/32] ANDROID: trusty: Add trusty-ffa driver
|
Subject: [PATCH 33/40] ANDROID: trusty: Add trusty-ffa driver
|
||||||
|
|
||||||
Initial changes related to FFA transport support
|
Initial changes related to FFA transport support
|
||||||
- Adds FFA transport descriptor
|
- Adds FFA transport descriptor
|
||||||
@@ -14,6 +14,7 @@ Initial changes related to FFA transport support
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: I78f72b85c20e4bad4c24cf0826e96f27dcf2ee1d
|
Change-Id: I78f72b85c20e4bad4c24cf0826e96f27dcf2ee1d
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
drivers/trusty/Makefile | 1 +
|
drivers/trusty/Makefile | 1 +
|
||||||
drivers/trusty/trusty-ffa.c | 196 ++++++++++++++++++++++++++++++++
|
drivers/trusty/trusty-ffa.c | 196 ++++++++++++++++++++++++++++++++
|
||||||
@@ -308,5 +309,5 @@ index ec0fccfaa24c..4686b0d34f61 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From c552f8ed6bbd68e838732598ca74055bb696dcb3 Mon Sep 17 00:00:00 2001
|
From 996e6bae70ec2ce04061daab23f20e9c353c4227 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Tue, 18 Jan 2022 15:11:46 +0000
|
Date: Tue, 18 Jan 2022 15:11:46 +0000
|
||||||
Subject: [PATCH 29/32] ANDROID: trusty-ffa: Add support for FFA memory
|
Subject: [PATCH 34/40] ANDROID: trusty-ffa: Add support for FFA memory
|
||||||
operations
|
operations
|
||||||
|
|
||||||
Initializes Trusty mem_ops with FFA memory operations for share,
|
Initializes Trusty mem_ops with FFA memory operations for share,
|
||||||
@@ -10,6 +10,7 @@ lend, reclaim.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Id3a1eb5ae8e4721cb983c624773d39bafe25a77d
|
Change-Id: Id3a1eb5ae8e4721cb983c624773d39bafe25a77d
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
drivers/trusty/trusty-ffa.c | 102 ++++++++++++++++++++++++++++++++++++
|
drivers/trusty/trusty-ffa.c | 102 ++++++++++++++++++++++++++++++++++++
|
||||||
drivers/trusty/trusty.c | 5 ++
|
drivers/trusty/trusty.c | 5 ++
|
||||||
@@ -147,5 +148,5 @@ index 4686b0d34f61..f91c255c9897 100644
|
|||||||
static const trusty_transports_t trusty_transports[] = {
|
static const trusty_transports_t trusty_transports[] = {
|
||||||
&trusty_smc_transport,
|
&trusty_smc_transport,
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From e67cd78142984c7c4120f15ef14e1e026746af5a Mon Sep 17 00:00:00 2001
|
From 8612a35bb376a3d104fe81f07c7109a252dcd9bf Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Thu, 3 Feb 2022 11:19:38 +0000
|
Date: Thu, 3 Feb 2022 11:19:38 +0000
|
||||||
Subject: [PATCH 30/32] ANDROID: trusty-ffa: Enable FFA transport for both
|
Subject: [PATCH 35/40] ANDROID: trusty-ffa: Enable FFA transport for both
|
||||||
memory and message ops
|
memory and message ops
|
||||||
|
|
||||||
Adds new API version TRUSTY_API_VERSION_FFA and sets this as current
|
Adds new API version TRUSTY_API_VERSION_FFA and sets this as current
|
||||||
@@ -13,6 +13,7 @@ then trusty core uses FFA calls for messages and memory operations.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: I4a8b060f906a96935a7df10713026fb543e2b9a7
|
Change-Id: I4a8b060f906a96935a7df10713026fb543e2b9a7
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
drivers/trusty/trusty-ffa.c | 58 +++++++++++++++++++++++++++++++++++
|
drivers/trusty/trusty-ffa.c | 58 +++++++++++++++++++++++++++++++++++
|
||||||
drivers/trusty/trusty.c | 3 ++
|
drivers/trusty/trusty.c | 3 ++
|
||||||
@@ -138,5 +139,5 @@ index aea3f6068593..17b3d1c2c4f6 100644
|
|||||||
|
|
||||||
/* TRUSTED_OS entity calls */
|
/* TRUSTED_OS entity calls */
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+4
-3
@@ -1,7 +1,7 @@
|
|||||||
From 088162ab1852aa0f2034199e97a327b6240231db Mon Sep 17 00:00:00 2001
|
From f6ffd3bf7b561d603b350dc0274121886193fef0 Mon Sep 17 00:00:00 2001
|
||||||
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Date: Wed, 16 Mar 2022 11:14:09 +0000
|
Date: Wed, 16 Mar 2022 11:14:09 +0000
|
||||||
Subject: [PATCH 31/32] ANDROID: trusty: Make trusty transports configurable
|
Subject: [PATCH 36/40] ANDROID: trusty: Make trusty transports configurable
|
||||||
|
|
||||||
With TRUSTY_SMC_TRANSPORT set to 'y', SMC based message passing and
|
With TRUSTY_SMC_TRANSPORT set to 'y', SMC based message passing and
|
||||||
memory sharing support will be compiled in to trusty core.
|
memory sharing support will be compiled in to trusty core.
|
||||||
@@ -16,6 +16,7 @@ Not enabling any of the transport causes the build to break.
|
|||||||
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
Change-Id: Ib5bbf0d39202e6897700264d14371ae33101c1d1
|
Change-Id: Ib5bbf0d39202e6897700264d14371ae33101c1d1
|
||||||
Upstream-Status: Pending [Not submitted to upstream yet]
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
---
|
---
|
||||||
drivers/trusty/Kconfig | 30 ++++++++++++++++++++++++++++++
|
drivers/trusty/Kconfig | 30 ++++++++++++++++++++++++++++++
|
||||||
drivers/trusty/Makefile | 26 +++++++++++++++-----------
|
drivers/trusty/Makefile | 26 +++++++++++++++-----------
|
||||||
@@ -142,5 +143,5 @@ index 66273873f169..06698f3c67f9 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.30.2
|
2.34.1
|
||||||
|
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
From 71a99394b657019d234b43d9abacf9f86a3c4e4f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Date: Thu, 19 May 2022 09:56:04 +0100
|
||||||
|
Subject: [PATCH 37/40] ANDROID: trusty-log: include panic_notifier.h
|
||||||
|
|
||||||
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
|
---
|
||||||
|
drivers/trusty/trusty-log.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/trusty/trusty-log.c b/drivers/trusty/trusty-log.c
|
||||||
|
index 7b279fe63766..1bd68278d0be 100644
|
||||||
|
--- a/drivers/trusty/trusty-log.c
|
||||||
|
+++ b/drivers/trusty/trusty-log.c
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
#include <linux/trusty/smcall.h>
|
||||||
|
#include <linux/trusty/trusty.h>
|
||||||
|
#include <linux/notifier.h>
|
||||||
|
+#include <linux/panic_notifier.h>
|
||||||
|
#include <linux/scatterlist.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
#include <linux/mm.h>
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
From dfa152d399d7e6a285ab31bcc2172f61d5db907d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Date: Thu, 19 May 2022 09:59:06 +0100
|
||||||
|
Subject: [PATCH 38/40] ANDROID: trusty-ipc: fix VIRTIO_ID_TRUSTY_IPC ID
|
||||||
|
|
||||||
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
|
---
|
||||||
|
include/uapi/linux/virtio_ids.h | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h
|
||||||
|
index 909905cd7618..06ccbf2db5fa 100644
|
||||||
|
--- a/include/uapi/linux/virtio_ids.h
|
||||||
|
+++ b/include/uapi/linux/virtio_ids.h
|
||||||
|
@@ -42,6 +42,10 @@
|
||||||
|
#define VIRTIO_ID_RPROC_SERIAL 11 /* virtio remoteproc serial link */
|
||||||
|
#define VIRTIO_ID_CAIF 12 /* Virtio caif */
|
||||||
|
#define VIRTIO_ID_MEMORY_BALLOON 13 /* virtio memory balloon */
|
||||||
|
+/*
|
||||||
|
+ * todo: VIRTIO_ID_TRUSTY_IPC conflicts with VIRTIO_ID_MEMORY_BALLOON
|
||||||
|
+ * replace with unused ID and update trusty kernel header tipc_virtio_dev.h
|
||||||
|
+ */
|
||||||
|
#define VIRTIO_ID_TRUSTY_IPC 13 /* virtio trusty ipc */
|
||||||
|
#define VIRTIO_ID_GPU 16 /* virtio GPU */
|
||||||
|
#define VIRTIO_ID_CLOCK 17 /* virtio clock/timer */
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
From 6de0622bb6880b5a8e8422f6e6e847cc43231a89 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Date: Wed, 18 May 2022 18:47:55 +0100
|
||||||
|
Subject: [PATCH 39/40] gki_config: add tc/disable_mpam
|
||||||
|
|
||||||
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
|
---
|
||||||
|
arch/arm64/configs/gki_defconfig | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig
|
||||||
|
index 31d836eef904..0536759d1baa 100644
|
||||||
|
--- a/arch/arm64/configs/gki_defconfig
|
||||||
|
+++ b/arch/arm64/configs/gki_defconfig
|
||||||
|
@@ -60,7 +60,6 @@ CONFIG_ARMV8_DEPRECATED=y
|
||||||
|
CONFIG_SWP_EMULATION=y
|
||||||
|
CONFIG_CP15_BARRIER_EMULATION=y
|
||||||
|
CONFIG_SETEND_EMULATION=y
|
||||||
|
-CONFIG_ARM64_MPAM=y
|
||||||
|
CONFIG_RANDOMIZE_BASE=y
|
||||||
|
# CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
|
||||||
|
CONFIG_CMDLINE="stack_depot_disable=on kasan.stacktrace=off kvm-arm.mode=protected cgroup_disable=pressure"
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
From 2cdf0de8f42c4825f52618b9bbd2ec2084749de0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Date: Thu, 19 May 2022 16:44:13 +0100
|
||||||
|
Subject: [PATCH 40/40] ANDROID: KVM: arm64: disable FFA driver at EL2
|
||||||
|
|
||||||
|
Do not handle FFA calls
|
||||||
|
|
||||||
|
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
|
||||||
|
Upstream-Status: Pending [Not submitted to upstream yet]
|
||||||
|
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com
|
||||||
|
---
|
||||||
|
arch/arm64/kvm/hyp/nvhe/hyp-main.c | 3 +++
|
||||||
|
arch/arm64/kvm/hyp/nvhe/setup.c | 4 +++-
|
||||||
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
|
||||||
|
index 49345929af0d..463cf27712c3 100644
|
||||||
|
--- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c
|
||||||
|
+++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c
|
||||||
|
@@ -1134,8 +1134,11 @@ static void handle_host_smc(struct kvm_cpu_context *host_ctxt)
|
||||||
|
bool handled;
|
||||||
|
|
||||||
|
handled = kvm_host_psci_handler(host_ctxt);
|
||||||
|
+ /* do not handle ffa calls as EL2 FFA driver is not yet complete */
|
||||||
|
+#if 0
|
||||||
|
if (!handled)
|
||||||
|
handled = kvm_host_ffa_handler(host_ctxt);
|
||||||
|
+#endif
|
||||||
|
if (!handled)
|
||||||
|
default_host_smc_handler(host_ctxt);
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c
|
||||||
|
index 1a6f3eba5035..ce84030426d0 100644
|
||||||
|
--- a/arch/arm64/kvm/hyp/nvhe/setup.c
|
||||||
|
+++ b/arch/arm64/kvm/hyp/nvhe/setup.c
|
||||||
|
@@ -317,10 +317,12 @@ void __noreturn __pkvm_init_finalise(void)
|
||||||
|
if (ret)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
+ /* skip ffa init at EL2, use EL1 driver instead */
|
||||||
|
+#if 0
|
||||||
|
ret = hyp_ffa_init(ffa_proxy_pages);
|
||||||
|
if (ret)
|
||||||
|
goto out;
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
hyp_shadow_table_init(shadow_table_base);
|
||||||
|
out:
|
||||||
|
/*
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
+48
-44
@@ -1,8 +1,13 @@
|
|||||||
|
CONFIG_UAPI_HEADER_TEST=y
|
||||||
CONFIG_AUDIT=y
|
CONFIG_AUDIT=y
|
||||||
CONFIG_NO_HZ=y
|
CONFIG_NO_HZ=y
|
||||||
CONFIG_HIGH_RES_TIMERS=y
|
CONFIG_HIGH_RES_TIMERS=y
|
||||||
|
CONFIG_BPF_SYSCALL=y
|
||||||
|
CONFIG_BPF_JIT=y
|
||||||
|
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||||
CONFIG_PREEMPT=y
|
CONFIG_PREEMPT=y
|
||||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||||
|
CONFIG_TASKSTATS=y
|
||||||
CONFIG_TASK_XACCT=y
|
CONFIG_TASK_XACCT=y
|
||||||
CONFIG_TASK_IO_ACCOUNTING=y
|
CONFIG_TASK_IO_ACCOUNTING=y
|
||||||
CONFIG_PSI=y
|
CONFIG_PSI=y
|
||||||
@@ -34,8 +39,6 @@ CONFIG_BOOT_CONFIG=y
|
|||||||
# CONFIG_SYSFS_SYSCALL is not set
|
# CONFIG_SYSFS_SYSCALL is not set
|
||||||
# CONFIG_FHANDLE is not set
|
# CONFIG_FHANDLE is not set
|
||||||
CONFIG_KALLSYMS_ALL=y
|
CONFIG_KALLSYMS_ALL=y
|
||||||
CONFIG_BPF_SYSCALL=y
|
|
||||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
|
||||||
CONFIG_USERFAULTFD=y
|
CONFIG_USERFAULTFD=y
|
||||||
# CONFIG_RSEQ is not set
|
# CONFIG_RSEQ is not set
|
||||||
CONFIG_EMBEDDED=y
|
CONFIG_EMBEDDED=y
|
||||||
@@ -45,23 +48,22 @@ CONFIG_SLAB_FREELIST_RANDOM=y
|
|||||||
CONFIG_SLAB_FREELIST_HARDENED=y
|
CONFIG_SLAB_FREELIST_HARDENED=y
|
||||||
CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
|
CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
|
||||||
CONFIG_PROFILING=y
|
CONFIG_PROFILING=y
|
||||||
# CONFIG_ZONE_DMA is not set
|
|
||||||
CONFIG_ARCH_SUNXI=y
|
CONFIG_ARCH_SUNXI=y
|
||||||
CONFIG_ARCH_HISI=y
|
CONFIG_ARCH_HISI=y
|
||||||
CONFIG_ARCH_QCOM=y
|
CONFIG_ARCH_QCOM=y
|
||||||
CONFIG_ARCH_SPRD=y
|
|
||||||
CONFIG_SCHED_MC=y
|
CONFIG_SCHED_MC=y
|
||||||
CONFIG_NR_CPUS=32
|
CONFIG_NR_CPUS=32
|
||||||
CONFIG_PARAVIRT=y
|
CONFIG_PARAVIRT_TIME_ACCOUNTING=y
|
||||||
CONFIG_ARM64_SW_TTBR0_PAN=y
|
CONFIG_ARM64_SW_TTBR0_PAN=y
|
||||||
CONFIG_COMPAT=y
|
CONFIG_COMPAT=y
|
||||||
CONFIG_ARMV8_DEPRECATED=y
|
CONFIG_ARMV8_DEPRECATED=y
|
||||||
CONFIG_SWP_EMULATION=y
|
CONFIG_SWP_EMULATION=y
|
||||||
CONFIG_CP15_BARRIER_EMULATION=y
|
CONFIG_CP15_BARRIER_EMULATION=y
|
||||||
CONFIG_SETEND_EMULATION=y
|
CONFIG_SETEND_EMULATION=y
|
||||||
|
CONFIG_ARM64_MPAM=y
|
||||||
CONFIG_RANDOMIZE_BASE=y
|
CONFIG_RANDOMIZE_BASE=y
|
||||||
# CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
|
# CONFIG_RANDOMIZE_MODULE_REGION_FULL is not set
|
||||||
CONFIG_CMDLINE="stack_depot_disable=on kasan.stacktrace=off kvm-arm.mode=protected cgroup_disable=pressure cgroup.memory=nokmem"
|
CONFIG_CMDLINE="stack_depot_disable=on kasan.stacktrace=off kvm-arm.mode=protected cgroup_disable=pressure"
|
||||||
CONFIG_CMDLINE_EXTEND=y
|
CONFIG_CMDLINE_EXTEND=y
|
||||||
# CONFIG_DMI is not set
|
# CONFIG_DMI is not set
|
||||||
CONFIG_PM_WAKELOCKS=y
|
CONFIG_PM_WAKELOCKS=y
|
||||||
@@ -80,14 +82,11 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
|||||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||||
CONFIG_ARM_SCPI_CPUFREQ=y
|
CONFIG_ARM_SCPI_CPUFREQ=y
|
||||||
CONFIG_ARM_SCMI_CPUFREQ=y
|
CONFIG_ARM_SCMI_CPUFREQ=y
|
||||||
CONFIG_ARM_SCMI_PROTOCOL=y
|
|
||||||
# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
|
|
||||||
CONFIG_ARM_SCPI_PROTOCOL=y
|
|
||||||
# CONFIG_ARM_SCPI_POWER_DOMAIN is not set
|
|
||||||
# CONFIG_EFI_ARMSTUB_DTB_LOADER is not set
|
|
||||||
CONFIG_VIRTUALIZATION=y
|
CONFIG_VIRTUALIZATION=y
|
||||||
CONFIG_KVM=y
|
CONFIG_KVM=y
|
||||||
|
CONFIG_KVM_S2MPU=y
|
||||||
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
||||||
|
CONFIG_CRYPTO_SHA512_ARM64_CE=y
|
||||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||||
CONFIG_KPROBES=y
|
CONFIG_KPROBES=y
|
||||||
CONFIG_JUMP_LABEL=y
|
CONFIG_JUMP_LABEL=y
|
||||||
@@ -98,7 +97,8 @@ CONFIG_MODULES=y
|
|||||||
CONFIG_MODULE_UNLOAD=y
|
CONFIG_MODULE_UNLOAD=y
|
||||||
CONFIG_MODVERSIONS=y
|
CONFIG_MODVERSIONS=y
|
||||||
CONFIG_MODULE_SCMVERSION=y
|
CONFIG_MODULE_SCMVERSION=y
|
||||||
CONFIG_BLK_CGROUP_IOCOST=y
|
CONFIG_MODULE_SIG=y
|
||||||
|
CONFIG_MODULE_SIG_PROTECT=y
|
||||||
CONFIG_BLK_INLINE_ENCRYPTION=y
|
CONFIG_BLK_INLINE_ENCRYPTION=y
|
||||||
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y
|
||||||
CONFIG_IOSCHED_BFQ=y
|
CONFIG_IOSCHED_BFQ=y
|
||||||
@@ -114,9 +114,10 @@ CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
|
|||||||
CONFIG_CLEANCACHE=y
|
CONFIG_CLEANCACHE=y
|
||||||
CONFIG_CMA=y
|
CONFIG_CMA=y
|
||||||
CONFIG_CMA_DEBUGFS=y
|
CONFIG_CMA_DEBUGFS=y
|
||||||
CONFIG_CMA_SYSFS=y
|
|
||||||
CONFIG_CMA_AREAS=16
|
CONFIG_CMA_AREAS=16
|
||||||
CONFIG_READ_ONLY_THP_FOR_FS=y
|
# CONFIG_ZONE_DMA is not set
|
||||||
|
CONFIG_ANON_VMA_NAME=y
|
||||||
|
CONFIG_LRU_GEN=y
|
||||||
CONFIG_NET=y
|
CONFIG_NET=y
|
||||||
CONFIG_PACKET=y
|
CONFIG_PACKET=y
|
||||||
CONFIG_UNIX=y
|
CONFIG_UNIX=y
|
||||||
@@ -224,6 +225,7 @@ CONFIG_IP6_NF_RAW=y
|
|||||||
CONFIG_TIPC=y
|
CONFIG_TIPC=y
|
||||||
CONFIG_L2TP=y
|
CONFIG_L2TP=y
|
||||||
CONFIG_BRIDGE=y
|
CONFIG_BRIDGE=y
|
||||||
|
CONFIG_VLAN_8021Q=y
|
||||||
CONFIG_6LOWPAN=y
|
CONFIG_6LOWPAN=y
|
||||||
CONFIG_IEEE802154=y
|
CONFIG_IEEE802154=y
|
||||||
CONFIG_IEEE802154_6LOWPAN=y
|
CONFIG_IEEE802154_6LOWPAN=y
|
||||||
@@ -258,9 +260,9 @@ CONFIG_NET_ACT_POLICE=y
|
|||||||
CONFIG_NET_ACT_GACT=y
|
CONFIG_NET_ACT_GACT=y
|
||||||
CONFIG_NET_ACT_MIRRED=y
|
CONFIG_NET_ACT_MIRRED=y
|
||||||
CONFIG_NET_ACT_SKBEDIT=y
|
CONFIG_NET_ACT_SKBEDIT=y
|
||||||
|
CONFIG_NET_ACT_BPF=y
|
||||||
CONFIG_VSOCKETS=y
|
CONFIG_VSOCKETS=y
|
||||||
CONFIG_CGROUP_NET_PRIO=y
|
CONFIG_CGROUP_NET_PRIO=y
|
||||||
CONFIG_BPF_JIT=y
|
|
||||||
CONFIG_CAN=y
|
CONFIG_CAN=y
|
||||||
CONFIG_BT=y
|
CONFIG_BT=y
|
||||||
CONFIG_BT_RFCOMM=y
|
CONFIG_BT_RFCOMM=y
|
||||||
@@ -271,6 +273,11 @@ CONFIG_BT_HCIUART=y
|
|||||||
CONFIG_BT_HCIUART_LL=y
|
CONFIG_BT_HCIUART_LL=y
|
||||||
CONFIG_BT_HCIUART_BCM=y
|
CONFIG_BT_HCIUART_BCM=y
|
||||||
CONFIG_BT_HCIUART_QCA=y
|
CONFIG_BT_HCIUART_QCA=y
|
||||||
|
CONFIG_CFG80211=y
|
||||||
|
CONFIG_NL80211_TESTMODE=y
|
||||||
|
# CONFIG_CFG80211_DEFAULT_PS is not set
|
||||||
|
# CONFIG_CFG80211_CRDA_SUPPORT is not set
|
||||||
|
CONFIG_MAC80211=y
|
||||||
CONFIG_RFKILL=y
|
CONFIG_RFKILL=y
|
||||||
CONFIG_NFC=y
|
CONFIG_NFC=y
|
||||||
CONFIG_PCI=y
|
CONFIG_PCI=y
|
||||||
@@ -286,6 +293,11 @@ CONFIG_FW_LOADER_USER_HELPER=y
|
|||||||
# CONFIG_FW_CACHE is not set
|
# CONFIG_FW_CACHE is not set
|
||||||
# CONFIG_SUN50I_DE2_BUS is not set
|
# CONFIG_SUN50I_DE2_BUS is not set
|
||||||
# CONFIG_SUNXI_RSB is not set
|
# CONFIG_SUNXI_RSB is not set
|
||||||
|
CONFIG_ARM_SCMI_PROTOCOL=y
|
||||||
|
# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
|
||||||
|
CONFIG_ARM_SCPI_PROTOCOL=y
|
||||||
|
# CONFIG_ARM_SCPI_POWER_DOMAIN is not set
|
||||||
|
# CONFIG_EFI_ARMSTUB_DTB_LOADER is not set
|
||||||
CONFIG_GNSS=y
|
CONFIG_GNSS=y
|
||||||
CONFIG_BLK_DEV_LOOP=y
|
CONFIG_BLK_DEV_LOOP=y
|
||||||
CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
|
CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
|
||||||
@@ -303,7 +315,6 @@ CONFIG_SCSI_UFS_DWC_TC_PLATFORM=y
|
|||||||
CONFIG_SCSI_UFS_HISI=y
|
CONFIG_SCSI_UFS_HISI=y
|
||||||
CONFIG_SCSI_UFS_BSG=y
|
CONFIG_SCSI_UFS_BSG=y
|
||||||
CONFIG_SCSI_UFS_CRYPTO=y
|
CONFIG_SCSI_UFS_CRYPTO=y
|
||||||
CONFIG_SCSI_UFS_HPB=y
|
|
||||||
CONFIG_MD=y
|
CONFIG_MD=y
|
||||||
CONFIG_BLK_DEV_DM=y
|
CONFIG_BLK_DEV_DM=y
|
||||||
CONFIG_DM_CRYPT=y
|
CONFIG_DM_CRYPT=y
|
||||||
@@ -312,11 +323,11 @@ CONFIG_DM_SNAPSHOT=y
|
|||||||
CONFIG_DM_UEVENT=y
|
CONFIG_DM_UEVENT=y
|
||||||
CONFIG_DM_VERITY=y
|
CONFIG_DM_VERITY=y
|
||||||
CONFIG_DM_VERITY_FEC=y
|
CONFIG_DM_VERITY_FEC=y
|
||||||
CONFIG_DM_BOW=y
|
|
||||||
CONFIG_NETDEVICES=y
|
CONFIG_NETDEVICES=y
|
||||||
CONFIG_DUMMY=y
|
CONFIG_DUMMY=y
|
||||||
CONFIG_WIREGUARD=y
|
CONFIG_WIREGUARD=y
|
||||||
CONFIG_IFB=y
|
CONFIG_IFB=y
|
||||||
|
CONFIG_MACSEC=y
|
||||||
CONFIG_TUN=y
|
CONFIG_TUN=y
|
||||||
CONFIG_VETH=y
|
CONFIG_VETH=y
|
||||||
CONFIG_PPP=y
|
CONFIG_PPP=y
|
||||||
@@ -328,8 +339,6 @@ CONFIG_PPPOL2TP=y
|
|||||||
CONFIG_USB_RTL8150=y
|
CONFIG_USB_RTL8150=y
|
||||||
CONFIG_USB_RTL8152=y
|
CONFIG_USB_RTL8152=y
|
||||||
CONFIG_USB_USBNET=y
|
CONFIG_USB_USBNET=y
|
||||||
# CONFIG_USB_NET_AX8817X is not set
|
|
||||||
# CONFIG_USB_NET_AX88179_178A is not set
|
|
||||||
CONFIG_USB_NET_CDC_EEM=y
|
CONFIG_USB_NET_CDC_EEM=y
|
||||||
# CONFIG_USB_NET_NET1080 is not set
|
# CONFIG_USB_NET_NET1080 is not set
|
||||||
# CONFIG_USB_NET_CDC_SUBSET is not set
|
# CONFIG_USB_NET_CDC_SUBSET is not set
|
||||||
@@ -356,8 +365,6 @@ CONFIG_KEYBOARD_GPIO=y
|
|||||||
# CONFIG_MOUSE_PS2 is not set
|
# CONFIG_MOUSE_PS2 is not set
|
||||||
CONFIG_INPUT_JOYSTICK=y
|
CONFIG_INPUT_JOYSTICK=y
|
||||||
CONFIG_JOYSTICK_XPAD=y
|
CONFIG_JOYSTICK_XPAD=y
|
||||||
CONFIG_JOYSTICK_XPAD_FF=y
|
|
||||||
CONFIG_JOYSTICK_XPAD_LEDS=y
|
|
||||||
CONFIG_INPUT_TOUCHSCREEN=y
|
CONFIG_INPUT_TOUCHSCREEN=y
|
||||||
CONFIG_INPUT_MISC=y
|
CONFIG_INPUT_MISC=y
|
||||||
CONFIG_INPUT_UINPUT=y
|
CONFIG_INPUT_UINPUT=y
|
||||||
@@ -367,25 +374,29 @@ CONFIG_SERIAL_8250=y
|
|||||||
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
|
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
# CONFIG_SERIAL_8250_EXAR is not set
|
# CONFIG_SERIAL_8250_EXAR is not set
|
||||||
|
CONFIG_SERIAL_8250_RUNTIME_UARTS=0
|
||||||
|
CONFIG_SERIAL_8250_DW=y
|
||||||
CONFIG_SERIAL_OF_PLATFORM=y
|
CONFIG_SERIAL_OF_PLATFORM=y
|
||||||
CONFIG_SERIAL_AMBA_PL011=y
|
CONFIG_SERIAL_AMBA_PL011=y
|
||||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||||
CONFIG_SERIAL_SAMSUNG=y
|
CONFIG_SERIAL_SAMSUNG=y
|
||||||
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
|
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
|
||||||
CONFIG_SERIAL_MSM_GENI_EARLY_CONSOLE=y
|
CONFIG_SERIAL_QCOM_GENI=y
|
||||||
|
# CONFIG_SERIAL_QCOM_GENI_CONSOLE_DEFAULT_ENABLED is not set
|
||||||
|
CONFIG_SERIAL_QCOM_GENI_CONSOLE=y
|
||||||
CONFIG_SERIAL_SPRD=y
|
CONFIG_SERIAL_SPRD=y
|
||||||
CONFIG_SERIAL_SPRD_CONSOLE=y
|
CONFIG_SERIAL_SPRD_CONSOLE=y
|
||||||
CONFIG_HVC_DCC=y
|
CONFIG_HVC_DCC=y
|
||||||
CONFIG_HVC_DCC_SERIALIZE_SMP=y
|
|
||||||
CONFIG_SERIAL_DEV_BUS=y
|
CONFIG_SERIAL_DEV_BUS=y
|
||||||
CONFIG_HW_RANDOM=y
|
CONFIG_HW_RANDOM=y
|
||||||
# CONFIG_HW_RANDOM_CAVIUM is not set
|
|
||||||
# CONFIG_DEVMEM is not set
|
# CONFIG_DEVMEM is not set
|
||||||
# CONFIG_DEVPORT is not set
|
# CONFIG_DEVPORT is not set
|
||||||
|
CONFIG_RANDOM_TRUST_CPU=y
|
||||||
# CONFIG_I2C_COMPAT is not set
|
# CONFIG_I2C_COMPAT is not set
|
||||||
# CONFIG_I2C_HELPER_AUTO is not set
|
# CONFIG_I2C_HELPER_AUTO is not set
|
||||||
CONFIG_I3C=y
|
CONFIG_I3C=y
|
||||||
CONFIG_SPI=y
|
CONFIG_SPI=y
|
||||||
|
CONFIG_SPI_MEM=y
|
||||||
CONFIG_SPMI=y
|
CONFIG_SPMI=y
|
||||||
# CONFIG_SPMI_MSM_PMIC_ARB is not set
|
# CONFIG_SPMI_MSM_PMIC_ARB is not set
|
||||||
# CONFIG_PINCTRL_SUN8I_H3_R is not set
|
# CONFIG_PINCTRL_SUN8I_H3_R is not set
|
||||||
@@ -396,6 +407,7 @@ CONFIG_SPMI=y
|
|||||||
# CONFIG_PINCTRL_SUN50I_H6_R is not set
|
# CONFIG_PINCTRL_SUN50I_H6_R is not set
|
||||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||||
CONFIG_POWER_RESET_HISI=y
|
CONFIG_POWER_RESET_HISI=y
|
||||||
|
CONFIG_POWER_RESET_SYSCON=y
|
||||||
# CONFIG_HWMON is not set
|
# CONFIG_HWMON is not set
|
||||||
CONFIG_THERMAL=y
|
CONFIG_THERMAL=y
|
||||||
CONFIG_THERMAL_NETLINK=y
|
CONFIG_THERMAL_NETLINK=y
|
||||||
@@ -410,7 +422,6 @@ CONFIG_THERMAL_EMULATION=y
|
|||||||
CONFIG_WATCHDOG=y
|
CONFIG_WATCHDOG=y
|
||||||
CONFIG_WATCHDOG_CORE=y
|
CONFIG_WATCHDOG_CORE=y
|
||||||
CONFIG_MFD_ACT8945A=y
|
CONFIG_MFD_ACT8945A=y
|
||||||
CONFIG_MFD_SYSCON=y
|
|
||||||
CONFIG_REGULATOR=y
|
CONFIG_REGULATOR=y
|
||||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||||
CONFIG_RC_CORE=y
|
CONFIG_RC_CORE=y
|
||||||
@@ -433,13 +444,12 @@ CONFIG_V4L_PLATFORM_DRIVERS=y
|
|||||||
CONFIG_V4L_MEM2MEM_DRIVERS=y
|
CONFIG_V4L_MEM2MEM_DRIVERS=y
|
||||||
# CONFIG_VGA_ARB is not set
|
# CONFIG_VGA_ARB is not set
|
||||||
CONFIG_DRM=y
|
CONFIG_DRM=y
|
||||||
# CONFIG_DRM_FBDEV_EMULATION is not set
|
|
||||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||||
CONFIG_SOUND=y
|
CONFIG_SOUND=y
|
||||||
CONFIG_SND=y
|
CONFIG_SND=y
|
||||||
CONFIG_SND_HRTIMER=y
|
CONFIG_SND_HRTIMER=y
|
||||||
CONFIG_SND_DYNAMIC_MINORS=y
|
|
||||||
# CONFIG_SND_SUPPORT_OLD_API is not set
|
# CONFIG_SND_SUPPORT_OLD_API is not set
|
||||||
|
# CONFIG_SND_VERBOSE_PROCFS is not set
|
||||||
# CONFIG_SND_DRIVERS is not set
|
# CONFIG_SND_DRIVERS is not set
|
||||||
CONFIG_SND_USB_AUDIO=y
|
CONFIG_SND_USB_AUDIO=y
|
||||||
CONFIG_SND_SOC=y
|
CONFIG_SND_SOC=y
|
||||||
@@ -447,7 +457,6 @@ CONFIG_HID_BATTERY_STRENGTH=y
|
|||||||
CONFIG_HIDRAW=y
|
CONFIG_HIDRAW=y
|
||||||
CONFIG_UHID=y
|
CONFIG_UHID=y
|
||||||
CONFIG_HID_APPLE=y
|
CONFIG_HID_APPLE=y
|
||||||
CONFIG_HID_BETOP_FF=y
|
|
||||||
CONFIG_HID_PRODIKEYS=y
|
CONFIG_HID_PRODIKEYS=y
|
||||||
CONFIG_HID_ELECOM=y
|
CONFIG_HID_ELECOM=y
|
||||||
CONFIG_HID_UCLOGIC=y
|
CONFIG_HID_UCLOGIC=y
|
||||||
@@ -479,14 +488,12 @@ CONFIG_USB_STORAGE=y
|
|||||||
CONFIG_USB_UAS=y
|
CONFIG_USB_UAS=y
|
||||||
CONFIG_USB_DWC3=y
|
CONFIG_USB_DWC3=y
|
||||||
CONFIG_USB_GADGET=y
|
CONFIG_USB_GADGET=y
|
||||||
CONFIG_USB_DUMMY_HCD=y
|
|
||||||
CONFIG_USB_CONFIGFS=y
|
CONFIG_USB_CONFIGFS=y
|
||||||
CONFIG_USB_CONFIGFS_UEVENT=y
|
CONFIG_USB_CONFIGFS_UEVENT=y
|
||||||
CONFIG_USB_CONFIGFS_SERIAL=y
|
CONFIG_USB_CONFIGFS_SERIAL=y
|
||||||
CONFIG_USB_CONFIGFS_ACM=y
|
CONFIG_USB_CONFIGFS_ACM=y
|
||||||
CONFIG_USB_CONFIGFS_NCM=y
|
CONFIG_USB_CONFIGFS_NCM=y
|
||||||
CONFIG_USB_CONFIGFS_ECM=y
|
CONFIG_USB_CONFIGFS_ECM=y
|
||||||
CONFIG_USB_CONFIGFS_RNDIS=y
|
|
||||||
CONFIG_USB_CONFIGFS_EEM=y
|
CONFIG_USB_CONFIGFS_EEM=y
|
||||||
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
||||||
CONFIG_USB_CONFIGFS_F_FS=y
|
CONFIG_USB_CONFIGFS_F_FS=y
|
||||||
@@ -522,19 +529,15 @@ CONFIG_STAGING=y
|
|||||||
CONFIG_ASHMEM=y
|
CONFIG_ASHMEM=y
|
||||||
CONFIG_DEBUG_KINFO=y
|
CONFIG_DEBUG_KINFO=y
|
||||||
CONFIG_COMMON_CLK_SCPI=y
|
CONFIG_COMMON_CLK_SCPI=y
|
||||||
# CONFIG_SPRD_COMMON_CLK is not set
|
|
||||||
# CONFIG_CLK_SUNXI is not set
|
# CONFIG_CLK_SUNXI is not set
|
||||||
# CONFIG_SUNXI_CCU is not set
|
# CONFIG_SUNXI_CCU is not set
|
||||||
CONFIG_HWSPINLOCK=y
|
CONFIG_HWSPINLOCK=y
|
||||||
CONFIG_SUN4I_TIMER=y
|
|
||||||
# CONFIG_SUN50I_ERRATUM_UNKNOWN1 is not set
|
# CONFIG_SUN50I_ERRATUM_UNKNOWN1 is not set
|
||||||
CONFIG_MTK_TIMER=y
|
|
||||||
CONFIG_MAILBOX=y
|
CONFIG_MAILBOX=y
|
||||||
CONFIG_IOMMU_LIMIT_IOVA_ALIGNMENT=y
|
|
||||||
CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y
|
|
||||||
CONFIG_REMOTEPROC=y
|
CONFIG_REMOTEPROC=y
|
||||||
CONFIG_REMOTEPROC_CDEV=y
|
CONFIG_REMOTEPROC_CDEV=y
|
||||||
CONFIG_RPMSG_CHAR=y
|
CONFIG_RPMSG_CHAR=y
|
||||||
|
CONFIG_QCOM_GENI_SE=y
|
||||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||||
@@ -546,7 +549,6 @@ CONFIG_IIO_TRIGGER=y
|
|||||||
CONFIG_PWM=y
|
CONFIG_PWM=y
|
||||||
CONFIG_GENERIC_PHY=y
|
CONFIG_GENERIC_PHY=y
|
||||||
CONFIG_POWERCAP=y
|
CONFIG_POWERCAP=y
|
||||||
CONFIG_DTPM=y
|
|
||||||
CONFIG_ANDROID=y
|
CONFIG_ANDROID=y
|
||||||
CONFIG_ANDROID_BINDER_IPC=y
|
CONFIG_ANDROID_BINDER_IPC=y
|
||||||
CONFIG_ANDROID_BINDERFS=y
|
CONFIG_ANDROID_BINDERFS=y
|
||||||
@@ -637,21 +639,20 @@ CONFIG_SECURITYFS=y
|
|||||||
CONFIG_SECURITY_NETWORK=y
|
CONFIG_SECURITY_NETWORK=y
|
||||||
CONFIG_HARDENED_USERCOPY=y
|
CONFIG_HARDENED_USERCOPY=y
|
||||||
# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
|
# CONFIG_HARDENED_USERCOPY_FALLBACK is not set
|
||||||
CONFIG_FORTIFY_SOURCE=y
|
|
||||||
CONFIG_STATIC_USERMODEHELPER=y
|
CONFIG_STATIC_USERMODEHELPER=y
|
||||||
CONFIG_STATIC_USERMODEHELPER_PATH=""
|
CONFIG_STATIC_USERMODEHELPER_PATH=""
|
||||||
CONFIG_SECURITY_SELINUX=y
|
CONFIG_SECURITY_SELINUX=y
|
||||||
CONFIG_INIT_STACK_ALL_ZERO=y
|
|
||||||
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
|
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
|
||||||
CONFIG_CRYPTO_CHACHA20POLY1305=y
|
CONFIG_CRYPTO_CHACHA20POLY1305=y
|
||||||
CONFIG_CRYPTO_ADIANTUM=y
|
CONFIG_CRYPTO_ADIANTUM=y
|
||||||
CONFIG_CRYPTO_XCBC=y
|
CONFIG_CRYPTO_XCBC=y
|
||||||
CONFIG_CRYPTO_BLAKE2B=y
|
CONFIG_CRYPTO_BLAKE2B=y
|
||||||
CONFIG_CRYPTO_MD5=y
|
CONFIG_CRYPTO_MD5=y
|
||||||
|
CONFIG_CRYPTO_DES=y
|
||||||
|
CONFIG_CRYPTO_LZO=y
|
||||||
CONFIG_CRYPTO_LZ4=y
|
CONFIG_CRYPTO_LZ4=y
|
||||||
CONFIG_CRYPTO_ZSTD=y
|
CONFIG_CRYPTO_ZSTD=y
|
||||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||||
CONFIG_CRC8=y
|
|
||||||
CONFIG_XZ_DEC=y
|
CONFIG_XZ_DEC=y
|
||||||
CONFIG_DMA_CMA=y
|
CONFIG_DMA_CMA=y
|
||||||
CONFIG_STACK_HASH_ORDER=12
|
CONFIG_STACK_HASH_ORDER=12
|
||||||
@@ -660,16 +661,19 @@ CONFIG_PRINTK_CALLER=y
|
|||||||
CONFIG_DYNAMIC_DEBUG_CORE=y
|
CONFIG_DYNAMIC_DEBUG_CORE=y
|
||||||
CONFIG_DEBUG_INFO=y
|
CONFIG_DEBUG_INFO=y
|
||||||
CONFIG_DEBUG_INFO_DWARF4=y
|
CONFIG_DEBUG_INFO_DWARF4=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
CONFIG_DEBUG_INFO_BTF=y
|
||||||
|
CONFIG_MODULE_ALLOW_BTF_MISMATCH=y
|
||||||
CONFIG_HEADERS_INSTALL=y
|
CONFIG_HEADERS_INSTALL=y
|
||||||
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
|
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
CONFIG_UBSAN=y
|
CONFIG_UBSAN=y
|
||||||
CONFIG_UBSAN_TRAP=y
|
CONFIG_UBSAN_TRAP=y
|
||||||
CONFIG_UBSAN_LOCAL_BOUNDS=y
|
CONFIG_UBSAN_LOCAL_BOUNDS=y
|
||||||
# CONFIG_UBSAN_MISC is not set
|
# CONFIG_UBSAN_SHIFT is not set
|
||||||
|
# CONFIG_UBSAN_BOOL is not set
|
||||||
|
# CONFIG_UBSAN_ENUM is not set
|
||||||
CONFIG_PAGE_OWNER=y
|
CONFIG_PAGE_OWNER=y
|
||||||
CONFIG_PAGE_PINNER=y
|
CONFIG_DEBUG_STACK_USAGE=y
|
||||||
CONFIG_DEBUG_MEMORY_INIT=y
|
CONFIG_DEBUG_MEMORY_INIT=y
|
||||||
CONFIG_KASAN=y
|
CONFIG_KASAN=y
|
||||||
CONFIG_KASAN_HW_TAGS=y
|
CONFIG_KASAN_HW_TAGS=y
|
||||||
@@ -678,12 +682,12 @@ CONFIG_KFENCE_SAMPLE_INTERVAL=500
|
|||||||
CONFIG_KFENCE_NUM_OBJECTS=63
|
CONFIG_KFENCE_NUM_OBJECTS=63
|
||||||
CONFIG_PANIC_ON_OOPS=y
|
CONFIG_PANIC_ON_OOPS=y
|
||||||
CONFIG_PANIC_TIMEOUT=-1
|
CONFIG_PANIC_TIMEOUT=-1
|
||||||
CONFIG_DETECT_HUNG_TASK=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
CONFIG_WQ_WATCHDOG=y
|
CONFIG_WQ_WATCHDOG=y
|
||||||
CONFIG_SCHEDSTATS=y
|
CONFIG_SCHEDSTATS=y
|
||||||
# CONFIG_DEBUG_PREEMPT is not set
|
# CONFIG_DEBUG_PREEMPT is not set
|
||||||
CONFIG_BUG_ON_DATA_CORRUPTION=y
|
CONFIG_BUG_ON_DATA_CORRUPTION=y
|
||||||
CONFIG_TRACE_MMIO_ACCESS=y
|
CONFIG_TRACE_MMIO_ACCESS=y
|
||||||
CONFIG_TRACEFS_DISABLE_AUTOMOUNT=y
|
|
||||||
CONFIG_HIST_TRIGGERS=y
|
CONFIG_HIST_TRIGGERS=y
|
||||||
|
CONFIG_PID_IN_CONTEXTIDR=y
|
||||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||||
+4
-4
@@ -1,14 +1,14 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 Arm Limited
|
# Copyright (c) 2022 Arm Limited
|
||||||
#
|
#
|
||||||
require linux-arm64-ack.inc
|
require linux-arm64-ack.inc
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
git://android.googlesource.com/kernel/common.git;protocol=https;branch=android12-5.10-lts \
|
git://android.googlesource.com/kernel/common.git;protocol=https;branch=android13-5.15-lts \
|
||||||
file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \
|
file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \
|
||||||
file://0002-vt-conmakehash-improve-reproducibility.patch \
|
file://0002-vt-conmakehash-improve-reproducibility.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
# tag: ASB-2021-09-05_12-5.10
|
# tag: ASB-2022-05-05_13-5.15-93-ge8b3f31d7a60
|
||||||
SRCREV = "3d371f087c953c0e08a228169d4e5c44aea99416"
|
SRCREV = "e8b3f31d7a60648343ecbd45ab58dbcfc425b22c"
|
||||||
Reference in New Issue
Block a user