Thread (17 messages) 17 messages, 5 authors, 2015-07-06

[PATCH v3 2/3] ACPI / ARM64: add BAD_MADT_GICC_ENTRY() macro

From: catalin.marinas@arm.com (Catalin Marinas)
Date: 2015-07-06 10:34:03
Also in: linux-acpi, lkml

On Sat, Jul 04, 2015 at 01:54:15AM +0200, Rafael J. Wysocki wrote:
On Friday, July 03, 2015 01:51:36 PM Al Stone wrote:
quoted
Perhaps the sanity checking for the MADT subtables needs to be revisited
and a more general solution provided -- this is not the only MADT subtable
with this problem and it may occur again.

Even the versions above are not technically compliant with the spec.  If
we implement what the spec currently says, it might look something like
this:

#define ACPI_MADT_GICC_LENGTH ({					\
	u8 length;							\
	switch (ACPI_FADT_SPEC_VERSION) {				\
	case ACPI_FADT_SPEC_VERSION_5_0:				\
		length = 40;						\
		break;							\
	case ACPI_FADT_SPEC_VERSION_5_1:				\
		length = 76;						\
		break;							\
	default:	/* use 6.0 size */				\
		length = 80;						\
	}								\
	length;								\
})

So it's just messy and there will be a need for change.  Let me think about
making this a function instead of a macro; it may make sense to really fix
BAD_MADT_ENTRY in general instead of just dealing with the GICC subtable,
but it could also be overkill.
So here's my suggestion.

First, make ARM64 boot with 4.2+ in the simplest way possible.

Second, set out to fix BAD_MADT_ENTRY() etc.  Start with fixing ACPICA to
distinguish between the different formats depending on the spec version and
follow up from there.
That's fine by me (as long as there is a plan to fix it properly,
ideally in 4.3).

-- 
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help