public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add AIC support for A7-A11 SoCs
@ 2024-08-29  9:03 Nick Chan
  2024-08-29  9:03 ` [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles Nick Chan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Nick Chan @ 2024-08-29  9:03 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig, Thomas Gleixner,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, asahi,
	linux-arm-kernel, linux-kernel, devicetree
  Cc: ~postmarketos/upstreaming, Nick Chan

Hi,

This series is a second attempt at adding support for A7-A11 SoCs to
Linux, it is based on a previous attempt, which you can find at [1].
However, there have been quite a bit of changes.

First, the boot process has changed, now, the boot process includes
a "1337" version of checkra1n [2], a custom PongoOS binary [3], and
a modified version of m1n1 [4]. The kernel is appended to m1n1 and loaded
by it.

This attempt also supports SMP, which has uncovered some differences
in the A7-A11 AIC. Namely, although A11 supported fast IPI, it only
supported "global" fast IPIs via SYS_IMP_APL_IPI_RR_GLOBAL_EL1,
and SYS_IMP_APL_IPI_RR_LOCAL_EL1 does not exist on A11. As a result,
there are now three feature levels:

A7 - A10: No fast IPI
A11: "Global" fast IPI
M1: Global and Local fast IPI

Each feature level is strictly an extension of the previous, for example,
M1 will also work with the A7-A10 compatible. As a result, the
modifications only includes if'ing out of features, in order to make
the existing driver work on older SoCs.

The A10(X) contains P-core and E-core pairs where only one core in each
pair may be active at one time, controlled by CPU frequency. A RFC patch
will be posted to disable 32-bit executable support on A10(X), as it only
supported 16KB page size anyways. However, such a patch is not required
to run AArch64 Linux on A10. At worst, any attempt to run 32-bit
executables will result in the process crashing.

Initial device trees will be posted in a later patch series, likely when
the AIC modifications are accepted.

Asahi Linux downstream kernel note:
These patches will not work with the Asahi Linux downstream kernel,
as these earlier SoCs do not support state retention across deep WFI,
which results in the CPUs going back to RVBAR on cpuidle.

[1]: https://lore.kernel.org/asahi/20221007200022.22844-1-konrad.dybcio@somainline.org/
[2]: https://checkra.in/1337
[3]: https://github.com/asdfugil/pongoOS/tree/mini
[4]: https://github.com/asdfugil/m1n1-idevice

Nick Chan (3):
  dt-bindings: apple,aic: Document A7-A11 compatibles
  irqchip/apple-aic: Only access IPI sysregs when use_fast_ipi is true
  irqchip/apple-aic: Add a new "Global fast IPIs only" feature level

 .../interrupt-controller/apple,aic.yaml       | 15 ++++--
 drivers/irqchip/irq-apple-aic.c               | 49 ++++++++++++++-----
 2 files changed, 48 insertions(+), 16 deletions(-)

-- 
2.46.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles
  2024-08-29  9:03 [PATCH 0/3] Add AIC support for A7-A11 SoCs Nick Chan
@ 2024-08-29  9:03 ` Nick Chan
  2024-08-29 10:24   ` Rob Herring (Arm)
  2024-08-29 11:44   ` Krzysztof Kozlowski
  2024-08-29  9:03 ` [PATCH 2/3] irqchip/apple-aic: Only access IPI sysregs when use_fast_ipi is true Nick Chan
  2024-08-29  9:03 ` [PATCH 3/3] irqchip/apple-aic: Add a new "Global fast IPIs only" feature level Nick Chan
  2 siblings, 2 replies; 9+ messages in thread
From: Nick Chan @ 2024-08-29  9:03 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig, Thomas Gleixner,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, asahi,
	linux-arm-kernel, linux-kernel, devicetree
  Cc: ~postmarketos/upstreaming, Nick Chan

Document the compatibles for Apple A7-A11 SoCs.

There are three feature levels:
- A7-A10: No fast IPI
- A11: fast IPI, global only
- M1: fast IPI with local and global support

Each feature level is an extension of the previous. For example, M1 will
also work with the A7 feature level.

Signed-off-by: Nick Chan <towinchenmi@gmail.com>
---
 .../bindings/interrupt-controller/apple,aic.yaml  | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
index 698588e9aa86..28e09b933087 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
@@ -36,9 +36,18 @@ allOf:
 
 properties:
   compatible:
-    items:
-      - const: apple,t8103-aic
-      - const: apple,aic
+    oneOf:
+      - const: apple,s5l8960x-aic
+      - items:
+          - enum:
+              - apple,s8000-aic
+              - apple,t7000-aic
+              - apple,t8010-aic
+          - const: apple,s5l8960x-aic
+      - items:
+          - const: apple,t8103-aic
+          - const: apple,t8015-aic
+          - const: apple,aic
 
   interrupt-controller: true
 
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] irqchip/apple-aic: Only access IPI sysregs when use_fast_ipi is true
  2024-08-29  9:03 [PATCH 0/3] Add AIC support for A7-A11 SoCs Nick Chan
  2024-08-29  9:03 ` [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles Nick Chan
@ 2024-08-29  9:03 ` Nick Chan
  2024-08-29  9:03 ` [PATCH 3/3] irqchip/apple-aic: Add a new "Global fast IPIs only" feature level Nick Chan
  2 siblings, 0 replies; 9+ messages in thread
From: Nick Chan @ 2024-08-29  9:03 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig, Thomas Gleixner,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, asahi,
	linux-arm-kernel, linux-kernel, devicetree
  Cc: ~postmarketos/upstreaming, Nick Chan, Konrad Dybcio

Starting from the A11 (T8015) SoC, Apple introuced system registers for
fast IPI and UNCORE PMC control. These sysregs do not exist on earlier
A7-A10 SoCs and trying to access them results in an instant crash.

Restrict sysreg access within the AIC driver to configurations where
use_fast_ipi is true to allow AIC to function properly on A7-A10 SoCs.

While at it, remove the IPI-always-ack path on aic_handle_fiq. If we are
able to reach there, we are on an IPI-capable system and should be using
one of the IPI-capable compatibles, anyway.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Nick Chan <towinchenmi@gmail.com>
---
 drivers/irqchip/irq-apple-aic.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-aic.c
index 5c534d9fd2b0..626aaeafa96c 100644
--- a/drivers/irqchip/irq-apple-aic.c
+++ b/drivers/irqchip/irq-apple-aic.c
@@ -234,6 +234,7 @@ enum fiq_hwirq {
 	AIC_NR_FIQ
 };
 
+/* True if UNCORE/UNCORE2 and Sn_... IPI registers are present and used (A11+) */
 static DEFINE_STATIC_KEY_TRUE(use_fast_ipi);
 
 struct aic_info {
@@ -532,13 +533,9 @@ static void __exception_irq_entry aic_handle_fiq(struct pt_regs *regs)
 	 * we check for everything here, even things we don't support yet.
 	 */
 
-	if (read_sysreg_s(SYS_IMP_APL_IPI_SR_EL1) & IPI_SR_PENDING) {
-		if (static_branch_likely(&use_fast_ipi)) {
-			aic_handle_ipi(regs);
-		} else {
-			pr_err_ratelimited("Fast IPI fired. Acking.\n");
-			write_sysreg_s(IPI_SR_PENDING, SYS_IMP_APL_IPI_SR_EL1);
-		}
+	if (static_branch_likely(&use_fast_ipi) &&
+	    (read_sysreg_s(SYS_IMP_APL_IPI_SR_EL1) & IPI_SR_PENDING)) {
+		aic_handle_ipi(regs);
 	}
 
 	if (TIMER_FIRING(read_sysreg(cntp_ctl_el0)))
@@ -574,8 +571,9 @@ static void __exception_irq_entry aic_handle_fiq(struct pt_regs *regs)
 					  AIC_FIQ_HWIRQ(irq));
 	}
 
-	if (FIELD_GET(UPMCR0_IMODE, read_sysreg_s(SYS_IMP_APL_UPMCR0_EL1)) == UPMCR0_IMODE_FIQ &&
-			(read_sysreg_s(SYS_IMP_APL_UPMSR_EL1) & UPMSR_IACT)) {
+	if (static_branch_likely(&use_fast_ipi) &&
+	    (FIELD_GET(UPMCR0_IMODE, read_sysreg_s(SYS_IMP_APL_UPMCR0_EL1)) == UPMCR0_IMODE_FIQ) &&
+	    (read_sysreg_s(SYS_IMP_APL_UPMSR_EL1) & UPMSR_IACT)) {
 		/* Same story with uncore PMCs */
 		pr_err_ratelimited("Uncore PMC FIQ fired. Masking.\n");
 		sysreg_clear_set_s(SYS_IMP_APL_UPMCR0_EL1, UPMCR0_IMODE,
@@ -811,7 +809,8 @@ static int aic_init_cpu(unsigned int cpu)
 	/* Mask all hard-wired per-CPU IRQ/FIQ sources */
 
 	/* Pending Fast IPI FIQs */
-	write_sysreg_s(IPI_SR_PENDING, SYS_IMP_APL_IPI_SR_EL1);
+	if (static_branch_likely(&use_fast_ipi))
+		write_sysreg_s(IPI_SR_PENDING, SYS_IMP_APL_IPI_SR_EL1);
 
 	/* Timer FIQs */
 	sysreg_clear_set(cntp_ctl_el0, 0, ARCH_TIMER_CTRL_IT_MASK);
@@ -832,8 +831,9 @@ static int aic_init_cpu(unsigned int cpu)
 			   FIELD_PREP(PMCR0_IMODE, PMCR0_IMODE_OFF));
 
 	/* Uncore PMC FIQ */
-	sysreg_clear_set_s(SYS_IMP_APL_UPMCR0_EL1, UPMCR0_IMODE,
-			   FIELD_PREP(UPMCR0_IMODE, UPMCR0_IMODE_OFF));
+	if (static_branch_likely(&use_fast_ipi))
+		sysreg_clear_set_s(SYS_IMP_APL_UPMCR0_EL1, UPMCR0_IMODE,
+				   FIELD_PREP(UPMCR0_IMODE, UPMCR0_IMODE_OFF));
 
 	/* Commit all of the above */
 	isb();
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] irqchip/apple-aic: Add a new "Global fast IPIs only" feature level
  2024-08-29  9:03 [PATCH 0/3] Add AIC support for A7-A11 SoCs Nick Chan
  2024-08-29  9:03 ` [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles Nick Chan
  2024-08-29  9:03 ` [PATCH 2/3] irqchip/apple-aic: Only access IPI sysregs when use_fast_ipi is true Nick Chan
@ 2024-08-29  9:03 ` Nick Chan
  2 siblings, 0 replies; 9+ messages in thread
From: Nick Chan @ 2024-08-29  9:03 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig, Thomas Gleixner,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, asahi,
	linux-arm-kernel, linux-kernel, devicetree
  Cc: ~postmarketos/upstreaming, Nick Chan

Starting with the A11 (T8015) SoC, Apple began using arm64 sysregs for
fast IPIs. However, on A11, there is no such things as "Local" fast IPIs,
as the SYS_IMP_APL_IPI_RR_LOCAL_EL1 register does not seem to exist.

Add a new feature level, used by the compatible "apple,t8015-aic",
controlled by a static branch key named use_local_fast_ipi. When
use_fast_ipi is true and use_local_fast_ipi is false, fast IPIs are used
but all IPIs goes through the register SYS_IMP_APL_IPI_RR_GLOBAL_EL1, as
"global" IPIs.

Signed-off-by: Nick Chan <towinchenmi@gmail.com>
---
 drivers/irqchip/irq-apple-aic.c | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-aic.c
index 626aaeafa96c..9248ecff42a3 100644
--- a/drivers/irqchip/irq-apple-aic.c
+++ b/drivers/irqchip/irq-apple-aic.c
@@ -236,6 +236,8 @@ enum fiq_hwirq {
 
 /* True if UNCORE/UNCORE2 and Sn_... IPI registers are present and used (A11+) */
 static DEFINE_STATIC_KEY_TRUE(use_fast_ipi);
+/* True if SYS_IMP_APL_IPI_RR_LOCAL_EL1 exists (M1+) */
+static DEFINE_STATIC_KEY_TRUE(use_local_fast_ipi);
 
 struct aic_info {
 	int version;
@@ -253,6 +255,7 @@ struct aic_info {
 
 	/* Features */
 	bool fast_ipi;
+	bool local_fast_ipi;
 };
 
 static const struct aic_info aic1_info __initconst = {
@@ -271,6 +274,16 @@ static const struct aic_info aic1_fipi_info __initconst = {
 	.fast_ipi	= true,
 };
 
+static const struct aic_info aic1_local_fipi_info __initconst = {
+	.version	= 1,
+
+	.event		= AIC_EVENT,
+	.target_cpu	= AIC_TARGET_CPU,
+
+	.fast_ipi	= true,
+	.local_fast_ipi = true,
+};
+
 static const struct aic_info aic2_info __initconst = {
 	.version	= 2,
 
@@ -282,6 +295,10 @@ static const struct aic_info aic2_info __initconst = {
 static const struct of_device_id aic_info_match[] = {
 	{
 		.compatible = "apple,t8103-aic",
+		.data = &aic1_local_fipi_info,
+	},
+	{
+		.compatible = "apple,t8015-aic",
 		.data = &aic1_fipi_info,
 	},
 	{
@@ -748,7 +765,8 @@ static void aic_ipi_send_fast(int cpu)
 	u64 cluster = MPIDR_CLUSTER(mpidr);
 	u64 idx = MPIDR_CPU(mpidr);
 
-	if (MPIDR_CLUSTER(my_mpidr) == cluster)
+	if (static_branch_likely(&use_local_fast_ipi) &&
+		MPIDR_CLUSTER(my_mpidr) == cluster)
 		write_sysreg_s(FIELD_PREP(IPI_RR_CPU, idx),
 			       SYS_IMP_APL_IPI_RR_LOCAL_EL1);
 	else
@@ -992,6 +1010,11 @@ static int __init aic_of_ic_init(struct device_node *node, struct device_node *p
 	else
 		static_branch_disable(&use_fast_ipi);
 
+	if (irqc->info.local_fast_ipi)
+		static_branch_enable(&use_local_fast_ipi);
+	else
+		static_branch_disable(&use_local_fast_ipi);
+
 	irqc->info.die_stride = off - start_off;
 
 	irqc->hw_domain = irq_domain_create_tree(of_node_to_fwnode(node),
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles
  2024-08-29  9:03 ` [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles Nick Chan
@ 2024-08-29 10:24   ` Rob Herring (Arm)
  2024-08-29 11:09     ` Nick Chan
  2024-08-29 11:44   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 9+ messages in thread
From: Rob Herring (Arm) @ 2024-08-29 10:24 UTC (permalink / raw)
  To: Nick Chan
  Cc: devicetree, ~postmarketos/upstreaming, Sven Peter,
	Thomas Gleixner, Conor Dooley, Krzysztof Kozlowski,
	linux-arm-kernel, Hector Martin, linux-kernel, Alyssa Rosenzweig,
	asahi


On Thu, 29 Aug 2024 17:03:11 +0800, Nick Chan wrote:
> Document the compatibles for Apple A7-A11 SoCs.
> 
> There are three feature levels:
> - A7-A10: No fast IPI
> - A11: fast IPI, global only
> - M1: fast IPI with local and global support
> 
> Each feature level is an extension of the previous. For example, M1 will
> also work with the A7 feature level.
> 
> Signed-off-by: Nick Chan <towinchenmi@gmail.com>
> ---
>  .../bindings/interrupt-controller/apple,aic.yaml  | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/apple,aic.example.dtb: interrupt-controller@23b100000: compatible: 'oneOf' conditional failed, one must be fixed:
	['apple,t8103-aic', 'apple,aic'] is too long
	['apple,t8103-aic', 'apple,aic'] is too short
	'apple,s5l8960x-aic' was expected
	'apple,t8103-aic' is not one of ['apple,s8000-aic', 'apple,t7000-aic', 'apple,t8010-aic']
	'apple,t8015-aic' was expected
	from schema $id: http://devicetree.org/schemas/interrupt-controller/apple,aic.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240829092610.89731-2-towinchenmi@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles
  2024-08-29 10:24   ` Rob Herring (Arm)
@ 2024-08-29 11:09     ` Nick Chan
  2024-08-29 11:43       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Nick Chan @ 2024-08-29 11:09 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: devicetree, ~postmarketos/upstreaming, Sven Peter,
	Thomas Gleixner, Conor Dooley, Krzysztof Kozlowski,
	linux-arm-kernel, Hector Martin, linux-kernel, Alyssa Rosenzweig,
	asahi



On 29/8/2024 18:24, Rob Herring (Arm) wrote:
> 
> On Thu, 29 Aug 2024 17:03:11 +0800, Nick Chan wrote:
>> Document the compatibles for Apple A7-A11 SoCs.
>>
>> There are three feature levels:
>> - A7-A10: No fast IPI
>> - A11: fast IPI, global only
>> - M1: fast IPI with local and global support
>>
>> Each feature level is an extension of the previous. For example, M1 will
>> also work with the A7 feature level.
>>
>> Signed-off-by: Nick Chan <towinchenmi@gmail.com>
>> ---
>>  .../bindings/interrupt-controller/apple,aic.yaml  | 15 ++++++++++++---
>>  1 file changed, 12 insertions(+), 3 deletions(-)
>>
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/apple,aic.example.dtb: interrupt-controller@23b100000: compatible: 'oneOf' conditional failed, one must be fixed:
> 	['apple,t8103-aic', 'apple,aic'] is too long
> 	['apple,t8103-aic', 'apple,aic'] is too short
> 	'apple,s5l8960x-aic' was expected
> 	'apple,t8103-aic' is not one of ['apple,s8000-aic', 'apple,t7000-aic', 'apple,t8010-aic']
> 	'apple,t8015-aic' was expected
> 	from schema $id: http://devicetree.org/schemas/interrupt-controller/apple,aic.yaml#
> 
> doc reference errors (make refcheckdocs):
> 
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240829092610.89731-2-towinchenmi@gmail.com
> 
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
> 
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
Acked. yamllint was not installed on my system.

> 
> pip3 install dtschema --upgrade
> 
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
> 

Nick Chan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles
  2024-08-29 11:09     ` Nick Chan
@ 2024-08-29 11:43       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-29 11:43 UTC (permalink / raw)
  To: Nick Chan, Rob Herring (Arm)
  Cc: devicetree, ~postmarketos/upstreaming, Sven Peter,
	Thomas Gleixner, Conor Dooley, Krzysztof Kozlowski,
	linux-arm-kernel, Hector Martin, linux-kernel, Alyssa Rosenzweig,
	asahi

On 29/08/2024 13:09, Nick Chan wrote:
> 
> 
> On 29/8/2024 18:24, Rob Herring (Arm) wrote:
>>
>> On Thu, 29 Aug 2024 17:03:11 +0800, Nick Chan wrote:
>>> Document the compatibles for Apple A7-A11 SoCs.
>>>
>>> There are three feature levels:
>>> - A7-A10: No fast IPI
>>> - A11: fast IPI, global only
>>> - M1: fast IPI with local and global support
>>>
>>> Each feature level is an extension of the previous. For example, M1 will
>>> also work with the A7 feature level.
>>>
>>> Signed-off-by: Nick Chan <towinchenmi@gmail.com>
>>> ---
>>>  .../bindings/interrupt-controller/apple,aic.yaml  | 15 ++++++++++++---
>>>  1 file changed, 12 insertions(+), 3 deletions(-)
>>>
>>
>> My bot found errors running 'make dt_binding_check' on your patch:
>>
>> yamllint warnings/errors:
>>
>> dtschema/dtc warnings/errors:
>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/interrupt-controller/apple,aic.example.dtb: interrupt-controller@23b100000: compatible: 'oneOf' conditional failed, one must be fixed:
>> 	['apple,t8103-aic', 'apple,aic'] is too long
>> 	['apple,t8103-aic', 'apple,aic'] is too short
>> 	'apple,s5l8960x-aic' was expected
>> 	'apple,t8103-aic' is not one of ['apple,s8000-aic', 'apple,t7000-aic', 'apple,t8010-aic']
>> 	'apple,t8015-aic' was expected
>> 	from schema $id: http://devicetree.org/schemas/interrupt-controller/apple,aic.yaml#
>>
>> doc reference errors (make refcheckdocs):
>>
>> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240829092610.89731-2-towinchenmi@gmail.com
>>
>> The base for the series is generally the latest rc1. A different dependency
>> should be noted in *this* patch.
>>
>> If you already ran 'make dt_binding_check' and didn't see the above
>> error(s), then make sure 'yamllint' is installed and dt-schema is up to
>> date:
> Acked. yamllint was not installed on my system.
> 

The error are not coming from yamllint. It's not about yamllint. You
just never tested the binding.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles
  2024-08-29  9:03 ` [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles Nick Chan
  2024-08-29 10:24   ` Rob Herring (Arm)
@ 2024-08-29 11:44   ` Krzysztof Kozlowski
  2024-08-29 12:42     ` Nick Chan
  1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-29 11:44 UTC (permalink / raw)
  To: Nick Chan, Hector Martin, Sven Peter, Alyssa Rosenzweig,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	asahi, linux-arm-kernel, linux-kernel, devicetree
  Cc: ~postmarketos/upstreaming

On 29/08/2024 11:03, Nick Chan wrote:
> Document the compatibles for Apple A7-A11 SoCs.
> 
> There are three feature levels:
> - A7-A10: No fast IPI
> - A11: fast IPI, global only
> - M1: fast IPI with local and global support
> 
> Each feature level is an extension of the previous. For example, M1 will
> also work with the A7 feature level.

It's hard for me to map above to compatibles. Extend the commit msg to
include names used in the bindings.

> 
> Signed-off-by: Nick Chan <towinchenmi@gmail.com>
> ---
>  .../bindings/interrupt-controller/apple,aic.yaml  | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
> index 698588e9aa86..28e09b933087 100644
> --- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
> +++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
> @@ -36,9 +36,18 @@ allOf:
>  
>  properties:
>    compatible:
> -    items:
> -      - const: apple,t8103-aic
> -      - const: apple,aic
> +    oneOf:
> +      - const: apple,s5l8960x-aic

Which one is this?

> +      - items:
> +          - enum:
> +              - apple,s8000-aic
> +              - apple,t7000-aic
> +              - apple,t8010-aic
> +          - const: apple,s5l8960x-aic
> +      - items:
> +          - const: apple,t8103-aic
> +          - const: apple,t8015-aic

Why are you changing all existing devices? Test your change, you would
see here errors.



Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles
  2024-08-29 11:44   ` Krzysztof Kozlowski
@ 2024-08-29 12:42     ` Nick Chan
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Chan @ 2024-08-29 12:42 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Hector Martin, Sven Peter, Alyssa Rosenzweig,
	Thomas Gleixner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	asahi, linux-arm-kernel, linux-kernel, devicetree
  Cc: ~postmarketos/upstreaming



On 29/8/2024 19:44, Krzysztof Kozlowski wrote:
> On 29/08/2024 11:03, Nick Chan wrote:
>> Document the compatibles for Apple A7-A11 SoCs.
>>
>> There are three feature levels:
>> - A7-A10: No fast IPI
>> - A11: fast IPI, global only
>> - M1: fast IPI with local and global support
>>
>> Each feature level is an extension of the previous. For example, M1 will
>> also work with the A7 feature level.
> 
> It's hard for me to map above to compatibles. Extend the commit msg to
> include names used in the bindings.
Acked. Will be in v2. A description of the feature levels will also be
added to
the description of AIC.

> 
>>
>> Signed-off-by: Nick Chan <towinchenmi@gmail.com>
>> ---
>>  .../bindings/interrupt-controller/apple,aic.yaml  | 15 ++++++++++++---
>>  1 file changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
>> index 698588e9aa86..28e09b933087 100644
>> --- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
>> +++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
>> @@ -36,9 +36,18 @@ allOf:
>>  
>>  properties:
>>    compatible:
>> -    items:
>> -      - const: apple,t8103-aic
>> -      - const: apple,aic
>> +    oneOf:
>> +      - const: apple,s5l8960x-aic
> 
> Which one is this?
> 
>> +      - items:
>> +          - enum:
>> +              - apple,s8000-aic
>> +              - apple,t7000-aic
>> +              - apple,t8010-aic
>> +          - const: apple,s5l8960x-aic
>> +      - items:
>> +          - const: apple,t8103-aic
>> +          - const: apple,t8015-aic
> 
> Why are you changing all existing devices? Test your change, you would
> see here errors.
This part is a bit of a mess from when A11 was supposed to get the M1
compatible. However, now that A11 is found out to be different from M1,
in v2 all of A7-M1 will get its own
SoC-specific compatible, in addition to the "apple,aic" generic
fallback. (you should have already seen the changes in the improper
"resend")

> 
> 
> 
> Best regards,
> Krzysztof
> 

Nick Chan

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-08-29 12:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29  9:03 [PATCH 0/3] Add AIC support for A7-A11 SoCs Nick Chan
2024-08-29  9:03 ` [PATCH 1/3] dt-bindings: apple,aic: Document A7-A11 compatibles Nick Chan
2024-08-29 10:24   ` Rob Herring (Arm)
2024-08-29 11:09     ` Nick Chan
2024-08-29 11:43       ` Krzysztof Kozlowski
2024-08-29 11:44   ` Krzysztof Kozlowski
2024-08-29 12:42     ` Nick Chan
2024-08-29  9:03 ` [PATCH 2/3] irqchip/apple-aic: Only access IPI sysregs when use_fast_ipi is true Nick Chan
2024-08-29  9:03 ` [PATCH 3/3] irqchip/apple-aic: Add a new "Global fast IPIs only" feature level Nick Chan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox