* [PATCH RT 0/4] sh arch support for 2.6.28-rt
@ 2009-02-11 15:01 Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 1/4] sh: use __preempt_enable_no_resched in cpu_idle() Katsuya Matsubara
2009-02-11 15:16 ` [PATCH RT 0/4] sh arch support for 2.6.28-rt Steven Rostedt
0 siblings, 2 replies; 6+ messages in thread
From: Katsuya Matsubara @ 2009-02-11 15:01 UTC (permalink / raw)
To: linux-rt-users
Cc: Steven Rostedt, Ingo Molnar, Thomas Gleixner, Paul Mundt, LKML,
Katsuya Matsubara
These patches apply preempt-rt treatments into sh specific code.
64 bit support is not included because I have no sh64 board.
These are based on the 2.6.28-rt git.
I made sure that these work on renesas rts7751r2dplus.
-- Katsuya Matsubara / matsu@igel.co.jp
---
Katsuya Matsubara (4):
sh: use __preempt_enable_no_resched in cpu_idle()
sh: enable interrupts in signal handling
sh: decouple the pagefault-disabled logic
convert-locks-list: add sh specific spin locks
arch/sh/kernel/process_32.c | 2 +-
arch/sh/kernel/signal_32.c | 7 +++++++
arch/sh/mm/fault_32.c | 2 +-
scripts/convert-locks-list | 12 ++++++++++++
4 files changed, 21 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH RT 1/4] sh: use __preempt_enable_no_resched in cpu_idle()
2009-02-11 15:01 [PATCH RT 0/4] sh arch support for 2.6.28-rt Katsuya Matsubara
@ 2009-02-11 15:01 ` Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 2/4] sh: enable interrupts in signal handling Katsuya Matsubara
2009-02-11 15:16 ` [PATCH RT 0/4] sh arch support for 2.6.28-rt Steven Rostedt
1 sibling, 1 reply; 6+ messages in thread
From: Katsuya Matsubara @ 2009-02-11 15:01 UTC (permalink / raw)
To: linux-rt-users
Cc: Steven Rostedt, Ingo Molnar, Thomas Gleixner, Paul Mundt, LKML,
Katsuya Matsubara
__preempt_enable_no_resched skips preempt_count check. However it is
of no matter since schedule is called afterwards in this case.
The same was done for arm in <http://lkml.org/lkml/2009/2/2/291>.
Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
---
arch/sh/kernel/process_32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index b965f02..483fe78 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -84,7 +84,7 @@ void cpu_idle(void)
idle();
tick_nohz_restart_sched_tick();
- preempt_enable_no_resched();
+ __preempt_enable_no_resched();
schedule();
preempt_disable();
check_pgt_cache();
--
1.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH RT 2/4] sh: enable interrupts in signal handling
2009-02-11 15:01 ` [PATCH RT 1/4] sh: use __preempt_enable_no_resched in cpu_idle() Katsuya Matsubara
@ 2009-02-11 15:01 ` Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 3/4] sh: decouple the pagefault-disabled logic Katsuya Matsubara
0 siblings, 1 reply; 6+ messages in thread
From: Katsuya Matsubara @ 2009-02-11 15:01 UTC (permalink / raw)
To: linux-rt-users
Cc: Steven Rostedt, Ingo Molnar, Thomas Gleixner, Paul Mundt, LKML,
Katsuya Matsubara
Fully-preemptible kernel does not need interrupts disabled in signal
handling. The same treatment can be found in x86 and arm code.
Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
---
arch/sh/kernel/signal_32.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index 6d6e408..9f633b5 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -571,6 +571,13 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
struct k_sigaction ka;
sigset_t *oldset;
+#ifdef CONFIG_PREEMPT_RT
+ /*
+ * Fully-preemptible kernel does not need interrupts disabled:
+ */
+ local_irq_enable();
+ preempt_check_resched();
+#endif
/*
* We want the common case to go fast, which
* is why we may in certain cases get here from
--
1.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH RT 3/4] sh: decouple the pagefault-disabled logic
2009-02-11 15:01 ` [PATCH RT 2/4] sh: enable interrupts in signal handling Katsuya Matsubara
@ 2009-02-11 15:01 ` Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 4/4] convert-locks-list: add sh specific spin locks Katsuya Matsubara
0 siblings, 1 reply; 6+ messages in thread
From: Katsuya Matsubara @ 2009-02-11 15:01 UTC (permalink / raw)
To: linux-rt-users
Cc: Steven Rostedt, Ingo Molnar, Thomas Gleixner, Paul Mundt, LKML,
Katsuya Matsubara
The preempt-rt patch adds a pagefault-disabled logic. We must not take
page faults if pagefault_disabled > 0. The same treatment can be found
in other arch code.
Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
---
arch/sh/mm/fault_32.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 898d477..2746b08 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -100,7 +100,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
* If we're in an interrupt or have no user
* context, we must not take the fault..
*/
- if (in_atomic() || !mm)
+ if (in_atomic() || !mm || current->pagefault_disabled)
goto no_context;
down_read(&mm->mmap_sem);
--
1.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH RT 4/4] convert-locks-list: add sh specific spin locks
2009-02-11 15:01 ` [PATCH RT 3/4] sh: decouple the pagefault-disabled logic Katsuya Matsubara
@ 2009-02-11 15:01 ` Katsuya Matsubara
0 siblings, 0 replies; 6+ messages in thread
From: Katsuya Matsubara @ 2009-02-11 15:01 UTC (permalink / raw)
To: linux-rt-users
Cc: Steven Rostedt, Ingo Molnar, Thomas Gleixner, Paul Mundt, LKML,
Katsuya Matsubara
The preempt-rt converts all spin locks into sleepable locks. However
some of the locks, for example, used in preempt-disabled code, must
keep the original behavior. The convert-locks script can revert such
locks specified by convert-locks-list. This patch add sh specific spin
locks into the list.
Signed-off-by: Katsuya Matsubara <matsu@igel.co.jp>
---
scripts/convert-locks-list | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/scripts/convert-locks-list b/scripts/convert-locks-list
index daba5a8..44793fb 100644
--- a/scripts/convert-locks-list
+++ b/scripts/convert-locks-list
@@ -84,6 +84,18 @@ arch/powerpc/include/asm/mpic.h:fixup_lock
arch/powerpc/include/asm/rtas.h:lock
arch/powerpc/include/asm/rwsem.h:wait_lock
+arch/sh/kernel/irq.c:(.*)lock
+arch/sh/kernel/traps_32.c:die_lock
+arch/sh/kernel/io_trapped.c:trapped_lock
+arch/sh/kernel/cpu/sh4/sq.c:sq_mapping_lock
+arch/sh/kernel/cpu/clock.c:clock_lock
+arch/sh/drivers/pci/ops-sh4.c:sh4_pci_lock
+arch/sh/mm/pmb.c:pmb_list_lock
+
+arch/sh/include/asm/dma.h:dma_spin_lock
+arch/sh/drivers/dma/dma-api.c:dma_spin_lock
+arch/sh/drivers/dma/dma-isa.c:dma_spin_lock
+
arch/mips/kernel/i8259.c:i8259A_lock
arch/mips/kernel/module.c:dbe_lock
arch/mips/kernel/smp.c:smp_call_lock
--
1.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH RT 0/4] sh arch support for 2.6.28-rt
2009-02-11 15:01 [PATCH RT 0/4] sh arch support for 2.6.28-rt Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 1/4] sh: use __preempt_enable_no_resched in cpu_idle() Katsuya Matsubara
@ 2009-02-11 15:16 ` Steven Rostedt
1 sibling, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2009-02-11 15:16 UTC (permalink / raw)
To: Katsuya Matsubara
Cc: linux-rt-users, Ingo Molnar, Thomas Gleixner, Paul Mundt, LKML
On Thu, 2009-02-12 at 00:01 +0900, Katsuya Matsubara wrote:
> These patches apply preempt-rt treatments into sh specific code.
> 64 bit support is not included because I have no sh64 board.
> These are based on the 2.6.28-rt git.
>
> I made sure that these work on renesas rts7751r2dplus.
>
> -- Katsuya Matsubara / matsu@igel.co.jp
>
> ---
>
> Katsuya Matsubara (4):
> sh: use __preempt_enable_no_resched in cpu_idle()
> sh: enable interrupts in signal handling
> sh: decouple the pagefault-disabled logic
> convert-locks-list: add sh specific spin locks
Applied. Thanks!
-- Steve
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-11 15:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 15:01 [PATCH RT 0/4] sh arch support for 2.6.28-rt Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 1/4] sh: use __preempt_enable_no_resched in cpu_idle() Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 2/4] sh: enable interrupts in signal handling Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 3/4] sh: decouple the pagefault-disabled logic Katsuya Matsubara
2009-02-11 15:01 ` [PATCH RT 4/4] convert-locks-list: add sh specific spin locks Katsuya Matsubara
2009-02-11 15:16 ` [PATCH RT 0/4] sh arch support for 2.6.28-rt Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox