Skip to contentSkip to conversation

Patches for linux-rt on ARM

PATCH New Uwe Kleine-König 1 participant 6 messages Jan 25, 2009 – Jan 30, 2009

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

Hello,

as a reply I send some patches that fix compilation of most ARM defconfigs for the linux-rt tree and allow enabling PREEMPT_RT for ARM. Two commits are already in Linus' tree and so cherry-picked from there. My commits are new.

There are some commits pending in Russell's queue that should be applied on linux-rt, too. I will write another email when they hit Linus' master branch.

Shortlog and diffstat are below.

Best regards
Uwe

Ben Dooks (1):
[ARM] S3C24XX: Add gpio_to_irq() facility

Tony Lindgren (1):
ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS

Uwe Kleine-König (2):
fix compilation error in ide code
Use kernel/Kconfig.preempt for ARM

 arch/arm/Kconfig                          |   13 +------------
 arch/arm/mach-s3c2410/include/mach/gpio.h |    1 +
 arch/arm/plat-omap/gpio.c                 |    3 +++
 include/linux/ide.h                       |    2 +-
 kernel/Kconfig.preempt                    |    2 ++
 5 files changed, 8 insertions(+), 13 deletions(-)
Signature · 4 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Peiner Strasse 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686              | Fax:   +49-5121-206917-5555 |
#1 lore raw

PATCH 1/1 fix compilation error in ide code

Commit 97b45b274f48aeec changed a local_save_flags to local_save_flags_nort which is not defined and not used anywhere else. Change this back to local_save_flags as there is no reason not to read the flags in RT code.

---
 include/linux/ide.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/ide.h +1 -1
index dc5ac49..a3cf9c1 100644
@@ -1622,7 +1622,7 @@ extern struct mutex ide_cfg_mtx;
 
 #define local_irq_set(flags)			\
 	do {					\
-		local_save_flags_nort((flags)); \
+		local_save_flags((flags)); \
 		local_irq_enable_in_hardirq();	\
 	} while (0)
 
Signature · 1 line
1.5.6.5
#2 lore raw

PATCH 1/1 ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS

From: Tony Lindgren <[email protected]>

There are no wakeup registers on 15xx, and suspend_wakeup does not exist in the struct gpio_bank.

Without this fix we'll get "arch/arm/plat-omap/gpio.c:1792:
error: 'struct gpio_bank' has no member named 'suspend_wakeup'" as noted by Russell King.

Note that the ifdefs will be cleaned up once the omap gpio code gets split into omap1 and omap2 specific parts.

(cherry picked from commit 3a26e3318bc2ceec340f242c6ee7074becdc7219)

---
 arch/arm/plat-omap/gpio.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/plat-omap/gpio.c +3 -0
index 9908710..4131e06 100644
@@ -1816,6 +1816,8 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
 /* FIXME for at least omap2, show pullup/pulldown state */
 
 			irqstat = irq_desc[irq].status;
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) ||	\
+		defined(CONFIG_ARCH_OMAP34XX)
 			if (is_in && ((bank->suspend_wakeup & mask)
 					|| irqstat & IRQ_TYPE_SENSE_MASK)) {
 				char	*trigger = NULL;
@@ -1845,6 +1847,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
 						(bank->suspend_wakeup & mask)
 							? " wakeup" : "");
 			}
+#endif
 			seq_printf(s, "\n");
 		}
 
Signature · 1 line
1.5.6.5
#3 lore raw

PATCH 1/1 S3C24XX: Add gpio_to_irq() facility

From: Ben Dooks <[email protected]>

Add gpio_to_irq() by re-directing the call to the
generic __gpio_to_irq() code in the gpiolib.

(cherry picked from commit 4d316fc5a34b073da4145a203101ec5b9553a634 to

fix compile error in drivers/gpio/gpiolib.c with CONFIG_DEBUG_FS=y)
Cc: Steven Rostedt <[email protected]>

---
 arch/arm/mach-s3c2410/include/mach/gpio.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-s3c2410/include/mach/gpio.h +1 -0
index 3b52b86..fd8b326 100644
@@ -14,5 +14,6 @@
 #define gpio_get_value	__gpio_get_value
 #define gpio_set_value	__gpio_set_value
 #define gpio_cansleep	__gpio_cansleep
+#define gpio_to_irq	__gpio_to_irq
 
 #include <asm-generic/gpio.h>
Signature · 1 line
1.5.6.5
#4 lore raw

PATCH 1/1 Use kernel/Kconfig.preempt for ARM

before this patch ARM had it's own definition of CONFIG_PREEMPT. Instead of that use the general definition provided in kernel/Kconfig.preempt.

It adds some dependencies such that the available options don't change (neither for ARM nor for other archs). The only resulting changes are that ARM gets CONFIG_PREEMPT_NONE and the help text.

Currently the only usage of CONFIG_PREEMPT_NONE is in kernel/trace/trace.c and only affects the content of some proc files where "M:unknown" is changed to "M:server" if it is defined.

The intention is that ARM gets the option CONFIG_PREEMPT_RT after it will be added to kernel/Kconfig.preempt as it is done in the linux-rt tree.

Cc Russell King <[email protected]>
Cc Steven Rostedt <[email protected]>
---
 arch/arm/Kconfig       |   13 +------------
 kernel/Kconfig.preempt |    2 ++
 2 files changed, 3 insertions(+), 12 deletions(-)
arch/arm/Kconfig +1 -12
index 9722f8b..85722ba 100644
@@ -789,18 +789,7 @@ config LOCAL_TIMERS
 	  accounting to be spread across the timer interval, preventing a
 	  "thundering herd" at every timer tick.
 
-config PREEMPT
-	bool "Preemptible Kernel (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
-	help
-	  This option reduces the latency of the kernel when reacting to
-	  real-time or interactive events by allowing a low priority process to
-	  be preempted even if it is in kernel mode executing a system call.
-	  This allows applications to run more reliably even when the system is
-	  under load.
-
-	  Say Y here if you are building a kernel for a desktop, embedded
-	  or real-time system.  Say N if you are unsure.
+source kernel/Kconfig.preempt
 
 config HZ
 	int
kernel/Kconfig.preempt +2 -0
index 3953130..22b1b18 100644
@@ -18,6 +18,7 @@ config PREEMPT_NONE
 
 config PREEMPT_VOLUNTARY
 	bool "Voluntary Kernel Preemption (Desktop)"
+	depends on !ARM
 	help
 	  This option reduces the latency of the kernel by adding more
 	  "explicit preemption points" to the kernel code. These new
@@ -35,6 +36,7 @@ config PREEMPT_VOLUNTARY
 
 config PREEMPT_DESKTOP
 	bool "Preemptible Kernel (Low-Latency Desktop)"
+	depends on !ARM || EXPERIMENTAL
 	help
 	  This option reduces the latency of the kernel by making
 	  all kernel code (that is not executing in a critical section)
Signature · 1 line
1.5.6.5
#5 lore raw
In reply to Uwe Kleine-König

Hello Steven,

Quoted 4 lines

as a reply I send some patches that fix compilation of most ARM defconfigs for the linux-rt tree and allow enabling PREEMPT_RT for ARM. Two commits are already in Linus' tree and so cherry-picked from there. My commits are new.

as requested by you in irc the following changes since commit 4a6908a3a050aacc9c3a2f36b276b46c0629ad91:
Linus Torvalds (1):

        Linux 2.6.28

(e.g. your "linus" branch) are available in the git repository at:

git://git.pengutronix.de/git/ukl/linux-2.6.git rt-arm

There is one patch that I dropped since the first post, because you fixed it yourself in 2766d45892aa914abc96ec8c9f3688ca3ea468e8. In turn there is a new fix for the am79c961a driver that hit mainline in the meantime.

Apart from "Use kernel/Kconfig.preempt for ARM" all patches are cherry-picked from Linus' tree to fix compilation errors in your -rt tree.

Shortlog and diffstat can be found below.

Best regards
Uwe

Ben Dooks (1):
[ARM] S3C24XX: Add gpio_to_irq() facility

Tony Lindgren (1):
ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS

Uwe Kleine-König (2):
Use kernel/Kconfig.preempt for ARM
[NET] am79c961a: fix spin_lock usage

 arch/arm/Kconfig                          |   13 +------------
 arch/arm/mach-s3c2410/include/mach/gpio.h |    1 +
 arch/arm/plat-omap/gpio.c                 |    3 +++
 drivers/net/arm/am79c961a.c               |   20 ++++++++++----------
 kernel/Kconfig.preempt                    |    2 ++
 5 files changed, 17 insertions(+), 22 deletions(-)
Signature · 4 lines
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Peiner Strasse 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686              | Fax:   +49-5121-206917-5555 |