diff mbox series

ACPI / table: Print CORE_PIC information when MADT is parsed

Message ID 20221102064838.2615669-1-chenhuacai@loongson.cn (mailing list archive)
State Mainlined, archived
Headers show
Series ACPI / table: Print CORE_PIC information when MADT is parsed | expand

Commit Message

Huacai Chen Nov. 2, 2022, 6:48 a.m. UTC
When MADT is parsed, print CORE_PIC information as below:

ACPI: CORE PIC (processor_id[0x00] core_id[0x00] enabled)
ACPI: CORE PIC (processor_id[0x01] core_id[0x01] enabled)
...
ACPI: CORE PIC (processor_id[0xff] core_id[0xff] enabled)

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

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
 drivers/acpi/tables.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Rafael J. Wysocki Nov. 3, 2022, 6:34 p.m. UTC | #1
On Wed, Nov 2, 2022 at 7:50 AM Huacai Chen <chenhuacai@loongson.cn> wrote:
>
> When MADT is parsed, print CORE_PIC information as below:
>
> ACPI: CORE PIC (processor_id[0x00] core_id[0x00] enabled)
> ACPI: CORE PIC (processor_id[0x01] core_id[0x01] enabled)
> ...
> ACPI: CORE PIC (processor_id[0xff] core_id[0xff] enabled)
>
> This debug information will be very helpful to bring up early systems to
> see if processor_id and core_id are matched or not as spec defined.
>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
>  drivers/acpi/tables.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
> index 47ec11d4c68e..23bff77b09f4 100644
> --- a/drivers/acpi/tables.c
> +++ b/drivers/acpi/tables.c
> @@ -210,6 +210,16 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
>                 }
>                 break;
>
> +       case ACPI_MADT_TYPE_CORE_PIC:
> +               {
> +                       struct acpi_madt_core_pic *p =
> +                           (struct acpi_madt_core_pic *)header;
> +                       pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n",
> +                                p->processor_id, p->core_id,
> +                                (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
> +               }
> +               break;
> +
>         default:
>                 pr_warn("Found unsupported MADT entry (type = 0x%x)\n",
>                         header->type);
> --

Applied as 6.2 material.

However, next time please CC ACPI-related patches to linux-acpi rather
than to linux-pm (or you can do both if the patch is PM-related
anyway).

Thanks!
Huacai Chen Nov. 4, 2022, 12:20 a.m. UTC | #2
On Fri, Nov 4, 2022 at 2:35 AM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Wed, Nov 2, 2022 at 7:50 AM Huacai Chen <chenhuacai@loongson.cn> wrote:
> >
> > When MADT is parsed, print CORE_PIC information as below:
> >
> > ACPI: CORE PIC (processor_id[0x00] core_id[0x00] enabled)
> > ACPI: CORE PIC (processor_id[0x01] core_id[0x01] enabled)
> > ...
> > ACPI: CORE PIC (processor_id[0xff] core_id[0xff] enabled)
> >
> > This debug information will be very helpful to bring up early systems to
> > see if processor_id and core_id are matched or not as spec defined.
> >
> > Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> > ---
> >  drivers/acpi/tables.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
> > index 47ec11d4c68e..23bff77b09f4 100644
> > --- a/drivers/acpi/tables.c
> > +++ b/drivers/acpi/tables.c
> > @@ -210,6 +210,16 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
> >                 }
> >                 break;
> >
> > +       case ACPI_MADT_TYPE_CORE_PIC:
> > +               {
> > +                       struct acpi_madt_core_pic *p =
> > +                           (struct acpi_madt_core_pic *)header;
> > +                       pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n",
> > +                                p->processor_id, p->core_id,
> > +                                (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
> > +               }
> > +               break;
> > +
> >         default:
> >                 pr_warn("Found unsupported MADT entry (type = 0x%x)\n",
> >                         header->type);
> > --
>
> Applied as 6.2 material.
>
> However, next time please CC ACPI-related patches to linux-acpi rather
> than to linux-pm (or you can do both if the patch is PM-related
> anyway).
Sorry, I will do that next time.

Huacai
>
> Thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 47ec11d4c68e..23bff77b09f4 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -210,6 +210,16 @@  void acpi_table_print_madt_entry(struct acpi_subtable_header *header)
 		}
 		break;
 
+	case ACPI_MADT_TYPE_CORE_PIC:
+		{
+			struct acpi_madt_core_pic *p =
+			    (struct acpi_madt_core_pic *)header;
+			pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n",
+				 p->processor_id, p->core_id,
+				 (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled");
+		}
+		break;
+
 	default:
 		pr_warn("Found unsupported MADT entry (type = 0x%x)\n",
 			header->type);