All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI / table: Print CORE_PIC information when MADT is parsed
@ 2022-11-02  6:48 Huacai Chen
  2022-11-03 18:34 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Huacai Chen @ 2022-11-02  6:48 UTC (permalink / raw)
  To: Huacai Chen, Rafael J . Wysocki, Len Brown, Pavel Machek
  Cc: loongarch, linux-pm, Xuefeng Li, Jianmin Lv, Jiaxun Yang, Huacai Chen

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);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ACPI / table: Print CORE_PIC information when MADT is parsed
  2022-11-02  6:48 [PATCH] ACPI / table: Print CORE_PIC information when MADT is parsed Huacai Chen
@ 2022-11-03 18:34 ` Rafael J. Wysocki
  2022-11-04  0:20   ` Huacai Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2022-11-03 18:34 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Huacai Chen, Rafael J . Wysocki, Len Brown, Pavel Machek,
	loongarch, linux-pm, Xuefeng Li, Jianmin Lv, Jiaxun Yang

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!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ACPI / table: Print CORE_PIC information when MADT is parsed
  2022-11-03 18:34 ` Rafael J. Wysocki
@ 2022-11-04  0:20   ` Huacai Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Huacai Chen @ 2022-11-04  0:20 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Huacai Chen, Rafael J . Wysocki, Len Brown, Pavel Machek,
	loongarch, linux-pm, Xuefeng Li, Jianmin Lv, Jiaxun Yang

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!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-04  0:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02  6:48 [PATCH] ACPI / table: Print CORE_PIC information when MADT is parsed Huacai Chen
2022-11-03 18:34 ` Rafael J. Wysocki
2022-11-04  0:20   ` Huacai Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.