All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/7] MIPS: Assorted fixlets and annotation patches
@ 2011-07-23 12:41 Thomas Gleixner
  2011-07-23 12:41 ` [patch 1/7] mips: sibyte: Add missing irq_mask function Thomas Gleixner
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-07-23 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

Ralf,

the following series is the fallout of the 3.0-rt work for MIPS.

The first 3 patches are bug fixes, the last 3 annotations for spin
locks and interrupts which want to be marked NO_THREAD.

There is one bug remaining, which I currently worked around by
disabling the dynamic ftrace functionality.

When the tracer starts up then ftrace_dyn_arch_init() is called with
interrupts disabled, but the MIPS code issues a SMP function call
which complains about interrupts being disabled. Observed on SWARM.

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 1/7] mips: sibyte: Add missing irq_mask function
  2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
@ 2011-07-23 12:41 ` Thomas Gleixner
  2011-07-27  8:41   ` Ralf Baechle
  2011-07-27 14:49   ` Ralf Baechle
  2011-07-23 12:41 ` [patch 3/7] mips: Enable interrupts in do_signal() Thomas Gleixner
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 16+ messages in thread
From: Thomas Gleixner @ 2011-07-23 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

[-- Attachment #1: mips-sibyte-fix-irq-chip.patch --]
[-- Type: text/plain, Size: 678 bytes --]

Crashes on free_irq() otherwise.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/mips/sibyte/sb1250/irq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/mips/sibyte/sb1250/irq.c
===================================================================
--- linux-2.6.orig/arch/mips/sibyte/sb1250/irq.c
+++ linux-2.6/arch/mips/sibyte/sb1250/irq.c
@@ -178,7 +178,7 @@ static void ack_sb1250_irq(struct irq_da
 
 static struct irq_chip sb1250_irq_type = {
 	.name = "SB1250-IMR",
-	.irq_mask_ack = ack_sb1250_irq,
+	.irq_mask = ack_sb1250_irq,
 	.irq_unmask = enable_sb1250_irq,
 #ifdef CONFIG_SMP
 	.irq_set_affinity = sb1250_set_affinity

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile
  2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
  2011-07-23 12:41 ` [patch 1/7] mips: sibyte: Add missing irq_mask function Thomas Gleixner
  2011-07-23 12:41 ` [patch 3/7] mips: Enable interrupts in do_signal() Thomas Gleixner
@ 2011-07-23 12:41 ` Thomas Gleixner
  2011-07-27  9:23   ` Ralf Baechle
  2011-07-23 12:41 ` [patch 4/7] MIPS: Make the die_lock be raw Thomas Gleixner
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2011-07-23 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: mips-ftrace-fix-non-dynamic-crappola.patch --]
[-- Type: text/plain, Size: 2433 bytes --]

arch/mips/kernel/ftrace.c: In function ‘ftrace_get_parent_ra_addr’:
arch/mips/kernel/ftrace.c:212: error: implicit declaration of function ‘in_kernel_space’
arch/mips/kernel/ftrace.c: In function ‘prepare_ftrace_return’:
arch/mips/kernel/ftrace.c:314: error: ‘MCOUNT_OFFSET_INSNS’ undeclared (first use in this function)
arch/mips/kernel/ftrace.c:314: error: (Each undeclared identifier is reported only once
arch/mips/kernel/ftrace.c:314: error: for each function it appears in.)

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/mips/kernel/ftrace.c |   39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

Index: linux-2.6/arch/mips/kernel/ftrace.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/ftrace.c
+++ linux-2.6/arch/mips/kernel/ftrace.c
@@ -19,6 +19,26 @@
 
 #include <asm-generic/sections.h>
 
+#if defined(KBUILD_MCOUNT_RA_ADDRESS) && defined(CONFIG_32BIT)
+#define MCOUNT_OFFSET_INSNS 5
+#else
+#define MCOUNT_OFFSET_INSNS 4
+#endif
+
+/*
+ * Check if the address is in kernel space
+ *
+ * Clone core_kernel_text() from kernel/extable.c, but doesn't call
+ * init_kernel_text() for Ftrace doesn't trace functions in init sections.
+ */
+static inline int in_kernel_space(unsigned long ip)
+{
+	if (ip >= (unsigned long)_stext &&
+	    ip <= (unsigned long)_etext)
+		return 1;
+	return 0;
+}
+
 #ifdef CONFIG_DYNAMIC_FTRACE
 
 #define JAL 0x0c000000		/* jump & link: ip --> ra, jump to target */
@@ -54,20 +74,6 @@ static inline void ftrace_dyn_arch_init_
 #endif
 }
 
-/*
- * Check if the address is in kernel space
- *
- * Clone core_kernel_text() from kernel/extable.c, but doesn't call
- * init_kernel_text() for Ftrace doesn't trace functions in init sections.
- */
-static inline int in_kernel_space(unsigned long ip)
-{
-	if (ip >= (unsigned long)_stext &&
-	    ip <= (unsigned long)_etext)
-		return 1;
-	return 0;
-}
-
 static int ftrace_modify_code(unsigned long ip, unsigned int new_code)
 {
 	int faulted;
@@ -112,11 +118,6 @@ static int ftrace_modify_code(unsigned l
  *                                  1: offset = 4 instructions
  */
 
-#if defined(KBUILD_MCOUNT_RA_ADDRESS) && defined(CONFIG_32BIT)
-#define MCOUNT_OFFSET_INSNS 5
-#else
-#define MCOUNT_OFFSET_INSNS 4
-#endif
 #define INSN_B_1F (0x10000000 | MCOUNT_OFFSET_INSNS)
 
 int ftrace_make_nop(struct module *mod,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 3/7] mips: Enable interrupts in do_signal()
  2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
  2011-07-23 12:41 ` [patch 1/7] mips: sibyte: Add missing irq_mask function Thomas Gleixner
@ 2011-07-23 12:41 ` Thomas Gleixner
  2011-07-27 13:06   ` Ralf Baechle
  2011-07-23 12:41 ` [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile Thomas Gleixner
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2011-07-23 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

[-- Attachment #1: mips-enable-interrupts-in-signal.patch --]
[-- Type: text/plain, Size: 1717 bytes --]

do_signal() does __put_user() which can fault, resulting in a
might_sleep() warning in down_read(&mm->mmap_sem) and a "scheduling
while atomic" warning when mmap_sem is contented. On swarm this also
results in:

WARNING: at kernel/smp.c:459 smp_call_function_many+0x148/0x398()
Modules linked in:
Call Trace:

[<ffffffff804b48a4>] dump_stack+0x1c/0x50
[<ffffffff8013dc94>] warn_slowpath_common+0x8c/0xc8
[<ffffffff8013dcfc>] warn_slowpath_null+0x2c/0x40
[<ffffffff801864a0>] smp_call_function_many+0x148/0x398
[<ffffffff80186748>] smp_call_function+0x58/0xa8
[<ffffffff80119b5c>] r4k_flush_data_cache_page+0x54/0xd8
[<ffffffff801f39bc>] handle_pte_fault+0xa9c/0xad0
[<ffffffff801f40d0>] handle_mm_fault+0x158/0x200
[<ffffffff80115548>] do_page_fault+0x218/0x3b0
[<ffffffff80102744>] ret_from_exception+0x0/0x10
[<ffffffff8010eb18>] copy_siginfo_to_user32+0x50/0x298
[<ffffffff8010edf0>] setup_rt_frame_32+0x90/0x250
[<ffffffff80106414>] do_notify_resume+0x154/0x358
[<ffffffff80102930>] work_notifysig+0xc/0x14

Enable interrupts in do_signal() before delivering signals. Might be
done in the entry code before calling do_notify_resume(), but I leave
that for the MIPS ASM wizards.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/mips/kernel/signal.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/arch/mips/kernel/signal.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/signal.c
+++ linux-2.6/arch/mips/kernel/signal.c
@@ -603,6 +603,8 @@ static void do_signal(struct pt_regs *re
 	if (!user_mode(regs))
 		return;
 
+	local_irq_enable();
+
 	if (test_thread_flag(TIF_RESTORE_SIGMASK))
 		oldset = &current->saved_sigmask;
 	else

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 4/7] MIPS: Make the die_lock be raw
  2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
                   ` (2 preceding siblings ...)
  2011-07-23 12:41 ` [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile Thomas Gleixner
@ 2011-07-23 12:41 ` Thomas Gleixner
  2011-07-27  9:51   ` Ralf Baechle
  2011-07-23 12:41 ` [patch 6/7] MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD Thomas Gleixner
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2011-07-23 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Wu Zhangjin

[-- Attachment #1: mips-make-die-lock-raw.patch --]
[-- Type: text/plain, Size: 1340 bytes --]

From: Wu Zhangjin <wuzhangjin@gmail.com>

On preempt-rt this lock needs to be raw, so it does not get converted
to a sleeping spinlock. Trying to sleep in a panic is not really
desireable.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/mips/kernel/traps.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/mips/kernel/traps.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/traps.c
+++ linux-2.6/arch/mips/kernel/traps.c
@@ -364,7 +364,7 @@ static int regs_to_trapnr(struct pt_regs
 	return (regs->cp0_cause >> 2) & 0x1f;
 }
 
-static DEFINE_SPINLOCK(die_lock);
+static DEFINE_RAW_SPINLOCK(die_lock);
 
 void __noreturn die(const char *str, struct pt_regs *regs)
 {
@@ -378,7 +378,7 @@ void __noreturn die(const char *str, str
 		sig = 0;
 
 	console_verbose();
-	spin_lock_irq(&die_lock);
+	raw_spin_lock_irq(&die_lock);
 	bust_spinlocks(1);
 #ifdef CONFIG_MIPS_MT_SMTC
 	mips_mt_regdump(dvpret);
@@ -387,7 +387,7 @@ void __noreturn die(const char *str, str
 	printk("%s[#%d]:\n", str, ++die_counter);
 	show_registers(regs);
 	add_taint(TAINT_DIE);
-	spin_unlock_irq(&die_lock);
+	raw_spin_unlock_irq(&die_lock);
 
 	if (in_interrupt())
 		panic("Fatal exception in interrupt");

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 5/7] MIPS: Mark cascade and low level interrupts IRQF_NO_THREAD
  2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
                   ` (4 preceding siblings ...)
  2011-07-23 12:41 ` [patch 6/7] MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD Thomas Gleixner
@ 2011-07-23 12:41 ` Thomas Gleixner
  2011-07-27  9:53   ` Ralf Baechle
  2011-07-23 12:41 ` [patch 7/7] mips: Allow forced irq threading Thomas Gleixner
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2011-07-23 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Wu Zhangjin

[-- Attachment #1: mips-mark-cascade-interrupts-nothread.patch --]
[-- Type: text/plain, Size: 7502 bytes --]

From: Wu Zhangjin <wuzhangjin@gmail.com>

Mark interrupts with no_action handler, cascade interrupts, low level
interrupts (bus error, halt ..) with IRQF_NO_THREAD to exclude them
from forced threading.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/mips/ar7/irq.c                    |    3 ++-
 arch/mips/bcm63xx/irq.c                |    1 +
 arch/mips/cobalt/irq.c                 |    1 +
 arch/mips/dec/setup.c                  |    4 ++++
 arch/mips/emma/markeins/irq.c          |    2 +-
 arch/mips/lasat/interrupt.c            |    1 +
 arch/mips/mti-malta/malta-int.c        |    6 ++++--
 arch/mips/pmc-sierra/msp71xx/msp_irq.c |    2 ++
 arch/mips/pnx8550/common/int.c         |    2 +-
 arch/mips/sgi-ip22/ip22-int.c          |   10 +++++-----
 arch/mips/sni/rm200.c                  |    1 +
 arch/mips/vr41xx/common/irq.c          |    1 +
 12 files changed, 24 insertions(+), 10 deletions(-)

Index: linux-2.6/arch/mips/ar7/irq.c
===================================================================
--- linux-2.6.orig/arch/mips/ar7/irq.c
+++ linux-2.6/arch/mips/ar7/irq.c
@@ -98,7 +98,8 @@ static struct irq_chip ar7_sec_irq_type 
 
 static struct irqaction ar7_cascade_action = {
 	.handler = no_action,
-	.name = "AR7 cascade interrupt"
+	.name = "AR7 cascade interrupt",
+	.flags = IRQF_NO_THREAD,
 };
 
 static void __init ar7_irq_init(int base)
Index: linux-2.6/arch/mips/bcm63xx/irq.c
===================================================================
--- linux-2.6.orig/arch/mips/bcm63xx/irq.c
+++ linux-2.6/arch/mips/bcm63xx/irq.c
@@ -222,6 +222,7 @@ static struct irq_chip bcm63xx_external_
 static struct irqaction cpu_ip2_cascade_action = {
 	.handler	= no_action,
 	.name		= "cascade_ip2",
+	.flags		= IRQF_NO_THREAD,
 };
 
 void __init arch_init_irq(void)
Index: linux-2.6/arch/mips/cobalt/irq.c
===================================================================
--- linux-2.6.orig/arch/mips/cobalt/irq.c
+++ linux-2.6/arch/mips/cobalt/irq.c
@@ -48,6 +48,7 @@ asmlinkage void plat_irq_dispatch(void)
 static struct irqaction cascade = {
 	.handler	= no_action,
 	.name		= "cascade",
+	.flags		= IRQF_NO_THREAD,
 };
 
 void __init arch_init_irq(void)
Index: linux-2.6/arch/mips/dec/setup.c
===================================================================
--- linux-2.6.orig/arch/mips/dec/setup.c
+++ linux-2.6/arch/mips/dec/setup.c
@@ -101,20 +101,24 @@ int cpu_fpu_mask = DEC_CPU_IRQ_MASK(DEC_
 static struct irqaction ioirq = {
 	.handler = no_action,
 	.name = "cascade",
+	.flags = IRQF_NO_THREAD,
 };
 static struct irqaction fpuirq = {
 	.handler = no_action,
 	.name = "fpu",
+	.flags = IRQF_NO_THREAD,
 };
 
 static struct irqaction busirq = {
 	.flags = IRQF_DISABLED,
 	.name = "bus error",
+	.flags = IRQF_NO_THREAD,
 };
 
 static struct irqaction haltirq = {
 	.handler = dec_intr_halt,
 	.name = "halt",
+	.flags = IRQF_NO_THREAD,
 };
 
 
Index: linux-2.6/arch/mips/emma/markeins/irq.c
===================================================================
--- linux-2.6.orig/arch/mips/emma/markeins/irq.c
+++ linux-2.6/arch/mips/emma/markeins/irq.c
@@ -169,7 +169,7 @@ void emma2rh_gpio_irq_init(void)
 
 static struct irqaction irq_cascade = {
 	   .handler = no_action,
-	   .flags = 0,
+	   .flags = IRQF_NO_THREAD,
 	   .name = "cascade",
 	   .dev_id = NULL,
 	   .next = NULL,
Index: linux-2.6/arch/mips/lasat/interrupt.c
===================================================================
--- linux-2.6.orig/arch/mips/lasat/interrupt.c
+++ linux-2.6/arch/mips/lasat/interrupt.c
@@ -105,6 +105,7 @@ asmlinkage void plat_irq_dispatch(void)
 static struct irqaction cascade = {
 	.handler	= no_action,
 	.name		= "cascade",
+	.flags		= IRQF_NO_THREAD,
 };
 
 void __init arch_init_irq(void)
Index: linux-2.6/arch/mips/mti-malta/malta-int.c
===================================================================
--- linux-2.6.orig/arch/mips/mti-malta/malta-int.c
+++ linux-2.6/arch/mips/mti-malta/malta-int.c
@@ -350,12 +350,14 @@ unsigned int plat_ipi_resched_int_xlate(
 
 static struct irqaction i8259irq = {
 	.handler = no_action,
-	.name = "XT-PIC cascade"
+	.name = "XT-PIC cascade",
+	.flags = IRQF_NO_THREAD,
 };
 
 static struct irqaction corehi_irqaction = {
 	.handler = no_action,
-	.name = "CoreHi"
+	.name = "CoreHi",
+	.flags = IRQF_NO_THREAD,
 };
 
 static msc_irqmap_t __initdata msc_irqmap[] = {
Index: linux-2.6/arch/mips/pmc-sierra/msp71xx/msp_irq.c
===================================================================
--- linux-2.6.orig/arch/mips/pmc-sierra/msp71xx/msp_irq.c
+++ linux-2.6/arch/mips/pmc-sierra/msp71xx/msp_irq.c
@@ -109,11 +109,13 @@ asmlinkage void plat_irq_dispatch(struct
 static struct irqaction cic_cascade_msp = {
 	.handler = no_action,
 	.name	 = "MSP CIC cascade"
+	.flags	 = IRQF_NO_THREAD,
 };
 
 static struct irqaction per_cascade_msp = {
 	.handler = no_action,
 	.name	 = "MSP PER cascade"
+	.flags	 = IRQF_NO_THREAD,
 };
 
 void __init arch_init_irq(void)
Index: linux-2.6/arch/mips/pnx8550/common/int.c
===================================================================
--- linux-2.6.orig/arch/mips/pnx8550/common/int.c
+++ linux-2.6/arch/mips/pnx8550/common/int.c
@@ -167,7 +167,7 @@ static struct irq_chip level_irq_type = 
 
 static struct irqaction gic_action = {
 	.handler =	no_action,
-	.flags =	IRQF_DISABLED,
+	.flags =	IRQF_DISABLED | IRQF_NO_THREAD,
 	.name =		"GIC",
 };
 
Index: linux-2.6/arch/mips/sgi-ip22/ip22-int.c
===================================================================
--- linux-2.6.orig/arch/mips/sgi-ip22/ip22-int.c
+++ linux-2.6/arch/mips/sgi-ip22/ip22-int.c
@@ -155,32 +155,32 @@ static void __irq_entry indy_buserror_ir
 
 static struct irqaction local0_cascade = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED,
+	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
 	.name		= "local0 cascade",
 };
 
 static struct irqaction local1_cascade = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED,
+	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
 	.name		= "local1 cascade",
 };
 
 static struct irqaction buserr = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED,
+	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
 	.name		= "Bus Error",
 };
 
 static struct irqaction map0_cascade = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED,
+	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
 	.name		= "mapable0 cascade",
 };
 
 #ifdef USE_LIO3_IRQ
 static struct irqaction map1_cascade = {
 	.handler	= no_action,
-	.flags		= IRQF_DISABLED,
+	.flags		= IRQF_DISABLED | IRQF_NO_THREAD,
 	.name		= "mapable1 cascade",
 };
 #define SGI_INTERRUPTS	SGINT_END
Index: linux-2.6/arch/mips/sni/rm200.c
===================================================================
--- linux-2.6.orig/arch/mips/sni/rm200.c
+++ linux-2.6/arch/mips/sni/rm200.c
@@ -359,6 +359,7 @@ void sni_rm200_init_8259A(void)
 static struct irqaction sni_rm200_irq2 = {
 	.handler = no_action,
 	.name = "cascade",
+	.flags = IRQF_NO_THREAD,
 };
 
 static struct resource sni_rm200_pic1_resource = {
Index: linux-2.6/arch/mips/vr41xx/common/irq.c
===================================================================
--- linux-2.6.orig/arch/mips/vr41xx/common/irq.c
+++ linux-2.6/arch/mips/vr41xx/common/irq.c
@@ -34,6 +34,7 @@ static irq_cascade_t irq_cascade[NR_IRQS
 static struct irqaction cascade_irqaction = {
 	.handler	= no_action,
 	.name		= "cascade",
+	.flags		= IRQF_NO_THREAD,
 };
 
 int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int))

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 6/7] MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD
  2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
                   ` (3 preceding siblings ...)
  2011-07-23 12:41 ` [patch 4/7] MIPS: Make the die_lock be raw Thomas Gleixner
@ 2011-07-23 12:41 ` Thomas Gleixner
  2011-07-27  9:55   ` Ralf Baechle
  2011-07-23 12:41 ` [patch 5/7] MIPS: Mark cascade and low level " Thomas Gleixner
  2011-07-23 12:41 ` [patch 7/7] mips: Allow forced irq threading Thomas Gleixner
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2011-07-23 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle, Wu Zhangjin

[-- Attachment #1: mips-loongson-mark-cascade-interrupts-non-thread.patch --]
[-- Type: text/plain, Size: 1515 bytes --]

From: Wu Zhangjin <wuzhangjin@gmail.com>

There are two cascade interrupts in Loongson machines, one for bonito
northbridge, another for the 8259A controller in the southbridge. Both
want to be non threaded.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/mips/loongson/fuloong-2e/irq.c |    1 +
 arch/mips/loongson/lemote-2f/irq.c  |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6-tip/arch/mips/loongson/fuloong-2e/irq.c
===================================================================
--- linux-2.6-tip.orig/arch/mips/loongson/fuloong-2e/irq.c
+++ linux-2.6-tip/arch/mips/loongson/fuloong-2e/irq.c
@@ -42,6 +42,7 @@ asmlinkage void mach_irq_dispatch(unsign
 static struct irqaction cascade_irqaction = {
 	.handler = no_action,
 	.name = "cascade",
+	.flags = IRQF_NO_THREAD,
 };
 
 void __init mach_init_irq(void)
Index: linux-2.6-tip/arch/mips/loongson/lemote-2f/irq.c
===================================================================
--- linux-2.6-tip.orig/arch/mips/loongson/lemote-2f/irq.c
+++ linux-2.6-tip/arch/mips/loongson/lemote-2f/irq.c
@@ -96,12 +96,13 @@ static irqreturn_t ip6_action(int cpl, v
 struct irqaction ip6_irqaction = {
 	.handler = ip6_action,
 	.name = "cascade",
-	.flags = IRQF_SHARED,
+	.flags = IRQF_SHARED | IRQF_NO_THREAD,
 };
 
 struct irqaction cascade_irqaction = {
 	.handler = no_action,
 	.name = "cascade",
+	.flags = IRQF_NO_THREAD,
 };
 
 void __init mach_init_irq(void)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [patch 7/7] mips: Allow forced irq threading
  2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
                   ` (5 preceding siblings ...)
  2011-07-23 12:41 ` [patch 5/7] MIPS: Mark cascade and low level " Thomas Gleixner
@ 2011-07-23 12:41 ` Thomas Gleixner
  2011-07-27  9:56   ` Ralf Baechle
  6 siblings, 1 reply; 16+ messages in thread
From: Thomas Gleixner @ 2011-07-23 12:41 UTC (permalink / raw)
  To: linux-mips; +Cc: Ralf Baechle

[-- Attachment #1: mips-allow-irq-threading.patch --]
[-- Type: text/plain, Size: 593 bytes --]

All low level interrupts have been marked NO_THREAD, so MIPS can enjoy
the wonderful world of forced threaded interrupt handlers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/mips/Kconfig |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6/arch/mips/Kconfig
===================================================================
--- linux-2.6.orig/arch/mips/Kconfig
+++ linux-2.6/arch/mips/Kconfig
@@ -24,6 +24,7 @@ config MIPS
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
 	select HAVE_ARCH_JUMP_LABEL
+	select IRQ_FORCED_THREADING
 
 menu "Machine selection"
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 1/7] mips: sibyte: Add missing irq_mask function
  2011-07-23 12:41 ` [patch 1/7] mips: sibyte: Add missing irq_mask function Thomas Gleixner
@ 2011-07-27  8:41   ` Ralf Baechle
  2011-07-27 14:49   ` Ralf Baechle
  1 sibling, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2011-07-27  8:41 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mips

On Sat, Jul 23, 2011 at 12:41:22PM -0000, Thomas Gleixner wrote:

> Crashes on free_irq() otherwise.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
>  arch/mips/sibyte/sb1250/irq.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/arch/mips/sibyte/sb1250/irq.c
> ===================================================================
> --- linux-2.6.orig/arch/mips/sibyte/sb1250/irq.c
> +++ linux-2.6/arch/mips/sibyte/sb1250/irq.c
> @@ -178,7 +178,7 @@ static void ack_sb1250_irq(struct irq_da
>  
>  static struct irq_chip sb1250_irq_type = {
>  	.name = "SB1250-IMR",
> -	.irq_mask_ack = ack_sb1250_irq,
> +	.irq_mask = ack_sb1250_irq,

This conflicts with 1544129da2de9fa276429deed8fac3fbc45634be [MIPS: SB1250:
Restore dropped irq_mask function] which does:

@@ -180,6 +187,7 @@ static struct irq_chip sb1250_irq_type = {
        .name = "SB1250-IMR",
        .irq_mask_ack = ack_sb1250_irq,
        .irq_unmask = enable_sb1250_irq,
+       .irq_mask = disable_sb1250_irq,
 #ifdef CONFIG_SMP
        .irq_set_affinity = sb1250_set_affinity
 #endif

  Ralf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile
  2011-07-23 12:41 ` [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile Thomas Gleixner
@ 2011-07-27  9:23   ` Ralf Baechle
  0 siblings, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2011-07-27  9:23 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mips

Thanks, applied.

  Ralf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 4/7] MIPS: Make the die_lock be raw
  2011-07-23 12:41 ` [patch 4/7] MIPS: Make the die_lock be raw Thomas Gleixner
@ 2011-07-27  9:51   ` Ralf Baechle
  0 siblings, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2011-07-27  9:51 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mips, Wu Zhangjin

Thanks, applied.

  Ralf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 5/7] MIPS: Mark cascade and low level interrupts IRQF_NO_THREAD
  2011-07-23 12:41 ` [patch 5/7] MIPS: Mark cascade and low level " Thomas Gleixner
@ 2011-07-27  9:53   ` Ralf Baechle
  0 siblings, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2011-07-27  9:53 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mips, Wu Zhangjin

Thanks, applied.

  Ralf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 6/7] MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD
  2011-07-23 12:41 ` [patch 6/7] MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD Thomas Gleixner
@ 2011-07-27  9:55   ` Ralf Baechle
  0 siblings, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2011-07-27  9:55 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mips, Wu Zhangjin

Thanks, applied.

  Ralf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 7/7] mips: Allow forced irq threading
  2011-07-23 12:41 ` [patch 7/7] mips: Allow forced irq threading Thomas Gleixner
@ 2011-07-27  9:56   ` Ralf Baechle
  0 siblings, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2011-07-27  9:56 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mips

Thanks, applied.

  Ralf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 3/7] mips: Enable interrupts in do_signal()
  2011-07-23 12:41 ` [patch 3/7] mips: Enable interrupts in do_signal() Thomas Gleixner
@ 2011-07-27 13:06   ` Ralf Baechle
  0 siblings, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2011-07-27 13:06 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mips

On Sat, Jul 23, 2011 at 12:41:23PM -0000, Thomas Gleixner wrote:

Uwh..  This one affects master and all -stable branches.  But as discussed
on IRC I"ve placed the call directly into do_notify_resume - the less code
running with interrutps disabled the better.

  Ralf

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [patch 1/7] mips: sibyte: Add missing irq_mask function
  2011-07-23 12:41 ` [patch 1/7] mips: sibyte: Add missing irq_mask function Thomas Gleixner
  2011-07-27  8:41   ` Ralf Baechle
@ 2011-07-27 14:49   ` Ralf Baechle
  1 sibling, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2011-07-27 14:49 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-mips


And dropped as you suggested on IRC.

Thanks,

  Ralf

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-07-27 14:49 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-23 12:41 [patch 0/7] MIPS: Assorted fixlets and annotation patches Thomas Gleixner
2011-07-23 12:41 ` [patch 1/7] mips: sibyte: Add missing irq_mask function Thomas Gleixner
2011-07-27  8:41   ` Ralf Baechle
2011-07-27 14:49   ` Ralf Baechle
2011-07-23 12:41 ` [patch 3/7] mips: Enable interrupts in do_signal() Thomas Gleixner
2011-07-27 13:06   ` Ralf Baechle
2011-07-23 12:41 ` [patch 2/7] mips: ftrace: Fix the CONFIG_DYNAMIC_FTRACE=n compile Thomas Gleixner
2011-07-27  9:23   ` Ralf Baechle
2011-07-23 12:41 ` [patch 4/7] MIPS: Make the die_lock be raw Thomas Gleixner
2011-07-27  9:51   ` Ralf Baechle
2011-07-23 12:41 ` [patch 6/7] MIPS: Loongson: Mark cascade interrupts IRQF_NO_THREAD Thomas Gleixner
2011-07-27  9:55   ` Ralf Baechle
2011-07-23 12:41 ` [patch 5/7] MIPS: Mark cascade and low level " Thomas Gleixner
2011-07-27  9:53   ` Ralf Baechle
2011-07-23 12:41 ` [patch 7/7] mips: Allow forced irq threading Thomas Gleixner
2011-07-27  9:56   ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.