[PATCH 1/4] acpi: Use __packed with struct acpi_xsdt

Simon Glass sjg at chromium.org
Sun Nov 12 21:01:24 CET 2023


Hi Heinrich,

On Sun, 12 Nov 2023 at 09:46, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> On 11/12/23 16:58, Simon Glass wrote:
> > Since struct acpi_table_header is not a multiple of 64 bits, use the
> > __packed option for struct acpi_xsdt
> >
> > This ensures that the entry[] array starts on the correct boundary.
> >
>
> Typically we keep the original signed-off-by when reposting patches.
>
> Thanks for picking this change up.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>
> As in your review you suggested to add a unit test I have done so in my v2:
>
> [PATCH v2 1/2] acpi: fix struct acpi_xsdt
> https://patchwork.ozlabs.org/project/uboot/patch/20231112070316.17982-2-heinrich.schuchardt@canonical.com/

Oh yes, this is a duplicate patch to yours...I had it hanging around
for a while. So we can drop it.

>
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >   include/acpi/acpi_table.h | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
> > index 1f85de091d39..59ab79ed17c2 100644
> > --- a/include/acpi/acpi_table.h
> > +++ b/include/acpi/acpi_table.h
> > @@ -80,7 +80,7 @@ struct acpi_rsdt {
> >   };
> >
> >   /* XSDT (Extended System Description Table) */
> > -struct acpi_xsdt {
> > +struct __packed acpi_xsdt {
> >       struct acpi_table_header header;
> >       u64 entry[MAX_ACPI_TABLES];
> >   };
>

Regards,
Simon


More information about the U-Boot mailing list