From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xen.org
Cc: Julien Grall <julien.grall@arm.com>,
sstabellini@kernel.org, shannon.zhao@linaro.org
Subject: [for-4.7 2/5] xen/arm: acpi: The boot CPU does not always match the first entry in the MADT
Date: Thu, 7 Apr 2016 11:59:53 +0100 [thread overview]
Message-ID: <1460026796-10899-3-git-send-email-julien.grall@arm.com> (raw)
In-Reply-To: <1460026796-10899-1-git-send-email-julien.grall@arm.com>
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
Signed-off-by: Julien Grall <julien.grall@arm.com>
---
xen/arch/arm/acpi/boot.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/xen/arch/arm/acpi/boot.c b/xen/arch/arm/acpi/boot.c
index 859aa86..2a71660 100644
--- a/xen/arch/arm/acpi/boot.c
+++ b/xen/arch/arm/acpi/boot.c
@@ -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;
}
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-07 10:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 10:59 [for-4.7 0/5] xen/arm: acpi: Bunch of fixes to use ACPI with SMP and PL011 Julien Grall
2016-04-07 10:59 ` [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered Julien Grall
2016-04-07 12:30 ` Shannon Zhao
2016-04-07 13:41 ` Julien Grall
2016-04-07 13:57 ` Shannon Zhao
2016-04-07 13:59 ` Julien Grall
2016-04-07 10:59 ` Julien Grall [this message]
2016-04-07 12:49 ` [for-4.7 2/5] xen/arm: acpi: The boot CPU does not always match the first entry in the MADT Shannon Zhao
2016-04-10 20:16 ` Stefano Stabellini
2016-04-07 10:59 ` [for-4.7 3/5] xen/arm: acpi: Fix SMP support when booting with ACPI Julien Grall
2016-04-07 12:20 ` Shannon Zhao
2016-04-10 20:18 ` Stefano Stabellini
2016-04-07 10:59 ` [for-4.7 4/5] xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface Julien Grall
2016-04-07 12:23 ` Shannon Zhao
2016-04-10 20:19 ` Stefano Stabellini
2016-04-07 10:59 ` [for-4.7 5/5] xen/arm: acpi: Print more error messages " Julien Grall
2016-04-07 12:22 ` Shannon Zhao
2016-04-10 20:21 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460026796-10899-3-git-send-email-julien.grall@arm.com \
--to=julien.grall@arm.com \
--cc=shannon.zhao@linaro.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).