Skip to contentSkip to conversation

xen/arm: acpi: Bunch of fixes to use ACPI with SMP and PL011

PATCH Superseded Julien Grall 4 participants 18 messages Apr 7, 2016 – Apr 10, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover xen/arm: acpi: Bunch of fixes to use ACPI with SMP and PL011

Hello,

This patch series fixes secondary bring up and the use of the PL011 UART driver when Xen boots using ACPI.

Regards,

Julien Grall (5):
drivers/pl011: ACPI: The interrupt should always be high level
triggered
xen/arm: acpi: The boot CPU does not always match the first entry in
the MADT
xen/arm: acpi: Fix SMP support when booting with ACPI xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface xen/arm: acpi: Print more error messages in acpi_map_gic_cpu_interface

 xen/arch/arm/acpi/boot.c | 38 ++++++++++++++++++++++++++------------
 xen/drivers/char/pl011.c |  2 +-
 2 files changed, 27 insertions(+), 13 deletions(-)
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw

PATCH 1/5 drivers/pl011: ACPI: The interrupt should always be high level triggered

The SPCR does not specify if the interrupt is edge or level triggered. So the configuration needs to be hardcoded in the code.

Based on the PL011 TRM (see 2.2.8 in ARM DDI 0183G), the interrupt generated will be active high. This wording implies the interrupt should be high level triggered. Note that a rising edge triggered interrupt would be described as "high going edge".

---
 xen/drivers/char/pl011.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/char/pl011.c +1 -1
index fa22edf..88d8488 100644
@@ -327,7 +327,7 @@ static int __init pl011_acpi_uart_init(const void *data)
     }
 
     /* trigger/polarity information is not available in spcr */
-    irq_set_type(spcr->interrupt, IRQ_TYPE_EDGE_BOTH);
+    irq_set_type(spcr->interrupt, IRQ_TYPE_LEVEL_MASK);
 
     res = pl011_uart_init(spcr->interrupt, spcr->serial_port.address,
                           PAGE_SIZE);
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#2 lore raw

Re: [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

Quoted 6 lines · Julien Grall

The SPCR does not specify if the interrupt is edge or level triggered. So the configuration needs to be hardcoded in the code.

Based on the PL011 TRM (see 2.2.8 in ARM DDI 0183G), the interrupt generated will be active high. This wording implies the interrupt should be high level triggered.

I think active high can stand rising edge triggered for edge triggered interrupt.

E.g. see "Table 5-118 Flag Definitions: Virtual Timer, EL2 timers, and Secure & Non-Secure EL1 timers" in ACPI SPEC 6.0.

Quoted 22 lines

Note that a rising edge triggered interrupt would be described as "high going edge".

---
 xen/drivers/char/pl011.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/char/pl011.c +1 -1
index fa22edf..88d8488 100644
@@ -327,7 +327,7 @@ static int __init pl011_acpi_uart_init(const void *data)
     }
 
     /* trigger/polarity information is not available in spcr */
-    irq_set_type(spcr->interrupt, IRQ_TYPE_EDGE_BOTH);
+    irq_set_type(spcr->interrupt, IRQ_TYPE_LEVEL_MASK);
 
     res = pl011_uart_init(spcr->interrupt, spcr->serial_port.address,
                           PAGE_SIZE);
Signature · 7 lines
Shannon


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#3 lore raw

Re: [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

Hi Shannon,

Thank you for the review.

Quoted 6 lines · Shannon Zhao
Quoted 3 lines · Julien Grall

The SPCR does not specify if the interrupt is edge or level triggered. So the configuration needs to be hardcoded in the code.

Quoted 8 lines
Quoted 3 lines

Based on the PL011 TRM (see 2.2.8 in ARM DDI 0183G), the interrupt generated will be active high. This wording implies the interrupt should be high level triggered.

I think active high can stand rising edge triggered for edge triggered interrupt.

E.g. see "Table 5-118 Flag Definitions: Virtual Timer, EL2 timers, and Secure & Non-Secure EL1 timers" in ACPI SPEC 6.0.

I've spoken with multiple person about the wording and the consensus is "active high" would imply high level triggered. So it's very ambiguous.

However, the PL011 is always using a high level triggered. You can look at the device tree bindings such as the one for the foundation model.

Also, the SBSA (section 4.3.2 in ARM-DEN-0029 v2.3) states the PL011 implemented with a level triggered interrupt.

Note, I wasn't able to get the serial console working on my platform with edge triggered interrupt.

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#4 lore raw

Re: [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

Quoted 22 lines · Julien Grall
Quoted 11 lines · Shannon Zhao
Quoted 8 lines · Julien Grall

The SPCR does not specify if the interrupt is edge or level triggered. So the configuration needs to be hardcoded in the code.

Based on the PL011 TRM (see 2.2.8 in ARM DDI 0183G), the interrupt generated
will be active high. This wording implies the interrupt should be high level
triggered.

Quoted 5 lines

I think active high can stand rising edge triggered for edge triggered interrupt.

E.g. see "Table 5-118 Flag Definitions: Virtual Timer, EL2 timers, and Secure & Non-Secure EL1 timers" in ACPI SPEC 6.0.

I've spoken with multiple person about the wording and the consensus is "active high" would imply high level triggered. So it's very ambiguous.

Quoted 8 lines

However, the PL011 is always using a high level triggered. You can look at the device tree bindings such as the one for the foundation model.

Also, the SBSA (section 4.3.2 in ARM-DEN-0029 v2.3) states the PL011 implemented with a level triggered interrupt.

Note, I wasn't able to get the serial console working on my platform with edge triggered interrupt.

So how about IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_LEVEL_MASK?

Thanks,

Signature · 6 lines
Shannon

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#5 lore raw

Re: [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

Quoted 26 lines · Shannon Zhao
Quoted 25 lines · Julien Grall
Quoted 11 lines · Shannon Zhao
Quoted 8 lines · Julien Grall

The SPCR does not specify if the interrupt is edge or level triggered. So the configuration needs to be hardcoded in the code.

Based on the PL011 TRM (see 2.2.8 in ARM DDI 0183G), the interrupt generated
will be active high. This wording implies the interrupt should be high level
triggered.

Quoted 5 lines

I think active high can stand rising edge triggered for edge triggered interrupt.

E.g. see "Table 5-118 Flag Definitions: Virtual Timer, EL2 timers, and Secure & Non-Secure EL1 timers" in ACPI SPEC 6.0.

I've spoken with multiple person about the wording and the consensus is "active high" would imply high level triggered. So it's very ambiguous.

However, the PL011 is always using a high level triggered. You can look at the device tree bindings such as the one for the foundation model.

Quoted 7 lines
Quoted 5 lines

Also, the SBSA (section 4.3.2 in ARM-DEN-0029 v2.3) states the PL011 implemented with a level triggered interrupt.

Note, I wasn't able to get the serial console working on my platform with edge triggered interrupt.

So how about IRQ_TYPE_LEVEL_HIGH instead of IRQ_TYPE_LEVEL_MASK?

Good point. I will likely resend only this patch and update the commit message too.

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#6 lore raw

PATCH 2/5 xen/arm: acpi: The boot CPU does not always match the first entry in the MADT

In reply to Julien Grall

Since the ACPI 6.0 errata document [1], the first entry in the MADT does not have to correspond to the boot CPU.

Introduce a new variable to know if a MADT entry matching the boot CPU is found. Furthermore, it's not necessary to check if the MPIDR is duplicated for the boot CPU. So the rest of the function can be skipped.

[1] 1380 Unnecessary restrictions to FW vendors in ordering of GIC structures in MADT

---
 xen/arch/arm/acpi/boot.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
xen/arch/arm/acpi/boot.c +10 -4
index 859aa86..2a71660 100644
@@ -37,7 +37,8 @@
 #include <asm/setup.h>
 
 /* Processors with enabled flag and sane MPIDR */
-static unsigned int enabled_cpus;
+static unsigned int enabled_cpus = 1;
+static bool __initdata bootcpu_valid;
 
 /* total number of cpus in this system */
 static unsigned int __initdata total_cpus;
@@ -71,10 +72,15 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     }
 
     /* Check if GICC structure of boot CPU is available in the MADT */
-    if ( (enabled_cpus == 0) && (cpu_logical_map(0) != mpidr) )
+    if ( cpu_logical_map(0) == mpidr )
     {
-        printk("Firmware bug, invalid CPU MPIDR for cpu0: 0x%"PRIx64" in MADT\n",
-               mpidr);
+        if ( bootcpu_valid )
+        {
+            printk("Firmware bug, duplicate boot CPU MPIDR: 0x%"PRIx64" in MADT\n",
+                   mpidr);
+            return;
+        }
+        bootcpu_valid = true;
         return;
     }
 
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 2/5
#7 lore raw

Re: [for-4.7 2/5] xen/arm: acpi: The boot CPU does not always match the first entry in the MADT

Quoted 11 lines · Julien Grall

Since the ACPI 6.0 errata document [1], the first entry in the MADT does not have to correspond to the boot CPU.

Introduce a new variable to know if a MADT entry matching the boot CPU is found. Furthermore, it's not necessary to check if the MPIDR is duplicated for the boot CPU. So the rest of the function can be skipped.

[1] 1380 Unnecessary restrictions to FW vendors in ordering of GIC structures in MADT

Quoted 38 lines
---
 xen/arch/arm/acpi/boot.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
xen/arch/arm/acpi/boot.c +10 -4
index 859aa86..2a71660 100644
@@ -37,7 +37,8 @@
 #include <asm/setup.h>
 
 /* Processors with enabled flag and sane MPIDR */
-static unsigned int enabled_cpus;
+static unsigned int enabled_cpus = 1;
+static bool __initdata bootcpu_valid;
 
 /* total number of cpus in this system */
 static unsigned int __initdata total_cpus;
@@ -71,10 +72,15 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     }
 
     /* Check if GICC structure of boot CPU is available in the MADT */
-    if ( (enabled_cpus == 0) && (cpu_logical_map(0) != mpidr) )
+    if ( cpu_logical_map(0) == mpidr )
     {
-        printk("Firmware bug, invalid CPU MPIDR for cpu0: 0x%"PRIx64" in MADT\n",
-               mpidr);
+        if ( bootcpu_valid )
+        {
+            printk("Firmware bug, duplicate boot CPU MPIDR: 0x%"PRIx64" in MADT\n",
+                   mpidr);
+            return;
+        }
+        bootcpu_valid = true;
         return;
     }
 
Signature · 7 lines
Shannon


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#8 lore raw

Re: [for-4.7 2/5] xen/arm: acpi: The boot CPU does not always match the first entry in the MADT

In reply to Julien Grall
Quoted 37 lines · Julien Grall

Since the ACPI 6.0 errata document [1], the first entry in the MADT does not have to correspond to the boot CPU.

Introduce a new variable to know if a MADT entry matching the boot CPU is found. Furthermore, it's not necessary to check if the MPIDR is duplicated for the boot CPU. So the rest of the function can be skipped.

[1] 1380 Unnecessary restrictions to FW vendors in ordering of GIC structures in MADT

---
 xen/arch/arm/acpi/boot.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
xen/arch/arm/acpi/boot.c +3 -3
index 859aa86..2a71660 100644
@@ -37,7 +37,8 @@
 #include <asm/setup.h>
 
 /* Processors with enabled flag and sane MPIDR */
-static unsigned int enabled_cpus;
+static unsigned int enabled_cpus = 1;
+static bool __initdata bootcpu_valid;
 
 /* total number of cpus in this system */
 static unsigned int __initdata total_cpus;
@@ -71,10 +72,15 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     }
 
     /* Check if GICC structure of boot CPU is available in the MADT */
-    if ( (enabled_cpus == 0) && (cpu_logical_map(0) != mpidr) )
+    if ( cpu_logical_map(0) == mpidr )
     {
-        printk("Firmware bug, invalid CPU MPIDR for cpu0: 0x%"PRIx64" in MADT\n",

xen/arch/arm/acpi/boot.c acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor) · line 85

Quoted 10 lines
xen/arch/arm/acpi/boot.c +7 -1
-               mpidr);
+        if ( bootcpu_valid )
+        {
+            printk("Firmware bug, duplicate boot CPU MPIDR: 0x%"PRIx64" in MADT\n",
+                   mpidr);
+            return;
+        }
+        bootcpu_valid = true;
         return;
     }

In that case you can start the other loop below from i = 1, instead of i = 0.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#9 lore raw

PATCH 3/5 xen/arm: acpi: Fix SMP support when booting with ACPI

In reply to Julien Grall

The variable enabled_cpus is used to know the number of CPU enabled in the MADT.

Currently this variable is used to check the validity of the boot CPU. It will be considered invalid when "enabled_cpus > 1".

However, this condition also means that multiple CPUs are present on the system. So secondary will never be brought up.

The correct way to check the validity of the boot CPU is to use the variable bootcpu_valid.

---
 xen/arch/arm/acpi/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/acpi/boot.c +1 -1
index 2a71660..fd29bdc 100644
@@ -149,7 +149,7 @@ void __init acpi_smp_init_cpus(void)
         return;
     }
 
-    if ( enabled_cpus > 1 )
+    if ( !bootcpu_valid )
     {
         printk("MADT missing boot CPU MPIDR, not enabling secondaries\n");
         return;
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 3/5
#10 lore raw

Re: [for-4.7 3/5] xen/arm: acpi: Fix SMP support when booting with ACPI

Quoted 6 lines · Julien Grall

The variable enabled_cpus is used to know the number of CPU enabled in the MADT.

Currently this variable is used to check the validity of the boot CPU. It will be considered invalid when "enabled_cpus > 1".

Quoted 7 lines

However, this condition also means that multiple CPUs are present on the system. So secondary will never be brought up.

The correct way to check the validity of the boot CPU is to use the variable bootcpu_valid.

Quoted 18 lines
---
 xen/arch/arm/acpi/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/acpi/boot.c +1 -1
index 2a71660..fd29bdc 100644
@@ -149,7 +149,7 @@ void __init acpi_smp_init_cpus(void)
         return;
     }
 
-    if ( enabled_cpus > 1 )
+    if ( !bootcpu_valid )
     {
         printk("MADT missing boot CPU MPIDR, not enabling secondaries\n");
         return;
Signature · 7 lines
Shannon


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 3/5
#11 lore raw

Re: [for-4.7 3/5] xen/arm: acpi: Fix SMP support when booting with ACPI

In reply to Julien Grall
Quoted 6 lines · Julien Grall

The variable enabled_cpus is used to know the number of CPU enabled in the MADT.

Currently this variable is used to check the validity of the boot CPU. It will be considered invalid when "enabled_cpus > 1".

Quoted 7 lines

However, this condition also means that multiple CPUs are present on the system. So secondary will never be brought up.

The correct way to check the validity of the boot CPU is to use the variable bootcpu_valid.

Quoted 19 lines
 xen/arch/arm/acpi/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/acpi/boot.c +1 -1
index 2a71660..fd29bdc 100644
@@ -149,7 +149,7 @@ void __init acpi_smp_init_cpus(void)
         return;
     }
 
-    if ( enabled_cpus > 1 )
+    if ( !bootcpu_valid )
     {
         printk("MADT missing boot CPU MPIDR, not enabling secondaries\n");
         return;
Signature · 1 line
1.9.1

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#12 lore raw

PATCH 4/5 xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface

In reply to Julien Grall

This part of the code will never be executed when the entry corresponds to the boot CPU.

Also print an error message rather when arch_cpu_init has failed.

---
 xen/arch/arm/acpi/boot.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
xen/arch/arm/acpi/boot.c +8 -7
index fd29bdc..602ab39 100644
@@ -51,6 +51,7 @@ static void __init
 acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
 {
     int i;
+    int rc;
     u64 mpidr = processor->arm_mpidr & MPIDR_HWID_MASK;
     bool_t enabled = !!(processor->flags & ACPI_MADT_ENABLED);
 
@@ -102,16 +103,16 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     if ( !acpi_psci_present() )
         return;
 
-    /* CPU 0 was already initialized */
-    if ( enabled_cpus )
+    if ( (rc = arch_cpu_init(enabled_cpus, NULL)) < 0 )
     {
-        if ( arch_cpu_init(enabled_cpus, NULL) < 0 )
-            return;
-
-        /* map the logical cpu id to cpu MPIDR */
-        cpu_logical_map(enabled_cpus) = mpidr;
+        printk("cpu%d: init failed (0x%"PRIx64" MPIDR): %d\n",
+               enabled_cpus, mpidr, rc);
+        return;
     }
 
+    /* map the logical cpu id to cpu MPIDR */
+    cpu_logical_map(enabled_cpus) = mpidr;
+
     enabled_cpus++;
 }
 
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 4/5
#13 lore raw

Re: [for-4.7 4/5] xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface

Quoted 6 lines · Julien Grall

This part of the code will never be executed when the entry corresponds to the boot CPU.

Also print an error message rather when arch_cpu_init has failed.

Quoted 41 lines
---
 xen/arch/arm/acpi/boot.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
xen/arch/arm/acpi/boot.c +8 -7
index fd29bdc..602ab39 100644
@@ -51,6 +51,7 @@ static void __init
 acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
 {
     int i;
+    int rc;
     u64 mpidr = processor->arm_mpidr & MPIDR_HWID_MASK;
     bool_t enabled = !!(processor->flags & ACPI_MADT_ENABLED);
 
@@ -102,16 +103,16 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     if ( !acpi_psci_present() )
         return;
 
-    /* CPU 0 was already initialized */
-    if ( enabled_cpus )
+    if ( (rc = arch_cpu_init(enabled_cpus, NULL)) < 0 )
     {
-        if ( arch_cpu_init(enabled_cpus, NULL) < 0 )
-            return;
-
-        /* map the logical cpu id to cpu MPIDR */
-        cpu_logical_map(enabled_cpus) = mpidr;
+        printk("cpu%d: init failed (0x%"PRIx64" MPIDR): %d\n",
+               enabled_cpus, mpidr, rc);
+        return;
     }
 
+    /* map the logical cpu id to cpu MPIDR */
+    cpu_logical_map(enabled_cpus) = mpidr;
+
     enabled_cpus++;
 }
 
Signature · 7 lines
Shannon


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 4/5
#14 lore raw

Re: [for-4.7 4/5] xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface

In reply to Julien Grall
Quoted 6 lines · Julien Grall

This part of the code will never be executed when the entry corresponds to the boot CPU.

Also print an error message rather when arch_cpu_init has failed.

Quoted 42 lines
 xen/arch/arm/acpi/boot.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
xen/arch/arm/acpi/boot.c +8 -7
index fd29bdc..602ab39 100644
@@ -51,6 +51,7 @@ static void __init
 acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
 {
     int i;
+    int rc;
     u64 mpidr = processor->arm_mpidr & MPIDR_HWID_MASK;
     bool_t enabled = !!(processor->flags & ACPI_MADT_ENABLED);
 
@@ -102,16 +103,16 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     if ( !acpi_psci_present() )
         return;
 
-    /* CPU 0 was already initialized */
-    if ( enabled_cpus )
+    if ( (rc = arch_cpu_init(enabled_cpus, NULL)) < 0 )
     {
-        if ( arch_cpu_init(enabled_cpus, NULL) < 0 )
-            return;
-
-        /* map the logical cpu id to cpu MPIDR */
-        cpu_logical_map(enabled_cpus) = mpidr;
+        printk("cpu%d: init failed (0x%"PRIx64" MPIDR): %d\n",
+               enabled_cpus, mpidr, rc);
+        return;
     }
 
+    /* map the logical cpu id to cpu MPIDR */
+    cpu_logical_map(enabled_cpus) = mpidr;
+
     enabled_cpus++;
 }
 
Signature · 1 line
1.9.1

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#15 lore raw

PATCH 5/5 xen/arm: acpi: Print more error messages in acpi_map_gic_cpu_interface

In reply to Julien Grall

It's helpful to spot any error without having to modify the hypervisor code.

---
 xen/arch/arm/acpi/boot.c | 7 +++++++
 1 file changed, 7 insertions(+)
xen/arch/arm/acpi/boot.c +7 -0
index 602ab39..23285f7 100644
@@ -63,7 +63,10 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
 
     total_cpus++;
     if ( !enabled )
+    {
+        printk("Skipping disabled CPU entry with 0x%"PRIx64" MPIDR\n", mpidr);
         return;
+    }
 
     if ( enabled_cpus >=  NR_CPUS )
     {
@@ -101,7 +104,11 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     }
 
     if ( !acpi_psci_present() )
+    {
+        printk("PSCI not present, skipping CPU MPIDR 0x%"PRIx64"\n",
+               mpidr);
         return;
+    }
 
     if ( (rc = arch_cpu_init(enabled_cpus, NULL)) < 0 )
     {
Signature · 7 lines
1.9.1


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 5/5
#16 lore raw

Re: [for-4.7 5/5] xen/arm: acpi: Print more error messages in acpi_map_gic_cpu_interface

Quoted 4 lines · Julien Grall

It's helpful to spot any error without having to modify the hypervisor code.

Quoted 32 lines
---
 xen/arch/arm/acpi/boot.c | 7 +++++++
 1 file changed, 7 insertions(+)
xen/arch/arm/acpi/boot.c +7 -0
index 602ab39..23285f7 100644
@@ -63,7 +63,10 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
 
     total_cpus++;
     if ( !enabled )
+    {
+        printk("Skipping disabled CPU entry with 0x%"PRIx64" MPIDR\n", mpidr);
         return;
+    }
 
     if ( enabled_cpus >=  NR_CPUS )
     {
@@ -101,7 +104,11 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     }
 
     if ( !acpi_psci_present() )
+    {
+        printk("PSCI not present, skipping CPU MPIDR 0x%"PRIx64"\n",
+               mpidr);
         return;
+    }
 
     if ( (rc = arch_cpu_init(enabled_cpus, NULL)) < 0 )
     {
Signature · 7 lines
Shannon


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 5/5
#17 lore raw

Re: [for-4.7 5/5] xen/arm: acpi: Print more error messages in acpi_map_gic_cpu_interface

In reply to Julien Grall
Quoted 4 lines · Julien Grall

It's helpful to spot any error without having to modify the hypervisor code.

Quoted 33 lines
 xen/arch/arm/acpi/boot.c | 7 +++++++
 1 file changed, 7 insertions(+)
xen/arch/arm/acpi/boot.c +7 -0
index 602ab39..23285f7 100644
@@ -63,7 +63,10 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
 
     total_cpus++;
     if ( !enabled )
+    {
+        printk("Skipping disabled CPU entry with 0x%"PRIx64" MPIDR\n", mpidr);
         return;
+    }
 
     if ( enabled_cpus >=  NR_CPUS )
     {
@@ -101,7 +104,11 @@ acpi_map_gic_cpu_interface(struct acpi_madt_generic_interrupt *processor)
     }
 
     if ( !acpi_psci_present() )
+    {
+        printk("PSCI not present, skipping CPU MPIDR 0x%"PRIx64"\n",
+               mpidr);
         return;
+    }
 
     if ( (rc = arch_cpu_init(enabled_cpus, NULL)) < 0 )
     {
Signature · 1 line
1.9.1

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel