Message ID | 1453540813-15764-8-git-send-email-zhaoshenglong@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 23.01.16 at 10:19, <zhaoshenglong@huawei.com> wrote: > From: Shannon Zhao <shannon.zhao@linaro.org> > > When MADT is parsed, print GIC information to make the boot log look > pretty. > > Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> > Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> > Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Is this the equivalent of a Linux side commit? If so please name it. If not, ... > --- a/xen/drivers/acpi/tables.c > +++ b/xen/drivers/acpi/tables.c > @@ -189,6 +189,28 @@ 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 = > + (struct acpi_madt_generic_interrupt *)header; ... no matter that other cases here have been coded in a similarly bad manner, please do better than them and use container_of() instead of a cast here. (Cleaning up the others is [fairly low] on my todo list.) Jan
On Sat, 23 Jan 2016, Shannon Zhao wrote: > From: Shannon Zhao <shannon.zhao@linaro.org> > > When MADT is parsed, print GIC information to make the boot log look > pretty. > > Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> > Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> > Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > V4: use PRIx64 instead of %llx > --- > xen/drivers/acpi/tables.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c > index 4e590de..84a290f 100644 > --- a/xen/drivers/acpi/tables.c > +++ b/xen/drivers/acpi/tables.c > @@ -189,6 +189,28 @@ 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 = > + (struct acpi_madt_generic_interrupt *)header; > + printk(KERN_INFO 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 = > + (struct acpi_madt_generic_distributor *)header; > + printk(KERN_INFO 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 > >
diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c index 4e590de..84a290f 100644 --- a/xen/drivers/acpi/tables.c +++ b/xen/drivers/acpi/tables.c @@ -189,6 +189,28 @@ 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 = + (struct acpi_madt_generic_interrupt *)header; + printk(KERN_INFO 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 = + (struct acpi_madt_generic_distributor *)header; + printk(KERN_INFO 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",