diff mbox

[v2,1/3] ACPI: ARM64 does not have a BIOS add config for BIOS table scan.

Message ID 1404898746-6685-2-git-send-email-hanjun.guo@linaro.org
State New
Headers show

Commit Message

Hanjun Guo July 9, 2014, 9:39 a.m. UTC
From: Graeme Gregory <graeme.gregory@linaro.org>

With the addition of ARM64 that does not have a traditional BIOS to
scan, add a config option which is selected on x86 and ia64 to do
the traditional BIOS scanning for tables.

Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
---
 arch/ia64/Kconfig    |    1 +
 arch/x86/Kconfig     |    1 +
 drivers/acpi/Kconfig |    3 +++
 drivers/acpi/osl.c   |    4 +++-
 4 files changed, 8 insertions(+), 1 deletion(-)

Comments

H. Peter Anvin July 16, 2014, 11:37 p.m. UTC | #1
On 07/09/2014 02:39 AM, Hanjun Guo wrote:
> From: Graeme Gregory <graeme.gregory@linaro.org>
> 
> With the addition of ARM64 that does not have a traditional BIOS to
> scan, add a config option which is selected on x86 and ia64 to do
> the traditional BIOS scanning for tables.
> 
> Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
> ---
>  arch/ia64/Kconfig    |    1 +
>  arch/x86/Kconfig     |    1 +
>  drivers/acpi/Kconfig |    3 +++
>  drivers/acpi/osl.c   |    4 +++-
>  4 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
> index 2f3abcf..c54bd7e 100644
> --- a/arch/ia64/Kconfig
> +++ b/arch/ia64/Kconfig
> @@ -47,6 +47,7 @@ config IA64
>  	select MODULES_USE_ELF_RELA
>  	select ARCH_USE_CMPXCHG_LOCKREF
>  	select HAVE_ARCH_AUDITSYSCALL
> +	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
>  	default y
>  	help
>  	  The Itanium Processor Family is Intel's 64-bit successor to

This shouldn't actually be set on IA64, should it?  IA64 doesn't have
BIOS, either, it has EFI/UEFI, like ARM64...

	-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Luck July 16, 2014, 11:46 p.m. UTC | #2
> +	select ACPI_LEGACY_TABLES_LOOKUP if ACPI


> This shouldn't actually be set on IA64, should it?  IA64 doesn't have

> BIOS, either, it has EFI/UEFI, like ARM64...


Which ACPI tables are in the "LEGACY" category affected by this option?

-Tony
H. Peter Anvin July 16, 2014, 11:49 p.m. UTC | #3
On 07/16/2014 04:46 PM, Luck, Tony wrote:
>> +	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
> 
>> This shouldn't actually be set on IA64, should it?  IA64 doesn't have
>> BIOS, either, it has EFI/UEFI, like ARM64...
> 
> Which ACPI tables are in the "LEGACY" category affected by this option?
> 

That's not what this is about... it is about how you find the root pointer.

On a BIOS system it is found by scanning low memory.  On an EFI system
it is found by querying EFI for a specific UUID.

	-hpa



--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hanjun Guo July 17, 2014, 3:18 a.m. UTC | #4
On 2014-7-17 7:49, H. Peter Anvin wrote:
> On 07/16/2014 04:46 PM, Luck, Tony wrote:
>>> +	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
>>
>>> This shouldn't actually be set on IA64, should it?  IA64 doesn't have
>>> BIOS, either, it has EFI/UEFI, like ARM64...

Yes, I agree with you, thanks for pointing this out. if I remember
correctly, the EFI standard was introduced when IA64 came out.

>>
>> Which ACPI tables are in the "LEGACY" category affected by this option?
>>
> 
> That's not what this is about... it is about how you find the root pointer.
> 
> On a BIOS system it is found by scanning low memory.  On an EFI system
> it is found by querying EFI for a specific UUID.

Thanks for the explanation.

Tony, if it is ok with you, I will modify the patch and will not select
ACPI_LEGACY_TABLES_LOOKUP on IA64, I'm waiting for your final confirmation.

Thanks
Hanjun
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Luck July 17, 2014, 4:58 p.m. UTC | #5
> Tony, if it is ok with you, I will modify the patch and will not select

> ACPI_LEGACY_TABLES_LOOKUP on IA64, I'm waiting for your final confirmation.


Confirmed.  Thanks Peter for catching this.

-Tony
N‹§˛ćěr¸›yúčšŘb˛XŹśÇ§vŘ^–)Ţş{.nÇ+‰ˇĽŠ{ą‘ęçzX§ś›ĄÜ¨}Šž˛Ć zÚ&j:+v‰¨žŤ‘ęçzZ+€Ę+zfŁ˘ˇhšˆ§~†­†Űi˙űŕzšŽwĽ˘¸?™¨č­Ú&˘)ߢf”ů^jÇŤy§m…á@AŤaśÚ˙0śěhŽĺ’i
Hanjun Guo July 18, 2014, 9:22 a.m. UTC | #6
On 2014-7-18 0:58, Luck, Tony wrote:
>> Tony, if it is ok with you, I will modify the patch and will not select
>> ACPI_LEGACY_TABLES_LOOKUP on IA64, I'm waiting for your final confirmation.
> 
> Confirmed.  Thanks Peter for catching this.

Great, I will update the patch and send out soon.

Thanks
Hanjun

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 2f3abcf..c54bd7e 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -47,6 +47,7 @@  config IA64
 	select MODULES_USE_ELF_RELA
 	select ARCH_USE_CMPXCHG_LOCKREF
 	select HAVE_ARCH_AUDITSYSCALL
+	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
 	default y
 	help
 	  The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a8f749e..6d9f1d8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -131,6 +131,7 @@  config X86
 	select HAVE_CC_STACKPROTECTOR
 	select GENERIC_CPU_AUTOPROBE
 	select HAVE_ARCH_AUDITSYSCALL
+	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
 
 config INSTRUCTION_DECODER
 	def_bool y
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index a34a228..970524c 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -42,6 +42,9 @@  menuconfig ACPI
 
 if ACPI
 
+config ACPI_LEGACY_TABLES_LOOKUP
+	bool
+
 config ACPI_SLEEP
 	bool
 	depends on SUSPEND || HIBERNATION
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index bad25b0..3abe9b2 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -259,12 +259,14 @@  acpi_physical_address __init acpi_os_get_root_pointer(void)
 			       "System description tables not found\n");
 			return 0;
 		}
-	} else {
+	} else if (IS_ENABLED(CONFIG_ACPI_LEGACY_TABLES_LOOKUP)) {
 		acpi_physical_address pa = 0;
 
 		acpi_find_root_pointer(&pa);
 		return pa;
 	}
+
+	return 0;
 }
 
 /* Must be called with 'acpi_ioremap_lock' or RCU read lock held. */