From mboxrd@z Thu Jan 1 00:00:00 1970 From: Parth Dixit Subject: Re: [PATCH v2 10/41] arm/acpi : Print GIC information when MADT is parsed Date: Sun, 24 May 2015 11:39:15 +0530 Message-ID: References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> <1431893048-5214-11-git-send-email-parth.dixit@linaro.org> <5559FFEA.7000205@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3829553035121680623==" Return-path: In-Reply-To: <5559FFEA.7000205@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: keir@xen.org, Ian Campbell , andrew.cooper3@citrix.com, tim@xen.org, xen-devel , Stefano Stabellini , Jan Beulich , Christoffer Dall List-Id: xen-devel@lists.xenproject.org --===============3829553035121680623== Content-Type: multipart/alternative; boundary=001a113a962e9d814d0516cdbb19 --001a113a962e9d814d0516cdbb19 Content-Type: text/plain; charset=UTF-8 On 18 May 2015 at 20:36, Julien Grall wrote: > Hi Parth, > > On 17/05/15 21:03, Parth Dixit wrote: > > From: Naresh Bhat > > > > When MADT is parsed, print GIC information to make the boot > > log look pretty. > > > > Signed-off-by: Hanjun Guo > > Signed-off-by: Tomasz Nowicki > > Signed-off-by: Naresh Bhat > > --- > > xen/drivers/acpi/tables.c | 39 +++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 39 insertions(+) > > > > diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c > > index 1beca79..684d8c9 100644 > > --- a/xen/drivers/acpi/tables.c > > +++ b/xen/drivers/acpi/tables.c > > @@ -190,6 +190,45 @@ 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 > > + "GIC (acpi_id[0x%04x] gic_id[0x%04x] %s)\n", > > + p->uid, p->gic_id, > > + (p->flags & ACPI_MADT_ENABLED) ? "enabled" : > "disabled"); > > Printk indentation: > > printk(KERN_INFO PREFIX > "GIC ... > ...); > > Also, it seems that the indentation doesn't match the rest of the switch > case. > > > + } > > + 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 (id[0x%04x] address[0x%08llx] > gsi_base[%d])\n", > > + p->gic_id, (long long unsigned int)p->base_address, > p->global_irq_base); > > Ditto > > > + } > > + break; > > + > > + case ACPI_MADT_TYPE_GIC_MSI_FRAME: > > + { > > + struct acpi_madt_gic_msi_frame *p = > > + (struct acpi_madt_gic_msi_frame *)header; > > + printk("GIC MSI Frame (address[0x%08llx] > msi_fame_id[%d])\n", > > + (long long unsigned int)p->base_address, > p->gic_msi_frame_id); > > Ditto & missing KERN_INFO PREFIX > > > + } > > + break; > > + > > + case ACPI_MADT_TYPE_GIC_REDISTRIBUTOR: > > + { > > + struct acpi_madt_gic_redistributor *p = > > + (struct acpi_madt_gic_redistributor *)header; > > + printk("GIC Redistributor (address[0x%08llx] > region_size[0x%x])\n", > > + (long long unsigned int)p->base_address, > p->region_size); > > Ditto & missing KERN_INFO PREFIX > will take care in next patchset. > > > + } > > + break; > > + > > default: > > printk(KERN_WARNING PREFIX > > "Found unsupported MADT entry (type = %#x)\n", > > > > Regards, > > -- > Julien Grall > --001a113a962e9d814d0516cdbb19 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 18 May 2015 at 20:36, Julien Grall <julien.grall@citrix.com> wrote:
H= i Parth,

On 17/05/15 21:03, Parth Dixit wrote:
> From: Naresh Bhat <
naresh= .bhat@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: Naresh Bhat <naresh.bhat@linaro.org>
> ---
>=C2=A0 xen/drivers/acpi/tables.c | 39 +++++++++++++++++++++++++++++++++= ++++++
>=C2=A0 1 file changed, 39 insertions(+)
>
> diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c
> index 1beca79..684d8c9 100644
> --- a/xen/drivers/acpi/tables.c
> +++ b/xen/drivers/acpi/tables.c
> @@ -190,6 +190,45 @@ void __init acpi_table_print_madt_entry(struct ac= pi_subtable_header *header)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
>
> +=C2=A0 =C2=A0 case ACPI_MADT_TYPE_GENERIC_INTERRUPT:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct acpi_madt_generic_in= terrupt *p =3D
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (struct acpi_= madt_generic_interrupt *)header;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printk(KERN_INFO PREFIX
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "GIC (ac= pi_id[0x%04x] gic_id[0x%04x] %s)\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 p->uid, p-= >gic_id,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (p->flags = & ACPI_MADT_ENABLED) ? "enabled" : "disabled");

Printk indentation:

printk(KERN_INFO PREFIX
=C2=A0 =C2=A0 =C2=A0 =C2=A0"GIC ...
=C2=A0 =C2=A0 =C2=A0 =C2=A0...);

Also, it seems that the indentation doesn't match the rest of the switc= h
case.

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
> +
> +=C2=A0 =C2=A0 case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct acpi_madt_generic_di= stributor *p =3D
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (struct acpi_= madt_generic_distributor *)header;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printk(KERN_INFO PREFIX
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "GIC Dis= tributor (id[0x%04x] address[0x%08llx] gsi_base[%d])\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 p->gic_id,= (long long unsigned int)p->base_address, p->global_irq_base);

Ditto

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
> +
> +=C2=A0 =C2=A0 case ACPI_MADT_TYPE_GIC_MSI_FRAME:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct acpi_madt_gic_msi_fr= ame *p =3D
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (struct acpi_= madt_gic_msi_frame *)header;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printk("GIC MSI Frame = (address[0x%08llx] msi_fame_id[%d])\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (long long un= signed int)p->base_address, p->gic_msi_frame_id);

Ditto & missing KERN_INFO PREFIX

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
> +
> +=C2=A0 =C2=A0 case ACPI_MADT_TYPE_GIC_REDISTRIBUTOR:
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct acpi_madt_gic_redist= ributor *p =3D
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (struct acpi_= madt_gic_redistributor *)header;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 printk("GIC Redistribu= tor (address[0x%08llx] region_size[0x%x])\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (long long un= signed int)p->base_address, p->region_size);

Ditto & missing KERN_INFO PREFIX
=C2=A0will take care in next pat= chset.

> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
> +
>=C2=A0 =C2=A0 =C2=A0 =C2=A0default:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0printk(KERN_WARN= ING PREFIX
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 "Found unsupported MADT entry (type =3D %#x)\n",
>

Regards,

--
Julien Grall

--001a113a962e9d814d0516cdbb19-- --===============3829553035121680623== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3829553035121680623==--