Skip to contentSkip to conversation

ARM: ixp4xx: don't select SERIAL_OF_PLATFORM

PATCH Applied Arnd Bergmann 2 participants 6 messages Jun 17, 2019 – Jun 18, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ARM: ixp4xx: don't select SERIAL_OF_PLATFORM

Platforms should not normally select all the device drivers, leave that up to the user and the defconfig file.

In this case, we get a warning for randconfig builds:

WARNING: unmet direct dependencies detected for SERIAL_OF_PLATFORM
Depends on [n]: TTY [=y] && HAS_IOMEM [=y] && SERIAL_8250 [=n] && OF [=y] Selected by [y]:
- MACH_IXP4XX_OF [=y] && ARCH_IXP4XX [=y]

Fixes 9540724ca29d ("ARM: ixp4xx: Add device tree boot support")
---
 arch/arm/mach-ixp4xx/Kconfig | 1 -
 1 file changed, 1 deletion(-)
arch/arm/mach-ixp4xx/Kconfig +0 -1
index 2f052c56cd9e..fc5378b00f3d 100644
@@ -13,7 +13,6 @@ config MACH_IXP4XX_OF
 	select I2C
 	select I2C_IOP3XX
 	select PCI
-	select SERIAL_OF_PLATFORM
 	select TIMER_OF
 	select USE_OF
 	help
Signature · 7 lines
2.20.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 2/3 ARM: ixp4xx: mark ixp4xx_irq_setup as __init

Kbuild complains about ixp4xx_irq_setup not being __init itself in some configurations:

WARNING: vmlinux.o(.text+0x85bae4): Section mismatch in reference from the function ixp4xx_irq_setup() to the function .init.text:set_handle_irq() The function ixp4xx_irq_setup() references
the function __init set_handle_irq().
This is often because ixp4xx_irq_setup lacks a __init
annotation or the annotation of set_handle_irq is wrong.

I suspect it normally gets inlined, so we get no such warning, but clang makes this obvious when the function is left out of line.

---
 drivers/irqchip/irq-ixp4xx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/irqchip/irq-ixp4xx.c +4 -4
index d576809429ac..6751c35b7e1d 100644
@@ -252,10 +252,10 @@ static const struct ixp4xx_irq_chunk ixp4xx_irq_chunks[] = {
  * @fwnode: Corresponding fwnode abstraction for this controller
  * @is_356: if this is an IXP43x, IXP45x or IXP46x SoC variant
  */
-static int ixp4xx_irq_setup(struct ixp4xx_irq *ixi,
-			    void __iomem *irqbase,
-			    struct fwnode_handle *fwnode,
-			    bool is_356)
+static int __init ixp4xx_irq_setup(struct ixp4xx_irq *ixi,
+				   void __iomem *irqbase,
+				   struct fwnode_handle *fwnode,
+				   bool is_356)
 {
 	int nr_irqs;
 
Signature · 7 lines
2.20.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

Re: [PATCH 2/3] ARM: ixp4xx: mark ixp4xx_irq_setup as __init

Quoted 10 lines · Arnd Bergmann

Kbuild complains about ixp4xx_irq_setup not being __init itself in some configurations:

WARNING: vmlinux.o(.text+0x85bae4): Section mismatch in reference from the function ixp4xx_irq_setup() to the function .init.text:set_handle_irq() The function ixp4xx_irq_setup() references
the function __init set_handle_irq().
This is often because ixp4xx_irq_setup lacks a __init
annotation or the annotation of set_handle_irq is wrong.

Quoted 5 lines

I suspect it normally gets inlined, so we get no such warning, but clang makes this obvious when the function is left out of line.

Applied to arm/fixes. Thanks!

-Olof

#3 lore raw

PATCH 3/3 ARM: ixp4xx: include irqs.h where needed

In reply to Arnd Bergmann

Multiple ixp4xx specific files require macros from irqs.h that were moved out from mach/irqs.h, e.g.:

arch/arm/mach-ixp4xx/vulcan-pci.c:41:19: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] arch/arm/mach-ixp4xx/vulcan-pci.c:49:10: error: implicit declaration of function 'IXP4XX_GPIO_IRQ' [-Werror,-Wimplicit-function-declaration]

                return IXP4XX_GPIO_IRQ(INTA);

Include this header in all files that failed to build because of that.

Fixes dc8ef8cd3a05 ("ARM: ixp4xx: Convert to SPARSE_IRQ")
---
 arch/arm/mach-ixp4xx/goramo_mlr.c   | 2 ++
 arch/arm/mach-ixp4xx/miccpt-pci.c   | 2 ++
 arch/arm/mach-ixp4xx/omixp-setup.c  | 2 ++
 arch/arm/mach-ixp4xx/vulcan-pci.c   | 2 ++
 arch/arm/mach-ixp4xx/vulcan-setup.c | 2 ++
 5 files changed, 10 insertions(+)
arch/arm/mach-ixp4xx/goramo_mlr.c +2 -0
index 4d805080020e..a0e0b6b7dc5c 100644
@@ -18,6 +18,8 @@
 #include <asm/mach/pci.h>
 #include <asm/system_info.h>
 
+#include "irqs.h"
+
 #define SLOT_ETHA		0x0B	/* IDSEL = AD21 */
 #define SLOT_ETHB		0x0C	/* IDSEL = AD20 */
 #define SLOT_MPCI		0x0D	/* IDSEL = AD19 */
arch/arm/mach-ixp4xx/miccpt-pci.c +2 -0
index d114ccd2017c..ca889ef068a5 100644
@@ -25,6 +25,8 @@
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 
+#include "irqs.h"
+
 #define MAX_DEV		4
 #define IRQ_LINES	4
 
arch/arm/mach-ixp4xx/omixp-setup.c +2 -0
index 2d494b454376..c02fa6f48382 100644
@@ -27,6 +27,8 @@
 
 #include <mach/hardware.h>
 
+#include "irqs.h"
+
 static struct resource omixp_flash_resources[] = {
 	{
 		.flags	= IORESOURCE_MEM,
arch/arm/mach-ixp4xx/vulcan-pci.c +2 -0
index a4220fa5e0c3..6e41e5ece4e1 100644
@@ -21,6 +21,8 @@
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
 
+#include "irqs.h"
+
 /* PCI controller GPIO to IRQ pin mappings */
 #define INTA	2
 #define INTB	3
arch/arm/mach-ixp4xx/vulcan-setup.c +2 -0
index 2c03d2f6b647..d2ebb7c675a8 100644
@@ -22,6 +22,8 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 
+#include "irqs.h"
+
 static struct flash_platform_data vulcan_flash_data = {
 	.map_name	= "cfi_probe",
 	.width		= 2,
Signature · 1 line
2.20.0
#4 lore raw

Re: [PATCH 3/3] ARM: ixp4xx: include irqs.h where needed

Quoted 6 lines · Arnd Bergmann

Multiple ixp4xx specific files require macros from irqs.h that were moved out from mach/irqs.h, e.g.:

arch/arm/mach-ixp4xx/vulcan-pci.c:41:19: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] arch/arm/mach-ixp4xx/vulcan-pci.c:49:10: error: implicit declaration of function 'IXP4XX_GPIO_IRQ' [-Werror,-Wimplicit-function-declaration]

Quoted 7 lines
                return IXP4XX_GPIO_IRQ(INTA);

Include this header in all files that failed to build because of that.

Fixes dc8ef8cd3a05 ("ARM: ixp4xx: Convert to SPARSE_IRQ")

Applied to arm/fixes. Thanks!

-Olof

#5 lore raw
In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

Platforms should not normally select all the device drivers, leave that up to the user and the defconfig file.

In this case, we get a warning for randconfig builds:

Quoted 7 lines

WARNING: unmet direct dependencies detected for SERIAL_OF_PLATFORM
Depends on [n]: TTY [=y] && HAS_IOMEM [=y] && SERIAL_8250 [=n] && OF [=y] Selected by [y]:
- MACH_IXP4XX_OF [=y] && ARCH_IXP4XX [=y]

Fixes 9540724ca29d ("ARM: ixp4xx: Add device tree boot support")

Applied to arm/fixes. Thanks!

-Olof