Skip to contentSkip to conversation

*** firmware: imx: NXP Edgelock Enclave MUAP Driver ***

PATCH Superseded Pankaj Gupta 4 participants 12 messages Apr 11, 2023 – Apr 12, 2023

Subsystems (3)

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

cover *** firmware: imx: NXP Edgelock Enclave MUAP Driver ***

The Messaging Unit module enables two processing elements within the SoC to communicate and coordinate by passing messages (e.g., data, status and control) through its interfaces.

The NXP i.MX EdgeLock Enclave Message Unit (ELE-MUAP) is specifically targeted for use between application core and Edgelocke Enclave. It allows to send messages to the EL Enclave using a shared mailbox.

Patch-set add the ELE-MU kernel driver for exchanging messages with i.MX NXP ELE IP; both from:
- User-Space Applications via character driver.
- Kernel-space, used by kernel management layers like DM-Crypt.

Pankaj Gupta (7):
doc: device tree binding addition for ele MU
arm64: dts: imx93-11x11-evk: added ele-mu
arm64: dts: imx93-11x11-evk: reserved mem-ranges to constrain ele-mu
dma-range
arm64: dts: imx8ulp-evk: added ele-mu
arm64: dts: imx8ulp-evk: reserved mem-ranges to constrain ele-mu
dma-range
firmware: imx: add ELE MU driver support
MAINTAINERS: Added maintainer details

 .../bindings/arm/freescale/fsl,ele_mu.yaml    |   90 ++
 .../devicetree/bindings/mailbox/fsl,muap.txt  |   89 ++
 MAINTAINERS                                   |    7 +
 arch/arm64/boot/dts/freescale/imx8ulp-evk.dts |   15 +
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi    |   13 +-
 .../boot/dts/freescale/imx93-11x11-evk.dts    |   15 +
 arch/arm64/boot/dts/freescale/imx93.dtsi      |   11 +-
 drivers/firmware/imx/Kconfig                  |   11 +
 drivers/firmware/imx/Makefile                 |    2 +
 drivers/firmware/imx/ele_base_msg.c           |  377 +++++
 drivers/firmware/imx/ele_mu.c                 | 1284 +++++++++++++++++
 drivers/firmware/imx/ele_mu.h                 |  174 +++
 include/linux/firmware/imx/ele_base_msg.h     |   66 +
 include/linux/firmware/imx/ele_mu_ioctl.h     |   52 +
 14 files changed, 2204 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml
 create mode 100644 Documentation/devicetree/bindings/mailbox/fsl,muap.txt
 create mode 100644 drivers/firmware/imx/ele_base_msg.c
 create mode 100644 drivers/firmware/imx/ele_mu.c
 create mode 100644 drivers/firmware/imx/ele_mu.h
 create mode 100644 include/linux/firmware/imx/ele_base_msg.h
 create mode 100644 include/linux/firmware/imx/ele_mu_ioctl.h
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/7 doc: device tree binding addition for ele MU

Documentation update with addition of new device tree for NXP ele-mu (Edgelock Enclave Message Unit), driver.

---
 .../bindings/arm/freescale/fsl,ele_mu.yaml    | 90 +++++++++++++++++++
 .../devicetree/bindings/mailbox/fsl,muap.txt  | 89 ++++++++++++++++++
 2 files changed, 179 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml
 create mode 100644 Documentation/devicetree/bindings/mailbox/fsl,muap.txt
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +90 -0
new file mode 100644
index 000000000000..8f75a43aec26
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/freescale/fsl,ele_mu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX EdgeLock Enclave MUAP driver
+
+maintainers:
+  - Pankaj Gupta <[email protected]>
+
+description: |
+  Create char devices in /dev as channels of the form /dev/ele_muXchY with X
+  the id of the driver and Y for each users. It allows to send and receive
+  messages to the NXP EdgeLock Enclave IP on NXP SoC, where current possible
+  value, i.e., supported SoC(s) are imx8ulp, imx93.
+
+properties:
+  compatible:
+    enum:
+      - fsl,imx-ele
+      - fsl,imx93-ele
+
+  mboxes:
+    description:
+      List of <&phandle type channel> - 4 channels for TX, 4 channels for RX,
+      1 channel for TXDB (see mailbox/fsl,muap.txt)
+    maxItems: 9
+
+  mbox-names:
+    items:
+      - const: tx
+      - const: rx
+
+  fsl,ele_mu_did:
+    description:
+      Owner of message-unit, is identified via Domain ID or did.
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+      - enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+  fsl,ele_mu_id:
+    description:
+      Identifier to the message-unit among the multiple message-unit that exists on SoC.
+      It is used to create the channels, default to 2
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+      - enum: [0, 1, 2, 3]
+
+  fsl,ele_max_users:
+    description:
+      Number of misclleneous devices to be created, default to 4
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+      - enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+
+  fsl,cmd_tag:
+    description:
+      Tag in message header for commands on this MU, default to 0x17
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint8
+      - enum: [0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e]
+
+  fsl,rsp_tag:
+    description:
+      Tag in message header for responses on this MU, default to 0xe1
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint8
+      - enum: [0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8]
+
+required:
+  - compatible
+  - mboxes
+  - mbox-names
+
+additionalProperties: false
+
+examples:
+  - |
+    ele_mu: ele_mu {
+      compatible = "fsl,imx93-ele";
+      mbox-names = "tx", "rx";
+      mboxes = <&s4muap 2 0
+          &s4muap 3 0>;
+
+      fsl,ele_mu_id = <1>;
+      fsl,ele_max_users = <4>;
+      fsl,cmd_tag = /bits/ 8 <0x17>;
+      fsl,rsp_tag = /bits/ 8 <0xe1>;
+    };
Documentation/devicetree/bindings/mailbox/fsl,muap.txt new file +89 -0

89 lines not on this page · raw message

Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

Re: [NXP ELE-MUAP 1/7] doc: device tree binding addition for ele MU

Please use scripts/get_maintainer.pl to cc all. DT maintainers should review this patch.

Quoted 2 lines · Pankaj Gupta

Documentation update with addition of new device tree for NXP ele-mu (Edgelock Enclave Message Unit), driver.

The subject should be "dt-bindings: [susbsys]: [module]: ..."

Quoted 5 lines
---
  .../bindings/arm/freescale/fsl,ele_mu.yaml    | 90 +++++++++++++++++++
  .../devicetree/bindings/mailbox/fsl,muap.txt  | 89 ++++++++++++++++++

No txt binding. Only yaml.

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml

Quoted 9 lines
  2 files changed, 179 insertions(+)

create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml create mode 100644 Documentation/devicetree/bindings/mailbox/fsl,muap.txt

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +0 -0
new file mode 100644
index 000000000000..8f75a43aec26

This should be firmware binding, not freescale machine.

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 7

Quoted 8 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +7 -0
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/freescale/fsl,ele_mu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX EdgeLock Enclave MUAP driver

Drop MUAP

Quoted 16 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +16 -0
+
+maintainers:
+  - Pankaj Gupta <[email protected]>
+
+description: |
+  Create char devices in /dev as channels of the form /dev/ele_muXchY with X
+  the id of the driver and Y for each users. It allows to send and receive
+  messages to the NXP EdgeLock Enclave IP on NXP SoC, where current possible
+  value, i.e., supported SoC(s) are imx8ulp, imx93.
+
+properties:
+  compatible:
+    enum:
+      - fsl,imx-ele
+      - fsl,imx93-ele
+

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 33

Quoted 10 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +10 -0
+  mboxes:
+    description:
+      List of <&phandle type channel> - 4 channels for TX, 4 channels for RX,
+      1 channel for TXDB (see mailbox/fsl,muap.txt)
+    maxItems: 9
+
+  mbox-names:
+    items:
+      - const: tx
+      - const: rx

You listed 9 mboxes handle, but you only has 2 names here?

Quoted 37 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +37 -0
+
+  fsl,ele_mu_did:
+    description:
+      Owner of message-unit, is identified via Domain ID or did.
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+      - enum: [0, 1, 2, 3, 4, 5, 6, 7]
+
+  fsl,ele_mu_id:
+    description:
+      Identifier to the message-unit among the multiple message-unit that exists on SoC.
+      It is used to create the channels, default to 2
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+      - enum: [0, 1, 2, 3]
+
+  fsl,ele_max_users:
+    description:
+      Number of misclleneous devices to be created, default to 4
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+      - enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+
+  fsl,cmd_tag:
+    description:
+      Tag in message header for commands on this MU, default to 0x17
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint8
+      - enum: [0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e]
+
+  fsl,rsp_tag:
+    description:
+      Tag in message header for responses on this MU, default to 0xe1
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint8
+      - enum: [0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8]
+

Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml line 80

Quoted 10 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +10 -0
+required:
+  - compatible
+  - mboxes
+  - mbox-names
+
+additionalProperties: false
+
+examples:
+  - |
+    ele_mu: ele_mu {

I would prefer this ele or system-controller,
mu is message unit ,should not be used.

Documentation/devicetree/bindings/mailbox/fsl,muap.txt

Quoted 11 lines
Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml new file +10 -0
+      compatible = "fsl,imx93-ele";
+      mbox-names = "tx", "rx";
+      mboxes = <&s4muap 2 0
+          &s4muap 3 0>;
+
+      fsl,ele_mu_id = <1>;
+      fsl,ele_max_users = <4>;
+      fsl,cmd_tag = /bits/ 8 <0x17>;
+      fsl,rsp_tag = /bits/ 8 <0xe1>;
+    };
Documentation/devicetree/bindings/mailbox/fsl,muap.txt +0 -0

This should be in a new patch and yaml format, but we already have fsl,mu.yaml, is there a need to add a new one here?

Regards,
Peng.

Quoted 94 lines

new file mode 100644
index 000000000000..6854ce3467fe

Documentation/devicetree/bindings/mailbox/fsl,muap.txt new file +89 -0
@@ -0,0 +1,89 @@
+NXP i.MX EdgeLock Enclave Message Unit Driver
+=================================================
+
+The Messaging Unit module enables two processing elements within the SoC to
+communicate and coordinate by passing messages (e.g., data, status and control)
+through its interfaces.
+
+The NXP i.MX EdgeLock Enclave Message Unit (ELE-MUAP) is specifically targeted
+for use between application core and Edgelocke Enclave. It allows to send
+messages to the EL Enclave using a shared mailbox.
+
+The messages must follow the protocol defined.
+
+                                     Non-Secure           +   Secure
+                                                          |
+                                                          |
+                   +---------+      +-------------+       |
+                   | ele_mu.c+<---->+imx-mailbox.c|       |
+                   |         |      |  mailbox.c  +<-->+------+    +------+
+                   +---+-----+      +-------------+    | MU X +<-->+ ELE |
+                       |                               +------+    +------+
+                       +----------------+                 |
+                       |                |                 |
+                       v                v                 |
+                   logical           logical              |
+                   receiver          waiter               |
+                      +                 +                 |
+                      |                 |                 |
+                      |                 |                 |
+                      |            +----+------+          |
+                      |            |           |          |
+                      |            |           |          |
+               device_ctx     device_ctx     device_ctx   |
+                                                          |
+                 User 0        User 1       User Y        |
+                 +------+      +------+     +------+      |
+                 |misc.c|      |misc.c|     |misc.c|      |
+ kernel space    +------+      +------+     +------+      |
+                                                          |
+  +------------------------------------------------------ |
+                     |             |           |          |
+ userspace      /dev/ele_muXch0    |           |          |
+                           /dev/ele_muXch1     |          |
+                                         /dev/ele_muXchY  |
+                                                          |
+
+ When a user sends a command to the ELE, it registers its device_ctx as
+ waiter of a response from ELE.
+
+ A user can be registered as receiver of command from the ELE.
+
+ When a message is received, the driver select the device_ctx receiving the
+ message depending on the tag in the message. It selects the device_ctx
+ accordingly.
+
+
+NXP i.MX ELE-MU Device Node:
+===========================
+Required properties:
+--------------------
+- compatible:		Shall be: "fsl,imx-ele", "fsl,imx93-ele"
+- mbox-names:		Contains the name of TX/RX channels- "tx", "rx";
+- mboxes:		Details of the shared mailbox node instance from the
+			device tree. Example values are:
+			For TX: s4muap 0 0
+			For RX: s4muap 1 0
+
+- fsl,ele_mu_id		Contains the message unit id that connects between
+			application core and NXP EL-Enclave.
+- fsl,ele_max_users	For 1 user-space application, value of >2  is suggested.
+- fsl,cmd_tag		Default value of command tag is 0x17. Though it can be
+			over-ridden for futures SoCs.
+- fsl,rsp_tag		Default value of command tag is 0xe1. Though it can be
+			over-ridden for futures SoCs.
+
+Example:
+--------
+
+	ele_mu: ele_mu {
+		compatible = "fsl,imx93-ele";
+		mbox-names = "tx", "rx";
+		mboxes = <&s4muap 2 0
+			&s4muap 3 0>;
+
+		fsl,ele_mu_id = <1>;
+		fsl,ele_max_users = <4>;
+		fsl,cmd_tag = /bits/ 8 <0x17>;
+		fsl,rsp_tag = /bits/ 8 <0xe1>;
+	};
#3 lore raw

Re: [NXP ELE-MUAP 1/7] doc: device tree binding addition for ele MU

In reply to Pankaj Gupta
Quoted 7 lines · Pankaj Gupta

Documentation update with addition of new device tree for NXP ele-mu (Edgelock Enclave Message Unit), driver.

---
 .../bindings/arm/freescale/fsl,ele_mu.yaml    | 90 +++++++++++++++++++
 .../devicetree/bindings/mailbox/fsl,muap.txt  | 89 ++++++++++++++++++

I have troubles understanding what this patch is about. And to whom. You missed several mailing lists, wrong subject prefix, bindings in TXT are not accepted.

Maybe it is not for Linux kernel, then it is fine. If this was for Linux kernel, then just NAK. Please follow Linux kernel submission process.

Best regards,
Krzysztof

#4 lore raw

PATCH 2/7 arm64: dts: imx93-11x11-evk: added ele-mu

In reply to Pankaj Gupta

adde support for ele-mu for imx93-11x11-evk.

---
 arch/arm64/boot/dts/freescale/imx93.dtsi | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx93.dtsi +10 -1
index 92e93c8af7f7..8ca2f08b7caf 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /*
- * Copyright 2022 NXP
+ * Copyright 2022-2022 NXP
  */
 
 #include <dt-bindings/clock/imx93-clock.h>
@@ -725,5 +725,14 @@ media_blk_ctrl: system-controller@4ac10000 {
 			#power-domain-cells = <1>;
 			status = "disabled";
 		};
+		ele_mu: ele-mu {
+			compatible = "fsl,imx93-ele";
+			mboxes = <&s4muap 0 0 &s4muap 1 0>;
+			mbox-names = "tx", "rx";
+			fsl,ele_mu_did = <3>;
+			fsl,ele_mu_id = <2>;
+			fsl,ele_mu_max_users = <4>;
+			status = "okay";
+		};
 	};
 };
Signature · 1 line
2.34.1
#5 lore raw

PATCH 3/7 arm64: dts: imx93-11x11-evk: reserved mem-ranges to constrain ele-mu dma-range

In reply to Pankaj Gupta

EdgeLock Enclave are has a hardware limitation of restricted access to the DDR memory range:
- 0x80000000 0x9FFFFFFF

ELE-MU driver requireis 1MB of memory. In this patch the we are reserving 1MB of ddr memory region from the lower 32-bit range.

---
 arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts +15 -0
index 477c146f985c..2e2c26e38af0 100644
@@ -7,6 +7,10 @@
 
 #include "imx93.dtsi"
 
+&ele_mu {
+	memory-region = <&ele_reserved>;
+};
+
 / {
 	model = "NXP i.MX93 11X11 EVK board";
 	compatible = "fsl,imx93-11x11-evk", "fsl,imx93";
@@ -22,6 +26,17 @@ reg_vref_1v8: regulator-adc-vref {
 		regulator-max-microvolt = <1800000>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		ele_reserved: ele-reserved@a4120000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0xa4120000 0 0x100000>;
+			no-map;
+		};
+	};
+
 	reg_usdhc2_vmmc: regulator-usdhc2 {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
Signature · 1 line
2.34.1
#6 lore raw

PATCH 4/7 arm64: dts: imx8ulp-evk: added ele-mu

In reply to Pankaj Gupta

added support for ele-mu for imx8ulp-evk.

---
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8ulp.dtsi +12 -1
index 32193a43ff49..2ab240258a67 100644
@@ -113,7 +113,7 @@ sosc: clock-sosc {
 		#clock-cells = <0>;
 	};
 
-	sram@2201f000 {
+	sram0: sram@2201f000 {
 		compatible = "mmio-sram";
 		reg = <0x0 0x2201f000 0x0 0x1000>;
 
@@ -160,6 +160,17 @@ s4muap: mailbox@27020000 {
 			#mbox-cells = <2>;
 		};
 
+		ele_mu: ele-mu {
+			compatible = "fsl,imx-ele";
+			mboxes = <&s4muap 0 0 &s4muap 1 0>;
+			mbox-names = "tx", "rx";
+			fsl,ele_mu_did = <7>;
+			fsl,ele_mu_id = <2>;
+			fsl,ele_mu_max_users = <4>;
+			status = "okay";
+			sram-pool = <&sram0>;
+		};
+
 		per_bridge3: bus@29000000 {
 			compatible = "simple-bus";
 			reg = <0x29000000 0x800000>;
Signature · 1 line
2.34.1
#7 lore raw

PATCH 5/7 arm64: dts: imx8ulp-evk: reserved mem-ranges to constrain ele-mu dma-range

In reply to Pankaj Gupta

EdgeLock Enclave are has a hardware limitation of restricted access to the DDR memory range:
- 0x90000000 - 0xAFFFFFFF

ELE-MU driver requireis 1MB of memory. In this patch the we are reserving 1MB of ddr memory region from the lower 32-bit range.

---
 arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/freescale/imx8ulp-evk.dts +15 -0
index f1c6d933a17c..d2a39e9aa951 100644
@@ -19,6 +19,17 @@ memory@80000000 {
 		device_type = "memory";
 		reg = <0x0 0x80000000 0 0x80000000>;
 	};
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		ele_reserved: ele-reserved@90000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x90000000 0 0x100000>;
+			no-map;
+		};
+	};
 
 	clock_ext_rmii: clock-ext-rmii {
 		compatible = "fixed-clock";
@@ -53,6 +64,10 @@ &usdhc0 {
 	status = "okay";
 };
 
+&ele_mu {
+	memory-region = <&ele_reserved>;
+};
+
 &fec {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&pinctrl_enet>;
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#8 lore raw

PATCH 6/7 firmware: imx: add ELE MU driver support

In reply to Pankaj Gupta

The Edgelock Enclave Message Unit (ELE MU), is a message based communication channel, to communicated with ELE Firmware.

This runs on a dedicated MU present between application core and ELE H/W IP. It exists on some i.MX processors. e.g. i.MX8ULP, i.MX93

This patch implements the mail-box based communication with ELE firmware.

---
 drivers/firmware/imx/Kconfig              |   11 +
 drivers/firmware/imx/Makefile             |    2 +
 drivers/firmware/imx/ele_base_msg.c       |  377 ++++++
 drivers/firmware/imx/ele_mu.c             | 1284 +++++++++++++++++++++
 drivers/firmware/imx/ele_mu.h             |  174 +++
 include/linux/firmware/imx/ele_base_msg.h |   66 ++
 include/linux/firmware/imx/ele_mu_ioctl.h |   52 +
 7 files changed, 1966 insertions(+)
 create mode 100644 drivers/firmware/imx/ele_base_msg.c
 create mode 100644 drivers/firmware/imx/ele_mu.c
 create mode 100644 drivers/firmware/imx/ele_mu.h
 create mode 100644 include/linux/firmware/imx/ele_base_msg.h
 create mode 100644 include/linux/firmware/imx/ele_mu_ioctl.h
drivers/firmware/imx/Kconfig +11 -0
index c027d99f2a59..8b4d627e48b8 100644
@@ -28,3 +28,14 @@ config IMX_SCU_PD
 	depends on IMX_SCU
 	help
 	  The System Controller Firmware (SCFW) based power domain driver.
+
+config IMX_EL_ENCLAVE
+	tristate "i.MX Embedded EdgeLock Enclave support."
+	depends on IMX_MBOX
+	default m if ARM64
+
+	help
+	  It is possible to use APIs exposed by the iMX EdgeLock Enclave like base, HSM &
+	  SHE using the SAB protocol via the shared Messaging Unit. This driver exposes
+	  these interfaces via a set of file descriptors allowing to configure shared
+	  memory, send and receive messages.
drivers/firmware/imx/Makefile +2 -0
index b76acbade2a0..886385e79bf2 100644
@@ -2,3 +2,5 @@
 obj-$(CONFIG_IMX_DSP)		+= imx-dsp.o
 obj-$(CONFIG_IMX_SCU)		+= imx-scu.o misc.o imx-scu-irq.o rm.o imx-scu-soc.o
 obj-$(CONFIG_IMX_SCU_PD)	+= scu-pd.o
+el_enclave-objs			= ele_mu.o ele_base_msg.o
+obj-${CONFIG_IMX_EL_ENCLAVE}	+= el_enclave.o
drivers/firmware/imx/ele_base_msg.c new file +377 -0

377 lines not on this page · raw message

drivers/firmware/imx/ele_mu.c new file +1284 -0

1,284 lines not on this page · raw message

drivers/firmware/imx/ele_mu.h new file +174 -0

174 lines not on this page · raw message

include/linux/firmware/imx/ele_base_msg.h new file +66 -0

66 lines not on this page · raw message

include/linux/firmware/imx/ele_mu_ioctl.h new file +52 -0

52 lines not on this page · raw message

Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#9 lore raw

Re: [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support

kernel test robot noticed the following build warnings:

Hi Pankaj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on shawnguo/for-next]
[also build test WARNING on robh/for-next arm/for-next arm/fixes arm64/for-next/core clk/clk-next kvmarm/next rockchip/for-next soc/for-next linus/master v6.3-rc6 next-20230411] [cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pankaj-Gupta/doc-device-tree-binding-addition-for-ele-MU/20230411-231913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
patch link:    https://lore.kernel.org/r/20230411162536.30604-7-pankaj.gupta%40nxp.com
patch subject: [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20230412/[email protected]/config)
compiler: ia64-linux-gcc (GCC) 12.1.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/80f6b85e97e7f7eb4b5d59c638adb2bdbe6d48d1
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Pankaj-Gupta/doc-device-tree-binding-addition-for-ele-MU/20230411-231913 git checkout 80f6b85e97e7f7eb4b5d59c638adb2bdbe6d48d1
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/firmware/imx/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

drivers/firmware/imx/ele_mu.c: In function 'ele_mu_fops_read':

>> drivers/firmware/imx/ele_mu.c:408:23: warning: variable 'header' set but not used [-Wunused-but-set-variable]
     408 |         struct mu_hdr header;
         |                       ^~~~~~
   drivers/firmware/imx/ele_mu.c:404:29: warning: unused variable 'ele_mu_priv' [-Wunused-variable]
     404 |         struct ele_mu_priv *ele_mu_priv = dev_ctx->priv;
         |                             ^~~~~~~~~~~

vim +/header +408 drivers/firmware/imx/ele_mu.c

392
393 /*
394 * Read a message from the MU.
395 * Blocking until a message is available.
396 */
397 static ssize_t ele_mu_fops_read(struct file *fp, char __user *buf,
398 size_t size, loff_t *ppos)
399 {
400 struct ele_mu_device_ctx *dev_ctx
401 = container_of(fp->private_data,
402 struct ele_mu_device_ctx,
403 miscdev);
404 struct ele_mu_priv *ele_mu_priv = dev_ctx->priv;
405 u32 data_size = 0, size_to_copy = 0;
406 struct ele_obuf_desc *b_desc;
407 int err;

 > 408		struct mu_hdr header;

409
410 devctx_dbg(dev_ctx, "read to buf %p(%ld), ppos=%lld\n", buf, size,
411 ((ppos) ? *ppos : 0));
412
413 if (down_interruptible(&dev_ctx->fops_lock))
414 return -EBUSY;
415
416 if (dev_ctx->status != MU_OPENED) {
417 err = -EINVAL;
418 goto exit;
419 }
420
421 /* Wait until the complete message is received on the MU. */
422 err = wait_event_interruptible(dev_ctx->wq, dev_ctx->pending_hdr != 0);
423 if (err) {
424 devctx_err(dev_ctx, "Err[0x%x]:Interrupted by signal.\n", err);
425 goto exit;
426 }
427
428 devctx_dbg(dev_ctx, "%s %s\n", __func__,
429 "message received, start transmit to user");
430
431 /* Check that the size passed as argument is larger than
432 * the one carried in the message.
433 */
434 data_size = dev_ctx->temp_resp_size * sizeof(u32);
435 size_to_copy = data_size;
436 if (size_to_copy > size) {
437 devctx_dbg(dev_ctx, "User buffer too small (%ld < %d)\n",
438 size, size_to_copy);
439 size_to_copy = size;
440 }
441
442 /* We may need to copy the output data to user before
443 * delivering the completion message.
444 */
445 while (!list_empty(&dev_ctx->pending_out)) {
446 b_desc = list_first_entry_or_null(&dev_ctx->pending_out,
447 struct ele_obuf_desc,
448 link);
449 if (b_desc->out_usr_ptr && b_desc->out_ptr) {
450 devctx_dbg(dev_ctx, "Copy output data to user\n");
451 err = (int)copy_to_user(b_desc->out_usr_ptr,
452 b_desc->out_ptr,
453 b_desc->out_size);
454 if (err) {
455 devctx_err(dev_ctx,
456 "Failure copying output data to user.");
457 err = -EFAULT;
458 goto exit;
459 }
460 }
461 __list_del_entry(&b_desc->link);
462 devm_kfree(dev_ctx->dev, b_desc);
463 }
464
465 header = *((struct mu_hdr *) (&dev_ctx->temp_resp[0]));
466
467 /* Copy data from the buffer */
468 print_hex_dump_debug("to user ", DUMP_PREFIX_OFFSET, 4, 4,
469 dev_ctx->temp_resp, size_to_copy, false);
470 err = (int)copy_to_user(buf, dev_ctx->temp_resp, size_to_copy);
471 if (err) {
472 devctx_err(dev_ctx, "Failed to copy to user\n");
473 err = -EFAULT;
474 goto exit;
475 }
476
477 err = size_to_copy;
478
479 /* free memory allocated on the shared buffers. */
480 dev_ctx->secure_mem.pos = 0;
481 dev_ctx->non_secure_mem.pos = 0;
482
483 dev_ctx->pending_hdr = 0;
484
485 exit:
486
487 up(&dev_ctx->fops_lock);
488 return err;
489 }
490

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
#10 lore raw

Re: [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support

In reply to Pankaj Gupta
kernel test robot noticed the following build warnings:

Hi Pankaj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on shawnguo/for-next]
[also build test WARNING on robh/for-next arm/for-next arm/fixes arm64/for-next/core clk/clk-next kvmarm/next rockchip/for-next soc/for-next linus/master v6.3-rc6 next-20230411] [cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pankaj-Gupta/doc-device-tree-binding-addition-for-ele-MU/20230411-231913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
patch link:    https://lore.kernel.org/r/20230411162536.30604-7-pankaj.gupta%40nxp.com
patch subject: [NXP ELE-MUAP 6/7] firmware: imx: add ELE MU driver support
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230412/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 12.1.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/80f6b85e97e7f7eb4b5d59c638adb2bdbe6d48d1
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Pankaj-Gupta/doc-device-tree-binding-addition-for-ele-MU/20230411-231913 git checkout 80f6b85e97e7f7eb4b5d59c638adb2bdbe6d48d1
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/firmware/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

In file included from include/linux/printk.h:564,

                    from include/asm-generic/bug.h:22,
                    from arch/m68k/include/asm/bug.h:32,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:13,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from arch/m68k/include/asm/irqflags.h:6,
                    from include/linux/irqflags.h:16,
                    from arch/m68k/include/asm/atomic.h:6,
                    from include/linux/atomic.h:7,
                    from include/linux/rcupdate.h:25,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/firmware/imx/ele_mu.c:6:
   drivers/firmware/imx/ele_mu.c: In function 'ele_mu_fops_write':
>> drivers/firmware/imx/ele_mu.h:17:47: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      17 |                 dev_dbg((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                                               ^~~~~~
   include/linux/dynamic_debug.h:223:29: note: in definition of macro '__dynamic_func_call_cls'
     223 |                 func(&id, ##__VA_ARGS__);                       \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:249:9: note: in expansion of macro '_dynamic_func_call_cls'
     249 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:272:9: note: in expansion of macro '_dynamic_func_call'
     272 |         _dynamic_func_call(fmt, __dynamic_dev_dbg,              \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/firmware/imx/ele_mu.h:17:17: note: in expansion of macro 'dev_dbg'
      17 |                 dev_dbg((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                 ^~~~~~~
   drivers/firmware/imx/ele_mu.h:36:9: note: in expansion of macro 'miscdev_dbg'
      36 |         miscdev_dbg(&((p_devctx)->miscdev), fmt, ##va_args)
         |         ^~~~~~~~~~~
   drivers/firmware/imx/ele_mu.c:303:9: note: in expansion of macro 'devctx_dbg'
     303 |         devctx_dbg(dev_ctx, "write from buf (%p)%ld, ppos=%lld\n", buf, size,
         |         ^~~~~~~~~~
   drivers/firmware/imx/ele_mu.h:31:47: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      31 |                 dev_err((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                                               ^~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   drivers/firmware/imx/ele_mu.h:31:17: note: in expansion of macro 'dev_err'
      31 |                 dev_err((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                 ^~~~~~~
   drivers/firmware/imx/ele_mu.h:40:9: note: in expansion of macro 'miscdev_err'
      40 |         miscdev_err((&(p_devctx)->miscdev), fmt, ##va_args)
         |         ^~~~~~~~~~~
   drivers/firmware/imx/ele_mu.c:315:17: note: in expansion of macro 'devctx_err'
     315 |                 devctx_err(dev_ctx, "User buffer too small(%ld < %x)\n",
         |                 ^~~~~~~~~~
   drivers/firmware/imx/ele_mu.h:31:47: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      31 |                 dev_err((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                                               ^~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   drivers/firmware/imx/ele_mu.h:31:17: note: in expansion of macro 'dev_err'
      31 |                 dev_err((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                 ^~~~~~~
   drivers/firmware/imx/ele_mu.h:40:9: note: in expansion of macro 'miscdev_err'
      40 |         miscdev_err((&(p_devctx)->miscdev), fmt, ##va_args)
         |         ^~~~~~~~~~~
   drivers/firmware/imx/ele_mu.c:322:17: note: in expansion of macro 'devctx_err'
     322 |                 devctx_err(dev_ctx, "User buffer too big(%ld > %lu)\n", size,
         |                 ^~~~~~~~~~
>> drivers/firmware/imx/ele_mu.h:31:47: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=]
      31 |                 dev_err((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                                               ^~~~~~
   include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                        ^~~~~~~
   drivers/firmware/imx/ele_mu.h:31:17: note: in expansion of macro 'dev_err'
      31 |                 dev_err((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                 ^~~~~~~
   drivers/firmware/imx/ele_mu.h:40:9: note: in expansion of macro 'miscdev_err'
      40 |         miscdev_err((&(p_devctx)->miscdev), fmt, ##va_args)
         |         ^~~~~~~~~~~
   drivers/firmware/imx/ele_mu.c:322:17: note: in expansion of macro 'devctx_err'
     322 |                 devctx_err(dev_ctx, "User buffer too big(%ld > %lu)\n", size,
         |                 ^~~~~~~~~~
   drivers/firmware/imx/ele_mu.c: In function 'ele_mu_fops_read':
>> drivers/firmware/imx/ele_mu.h:17:47: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      17 |                 dev_dbg((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                                               ^~~~~~
   include/linux/dynamic_debug.h:223:29: note: in definition of macro '__dynamic_func_call_cls'
     223 |                 func(&id, ##__VA_ARGS__);                       \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:249:9: note: in expansion of macro '_dynamic_func_call_cls'
     249 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:272:9: note: in expansion of macro '_dynamic_func_call'
     272 |         _dynamic_func_call(fmt, __dynamic_dev_dbg,              \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/firmware/imx/ele_mu.h:17:17: note: in expansion of macro 'dev_dbg'
      17 |                 dev_dbg((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                 ^~~~~~~
   drivers/firmware/imx/ele_mu.h:36:9: note: in expansion of macro 'miscdev_dbg'
      36 |         miscdev_dbg(&((p_devctx)->miscdev), fmt, ##va_args)
         |         ^~~~~~~~~~~
   drivers/firmware/imx/ele_mu.c:410:9: note: in expansion of macro 'devctx_dbg'
     410 |         devctx_dbg(dev_ctx, "read to buf %p(%ld), ppos=%lld\n", buf, size,
         |         ^~~~~~~~~~
   drivers/firmware/imx/ele_mu.h:17:47: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      17 |                 dev_dbg((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                                               ^~~~~~
   include/linux/dynamic_debug.h:223:29: note: in definition of macro '__dynamic_func_call_cls'
     223 |                 func(&id, ##__VA_ARGS__);                       \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:249:9: note: in expansion of macro '_dynamic_func_call_cls'
     249 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:272:9: note: in expansion of macro '_dynamic_func_call'
     272 |         _dynamic_func_call(fmt, __dynamic_dev_dbg,              \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:30: note: in expansion of macro 'dev_fmt'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/firmware/imx/ele_mu.h:17:17: note: in expansion of macro 'dev_dbg'
      17 |                 dev_dbg((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
         |                 ^~~~~~~
   drivers/firmware/imx/ele_mu.h:36:9: note: in expansion of macro 'miscdev_dbg'
      36 |         miscdev_dbg(&((p_devctx)->miscdev), fmt, ##va_args)
         |         ^~~~~~~~~~~
   drivers/firmware/imx/ele_mu.c:437:17: note: in expansion of macro 'devctx_dbg'
     437 |                 devctx_dbg(dev_ctx, "User buffer too small (%ld < %d)\n",
         |                 ^~~~~~~~~~
   drivers/firmware/imx/ele_mu.c:408:23: warning: variable 'header' set but not used [-Wunused-but-set-variable]
     408 |         struct mu_hdr header;
         |                       ^~~~~~
   drivers/firmware/imx/ele_mu.c:404:29: warning: unused variable 'ele_mu_priv' [-Wunused-variable]
     404 |         struct ele_mu_priv *ele_mu_priv = dev_ctx->priv;
         |                             ^~~~~~~~~~~

vim +17 drivers/firmware/imx/ele_mu.h

    12	
    13	/* macro to log operation of a misc device */
    14	#define miscdev_dbg(p_miscdev, fmt, va_args...)                                \
    15		({                                                                     \
    16			struct miscdevice *_p_miscdev = p_miscdev;                     \
  > 17			dev_dbg((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
    18			##va_args);                                                    \
    19		})
    20	
    21	#define miscdev_info(p_miscdev, fmt, va_args...)                               \
    22		({                                                                     \
    23			struct miscdevice *_p_miscdev = p_miscdev;                     \
    24			dev_info((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name, \
    25			##va_args);                                                    \
    26		})
    27	
    28	#define miscdev_err(p_miscdev, fmt, va_args...)                                \
    29		({                                                                     \
    30			struct miscdevice *_p_miscdev = p_miscdev;                     \
  > 31			dev_err((_p_miscdev)->parent, "%s: " fmt, (_p_miscdev)->name,  \
    32			##va_args);                                                    \
    33		})
    34	/* macro to log operation of a device context */
    35	#define devctx_dbg(p_devctx, fmt, va_args...) \
    36		miscdev_dbg(&((p_devctx)->miscdev), fmt, ##va_args)
    37	#define devctx_info(p_devctx, fmt, va_args...) \
    38		miscdev_info(&((p_devctx)->miscdev), fmt, ##va_args)
    39	#define devctx_err(p_devctx, fmt, va_args...) \
    40		miscdev_err((&(p_devctx)->miscdev), fmt, ##va_args)
    41	
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
#11 lore raw

PATCH 7/7 MAINTAINERS: Added maintainer details

In reply to Pankaj Gupta

MAINTAINERS: Added maintainer details for ele-mu driver.

---
 MAINTAINERS | 7 +++++++
 1 file changed, 7 insertions(+)
MAINTAINERS +7 -0
index d8ebab595b2a..74e3dbaf9d63 100644
@@ -8103,6 +8103,13 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/crypto/fsl-sec4.txt
 F:	drivers/crypto/caam/
 
+NXP Edgelock Enclave MU DRIVER
+M:	Pankaj Gupta <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/arm/freescale/fsl,ele_mu.yaml
+F:	drivers/firmware/imx/
+
 FREESCALE COLDFIRE M5441X MMC DRIVER
 M:	Angelo Dureghello <[email protected]>
 L:	[email protected]
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel