Skip to contentSkip to conversation

omap1 sparse irq support for v4.2

GIT PULL Arnd Bergmann 2 participants 8 messages May 21, 2015

Subsystems (10)
lore
Share & tools
lore
#0 lore raw
Quoted 8 lines · On Wednesday 20 May 2015 15:36:05 Tony Lindgren wrote:

Add support for CONFIG_SPARSE_IRQ for omap1. This takes us a bit closer to making omap1 support multiarch. After this series we still need to make omap1 use the common clock framework and fix up the drivers to not rely on includes from mach and plat directories.

Note that this branch depends on a GPIO driver fix in v4.1-rc3 d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts").

I'm getting lots of build errors in linux-next, which I think are caused by this series.

Here is my fixup. Unfortunately, this again gets us a little further from making the drivers standalone, or at least it documents the dependencies.

Arnd

arch/arm/mach-omap1/board-htcherald.c +1 -0
index 9525ef9bc6c0..ac9bd88c6b05 100644
@@ -42,6 +42,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include <mach/hardware.h>
 #include <mach/omap7xx.h>
 #include "mmc.h"
 
arch/arm/mach-omap1/gpio16xx.c +1 -0
index 6e6ec93dcbb3..404f3f55726f 100644
@@ -19,6 +19,7 @@
 #include <linux/gpio.h>
 #include <linux/platform_data/gpio-omap.h>
 
+#include <mach/soc.h>
 #include <mach/irqs.h>
 
 #define OMAP1610_GPIO1_BASE		0xfffbe400
arch/arm/mach-omap1/gpio7xx.c +1 -0
index 4612d2506a2d..1bb38a4aec8f 100644
@@ -19,6 +19,7 @@
 #include <linux/gpio.h>
 #include <linux/platform_data/gpio-omap.h>
 
+#include <mach/soc.h>
 #include <mach/irqs.h>
 
 #define OMAP7XX_GPIO1_BASE		0xfffbc000
arch/arm/mach-omap1/iomap.h +1 -0
index f4e2d7a21365..23686204df45 100644
@@ -27,6 +27,7 @@
  * Omap1 specific IO mapping
  * ----------------------------------------------------------------------------
  */
+#include <mach/hardware.h>
 
 #define OMAP1_IO_PHYS		0xFFFB0000
 #define OMAP1_IO_SIZE		0x40000
arch/arm/mach-omap1/serial.c +1 -0
index d1ac08016f0b..652ba6b9385e 100644
@@ -22,6 +22,7 @@
 
 #include <asm/mach-types.h>
 
+#include <mach/soc.h>
 #include <mach/mux.h>
 
 #include "pm.h"
arch/arm/mach-omap1/usb.c +1 -0
index 4118db50d5e8..1f28b5e8d6ca 100644
@@ -26,6 +26,7 @@
 
 #include <asm/irq.h>
 
+#include <mach/hardware.h>
 #include <mach/mux.h>
 
 #include <mach/usb.h>
drivers/input/keyboard/omap-keypad.c +4 -0
index 7502e46165fa..32c8fc0fdc15 100644
@@ -38,6 +38,10 @@
 #include <linux/platform_data/gpio-omap.h>
 #include <linux/platform_data/keypad-omap.h>
 
+#ifdef CONFIG_ARCH_OMAP1
+#include <mach/hardware.h>
+#endif
+
 #undef NEW_BOARD_LEARNING_MODE
 
 static void omap_kp_tasklet(unsigned long);
drivers/tty/serial/8250/8250.h +4 -0
index c43f74c53cd9..c73297bd7ed4 100644
@@ -15,6 +15,10 @@
 #include <linux/serial_reg.h>
 #include <linux/dmaengine.h>
 
+#ifdef CONFIG_ARCH_OMAP1
+#include <mach/soc.h>
+#endif
+
 struct uart_8250_dma {
 	int (*tx_dma)(struct uart_8250_port *p);
 	int (*rx_dma)(struct uart_8250_port *p, unsigned int iir);
drivers/usb/phy/phy-isp1301-omap.c +1 -0
index 3af263cc0caa..1c05541bbeee 100644
@@ -36,6 +36,7 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
+#include <mach/hardware.h>
 #include <mach/mux.h>
 
 #include <mach/usb.h>
drivers/video/fbdev/omap/lcdc.c +1 -0
index 6efa2591eaa8..4e01fbbeb52f 100644
@@ -30,6 +30,7 @@
 #include <linux/clk.h>
 #include <linux/gfp.h>
 
+#include <mach/hardware.h>
 #include <mach/lcdc.h>
 #include <linux/omap-dma.h>
 
drivers/video/fbdev/omap/sossi.c +2 -0
index d4e7684e7045..39d9d7050d78 100644
@@ -27,6 +27,8 @@
 
 #include <linux/omap-dma.h>
 
+#include <mach/hardware.h>
+
 #include "omapfb.h"
 #include "lcdc.h"
 
reviewer
#1 lore raw
Quoted 6 lines · Arnd Bergmann
Quoted 5 lines · On Wednesday 20 May 2015 15:36:05 Tony Lindgren wrote:

Add support for CONFIG_SPARSE_IRQ for omap1. This takes us a bit closer to making omap1 support multiarch. After this series we still need to make omap1 use the common clock framework and fix up the drivers to not rely on includes from mach and plat directories.

Quoted 6 lines
Quoted 3 lines

Note that this branch depends on a GPIO driver fix in v4.1-rc3 d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts").

I'm getting lots of build errors in linux-next, which I think are caused by this series.

Hmm is this with make randconfig? What's the Kconfig option enabling these errors?

Regards,

Tony

#2 lore raw
Quoted 7 lines · On Thursday 21 May 2015 07:58:41 Tony Lindgren wrote:
Quoted 6 lines · Arnd Bergmann
Quoted 5 lines · On Wednesday 20 May 2015 15:36:05 Tony Lindgren wrote:

Add support for CONFIG_SPARSE_IRQ for omap1. This takes us a bit closer to making omap1 support multiarch. After this series we still need to make omap1 use the common clock framework and fix up the drivers to not rely on includes from mach and plat directories.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Note that this branch depends on a GPIO driver fix in v4.1-rc3 d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts").

I'm getting lots of build errors in linux-next, which I think are caused by this series.

Hmm is this with make randconfig?

Yes, all sorts of randconfig builds hit different parts here

Quoted 3 lines

What's the Kconfig option enabling these errors?

From what I can tell, this is simply a result of enabling

CONFIG_SPARSE_IRQ, which results in linux/irq.h no longer implicitly including mach/hardware.h through mach/irqs.h.

You should be able to see these errors by just enabling the respective drivers. The errors manifest as a long list of undefined symbols like

/git/arm-soc/arch/arm/mach-omap1/io.c:33:28: error: 'OMAP1_IO_OFFSET' undeclared here (not in a function) /git/arm-soc/arch/arm/mach-omap1/io.c:43:14: error: 'OMAP7XX_DSP_BASE' undeclared here (not in a function) /git/arm-soc/arch/arm/mach-omap1/serial.c:114:33: note: each undeclared identifier is reported only once for each function it appears in /git/arm-soc/arch/arm/mach-omap1/pm.c:217:23: error: 'ULPD_SOFT_DISABLE_REQ_REG' undeclared (first use in this function) /git/arm-soc/drivers/video/fbdev/omap/sossi.c:608:17: error: 'MOD_CONF_CTRL_1' undeclared (first use in this function)

Then again, it is possible that I only see the errors because of an interaction with another patch from my randconfig fixes series.

Arnd

reviewer
#3 lore raw
Quoted 17 lines · Arnd Bergmann
Quoted 7 lines · On Thursday 21 May 2015 07:58:41 Tony Lindgren wrote:
Quoted 6 lines · Arnd Bergmann
Quoted 5 lines · On Wednesday 20 May 2015 15:36:05 Tony Lindgren wrote:

Add support for CONFIG_SPARSE_IRQ for omap1. This takes us a bit closer to making omap1 support multiarch. After this series we still need to make omap1 use the common clock framework and fix up the drivers to not rely on includes from mach and plat directories.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Note that this branch depends on a GPIO driver fix in v4.1-rc3 d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts").

I'm getting lots of build errors in linux-next, which I think are caused by this series.

Hmm is this with make randconfig?

Quoted 7 lines

Yes, all sorts of randconfig builds hit different parts here

Quoted 1 line

What's the Kconfig option enabling these errors?

From what I can tell, this is simply a result of enabling CONFIG_SPARSE_IRQ, which results in linux/irq.h no longer implicitly including mach/hardware.h through mach/irqs.h.

Hmm not seeing that here, well at least not with what I've tried so far.

Quoted 10 lines

You should be able to see these errors by just enabling the respective drivers. The errors manifest as a long list of undefined symbols like

/git/arm-soc/arch/arm/mach-omap1/io.c:33:28: error: 'OMAP1_IO_OFFSET' undeclared here (not in a function) /git/arm-soc/arch/arm/mach-omap1/io.c:43:14: error: 'OMAP7XX_DSP_BASE' undeclared here (not in a function) /git/arm-soc/arch/arm/mach-omap1/serial.c:114:33: note: each undeclared identifier is reported only once for each function it appears in /git/arm-soc/arch/arm/mach-omap1/pm.c:217:23: error: 'ULPD_SOFT_DISABLE_REQ_REG' undeclared (first use in this function) /git/arm-soc/drivers/video/fbdev/omap/sossi.c:608:17: error: 'MOD_CONF_CTRL_1' undeclared (first use in this function)

Quoted 3 lines

Then again, it is possible that I only see the errors because of an interaction with another patch from my randconfig fixes series.

I think there's something like that going on.. Maybe you're now enabling multiarch for omap1 in your branch?

Regards,

Tony

reviewer
#4 lore raw
Quoted 39 lines · Tony Lindgren
Quoted 17 lines · Arnd Bergmann
Quoted 7 lines · On Thursday 21 May 2015 07:58:41 Tony Lindgren wrote:
Quoted 6 lines · Arnd Bergmann
Quoted 5 lines · On Wednesday 20 May 2015 15:36:05 Tony Lindgren wrote:

Add support for CONFIG_SPARSE_IRQ for omap1. This takes us a bit closer to making omap1 support multiarch. After this series we still need to make omap1 use the common clock framework and fix up the drivers to not rely on includes from mach and plat directories.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Note that this branch depends on a GPIO driver fix in v4.1-rc3 d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts").

I'm getting lots of build errors in linux-next, which I think are caused by this series.

Hmm is this with make randconfig?

Quoted 7 lines

Yes, all sorts of randconfig builds hit different parts here

Quoted 1 line

What's the Kconfig option enabling these errors?

From what I can tell, this is simply a result of enabling CONFIG_SPARSE_IRQ, which results in linux/irq.h no longer implicitly including mach/hardware.h through mach/irqs.h.

Hmm not seeing that here, well at least not with what I've tried so far.

Quoted 10 lines

You should be able to see these errors by just enabling the respective drivers. The errors manifest as a long list of undefined symbols like

/git/arm-soc/arch/arm/mach-omap1/io.c:33:28: error: 'OMAP1_IO_OFFSET' undeclared here (not in a function) /git/arm-soc/arch/arm/mach-omap1/io.c:43:14: error: 'OMAP7XX_DSP_BASE' undeclared here (not in a function) /git/arm-soc/arch/arm/mach-omap1/serial.c:114:33: note: each undeclared identifier is reported only once for each function it appears in /git/arm-soc/arch/arm/mach-omap1/pm.c:217:23: error: 'ULPD_SOFT_DISABLE_REQ_REG' undeclared (first use in this function) /git/arm-soc/drivers/video/fbdev/omap/sossi.c:608:17: error: 'MOD_CONF_CTRL_1' undeclared (first use in this function)

Quoted 6 lines
Quoted 3 lines

Then again, it is possible that I only see the errors because of an interaction with another patch from my randconfig fixes series.

I think there's something like that going on.. Maybe you're now enabling multiarch for omap1 in your branch?

OK got it triggered here too with randconfig builds now. This seems to be related to not selecting some omap1 SoCs or boards. I'll try to do a minimal fix for it today.

It seems the include changes you posted would be better done by replacing the the dependencies to mach/irqs.h where possible rather than adding more includes?

Regards,

Tony

reviewer
#5 lore raw
Quoted 47 lines · Tony Lindgren
Quoted 39 lines · Tony Lindgren
Quoted 17 lines · Arnd Bergmann
Quoted 7 lines · On Thursday 21 May 2015 07:58:41 Tony Lindgren wrote:
Quoted 6 lines · Arnd Bergmann
Quoted 5 lines · On Wednesday 20 May 2015 15:36:05 Tony Lindgren wrote:

Add support for CONFIG_SPARSE_IRQ for omap1. This takes us a bit closer to making omap1 support multiarch. After this series we still need to make omap1 use the common clock framework and fix up the drivers to not rely on includes from mach and plat directories.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Note that this branch depends on a GPIO driver fix in v4.1-rc3 d2d05c65c40e ("gpio: omap: Fix regression for MPUIO interrupts").

I'm getting lots of build errors in linux-next, which I think are caused by this series.

Hmm is this with make randconfig?

Quoted 7 lines

Yes, all sorts of randconfig builds hit different parts here

Quoted 1 line

What's the Kconfig option enabling these errors?

From what I can tell, this is simply a result of enabling CONFIG_SPARSE_IRQ, which results in linux/irq.h no longer implicitly including mach/hardware.h through mach/irqs.h.

Hmm not seeing that here, well at least not with what I've tried so far.

Quoted 10 lines

You should be able to see these errors by just enabling the respective drivers. The errors manifest as a long list of undefined symbols like

/git/arm-soc/arch/arm/mach-omap1/io.c:33:28: error: 'OMAP1_IO_OFFSET' undeclared here (not in a function) /git/arm-soc/arch/arm/mach-omap1/io.c:43:14: error: 'OMAP7XX_DSP_BASE' undeclared here (not in a function) /git/arm-soc/arch/arm/mach-omap1/serial.c:114:33: note: each undeclared identifier is reported only once for each function it appears in /git/arm-soc/arch/arm/mach-omap1/pm.c:217:23: error: 'ULPD_SOFT_DISABLE_REQ_REG' undeclared (first use in this function) /git/arm-soc/drivers/video/fbdev/omap/sossi.c:608:17: error: 'MOD_CONF_CTRL_1' undeclared (first use in this function)

Quoted 6 lines
Quoted 3 lines

Then again, it is possible that I only see the errors because of an interaction with another patch from my randconfig fixes series.

I think there's something like that going on.. Maybe you're now enabling multiarch for omap1 in your branch?

Quoted 7 lines

OK got it triggered here too with randconfig builds now. This seems to be related to not selecting some omap1 SoCs or boards. I'll try to do a minimal fix for it today.

It seems the include changes you posted would be better done by replacing the the dependencies to mach/irqs.h where possible rather than adding more includes?

OK figured it out. We now rely on an indirect include selected with ARCH_OMAP15XX. Here's what I suggest as a fix for this issue, obviously the real fix is to fix the legacy drivers to not #include <mach/*.h>.

Regards,

Tony

8< --------------------
From: Tony Lindgren <[email protected]>
Date: Thu, 21 May 2015 11:01:29 -0700
Subject: [PATCH] ARM: OMAP1: Fix randconfig builds if ARCH_OMAP15XX not
selected

With the omap1 SPARSE_IRQ changes mach/irqs.h is no longer automatically included. Turns out now we rely on ARCH_OMAP15XX including hardware.h from memory.h, so without ARCH_OMAP15XX we get build failures.

As we have legacy drivers still relying on these indirect includes, let's not add more mach includes to the drivers. Those have to be removed anyways for multiplatform support.

Let's fix up mach-omap1 to include soc.h where cpu_is_omap checks are done, and common.h for board-*.c files.

But let's keep the indirect memory.h include for now to avoid unnecessary churn in the drivers.

arch/arm/mach-omap1/board-h3-mmc.c +1 -0
@@ -16,6 +16,7 @@
 
 #include <linux/i2c/tps65010.h>
 
+#include "common.h"
 #include "board-h3.h"
 #include "mmc.h"
 
arch/arm/mach-omap1/common.h +2 -0
@@ -36,6 +36,8 @@
 
 #include <mach/irqs.h>
 
+#include "soc.h"
+
 #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
 void omap7xx_map_io(void);
 #else
arch/arm/mach-omap1/gpio16xx.c +2 -0
@@ -21,6 +21,8 @@
 
 #include <mach/irqs.h>
 
+#include "soc.h"
+
 #define OMAP1610_GPIO1_BASE		0xfffbe400
 #define OMAP1610_GPIO2_BASE		0xfffbec00
 #define OMAP1610_GPIO3_BASE		0xfffbb400
arch/arm/mach-omap1/gpio7xx.c +2 -0
@@ -21,6 +21,8 @@
 
 #include <mach/irqs.h>
 
+#include "soc.h"
+
 #define OMAP7XX_GPIO1_BASE		0xfffbc000
 #define OMAP7XX_GPIO2_BASE		0xfffbc800
 #define OMAP7XX_GPIO3_BASE		0xfffbd000
arch/arm/mach-omap1/include/mach/memory.h +3 -1
@@ -5,6 +5,9 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
+/* REVISIT: omap1 legacy drivers still rely on this */
+#include <mach/soc.h>
+
 /*
  * Bus address is physical address, except for OMAP-1510 Local Bus.
  * OMAP-1510 bus address is translated into a Local Bus address if the
@@ -14,7 +17,6 @@
  * because of the strncmp().
  */
 #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__)
-#include <mach/soc.h>
 
 /*
  * OMAP-1510 Local Bus address offset
arch/arm/mach-omap1/pm.c +1 -0
@@ -62,6 +62,7 @@
 #include "iomap.h"
 #include "clock.h"
 #include "pm.h"
+#include "soc.h"
 #include "sram.h"
 
 static unsigned int arm_sleep_save[ARM_SLEEP_SAVE_SIZE];
arch/arm/mach-omap1/serial.c +1 -0
@@ -25,6 +25,7 @@
 #include <mach/mux.h>
 
 #include "pm.h"
+#include "soc.h"
 
 static struct clk * uart1_ck;
 static struct clk * uart2_ck;
#6 lore raw
Quoted 8 lines · On Thursday 21 May 2015 11:36:30 Tony Lindgren wrote:
Quoted 8 lines

OK got it triggered here too with randconfig builds now. This seems to be related to not selecting some omap1 SoCs or boards. I'll try to do a minimal fix for it today.

It seems the include changes you posted would be better done by replacing the the dependencies to mach/irqs.h where possible rather than adding more includes?

Yes, I guess we can do that too. FWIW, almost all the problems were uses of cpu_is_omap*(), omap_read*() and omap_write*().

There are quite a lot of them overall, but at least they are easy to grep for, and there should be an obvious fix for each of them, following what you did on OMAP2 a couple of years ago.

Quoted 4 lines

OK figured it out. We now rely on an indirect include selected with ARCH_OMAP15XX. Here's what I suggest as a fix for this issue, obviously the real fix is to fix the legacy drivers to not #include <mach/*.h>.

Ok, I've put this patch in my randconfig build setup to replace my older patch, let's see if there are still some corner cases left. So far, everything looks good (50 random mach-omap1 builds done). Can you send an updated pull request with the fix folded in?

Arnd

reviewer
#7 lore raw
Quoted 10 lines · Arnd Bergmann
Quoted 8 lines · On Thursday 21 May 2015 11:36:30 Tony Lindgren wrote:
Quoted 8 lines

OK got it triggered here too with randconfig builds now. This seems to be related to not selecting some omap1 SoCs or boards. I'll try to do a minimal fix for it today.

It seems the include changes you posted would be better done by replacing the the dependencies to mach/irqs.h where possible rather than adding more includes?

Quoted 6 lines

Yes, I guess we can do that too. FWIW, almost all the problems were uses of cpu_is_omap*(), omap_read*() and omap_write*().

There are quite a lot of them overall, but at least they are easy to grep for, and there should be an obvious fix for each of them, following what you did on OMAP2 a couple of years ago.

Yeah then that can be done one driver at a time.

Quoted 9 lines
Quoted 4 lines

OK figured it out. We now rely on an indirect include selected with ARCH_OMAP15XX. Here's what I suggest as a fix for this issue, obviously the real fix is to fix the legacy drivers to not #include <mach/*.h>.

Ok, I've put this patch in my randconfig build setup to replace my older patch, let's see if there are still some corner cases left. So far, everything looks good (50 random mach-omap1 builds done). Can you send an updated pull request with the fix folded in?

OK will do. I'll also include the secion warning I posted earlier today as that seems to get triggered with some randconfigs because of the __init_or_module.

Regards,

Tony