diff mbox

[v4,04/10] acpi: Don't do traditional BIOS table scan for ARM64

Message ID 1452920477-13916-5-git-send-email-zhaoshenglong@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shannon Zhao Jan. 16, 2016, 5:01 a.m. UTC
From: Shannon Zhao <shannon.zhao@linaro.org>

With the addition of ARM64 that does not have a traditional BIOS to
scan, stub out acpi_find_root_pointer to do nothing for ARM.

Cc: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
v4: stub out acpi_find_root_pointer fro ARM
---
 xen/drivers/acpi/tables/tbxfroot.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Jan Beulich Jan. 18, 2016, 1:29 p.m. UTC | #1
>>> On 16.01.16 at 06:01, <zhaoshenglong@huawei.com> wrote:
> --- a/xen/drivers/acpi/tables/tbxfroot.c
> +++ b/xen/drivers/acpi/tables/tbxfroot.c
> @@ -49,6 +49,12 @@
>  #define _COMPONENT          ACPI_TABLES
>  ACPI_MODULE_NAME("tbxfroot")
>  
> +#ifdef CONFIG_ARM
> +acpi_status __init acpi_find_root_pointer(acpi_native_uint * table_address)
> +{
> +	return_ACPI_STATUS(AE_NOT_FOUND);
> +}
> +#else
>  /* Local prototypes */
>  static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length);
>  
> @@ -271,3 +277,4 @@ static u8 *__init acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
>  			  start_address));
>  	return_PTR(NULL);
>  }
> +#endif

You modify ACPI CA code here, which should be avoided if at all
possible. Why don't you simply port over Linux'es solution (which
changes osl.c instead), the more that now we have Linux-like
Kconfig?

Jan
Shannon Zhao Jan. 19, 2016, 3:46 a.m. UTC | #2
On 2016/1/18 21:29, Jan Beulich wrote:
>>>> On 16.01.16 at 06:01, <zhaoshenglong@huawei.com> wrote:
>> > --- a/xen/drivers/acpi/tables/tbxfroot.c
>> > +++ b/xen/drivers/acpi/tables/tbxfroot.c
>> > @@ -49,6 +49,12 @@
>> >  #define _COMPONENT          ACPI_TABLES
>> >  ACPI_MODULE_NAME("tbxfroot")
>> >  
>> > +#ifdef CONFIG_ARM
>> > +acpi_status __init acpi_find_root_pointer(acpi_native_uint * table_address)
>> > +{
>> > +	return_ACPI_STATUS(AE_NOT_FOUND);
>> > +}
>> > +#else
>> >  /* Local prototypes */
>> >  static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length);
>> >  
>> > @@ -271,3 +277,4 @@ static u8 *__init acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
>> >  			  start_address));
>> >  	return_PTR(NULL);
>> >  }
>> > +#endif
> You modify ACPI CA code here, which should be avoided if at all
> possible. Why don't you simply port over Linux'es solution (which
> changes osl.c instead), the more that now we have Linux-like
> Kconfig?
Of course I can and I suggested this way at v3 but ...
Hope this your final suggestion. Thanks in advance!
diff mbox

Patch

diff --git a/xen/drivers/acpi/tables/tbxfroot.c b/xen/drivers/acpi/tables/tbxfroot.c
index 0efb603..90e52e9 100644
--- a/xen/drivers/acpi/tables/tbxfroot.c
+++ b/xen/drivers/acpi/tables/tbxfroot.c
@@ -49,6 +49,12 @@ 
 #define _COMPONENT          ACPI_TABLES
 ACPI_MODULE_NAME("tbxfroot")
 
+#ifdef CONFIG_ARM
+acpi_status __init acpi_find_root_pointer(acpi_native_uint * table_address)
+{
+	return_ACPI_STATUS(AE_NOT_FOUND);
+}
+#else
 /* Local prototypes */
 static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length);
 
@@ -271,3 +277,4 @@  static u8 *__init acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
 			  start_address));
 	return_PTR(NULL);
 }
+#endif