Date: Thu, 01 Feb 2024 21:54:10 +0100 From: Dmitry Salychev <dsl@FreeBSD.org> To: Jung-uk Kim <jkim@FreeBSD.org> Cc: Baptiste Daroussin <bapt@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 07c64d74917e - main - acpica: Import ACPICA 20230628 Message-ID: <86o7cz99u6.fsf@peasant.tower.home> In-Reply-To: <04c4a0e1-aa79-4d25-a1f7-2196cfa65578@FreeBSD.org> References: <202401310406.40V46B9a000876@gitrepo.freebsd.org> <thik6e6mp53h242l6bhgyxkzl45jne5zhxb7retxgyvot3x6jq@v2yuxtpvczg7> <04c4a0e1-aa79-4d25-a1f7-2196cfa65578@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain Hi, Jung-uk Kim <jkim@FreeBSD.org> writes: > On 24. 1. 31., Baptiste Daroussin wrote: >> Hello, >> Either this one or the previous import is breaking arm64 build >> --- acpi_iort.o --- >> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:103:4: error: field >> 'data' with variable sized type 'union (unnamed union at >> /home/bapt/worktrees/main/sys/arm64/acpica/acpi_iort.c:98:2 >> )' not at the end of a struct or class is a GNU extension >> [-Werror,-Wgnu-variable-sized-type-not-at-end] >> 103 | } data; >> | ^ > > Sorry for the breakage. I will fix it soon. > > BTW, this code was added by this: > > https://reviews.freebsd.org/D31267 > > It seems struct iort_named_component was a hack, which duplicated > ACPI_IORT_NAMED_COMPONENT but with a fixed length field > DeviceName[32]. Is it really necessary? > > Jung-uk Kim I'm struggling to understand (a) how the entire anonymous "data" union was added by https://reviews.freebsd.org/D31267 as was "named_comp" only and (b) what the problem with the "struct iort_named_component" really is as ACPI_IORT_ROOT_COMPLEX and ACPI_IORT_SMMU were re-defined as incomplete types in the new version of ACPICA. Everything is compilable as it used to be with the attached patch. Regards, Dmitry -- https://wiki.freebsd.org/DmitrySalychev --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-acpica-Revert-declarations-back-to-complete-types.patch >From 0b4210943fab59ff985953408ec7e11b1f90e90e Mon Sep 17 00:00:00 2001 From: Dmitry Salychev <dsl@FreeBSD.org> Date: Thu, 1 Feb 2024 21:47:48 +0100 Subject: [PATCH] acpica: Revert declarations back to complete types --- sys/contrib/dev/acpica/include/actbl2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/dev/acpica/include/actbl2.h b/sys/contrib/dev/acpica/include/actbl2.h index 140b386f802f..3e87844cc682 100644 --- a/sys/contrib/dev/acpica/include/actbl2.h +++ b/sys/contrib/dev/acpica/include/actbl2.h @@ -664,7 +664,7 @@ typedef struct acpi_iort_root_complex UINT32 PciSegmentNumber; UINT8 MemoryAddressLimit; /* Memory address size limit */ UINT16 PasidCapabilities; /* PASID Capabilities */ - UINT8 Reserved[]; /* Reserved, must be zero */ + UINT8 Reserved[1]; /* Reserved, must be zero */ } ACPI_IORT_ROOT_COMPLEX; @@ -688,7 +688,7 @@ typedef struct acpi_iort_smmu UINT32 ContextInterruptOffset; UINT32 PmuInterruptCount; UINT32 PmuInterruptOffset; - UINT64 Interrupts[]; /* Interrupt array */ + UINT64 Interrupts[1]; /* Interrupt array */ } ACPI_IORT_SMMU; -- 2.43.0 --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86o7cz99u6.fsf>