diff mbox

arm64: ignore FACS load failed for arm64

Message ID 5444C9D6.6090101@linaro.org
State Rejected
Headers show

Commit Message

Fu Wei Oct. 20, 2014, 8:37 a.m. UTC
arm64: ignore load failed for FACS which is involved in old 
BIOS style suspend/hibernate and does not make sense on arm64.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 src/lib/src/fwts_acpi_tables.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Fu Wei Oct. 20, 2014, 9:58 a.m. UTC | #1
On 10/20/2014 05:16 PM, Graeme Gregory wrote:
> On Mon, Oct 20, 2014 at 04:37:42PM +0800, Fu Wei wrote:
>> arm64: ignore load failed for FACS which is involved in old 
>> BIOS style suspend/hibernate and does not make sense on arm64.
>>
>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> ---
>>  src/lib/src/fwts_acpi_tables.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
>> index 56498e0..0641d93 100644
>> --- a/src/lib/src/fwts_acpi_tables.c
>> +++ b/src/lib/src/fwts_acpi_tables.c
>> @@ -375,7 +375,12 @@ static int fwts_acpi_handle_fadt(
>>  	    "FACS", "FIRMWARE_CTRL", "X_FIRMWARE_CTRL",
>>  	     &fadt->firmware_control, &fadt->x_firmware_ctrl,
>>  	     provenance) != FWTS_OK) {
>> +#if defined(__aarch64__)
>> +		fwts_log_warning(fw, "Failed to load FACS: Cannot determine "
>> +				"address of FACS from FADT. IGNORE for AArch64 platform!");
>> +#else
>>  		return FWTS_ERROR;
>> +#endif
> 
> I have a feeling doing this compile time might end up biting us on the
> ass in some situations where we need to check ACPI 5.1 vs 5.2 etc. I am
> not massively familiar with the code but my gut feeling is this should
> be solved runtime.

Agree, so I should try to make "#if defined" became "if (is_aarch64)", right?

I also noticed : Yi Li has submitted a patch for SMBIOS, so maybe I can use "#ifdef FWTS_ARCH_AARCH64"

any suggestion or idea ?

> 
> Graeme
> 
>>  	}
>>  	/* Determine DSDT addr and load it */
>>  	if (fwts_acpi_handle_fadt_tables(fw, fadt,
>> -- 
>> 1.9.1
diff mbox

Patch

diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
index 56498e0..0641d93 100644
--- a/src/lib/src/fwts_acpi_tables.c
+++ b/src/lib/src/fwts_acpi_tables.c
@@ -375,7 +375,12 @@  static int fwts_acpi_handle_fadt(
 	    "FACS", "FIRMWARE_CTRL", "X_FIRMWARE_CTRL",
 	     &fadt->firmware_control, &fadt->x_firmware_ctrl,
 	     provenance) != FWTS_OK) {
+#if defined(__aarch64__)
+		fwts_log_warning(fw, "Failed to load FACS: Cannot determine "
+				"address of FACS from FADT. IGNORE for AArch64 platform!");
+#else
 		return FWTS_ERROR;
+#endif
 	}
 	/* Determine DSDT addr and load it */
 	if (fwts_acpi_handle_fadt_tables(fw, fadt,