diff mbox series

[v3,03/17] xen/arm: solve compilation error on ARM with ACPI && HAS_PCI

Message ID b95685e16fccf18580c094a5c57db4b83d5b4a29.1632847120.git.rahul.singh@arm.com (mailing list archive)
State Superseded
Headers show
Series PCI devices passthrough on Arm | expand

Commit Message

Rahul Singh Sept. 28, 2021, 6:18 p.m. UTC
prelink.o: In function `pcie_aer_get_firmware_first’:
drivers/passthrough/pci.c:1251: undefined reference to `apei_hest_parse'

Compilation error is observed when ACPI and HAS_PCI is enabled for ARM
architecture. APEI not supported on ARM yet move the code under
CONFIG_X86 flag to gate the code for ARM.

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
Change in v3: Added Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Change in v2: Add in code comment "APEI not supported on ARM yet"
---
 xen/drivers/passthrough/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bertrand Marquis Sept. 29, 2021, 7:29 a.m. UTC | #1
Hi Rahul,

> On 28 Sep 2021, at 19:18, Rahul Singh <rahul.singh@arm.com> wrote:
> 
> prelink.o: In function `pcie_aer_get_firmware_first’:
> drivers/passthrough/pci.c:1251: undefined reference to `apei_hest_parse'
> 
> Compilation error is observed when ACPI and HAS_PCI is enabled for ARM
> architecture. APEI not supported on ARM yet move the code under
> CONFIG_X86 flag to gate the code for ARM.
> 
> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

Cheers
Bertrand

> ---
> Change in v3: Added Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> Change in v2: Add in code comment "APEI not supported on ARM yet"
> ---
> xen/drivers/passthrough/pci.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
> index 8996403161..d774a6154e 100644
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -1150,7 +1150,8 @@ void __hwdom_init setup_hwdom_pci_devices(
>     pcidevs_unlock();
> }
> 
> -#ifdef CONFIG_ACPI
> +/* APEI not supported on ARM yet. */
> +#if defined(CONFIG_ACPI) && defined(CONFIG_X86)
> #include <acpi/acpi.h>
> #include <acpi/apei.h>
> 
> -- 
> 2.17.1
>
Jan Beulich Sept. 29, 2021, 8:24 a.m. UTC | #2
On 28.09.2021 20:18, Rahul Singh wrote:
> prelink.o: In function `pcie_aer_get_firmware_first’:
> drivers/passthrough/pci.c:1251: undefined reference to `apei_hest_parse'
> 
> Compilation error is observed when ACPI and HAS_PCI is enabled for ARM
> architecture. APEI not supported on ARM yet move the code under
> CONFIG_X86 flag to gate the code for ARM.

Like iirc Julien has pointed out for another, similarly titled patch,
"solve compilation error" doesn't really seem appropriate here, as
with the tree at this point of the series no such error should be
observable. Unless I'm overlooking something.

I'd like to suggest that when you receive review comments, you apply
them throughout the series. If you follow the approach take in the
other patch ...

> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
> Acked-by: Stefano Stabellini <sstabellini@kernel.org>

Acked-by: Jan Beulich <jbeulich@suse.com>

Jan
Rahul Singh Sept. 29, 2021, 9:29 a.m. UTC | #3
Hi Jan,

> On 29 Sep 2021, at 9:24 am, Jan Beulich <jbeulich@suse.com> wrote:
> 
> On 28.09.2021 20:18, Rahul Singh wrote:
>> prelink.o: In function `pcie_aer_get_firmware_first’:
>> drivers/passthrough/pci.c:1251: undefined reference to `apei_hest_parse'
>> 
>> Compilation error is observed when ACPI and HAS_PCI is enabled for ARM
>> architecture. APEI not supported on ARM yet move the code under
>> CONFIG_X86 flag to gate the code for ARM.
> 
> Like iirc Julien has pointed out for another, similarly titled patch,
> "solve compilation error" doesn't really seem appropriate here, as
> with the tree at this point of the series no such error should be
> observable. Unless I'm overlooking something.
I wil fix the comment as below:

xen/pci: gate APEI support on ARM

APEI not supported on ARM yet move the code under
CONFIG_X86 flag to gate the code for ARM.

This patch is the preparatory work to enable HAS_PCI on ARM to avoid 
compilation error on ARM.

prelink.o: In function `pcie_aer_get_firmware_first’:
drivers/passthrough/pci.c:1251: undefined reference to `apei_hest_parse' 

>  
> I'd like to suggest that when you receive review comments, you apply
> them throughout the series. If you follow the approach take in the
> other patch ...

Ok. I will take care of this in future patch series.

Regards,
Rahul
> 
>> Signed-off-by: Rahul Singh <rahul.singh@arm.com>
>> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>
> 
> Jan
>
diff mbox series

Patch

diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index 8996403161..d774a6154e 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -1150,7 +1150,8 @@  void __hwdom_init setup_hwdom_pci_devices(
     pcidevs_unlock();
 }
 
-#ifdef CONFIG_ACPI
+/* APEI not supported on ARM yet. */
+#if defined(CONFIG_ACPI) && defined(CONFIG_X86)
 #include <acpi/acpi.h>
 #include <acpi/apei.h>