Xen: ARM: Improved NXP iMX8 platform support
v4 cover Xen: ARM: Improved NXP iMX8 platform support
The iMX lpuart driver added at 44e17aa60d47 ("xen/arm: Add i.MX lpuart driver") is not enough to boot a Linux based dom0 when certain drivers, such as the watchdog driver, are enabled.
We're also fixing compatibles in imx-lpuart to allow Xen to use the UART on the QXP variant as well.
When it comes to the watchdog we're currently only implementing the support for letting Dom0 manage it. There is also a desire for another approach where Xen kicks the watchdog (dom0-less use-cases etc). This approach is not covered by this patch set.
v4: (see individual patches for detailed changelog)
- Drop all SIP calls not used by iMX8Q{M,XP} (Michal Orzal)
- Sign off patch 3 (Stefano Stabellini)
v3: https://lore.kernel.org/xen-devel/[email protected]/
- Added a few more SIP calls
- Become a reviewer of IMX8Q{M,XP} related patches (Bertrand Marquis)
v2: https://lore.kernel.org/xen-devel/[email protected]/
- Added SIP call filtering (Julien Grall)
- Replace lpuart compatible instead (Julien Grall)
v1: https://lore.kernel.org/xen-devel/[email protected]
John Ernberg (3):
xen/arm: Add imx8q{m,x} platform glue
xen/drivers: imx-lpuart: Replace iMX8QM compatible with iMX8QXP
MAINTAINERS: Become a reviewer of iMX8Q{M,XP} related patches
MAINTAINERS | 5 ++ xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 139 ++++++++++++++++++++++++++++++++ xen/drivers/char/imx-lpuart.c | 2 +- 4 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 xen/arch/arm/platforms/imx8qm.c
Signature · 1 line
2.44.0
PATCH v4 1/3 xen/arm: Add imx8q{m,x} platform glue
When using Linux for dom0 there are a bunch of drivers that need to do SMC SIP calls into the firmware to enable certain hardware bits like the watchdog.
Provide a basic platform glue that implements the needed SMC forwarding.
The format of these calls are as follows:
- reg 0: function ID
- reg 1: subfunction ID (when there's a subfunction) remaining regs: args
For now we only allow Dom0 to make these calls as they are all managing hardware. There is no specification for these SIP calls, the IDs and names have been extracted from the upstream linux kernel and the vendor kernel.
Most of the SIP calls are only available for the iMX8M series of SoCs, so they are easy to reject and they need to be revisited when iMX8M series support is added.
From the other calls we can reject CPUFREQ because Dom0 cannot make an informed decision regarding CPU frequency scaling, WAKEUP_SRC is to wake up from suspend, which Xen doesn't support at this time.
This leaves the TIME SIP, OTP SIPs, BUILDINFO SIP and TEMP ALARM SIP, which for now are allowed to Dom0.
NOTE: This code is based on code found in NXP Xen tree located here:
https://github.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.c
---
v4:
- Fix coding style problems added in v3 (Michal Orzel)
- Remove all calls not currently used by Linux on imx8q{m,xp} (Michal Orzel)
- Fix {g,}printk inconsistencies, prefer gprintk (Michal Orzel)
v3:
- Adhere to style guidelines for line length and label indentation (Michal Orzel)
- Use smccc macros to build the SIP function identifier (Michal Orzel)
- Adjust platform name to be specific to QM and QXP variants (Michal Orzel)
- Pick up additional SIPs which may be used by other Linux versions (Michal Orzel)
- Changes to the commit message due to above
v2:
- Reword the commit message to be a bit clearer
- Include the link previously added as a context note to the commit message (Julien Grall)
- Add Pengs signed off (Julien Grall, Peng Fan)
- Add basic SIP call filter (Julien Grall)
- Expand the commit message a whole bunch because of the changes to the code
--- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 xen/arch/arm/platforms/imx8qm.c
xen/arch/arm/platforms/Makefile +1 -0
@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o
xen/arch/arm/platforms/imx8qm.c new file +139 -0
139 lines not on this page · raw message
Signature · 1 line
2.44.0
RE: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Quoted 217 lines
Subject: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
When using Linux for dom0 there are a bunch of drivers that need to do SMC SIP calls into the firmware to enable certain hardware bits like the watchdog.
Provide a basic platform glue that implements the needed SMC forwarding.
The format of these calls are as follows:
- reg 0: function ID
- reg 1: subfunction ID (when there's a subfunction) remaining regs: argsFor now we only allow Dom0 to make these calls as they are all managing hardware. There is no specification for these SIP calls, the IDs and names have been extracted from the upstream linux kernel and the vendor kernel.
Most of the SIP calls are only available for the iMX8M series of SoCs, so they are easy to reject and they need to be revisited when iMX8M series support is added.
From the other calls we can reject CPUFREQ because Dom0 cannot make an informed decision regarding CPU frequency scaling,
WAKEUP_SRCis to wake up from suspend, which Xen doesn't support at this time.This leaves the TIME SIP, OTP SIPs, BUILDINFO SIP and TEMP ALARM SIP, which for now are allowed to Dom0.
NOTE: This code is based on code found in NXP Xen tree located here:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub
.com%2Fnxp-imx%2Fimx-xen%2Fblob%2Flf- 5.10.y_4.13%2Fxen%2Farch%2Farm%2Fplatforms%2Fimx8qm.c&data=05%7 C02%7Cpeng.fan%40nxp.com%7C5602a2d54f074c7dcd9608dc57e69286%7 C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6384818950076004 32%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMz IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=qSf9A7yE17P 2q2%2FqXINORXh2EfFAS1%2BilhiY%2FexjcbA%3D&reserved=0Signed-off-by Peng Fan <[email protected]>[jernberg: Add SIP call filtering]Signed-off-by John Ernberg <[email protected]>---
v4:
- Fix coding style problems added in v3 (Michal Orzel)
- Remove all calls not currently used by Linux on imx8q{m,xp} (Michal Orzel)
- Fix {g,}printk inconsistencies, prefer gprintk (Michal Orzel)v3:
- Adhere to style guidelines for line length and label indentation (Michal
Orzel)
- Use smccc macros to build the SIP function identifier (Michal Orzel)
- Adjust platform name to be specific to QM and QXP variants (Michal Orzel)
- Pick up additional SIPs which may be used by other Linux versions (Michal
Orzel)
- Changes to the commit message due to abovev2:
- Reword the commit message to be a bit clearer
- Include the link previously added as a context note to the commit message
(Julien Grall)
- Add Pengs signed off (Julien Grall, Peng Fan)
- Add basic SIP call filter (Julien Grall)
- Expand the commit message a whole bunch because of the changes to the
code--- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 xen/arch/arm/platforms/imx8qm.c(quoted diff) +0
-0b/xen/arch/arm/platforms/Makefile index
8632f4115f..bec6e55d1f100644xen/arch/arm/platforms/Makefile +1
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o diff --git
a/xen/arch/arm/platforms/imx8qm.cb/xen/arch/arm/platforms/imx8qm.cnew file mode 100644 index 0000000000..3600a073e8xen/arch/arm/platforms/imx8qm.c new file +58
-0@@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* xen/arch/arm/platforms/imx8qm.c +* +* i.MX 8QM setup +* +* Copyright (c) 2016 Freescale Inc. +* Copyright 2018-2019 NXP +* +* +* Peng Fan <[email protected]> +*/ + +#include <xen/sched.h> +#include <asm/platform.h> +#include <asm/smccc.h> + +static const char *const imx8qm_dt_compat[]__initconst = { +"fsl,imx8qm" , +"fsl,imx8qxp" , +NULL +}; + +#define IMX_SIP_FID (fid) \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_CONV_64, \ + ARM_SMCCC_OWNER_SIP, \ + (fid)) + +#define IMX_SIP_F_CPUFREQ 0x1 +#define IMX_SIP_F_TIME 0x2 +#define IMX_SIP_F_WAKEUP_SRC 0x9 +#define IMX_SIP_F_OTP_WRITE 0xB + +#define IMX_SIP_TIME_SF_RTC_SET_TIME 0x00 +#define IMX_SIP_TIME_SF_WDOG_START 0x01 +#define IMX_SIP_TIME_SF_WDOG_STOP 0x02 +#define IMX_SIP_TIME_SF_WDOG_SET_ACT 0x03 +#define IMX_SIP_TIME_SF_WDOG_PING 0x04 +#define IMX_SIP_TIME_SF_WDOG_SET_TIMEOUT 0x05 +#define IMX_SIP_TIME_SF_WDOG_GET_STAT 0x06 +#define IMX_SIP_TIME_SF_WDOG_SET_PRETIME 0x07 + +static bool imx8qm_is_sip_time_call_ok (uint32_t subfunction_id) { +switch ( subfunction_id ) + { +case IMX_SIP_TIME_SF_RTC_SET_TIME : +return true; +case IMX_SIP_TIME_SF_WDOG_START : +case IMX_SIP_TIME_SF_WDOG_STOP : +case IMX_SIP_TIME_SF_WDOG_SET_ACT : +case IMX_SIP_TIME_SF_WDOG_PING : +case IMX_SIP_TIME_SF_WDOG_SET_TIMEOUT : +case IMX_SIP_TIME_SF_WDOG_GET_STAT : +case IMX_SIP_TIME_SF_WDOG_SET_PRETIME : +return true; +default : + gprintk(XENLOG_WARNING, "imx8qm: smc: time: Unknownsubfunction id %x\n",
xen/arch/arm/platforms/imx8qm.c new file +43
-0+ subfunction_id); +return false; + } +} + +static bool imx8qm_smc (struct cpu_user_regs *regs) { +uint32_t function_id =get_user_reg (regs,0 ); +uint32_t subfunction_id =get_user_reg (regs,1 ); +struct arm_smccc_res res; + +if ( !cpus_have_const_cap (ARM_SMCCC_1_1 ) ) + { +printk_once (XENLOG_WARNING + "imx8qm: smc: no SMCCC 1.1 support. Disabling + firmware calls\n"); + + return false; + } + +/* Only hardware domain may use the SIP calls */ +if ( !is_hardware_domain (current->domain) ) + { +gprintk (XENLOG_WARNING ,"imx8qm: smc: No access\n" ); +return false; + } + +switch ( function_id ) + { +case IMX_SIP_FID (IMX_SIP_F_CPUFREQ ): +/* Hardware domain can't take any informed decision here */ +return false; +case IMX_SIP_FID (IMX_SIP_F_TIME ): +if (imx8qm_is_sip_time_call_ok (subfunction_id) ) + goto allow_call; +return false; +/* Xen doesn't have suspend support */ +case IMX_SIP_FID (IMX_SIP_F_WAKEUP_SRC ): +return false; +case IMX_SIP_FID (IMX_SIP_F_OTP_WRITE ): +/* subfunction_id is the fuse number, no sensible check possible */ + goto allow_call; +default : + gprintk(XENLOG_WARNING, "imx8qm: smc: Unknown functionid %x\n",
xen/arch/arm/platforms/imx8qm.c new file +27
-0+ function_id); +return false; + } + + allow_call: +arm_smccc_1_1_smc (function_id, + subfunction_id, +get_user_reg (regs,2 ), +get_user_reg (regs,3 ), +get_user_reg (regs,4 ), +get_user_reg (regs,5 ), +get_user_reg (regs,6 ), +get_user_reg (regs,7 ), + &res); + +set_user_reg (regs,0 , res.a0); +set_user_reg (regs,1 , res.a1); +set_user_reg (regs,2 , res.a2); +set_user_reg (regs,3 , res.a3); + +return true; +} + +PLATFORM_START (imx8qm,"i.MX 8Q{M,XP}" ) + .compatible = imx8qm_dt_compat, + .smc = imx8qm_smc, +PLATFORM_END
xen/arch/arm/platforms/imx8qm.c
Quoted 10 lines
xen/arch/arm/platforms/imx8qm.c new file +9
-1+ +/* +* Local variables: +* mode: C +* c-file-style: "BSD" +* c-basic-offset: 4 +* indent-tabs-mode: nil +* End: +*/ --
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
In reply to John ErnbergHi John,
Quoted 13 lines · John Ernberg
When using Linux for dom0 there are a bunch of drivers that need to do SMC SIP calls into the firmware to enable certain hardware bits like the watchdog.
Provide a basic platform glue that implements the needed SMC forwarding.
The format of these calls are as follows:
- reg 0: function ID
- reg 1: subfunction ID (when there's a subfunction) remaining regs: args
Quoted 7 lines
For now we only allow Dom0 to make these calls as they are all managing hardware. There is no specification for these SIP calls, the IDs and names have been extracted from the upstream linux kernel and the vendor kernel.
Most of the SIP calls are only available for the iMX8M series of SoCs, so they are easy to reject and they need to be revisited when iMX8M series support is added.
Stale paragraph. Should be removed given that the driver targets only Q{M,XP}.
Quoted 7 lines
From the other calls we can reject CPUFREQ because Dom0 cannot make an informed decision regarding CPU frequency scaling,
WAKEUP_SRCis to wake up from suspend, which Xen doesn't support at this time.This leaves the TIME SIP, OTP SIPs, BUILDINFO SIP and TEMP ALARM SIP, which for now are allowed to Dom0.
BUILDINFO, TEMP ALARM are leftovers from previous revision.
Quoted 7 lines
NOTE: This code is based on code found in NXP Xen tree located here:
https://github.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.cSigned-off-by Peng Fan <[email protected]>[jernberg: Add SIP call filtering]Signed-off-by John Ernberg <[email protected]>
The commit msg can be fixed on commit.
~Michal
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Quoted 38 lines · Michal Orzel
Hi John,
Quoted 13 lines · John Ernberg
When using Linux for dom0 there are a bunch of drivers that need to do SMC SIP calls into the firmware to enable certain hardware bits like the watchdog.
Provide a basic platform glue that implements the needed SMC forwarding.
The format of these calls are as follows:
- reg 0: function ID
- reg 1: subfunction ID (when there's a subfunction) remaining regs: argsQuoted 7 lines
For now we only allow Dom0 to make these calls as they are all managing hardware. There is no specification for these SIP calls, the IDs and names have been extracted from the upstream linux kernel and the vendor kernel.
Most of the SIP calls are only available for the iMX8M series of SoCs, so they are easy to reject and they need to be revisited when iMX8M series support is added.
Stale paragraph. Should be removed given that the driver targets only Q{M,XP}.
Quoted 7 lines
From the other calls we can reject CPUFREQ because Dom0 cannot make an
informed decision regarding CPU frequency scaling,WAKEUP_SRCis to wake up from suspend, which Xen doesn't support at this time.This leaves the TIME SIP, OTP SIPs, BUILDINFO SIP and TEMP ALARM SIP, which for now are allowed to Dom0.
BUILDINFO, TEMP ALARM are leftovers from previous revision.
Quoted 4 lines
NOTE: This code is based on code found in NXP Xen tree located here:
https://github.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.c
Quoted 8 lines
Quoted 3 lines
Signed-off-by Peng Fan <[email protected]>[jernberg: Add SIP call filtering]Signed-off-by John Ernberg <[email protected]>Reviewed-by Michal Orzel <[email protected]>The commit msg can be fixed on commit.
~Michal
Apologies for forgetting to adjust that. Let me know if it's easier for you if I do a v5 with the fixed commit message.
Thanks! // John Ernberg
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Hi John,
Quoted 48 lines · John Ernberg
Quoted 45 lines · Michal Orzel
Hi John,
Quoted 13 lines · John Ernberg
When using Linux for dom0 there are a bunch of drivers that need to do SMC SIP calls into the firmware to enable certain hardware bits like the watchdog.
Provide a basic platform glue that implements the needed SMC forwarding.
The format of these calls are as follows:
- reg 0: function ID
- reg 1: subfunction ID (when there's a subfunction) remaining regs: argsQuoted 7 lines
For now we only allow Dom0 to make these calls as they are all managing hardware. There is no specification for these SIP calls, the IDs and names have been extracted from the upstream linux kernel and the vendor kernel.
Most of the SIP calls are only available for the iMX8M series of SoCs, so they are easy to reject and they need to be revisited when iMX8M series support is added.
Stale paragraph. Should be removed given that the driver targets only Q{M,XP}.
Quoted 7 lines
From the other calls we can reject CPUFREQ because Dom0 cannot make an
informed decision regarding CPU frequency scaling,WAKEUP_SRCis to wake up from suspend, which Xen doesn't support at this time.This leaves the TIME SIP, OTP SIPs, BUILDINFO SIP and TEMP ALARM SIP, which for now are allowed to Dom0.
BUILDINFO, TEMP ALARM are leftovers from previous revision.
Quoted 7 lines
NOTE: This code is based on code found in NXP Xen tree located here:
https://github.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.cSigned-off-by Peng Fan <[email protected]>[jernberg: Add SIP call filtering]Signed-off-by John Ernberg <[email protected]>Reviewed-by Michal Orzel <[email protected]>The commit msg can be fixed on commit.
Quoted 7 lines
Quoted 1 line
~Michal
Apologies for forgetting to adjust that. Let me know if it's easier for you if I do a v5 with the fixed commit message.
Thanks! // John Ernberg
The series is already committed and Stefano fixed my remarks on commit.
~Michal
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
In reply to John ErnbergHi John,
I saw this patch was committed. I have one question this may require some adjustment.
Quoted 23 lines · John Ernberg
--- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.cxen/arch/arm/platforms/Makefile +1
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.oxen/arch/arm/platforms/imx8qm.c new file +0
-0
xen/arch/arm/platforms/imx8qm.c line 1
Quoted 1 line
xen/arch/arm/platforms/imx8qm.c new file +1
-0@@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */
The majority of Xen code is using GPL-2.0-only. In the early days for Xen on Arm we started to use GPLv2+ which I consider it was a mistake. Unfortunately this started to spread as people copied/pasted the same copyright headers.
So can you confirm whether you intended to use GPL-2.0+? If not would you be able to send a patch to adjust it? (Better to it before there are more modifications).
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Quoted 38 lines · Julien Grall
Hi John,
I saw this patch was committed. I have one question this may require some adjustment.
Quoted 25 lines · John Ernberg
---
xen/arch/arm/platforms/Makefile | 1 +xen/arch/arm/platforms/imx8qm.c| 139 ++++++++++++++++++++++++++++++++2 files changed, 140 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.cxen/arch/arm/platforms/Makefile +0
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.oobj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o
xen/arch/arm/platforms/imx8qm.c new file +0
-0xen/arch/arm/platforms/imx8qm.c line 1
Quoted 1 line
xen/arch/arm/platforms/imx8qm.c new file +1
-0@@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ The majority of Xen code is using GPL-2.0-only. In the early days for Xen on Arm we started to use GPLv2+ which I consider it was a mistake. Unfortunately this started to spread as people copied/pasted the same copyright headers.
Quoted 3 lines
So can you confirm whether you intended to use GPL-2.0+? If not would you be able to send a patch to adjust it? (Better to it before there are more modifications).
Julien: I've called you out multiple times before.
Don't ever bully contributors into changing licensing. It is unacceptable behaviour, and in most cases - including this one by the looks of things - not legal.
John: Thankyou for your contribution. It has been made under a license compatible with the rest of Xen. There is no need to make any change, and please do not feel pressured into doing so.
~Andrew
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Quoted 39 lines · Andrew Cooper
Quoted 38 lines · Julien Grall
Hi John,
I saw this patch was committed. I have one question this may require some adjustment.
Quoted 25 lines · John Ernberg
--- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.cxen/arch/arm/platforms/Makefile +1
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.oxen/arch/arm/platforms/imx8qm.c new file +0
-0xen/arch/arm/platforms/imx8qm.c line 1
Quoted 1 line
xen/arch/arm/platforms/imx8qm.c new file +1
-0@@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ The majority of Xen code is using GPL-2.0-only. In the early days for Xen on Arm we started to use GPLv2+ which I consider it was a mistake. Unfortunately this started to spread as people copied/pasted the same copyright headers.
Quoted 5 lines
Quoted 3 lines
So can you confirm whether you intended to use GPL-2.0+? If not would you be able to send a patch to adjust it? (Better to it before there are more modifications).
Julien: I've called you out multiple times before.
And there are multiple thread explaining why I am requesting if we can use GPLv2-only. In fact from CONTRIBUTING:
The recommended license of a directory will depend on the COPYING file. If the new file is using a different license, this should be highlighted and discussed in the commit message or cover letter introducing the file.
Quoted 3 lines
Don't ever bully contributors into changing licensing. It is unacceptable behaviour, and in most cases - including this one by the looks of things - not legal.
I don't think I have bullied the contributor. I have asked politely whether it can be done. There is nothing illegal (see above).
The problematic behavior is you trying to pressure the other people to accept your point of view by been condescending or insulting them like you did here.
I have reported this behavior several times to CoC. And I guess this need to happen again.
Cheers,
Signature · 1 line
Julien Grall
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Hi Julien,
Quoted 49 lines · Julien Grall
Quoted 40 lines · Andrew Cooper
Quoted 39 lines · Julien Grall
Hi John,
I saw this patch was committed. I have one question this may require some adjustment.
Quoted 26 lines · John Ernberg
---
xen/arch/arm/platforms/Makefile | 1 +
xen/arch/arm/platforms/imx8qm.c| 139
++++++++++++++++++++++++++++++++2 files changed, 140 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.cxen/arch/arm/platforms/Makefile +0
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.oobj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o
xen/arch/arm/platforms/imx8qm.c new file +0
-0xen/arch/arm/platforms/imx8qm.c line 1
Quoted 1 line
xen/arch/arm/platforms/imx8qm.c new file +1
-0@@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ The majority of Xen code is using GPL-2.0-only. In the early days for Xen on Arm we started to use GPLv2+ which I consider it was a mistake. Unfortunately this started to spread as people copied/pasted the same copyright headers.
Quoted 5 lines
Quoted 3 lines
So can you confirm whether you intended to use GPL-2.0+? If not would you be able to send a patch to adjust it? (Better to it before there are more modifications).
Julien: I've called you out multiple times before.
Quoted 8 lines
And there are multiple thread explaining why I am requesting if we can use GPLv2-only. In fact from CONTRIBUTING:
The recommended license of a directory will depend on the COPYING file. If the new file is using a different license, this should be highlighted and discussed in the commit message or cover letter introducing the file.
Since part of the code was not written by me, but by Peng, I think both of us need to agree to a license change if one is to be made.
I am personally fine with either license.
Quoted 6 lines
Quoted 3 lines
Don't ever bully contributors into changing licensing. It is unacceptable behaviour, and in most cases - including this one by the looks of things - not legal.
I don't think I have bullied the contributor. I have asked politely whether it can be done. There is nothing illegal (see above).
Just adding: I did not feel bullied here.
Quoted 10 lines
The problematic behavior is you trying to pressure the other people to accept your point of view by been condescending or insulting them like you did here.
I have reported this behavior several times to CoC. And I guess this need to happen again.
Cheers,
Best regards // John Ernberg
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Hi John,
Quoted 55 lines · John Ernberg
Hi Julien,
Quoted 52 lines · Julien Grall
Quoted 40 lines · Andrew Cooper
Quoted 39 lines · Julien Grall
Hi John,
I saw this patch was committed. I have one question this may require some adjustment.
Quoted 26 lines · John Ernberg
--- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.cxen/arch/arm/platforms/Makefile +1
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.oxen/arch/arm/platforms/imx8qm.c new file +0
-0xen/arch/arm/platforms/imx8qm.c line 1
Quoted 1 line
xen/arch/arm/platforms/imx8qm.c new file +1
-0@@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ The majority of Xen code is using GPL-2.0-only. In the early days for Xen on Arm we started to use GPLv2+ which I consider it was a mistake. Unfortunately this started to spread as people copied/pasted the same copyright headers.
Quoted 5 lines
Quoted 3 lines
So can you confirm whether you intended to use GPL-2.0+? If not would you be able to send a patch to adjust it? (Better to it before there are more modifications).
Julien: I've called you out multiple times before.
And there are multiple thread explaining why I am requesting if we can use GPLv2-only. In fact from CONTRIBUTING:
Quoted 8 lines
Quoted 5 lines
The recommended license of a directory will depend on the COPYING file. If the new file is using a different license, this should be highlighted and discussed in the commit message or cover letter introducing the file.
Since part of the code was not written by me, but by Peng, I think both of us need to agree to a license change if one is to be made.
Ah I didn't realize that Peng also contributed. Let's wait if he is happy with the change.
Also, offline, I was pointed out that I could explain a little bit more why I asked if this could be changed. From [1]:
"IIRC from past discussion there are two broads concern with GPLv2+:
- We are leaving the choice of which license applies to the person
copying the code. So if a new version is released that is less favorable to the initial contributor, then we have no leverage.
- Some companies are rather cautious to contribute code that may be
licensed under GPLv3 (would be allowed with GPLv2+).
The later is particularly a problem because not many people realize that a fair part of Xen on Arm is GPLv2+. I never really understood why we chose that (this was before my time) but this got spread as the existing copyright was added to a new file. Admittely, the contributor should be more cautious. But I would not say this is trivial to spot the difference."
Cheers,
[1] https://lore.kernel.org/xen-devel/[email protected]/
Signature · 1 line
Julien Grall
RE: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Hi Julien, John,
Quoted 66 lines
Subject: Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
Hi John,
Quoted 42 lines · John Ernberg
Hi Julien,
Quoted 39 lines · Julien Grall
Quoted 36 lines · Andrew Cooper
Quoted 35 lines · Julien Grall
Hi John,
I saw this patch was committed. I have one question this may require some adjustment.
Quoted 25 lines · John Ernberg
--- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 139 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.c(quoted diff) +0
-0b/xen/arch/arm/platforms/Makefile index
8632f4115f..bec6e55d1f100644xen/arch/arm/platforms/Makefile +1
-1@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.o diff --git a/xen/arch/arm/platforms/imx8qm.c
b/xen/arch/arm/platforms/imx8qm.cnew file mode 100644 index 0000000000..3600a073e8xen/arch/arm/platforms/imx8qm.c line 1
Quoted 1 line
xen/arch/arm/platforms/imx8qm.c new file +1
-0@@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ The majority of Xen code is using GPL-2.0-only. In the early days for Xen on Arm we started to use GPLv2+ which I consider it was a
mistake.
Quoted 18 lines
Quoted 17 lines
Quoted 8 lines
Quoted 6 lines
Unfortunately this started to spread as people copied/pasted the same copyright headers.
So can you confirm whether you intended to use GPL-2.0+? If not would you be able to send a patch to adjust it? (Better to it before there are more modifications).
Julien: I've called you out multiple times before.
And there are multiple thread explaining why I am requesting if we can use GPLv2-only. In fact from CONTRIBUTING:
The recommended license of a directory will depend on the COPYING file. If the new file is using a different license, this should be highlighted and discussed in the commit message or cover letter introducing the file.
Quoted 5 lines
Quoted 2 lines
Since part of the code was not written by me, but by Peng, I think both of us need to agree to a license change if one is to be made.
Ah I didn't realize that Peng also contributed. Let's wait if he is happy with the change.
I am ok with the change.
Thanks,
Peng.
Quoted 31 lines
Also, offline, I was pointed out that I could explain a little bit more why I asked if this could be changed. From [1]:
"IIRC from past discussion there are two broads concern with GPLv2+:
- We are leaving the choice of which license applies to the person copying
the code. So if a new version is released that is less favorable to the initial contributor, then we have no leverage.
- Some companies are rather cautious to contribute code that may be
licensed under GPLv3 (would be allowed with GPLv2+).The later is particularly a problem because not many people realize that a fair part of Xen on Arm is GPLv2+. I never really understood why we chose that (this was before my time) but this got spread as the existing copyright was added to a new file. Admittely, the contributor should be more cautious. But I would not say this is trivial to spot the difference."
Cheers,
[1]
https://lore.ke/
rnel.org%2Fxen-devel%2Ff235f6f8-d585-4e24-7fc8- 3f2df9240c9d%40xen.org%2F&data=05%7C02%7Cpeng.fan%40nxp.com%7C 07ac104b960d476c349f08dc5d420db6%7C686ea1d3bc2b4c6fa92cd99c5c3 01635%7C0%7C0%7C638487785488861385%7CUnknown%7CTWFpbGZsb3 d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0 %3D%7C0%7C%7C%7C&sdata=d5RQJ8nek5a8Xgi%2B%2F9g3GqDL8CZmd3c O9EN6w57S9qE%3D&reserved=0--
Julien Grall
Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue
In reply to Julien GrallHi everyone,
We all have a responsibility and pledge to make this community a welcoming environment.
As such, I would like to request we keep the Code of Conduct and patch discussions separate.
Should there be a need for any Code of Conduct complaints/investigations, this will be treated separately.
Thank you John for your contributions.
Many thanks,
Kelly Choi
Community Manager
Xen Project
Quoted 76 lines · Julien Grall
Quoted 10 lines · Andrew Cooper
Quoted 9 lines · Julien Grall
Hi John,
I saw this patch was committed. I have one question this may require some adjustment.
Quoted 3 lines · John Ernberg
--- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/imx8qm.c | 139++++++++++++++++++++++++++++++++
Quoted 29 lines
Quoted 29 lines
Quoted 22 lines
2 files changed, 140 insertions(+)create mode 100644
xen/arch/arm/platforms/imx8qm.cxen/arch/arm/platforms/Makefile +1
-0@@ -9,5 +9,6 @@ obj-$(CONFIG_ALL_PLAT) += sunxi.o obj-$(CONFIG_ALL64_PLAT) += thunderx.o obj-$(CONFIG_ALL64_PLAT) += xgene-storm.o obj-$(CONFIG_ALL64_PLAT) += brcm-raspberry-pi.o +obj-$(CONFIG_ALL64_PLAT) += imx8qm.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp.o obj-$(CONFIG_MPSOC_PLATFORM) += xilinx-zynqmp-eemi.oxen/arch/arm/platforms/imx8qm.c new file +0
-0xen/arch/arm/platforms/imx8qm.c line 1
Quoted 1 line
xen/arch/arm/platforms/imx8qm.c new file +1
-0@@ -0,0 +1,139 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ The majority of Xen code is using GPL-2.0-only. In the early days for Xen on Arm we started to use GPLv2+ which I consider it was a mistake. Unfortunately this started to spread as people copied/pasted the same copyright headers.
Quoted 5 lines
Quoted 3 lines
So can you confirm whether you intended to use GPL-2.0+? If not would you be able to send a patch to adjust it? (Better to it before there are more modifications).
Julien: I've called you out multiple times before.
And there are multiple thread explaining why I am requesting if we can use GPLv2-only. In fact from CONTRIBUTING:
The recommended license of a directory will depend on the COPYING file. If the new file is using a different license, this should be highlighted and discussed in the commit message or cover letter introducing the file.
Quoted 3 lines
Don't ever bully contributors into changing licensing. It is unacceptable behaviour, and in most cases - including this one by the looks of things - not legal.
I don't think I have bullied the contributor. I have asked politely whether it can be done. There is nothing illegal (see above).
The problematic behavior is you trying to pressure the other people to accept your point of view by been condescending or insulting them like you did here.
I have reported this behavior several times to CoC. And I guess this need to happen again.
Cheers,
--
Julien Grall
PATCH v4 2/3 xen/drivers: imx-lpuart: Replace iMX8QM compatible with iMX8QXP
In reply to John ErnbergAllow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM.
Since the fsl,imx8qm-lpuart compatible in Linux exists in name only and is not used in the driver any iMX8QM device tree that can boot Linux must set fsl,imx8qxp-lpuart compatible as well as the QM one.
Thus we replace the compatible rather than adding just another one.
---
v4:
- no changes
v3:
- no changes
v2:
- Replace the compatible rather than adding to the list (Julien Grall)
- Reword commit message to reflect the above.
- Collect Julien's ack
--- xen/drivers/char/imx-lpuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/char/imx-lpuart.c +1 -1
@@ -236,7 +236,7 @@ static int __init imx_lpuart_init(struct dt_device_node *dev,static const struct dt_device_match imx_lpuart_dt_compat[]__initconst = { -DT_MATCH_COMPATIBLE ("fsl,imx8qm-lpuart" ), +DT_MATCH_COMPATIBLE ("fsl,imx8qxp-lpuart" ), {/* sentinel */ }, };
Signature · 1 line
2.44.0
RE: [PATCH v4 2/3] xen/drivers: imx-lpuart: Replace iMX8QM compatible with iMX8QXP
Quoted 36 lines
Subject: [PATCH v4 2/3] xen/drivers: imx-lpuart: Replace iMX8QM compatible with iMX8QXP
Allow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM.
Since the fsl,imx8qm-lpuart compatible in Linux exists in name only and is not used in the driver any iMX8QM device tree that can boot Linux must set fsl,imx8qxp-lpuart compatible as well as the QM one.
Thus we replace the compatible rather than adding just another one.
Signed-off-by John Ernberg <[email protected]>Acked-by Julien Grall <[email protected]>---
v4:
- no changesv3:
- no changesv2:
- Replace the compatible rather than adding to the list (Julien Grall)
- Reword commit message to reflect the above.
- Collect Julien's ack--- xen/drivers/char/imx-lpuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/drivers/char/imx-lpuart.c +0
-0
xen/drivers/char/imx-lpuart.c static int __init imx_lpuart_init(struct · line 240
Quoted 6 lines
xen/drivers/char/imx-lpuart.c +1
-1@@ -236,7 +236,7 @@ static int __init imx_lpuart_init(struct dt_device_node *dev, static const struct dt_device_match imx_lpuart_dt_compat[] __initconst = { -DT_MATCH_COMPATIBLE ("fsl,imx8qm-lpuart" ), +DT_MATCH_COMPATIBLE ("fsl,imx8qxp-lpuart" ), {/* sentinel */ },
Quoted 4 lines
xen/drivers/char/imx-lpuart.c +0
-1}; --2.44.0
PATCH v4 3/3 MAINTAINERS: Become a reviewer of iMX8Q{M,XP} related patches
In reply to John ErnbergI have experience with the IMX8QXP, and the supported parts of the IMX8QM are identical.
Help review patches touching these areas.
---
v4:
- Properly sign the patch off (Stefano Stabellini)
- Pick up Stefano's ack
v3:
- New patch (Bertrand Marquis)
--- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+)
MAINTAINERS +5 -0
@@ -337,6 +337,11 @@ F: tools/misc/xenhypfs.c F: xen/common/hypfs.c F: xen/include/xen/hypfs.h +IMX8QM/QXP SUPPORT +R: John Ernberg <[email protected]> +F: xen/arch/arm/platforms/imx8qm.c +F: xen/drivers/char/imx-lpuart.c + INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT) R: Lukasz Hawrylko <[email protected]> R: Daniel P. Smith <[email protected]>
Signature · 1 line
2.44.0
RE: [PATCH v4 3/3] MAINTAINERS: Become a reviewer of iMX8Q{M,XP} related patches
Quoted 30 lines
Subject: [PATCH v4 3/3]
MAINTAINERS: Become a reviewer of iMX8Q{M,XP} related patchesI have experience with the IMX8QXP, and the supported parts of the IMX8QM are identical.
Help review patches touching these areas.
Signed-off-by John Ernberg <[email protected]>---
v4:
- Properly sign the patch off (Stefano Stabellini)
- Pick up Stefano's ackv3:
- New patch (Bertrand Marquis)--- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+)MAINTAINERS +0
-0@@ -337,6 +337,11 @@ F: tools/misc/xenhypfs.c F: xen/common/hypfs.c F: xen/include/xen/hypfs.h
MAINTAINERS F: tools/misc/xenhypfs.c
Quoted 10 lines
MAINTAINERS +5
-1+IMX8QM/QXP SUPPORT +R: John Ernberg <[email protected]> +F: xen/arch/arm/platforms/imx8qm.c +F: xen/drivers/char/imx-lpuart.c + INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT) R: Lukasz Hawrylko <[email protected]> R: Daniel P. Smith <[email protected]> --