linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: PCI_RCAR_GEN2 and PCI_RCAR_GEN2_PCIE should depend on ARM
@ 2015-08-11 12:43 Geert Uytterhoeven
  2015-08-17 10:23 ` Phil Edworthy
  2015-08-28 21:43 ` Bjorn Helgaas
  0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2015-08-11 12:43 UTC (permalink / raw)
  To: Bjorn Helgaas, Simon Horman, Phil Edworthy, Valentine Barshak
  Cc: linux-pci, linux-sh, linux-kernel, Geert Uytterhoeven

On arm64/shmobile:

    drivers/pci/host/pci-rcar-gen2.c: In function 'rcar_pci_cfg_base': drivers/pci/host/pci-rcar-gen2.c:112:34: error: dereferencing pointer to incomplete type
      struct rcar_pci_priv *priv = sys->private_data;
				      ^

and

    drivers/pci/host/pcie-rcar.c:138:52: warning: 'struct pci_sys_data' declared inside parameter list
     static inline struct rcar_pcie *sys_to_pcie(struct pci_sys_data *sys)
							^

pci_sys_data exists on ARM only, hence these drivers should depend on
ARM unconditionally.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/pci/host/Kconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index 48b5b3058d9d09eb..e94392560842be0a 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -39,7 +39,8 @@ config PCI_TEGRA
 
 config PCI_RCAR_GEN2
 	bool "Renesas R-Car Gen2 Internal PCI controller"
-	depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
+	depends on ARM
+	depends on ARCH_SHMOBILE || COMPILE_TEST
 	help
 	  Say Y here if you want internal PCI support on R-Car Gen2 SoC.
 	  There are 3 internal PCI controllers available with a single
@@ -47,7 +48,8 @@ config PCI_RCAR_GEN2
 
 config PCI_RCAR_GEN2_PCIE
 	bool "Renesas R-Car PCIe controller"
-	depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
+	depends on ARM
+	depends on ARCH_SHMOBILE || COMPILE_TEST
 	help
 	  Say Y here if you want PCIe controller support on R-Car Gen2 SoCs.
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH] PCI: PCI_RCAR_GEN2 and PCI_RCAR_GEN2_PCIE should depend on ARM
  2015-08-11 12:43 [PATCH] PCI: PCI_RCAR_GEN2 and PCI_RCAR_GEN2_PCIE should depend on ARM Geert Uytterhoeven
@ 2015-08-17 10:23 ` Phil Edworthy
  2015-08-17 10:35   ` Geert Uytterhoeven
  2015-08-28 21:43 ` Bjorn Helgaas
  1 sibling, 1 reply; 4+ messages in thread
From: Phil Edworthy @ 2015-08-17 10:23 UTC (permalink / raw)
  To: Geert Uytterhoeven, Bjorn Helgaas, Simon Horman,
	Valentine Barshak
  Cc: linux-pci@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-kernel@vger.kernel.org

Hi Geert,

On 11 August 2015 13:43, Geert wrote:
> On arm64/shmobile:
> 
>     drivers/pci/host/pci-rcar-gen2.c: In function 'rcar_pci_cfg_base':
> drivers/pci/host/pci-rcar-gen2.c:112:34: error: dereferencing pointer to
> incomplete type
>       struct rcar_pci_priv *priv = sys->private_data;
> 				      ^
> 
> and
> 
>     drivers/pci/host/pcie-rcar.c:138:52: warning: 'struct pci_sys_data' declared
> inside parameter list
>      static inline struct rcar_pcie *sys_to_pcie(struct pci_sys_data *sys)
> 							^
> 
> pci_sys_data exists on ARM only, hence these drivers should depend on
> ARM unconditionally.

Since these drivers should also be used for R-Car Gen3, I assume someone will
have to fix the problem in the same way the designware pci driver is being modified.
Please see http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/353421.html

Of course, as a quick fix for the compile test failure, this is fine.

Best regards
Phil

> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/pci/host/Kconfig | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
> index 48b5b3058d9d09eb..e94392560842be0a 100644
> --- a/drivers/pci/host/Kconfig
> +++ b/drivers/pci/host/Kconfig
> @@ -39,7 +39,8 @@ config PCI_TEGRA
> 
>  config PCI_RCAR_GEN2
>  	bool "Renesas R-Car Gen2 Internal PCI controller"
> -	depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
> +	depends on ARM
> +	depends on ARCH_SHMOBILE || COMPILE_TEST
>  	help
>  	  Say Y here if you want internal PCI support on R-Car Gen2 SoC.
>  	  There are 3 internal PCI controllers available with a single
> @@ -47,7 +48,8 @@ config PCI_RCAR_GEN2
> 
>  config PCI_RCAR_GEN2_PCIE
>  	bool "Renesas R-Car PCIe controller"
> -	depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
> +	depends on ARM
> +	depends on ARCH_SHMOBILE || COMPILE_TEST
>  	help
>  	  Say Y here if you want PCIe controller support on R-Car Gen2 SoCs.
> 
> --
> 1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PCI: PCI_RCAR_GEN2 and PCI_RCAR_GEN2_PCIE should depend on ARM
  2015-08-17 10:23 ` Phil Edworthy
@ 2015-08-17 10:35   ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2015-08-17 10:35 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: Geert Uytterhoeven, Bjorn Helgaas, Simon Horman,
	Valentine Barshak, linux-pci@vger.kernel.org,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org

Hi Phil,

On Mon, Aug 17, 2015 at 12:23 PM, Phil Edworthy
<phil.edworthy@renesas.com> wrote:
> On 11 August 2015 13:43, Geert wrote:
>> On arm64/shmobile:
>>
>>     drivers/pci/host/pci-rcar-gen2.c: In function 'rcar_pci_cfg_base':
>> drivers/pci/host/pci-rcar-gen2.c:112:34: error: dereferencing pointer to
>> incomplete type
>>       struct rcar_pci_priv *priv = sys->private_data;
>>                                     ^
>>
>> and
>>
>>     drivers/pci/host/pcie-rcar.c:138:52: warning: 'struct pci_sys_data' declared
>> inside parameter list
>>      static inline struct rcar_pcie *sys_to_pcie(struct pci_sys_data *sys)
>>                                                       ^
>>
>> pci_sys_data exists on ARM only, hence these drivers should depend on
>> ARM unconditionally.
>
> Since these drivers should also be used for R-Car Gen3, I assume someone will
> have to fix the problem in the same way the designware pci driver is being modified.
> Please see http://lists.infradead.org/pipermail/linux-arm-kernel/2015-July/353421.html

Yes, that would be the correct long-term solution.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PCI: PCI_RCAR_GEN2 and PCI_RCAR_GEN2_PCIE should depend on ARM
  2015-08-11 12:43 [PATCH] PCI: PCI_RCAR_GEN2 and PCI_RCAR_GEN2_PCIE should depend on ARM Geert Uytterhoeven
  2015-08-17 10:23 ` Phil Edworthy
@ 2015-08-28 21:43 ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2015-08-28 21:43 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Simon Horman, Phil Edworthy, Valentine Barshak, linux-pci,
	linux-sh, linux-kernel

On Tue, Aug 11, 2015 at 02:43:14PM +0200, Geert Uytterhoeven wrote:
> On arm64/shmobile:
> 
>     drivers/pci/host/pci-rcar-gen2.c: In function 'rcar_pci_cfg_base': drivers/pci/host/pci-rcar-gen2.c:112:34: error: dereferencing pointer to incomplete type
>       struct rcar_pci_priv *priv = sys->private_data;
> 				      ^
> 
> and
> 
>     drivers/pci/host/pcie-rcar.c:138:52: warning: 'struct pci_sys_data' declared inside parameter list
>      static inline struct rcar_pcie *sys_to_pcie(struct pci_sys_data *sys)
> 							^
> 
> pci_sys_data exists on ARM only, hence these drivers should depend on
> ARM unconditionally.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thanks, I applied this to pci-4.4/host-rcar, which I will rebase after v4.3
is released.

commit ae93c3763a294543fd790107e223023ae75cd93a
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Tue Aug 11 14:43:14 2015 +0200

    PCI: rcar: Build only on ARM
    
    The pci-rcar-gen2.c and pcie-rcar.c drivers use struct pci_sys_data, which
    only exists on ARM.  Building them on other arches, e.g., arm64/shmobile,
    causes errors like this:
    
      drivers/pci/host/pci-rcar-gen2.c: In function 'rcar_pci_cfg_base': drivers/pci/host/pci-rcar-gen2.c:112:34: error: dereferencing pointer to incomplete type
        struct rcar_pci_priv *priv = sys->private_data;
                                        ^
    Make these drivers depend on ARM unconditionally.
    
    [bhelgaas: changelog]
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index c132bdd..3745c63 100644
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
@@ -39,7 +39,8 @@ config PCI_TEGRA
 
 config PCI_RCAR_GEN2
 	bool "Renesas R-Car Gen2 Internal PCI controller"
-	depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
+	depends on ARM
+	depends on ARCH_SHMOBILE || COMPILE_TEST
 	help
 	  Say Y here if you want internal PCI support on R-Car Gen2 SoC.
 	  There are 3 internal PCI controllers available with a single
@@ -47,7 +48,8 @@ config PCI_RCAR_GEN2
 
 config PCI_RCAR_GEN2_PCIE
 	bool "Renesas R-Car PCIe controller"
-	depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
+	depends on ARM
+	depends on ARCH_SHMOBILE || COMPILE_TEST
 	help
 	  Say Y here if you want PCIe controller support on R-Car Gen2 SoCs.
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-28 21:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 12:43 [PATCH] PCI: PCI_RCAR_GEN2 and PCI_RCAR_GEN2_PCIE should depend on ARM Geert Uytterhoeven
2015-08-17 10:23 ` Phil Edworthy
2015-08-17 10:35   ` Geert Uytterhoeven
2015-08-28 21:43 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).