[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v5 07/22] ACPI / table: Print GIC information when MADT is parsed



From: Hanjun Guo <hanjun.guo@xxxxxxxxxx>

When MADT is parsed, print GIC information as debug message:

ACPI: GICC (acpi_id[0x0000] address[00000000e112f000] MPIDR[0x0] enabled)
ACPI: GICC (acpi_id[0x0001] address[00000000e112f000] MPIDR[0x1] enabled)
...
ACPI: GICC (acpi_id[0x0201] address[00000000e112f000] MPIDR[0x201] enabled)

This debug information will be very helpful to bring up early systems to
see if acpi_id and MPIDR are matched or not as spec defined.

CC: Rafael J. Wysocki <rjw@xxxxxxxxxxxxx>
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@xxxxxxx>
Tested-by: Yijing Wang <wangyijing@xxxxxxxxxx>
Tested-by: Mark Langsdorf <mlangsdo@xxxxxxxxxx>
Tested-by: Jon Masters <jcm@xxxxxxxxxx>
Tested-by: Timur Tabi <timur@xxxxxxxxxxxxxx>
Tested-by: Robert Richter <rrichter@xxxxxxxxxx>
Acked-by: Robert Richter <rrichter@xxxxxxxxxx>
Acked-by: Sudeep Holla <sudeep.holla@xxxxxxx>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
Acked-by: Grant Likely <grant.likely@xxxxxxxxxx>
Signed-off-by: Hanjun Guo <hanjun.guo@xxxxxxxxxx>
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@xxxxxxxxxx>
Signed-off-by: Will Deacon <will.deacon@xxxxxxx>
[Linux commit 4c1c8d7a7ebc8b909493a14b21b233e5377b69aa]
[Use container_of instead of cast and PRIx64 instead of %llx]
Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
---
CC: Jan Beulich <jbeulich@xxxxxxxx>
V5: port this change from Linux
---
 xen/drivers/acpi/tables.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c
index 4e590de..f81c369 100644
--- a/xen/drivers/acpi/tables.c
+++ b/xen/drivers/acpi/tables.c
@@ -189,6 +189,30 @@ void __init acpi_table_print_madt_entry(struct 
acpi_subtable_header *header)
                }
                break;
 
+       case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
+               {
+                       struct acpi_madt_generic_interrupt *p =
+                               container_of(header, struct 
acpi_madt_generic_interrupt, header);
+                       printk(KERN_DEBUG PREFIX
+                              "GICC (acpi_id[0x%04x] address[0x%"PRIx64"] 
MPIDR[0x%"PRIx64"] %s)\n",
+                              p->uid, p->base_address,
+                              p->arm_mpidr,
+                              (p->flags & ACPI_MADT_ENABLED) ? "enabled" : 
"disabled");
+
+               }
+               break;
+
+       case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
+               {
+                       struct acpi_madt_generic_distributor *p =
+                               container_of(header, struct 
acpi_madt_generic_distributor, header);
+                       printk(KERN_DEBUG PREFIX
+                              "GIC Distributor (gic_id[0x%04x] 
address[0x%"PRIx64"] gsi_base[%d])\n",
+                              p->gic_id, p->base_address,
+                              p->global_irq_base);
+               }
+               break;
+
        default:
                printk(KERN_WARNING PREFIX
                       "Found unsupported MADT entry (type = %#x)\n",
-- 
2.0.4



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.