* sparc32 defconfig build broken due to commit ebd97be63 (PCI: remove ARCH_SUPPORTS_MSI kconfig option)
@ 2013-09-09 1:00 Guenter Roeck
2013-09-09 7:05 ` Thomas Petazzoni
2013-09-11 10:32 ` [PATCH] sparc: fix MSI build failure on Sparc32 Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Guenter Roeck @ 2013-09-09 1:00 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, Bjorn Helgaas,
Benjamin Herrenschmidt, sparclinux, David S. Miller,
Thomas Petazzoni
Hi,
"make ARCH=sparc32 defconfig; make ARCH=sparc32" on the current upstream kernel results in:
In file included from arch/sparc/kernel/pci_msi.c:10:0:
arch/sparc/kernel/pci_impl.h:142:18: error: field 'stc' has incomplete type
arch/sparc/kernel/pci_msi.c: In function 'sparc64_setup_msi_irq':
arch/sparc/kernel/pci_msi.c:131:2: error: implicit declaration of function 'irq_alloc' [-Werror=implicit-function-declaration]
arch/sparc/kernel/pci_msi.c:173:2: error: implicit declaration of function 'irq_free' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[2]: *** [arch/sparc/kernel/pci_msi.o] Error 1
Bisect points to commit ebd97be635 (PCI: remove ARCH_SUPPORTS_MSI kconfig option).
After reverting this commit, sparc32:defconfig builds fine.
sparc64 defconfig is unaffected.
Guenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sparc32 defconfig build broken due to commit ebd97be63 (PCI: remove ARCH_SUPPORTS_MSI kconfig option)
2013-09-09 1:00 sparc32 defconfig build broken due to commit ebd97be63 (PCI: remove ARCH_SUPPORTS_MSI kconfig option) Guenter Roeck
@ 2013-09-09 7:05 ` Thomas Petazzoni
2013-09-11 10:32 ` [PATCH] sparc: fix MSI build failure on Sparc32 Thomas Petazzoni
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2013-09-09 7:05 UTC (permalink / raw)
To: Guenter Roeck
Cc: linux-kernel@vger.kernel.org, Bjorn Helgaas,
Benjamin Herrenschmidt, sparclinux, David S. Miller
Dear Guenter Roeck,
On Sun, 08 Sep 2013 18:00:30 -0700, Guenter Roeck wrote:
> "make ARCH=sparc32 defconfig; make ARCH=sparc32" on the current upstream kernel results in:
>
> In file included from arch/sparc/kernel/pci_msi.c:10:0:
> arch/sparc/kernel/pci_impl.h:142:18: error: field 'stc' has incomplete type
> arch/sparc/kernel/pci_msi.c: In function 'sparc64_setup_msi_irq':
> arch/sparc/kernel/pci_msi.c:131:2: error: implicit declaration of function 'irq_alloc' [-Werror=implicit-function-declaration]
> arch/sparc/kernel/pci_msi.c:173:2: error: implicit declaration of function 'irq_free' [-Werror=implicit-function-declaration]
> cc1: all warnings being treated as errors
> make[2]: *** [arch/sparc/kernel/pci_msi.o] Error 1
>
> Bisect points to commit ebd97be635 (PCI: remove ARCH_SUPPORTS_MSI kconfig option).
> After reverting this commit, sparc32:defconfig builds fine.
>
> sparc64 defconfig is unaffected.
Thanks for the report, I'll have a look very soon.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] sparc: fix MSI build failure on Sparc32
2013-09-09 1:00 sparc32 defconfig build broken due to commit ebd97be63 (PCI: remove ARCH_SUPPORTS_MSI kconfig option) Guenter Roeck
2013-09-09 7:05 ` Thomas Petazzoni
@ 2013-09-11 10:32 ` Thomas Petazzoni
2013-09-11 13:40 ` Guenter Roeck
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2013-09-11 10:32 UTC (permalink / raw)
To: Guenter Roeck
Cc: linux-kernel, Bjorn Helgaas, Benjamin Herrenschmidt, sparclinux,
David S. Miller, Gregory Clement, Lior Amsalem, Ezequiel Garcia,
Thomas Petazzoni
Commit ebd97be635 ('PCI: remove ARCH_SUPPORTS_MSI kconfig option')
removes the ARCH_SUPPORTS_MSI Kconfig option that allowed
architectures to indicate whether they support PCI MSI or not. Now,
PCI MSI support can be compiled in on any architecture thanks to the
use of weak functions thanks to 4287d824f265 ('PCI: use weak functions
for MSI arch-specific functions').
So, architecture specific code is now responsible to ensure that its
PCI MSI code builds in all cases, or be appropriately conditionally
compiled.
On Sparc, the MSI support is only provided for Sparc64, so the
ARCH_SUPPORTS_MSI kconfig option was only selected for SPARC64, and
not for the Sparc architecture as a whole. Therefore, removing
ARCH_SUPPORTS_MSI broke Sparc32 configurations with CONFIG_PCI_MSI=y,
because the Sparc-specific MSI code is not designed to be built on
Sparc32.
To solve this, this commit ensures that the Sparc MSI code is only
built on Sparc64. This is done thanks to a new Kconfig Makefile helper
option SPARC64_PCI_MSI, modeled after the existing SPARC64_PCI. The
SPARC64_PCI_MSI option is an hidden option that is true when both
Sparc64 PCI support is enabled and MSI is enabled. The
arch/sparc/kernel/pci_msi.c file is now only built when
SPARC64_PCI_MSI is true.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
---
arch/sparc/Kconfig | 7 ++++++-
arch/sparc/kernel/Makefile | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 1570ad2..a284efa 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -507,12 +507,17 @@ config SUN_OPENPROMFS
Only choose N if you know in advance that you will not need to modify
OpenPROM settings on the running system.
-# Makefile helper
+# Makefile helpers
config SPARC64_PCI
bool
default y
depends on SPARC64 && PCI
+config SPARC64_PCI_MSI
+ bool
+ default y
+ depends on SPARC64_PCI && PCI_MSI
+
endmenu
menu "Executable file formats"
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
index d432fb2..d15cc17 100644
--- a/arch/sparc/kernel/Makefile
+++ b/arch/sparc/kernel/Makefile
@@ -1,3 +1,4 @@
+
#
# Makefile for the linux kernel.
#
@@ -99,7 +100,7 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_SPARC64_PCI) += pci.o pci_common.o psycho_common.o
obj-$(CONFIG_SPARC64_PCI) += pci_psycho.o pci_sabre.o pci_schizo.o
obj-$(CONFIG_SPARC64_PCI) += pci_sun4v.o pci_sun4v_asm.o pci_fire.o
-obj-$(CONFIG_PCI_MSI) += pci_msi.o
+obj-$(CONFIG_SPARC64_PCI_MSI) += pci_msi.o
obj-$(CONFIG_COMPAT) += sys32.o sys_sparc32.o signal32.o
--
1.8.1.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] sparc: fix MSI build failure on Sparc32
2013-09-11 10:32 ` [PATCH] sparc: fix MSI build failure on Sparc32 Thomas Petazzoni
@ 2013-09-11 13:40 ` Guenter Roeck
2013-10-03 0:12 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2013-09-11 13:40 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: linux-kernel, Bjorn Helgaas, Benjamin Herrenschmidt, sparclinux,
David S. Miller, Gregory Clement, Lior Amsalem, Ezequiel Garcia
On 09/11/2013 03:32 AM, Thomas Petazzoni wrote:
> Commit ebd97be635 ('PCI: remove ARCH_SUPPORTS_MSI kconfig option')
> removes the ARCH_SUPPORTS_MSI Kconfig option that allowed
> architectures to indicate whether they support PCI MSI or not. Now,
> PCI MSI support can be compiled in on any architecture thanks to the
> use of weak functions thanks to 4287d824f265 ('PCI: use weak functions
> for MSI arch-specific functions').
>
> So, architecture specific code is now responsible to ensure that its
> PCI MSI code builds in all cases, or be appropriately conditionally
> compiled.
>
> On Sparc, the MSI support is only provided for Sparc64, so the
> ARCH_SUPPORTS_MSI kconfig option was only selected for SPARC64, and
> not for the Sparc architecture as a whole. Therefore, removing
> ARCH_SUPPORTS_MSI broke Sparc32 configurations with CONFIG_PCI_MSI=y,
> because the Sparc-specific MSI code is not designed to be built on
> Sparc32.
>
> To solve this, this commit ensures that the Sparc MSI code is only
> built on Sparc64. This is done thanks to a new Kconfig Makefile helper
> option SPARC64_PCI_MSI, modeled after the existing SPARC64_PCI. The
> SPARC64_PCI_MSI option is an hidden option that is true when both
> Sparc64 PCI support is enabled and MSI is enabled. The
> arch/sparc/kernel/pci_msi.c file is now only built when
> SPARC64_PCI_MSI is true.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
Yes, that fixes the build error.
Tested-by: Guenter Roeck <linux@roeck-us.net>
Thanks,
Guenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sparc: fix MSI build failure on Sparc32
2013-09-11 13:40 ` Guenter Roeck
@ 2013-10-03 0:12 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2013-10-03 0:12 UTC (permalink / raw)
To: linux
Cc: thomas.petazzoni, linux-kernel, bhelgaas, benh, sparclinux,
gregory.clement, alior, ezequiel.garcia
From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 11 Sep 2013 06:40:12 -0700
> On 09/11/2013 03:32 AM, Thomas Petazzoni wrote:
>> Commit ebd97be635 ('PCI: remove ARCH_SUPPORTS_MSI kconfig option')
>> removes the ARCH_SUPPORTS_MSI Kconfig option that allowed
>> architectures to indicate whether they support PCI MSI or not. Now,
>> PCI MSI support can be compiled in on any architecture thanks to the
>> use of weak functions thanks to 4287d824f265 ('PCI: use weak functions
>> for MSI arch-specific functions').
>>
>> So, architecture specific code is now responsible to ensure that its
>> PCI MSI code builds in all cases, or be appropriately conditionally
>> compiled.
>>
>> On Sparc, the MSI support is only provided for Sparc64, so the
>> ARCH_SUPPORTS_MSI kconfig option was only selected for SPARC64, and
>> not for the Sparc architecture as a whole. Therefore, removing
>> ARCH_SUPPORTS_MSI broke Sparc32 configurations with CONFIG_PCI_MSI=y,
>> because the Sparc-specific MSI code is not designed to be built on
>> Sparc32.
>>
>> To solve this, this commit ensures that the Sparc MSI code is only
>> built on Sparc64. This is done thanks to a new Kconfig Makefile helper
>> option SPARC64_PCI_MSI, modeled after the existing SPARC64_PCI. The
>> SPARC64_PCI_MSI option is an hidden option that is true when both
>> Sparc64 PCI support is enabled and MSI is enabled. The
>> arch/sparc/kernel/pci_msi.c file is now only built when
>> SPARC64_PCI_MSI is true.
>>
>> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> Reported-by: Guenter Roeck <linux@roeck-us.net>
>
> Yes, that fixes the build error.
>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
Applied, sorry for taking so long.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-03 0:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09 1:00 sparc32 defconfig build broken due to commit ebd97be63 (PCI: remove ARCH_SUPPORTS_MSI kconfig option) Guenter Roeck
2013-09-09 7:05 ` Thomas Petazzoni
2013-09-11 10:32 ` [PATCH] sparc: fix MSI build failure on Sparc32 Thomas Petazzoni
2013-09-11 13:40 ` Guenter Roeck
2013-10-03 0:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox