2018-05-28 15:58:46

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] ARM: tegra: fix compile-testing PCI host driver

The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM
builds, but now we can compile-test the Tegra pci driver on non-Tegra
ARM platforms as well, which results in a new link error:

drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
pci-tegra.c:(.text+0x288): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
drivers/pci/host/pci-tegra.o: In function `tegra_msi_map':
pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'

This adapts the #ifdef statement to match the exact condition under which
the function can be called.

Fixes: 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
Cc: Rob Herring <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
---
include/soc/tegra/cpuidle.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/soc/tegra/cpuidle.h b/include/soc/tegra/cpuidle.h
index 1fae9c7800d1..b6cf32211520 100644
--- a/include/soc/tegra/cpuidle.h
+++ b/include/soc/tegra/cpuidle.h
@@ -14,7 +14,7 @@
#ifndef __SOC_TEGRA_CPUIDLE_H__
#define __SOC_TEGRA_CPUIDLE_H__

-#if defined(CONFIG_ARM) && defined(CONFIG_CPU_IDLE)
+#if defined(CONFIG_ARM) && defined(CONFIG_ARCH_TEGRA) && defined(CONFIG_CPU_IDLE)
void tegra_cpuidle_pcie_irqs_in_use(void);
#else
static inline void tegra_cpuidle_pcie_irqs_in_use(void)
--
2.9.0



2018-05-29 14:27:18

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH] ARM: tegra: fix compile-testing PCI host driver

On Mon, May 28, 2018 at 10:55 AM, Arnd Bergmann <[email protected]> wrote:
> The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM
> builds, but now we can compile-test the Tegra pci driver on non-Tegra
> ARM platforms as well, which results in a new link error:
>
> drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
> pci-tegra.c:(.text+0x288): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
> drivers/pci/host/pci-tegra.o: In function `tegra_msi_map':
> pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
>
> This adapts the #ifdef statement to match the exact condition under which
> the function can be called.
>
> Fixes: 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
> Cc: Rob Herring <[email protected]>
> Cc: Lorenzo Pieralisi <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> include/soc/tegra/cpuidle.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Rob Herring <[email protected]>

2018-05-29 14:37:41

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] ARM: tegra: fix compile-testing PCI host driver

On Mon, May 28, 2018 at 05:55:29PM +0200, Arnd Bergmann wrote:
> The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM
> builds, but now we can compile-test the Tegra pci driver on non-Tegra
> ARM platforms as well, which results in a new link error:
>
> drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
> pci-tegra.c:(.text+0x288): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
> drivers/pci/host/pci-tegra.o: In function `tegra_msi_map':
> pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
>
> This adapts the #ifdef statement to match the exact condition under which
> the function can be called.
>
> Fixes: 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
> Cc: Rob Herring <[email protected]>
> Cc: Lorenzo Pieralisi <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> include/soc/tegra/cpuidle.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (1.03 kB)
signature.asc (849.00 B)
Download all attachments

2018-06-02 08:49:27

by Olof Johansson

[permalink] [raw]
Subject: Re: [PATCH] ARM: tegra: fix compile-testing PCI host driver

On Mon, May 28, 2018 at 05:55:29PM +0200, Arnd Bergmann wrote:
> The tegra_cpuidle_pcie_irqs_in_use() function is stubbed out for non-ARM
> builds, but now we can compile-test the Tegra pci driver on non-Tegra
> ARM platforms as well, which results in a new link error:
>
> drivers/pci/host/pci-tegra.o: In function `tegra_pcie_map_irq':
> pci-tegra.c:(.text+0x288): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
> drivers/pci/host/pci-tegra.o: In function `tegra_msi_map':
> pci-tegra.c:(.text+0xba0): undefined reference to `tegra_cpuidle_pcie_irqs_in_use'
>
> This adapts the #ifdef statement to match the exact condition under which
> the function can be called.
>
> Fixes: 51bc085d6454 ("PCI: Improve host drivers compile test coverage")
> Cc: Rob Herring <[email protected]>
> Cc: Lorenzo Pieralisi <[email protected]>
> Signed-off-by: Arnd Bergmann <[email protected]>

Applied, thanks!


-Olof