lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 11 Sep 2011 13:59:51 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	linux-m68k@...ts.linux-m68k.org
Cc:	linux-kernel@...r.kernel.org,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Sam Creasey <sammy@...my.net>
Subject: [PATCH 25/28] m68k/sun3: Convert Sun3/3x to genirq

Replace the custom irq handler that masks the irq and calls do_IRQ(), and
the unmasking in the individual handlers, by handle_level_irq().

Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Sam Creasey <sammy@...my.net>
---
v4: Added this changeset
---
 arch/m68k/Kconfig.mmu     |    2 --
 arch/m68k/sun3/sun3ints.c |   16 ++++++++++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/m68k/Kconfig.mmu b/arch/m68k/Kconfig.mmu
index b5e331f..fa98287 100644
--- a/arch/m68k/Kconfig.mmu
+++ b/arch/m68k/Kconfig.mmu
@@ -200,9 +200,7 @@ config SUN3
 
 config USE_GENERIC_HARDIRQS
 	bool "Use genirq"
-	depends on !SUN3X
 	depends on !Q40
-	depends on !SUN3
 	select HAVE_GENERIC_HARDIRQS
 	select GENERIC_IRQ_SHOW
 
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 1273eb8..626b601 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -53,7 +53,9 @@ static irqreturn_t sun3_int7(int irq, void *dev_id)
 {
 	unsigned int cnt;
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 	*sun3_intreg |=  (1 << irq);
+#endif
 	cnt = kstat_irqs_cpu(irq, 0);
 	if (!(cnt % 2000))
 		sun3_leds(led_pattern[cnt % 16000 / 2000]);
@@ -67,7 +69,9 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)
 #ifdef CONFIG_SUN3
 	intersil_clear();
 #endif
+#ifndef CONFIG_GENERIC_HARDIRQS
         *sun3_intreg |=  (1 << irq);
+#endif
 #ifdef CONFIG_SUN3
 	intersil_clear();
 #endif
@@ -85,12 +89,14 @@ static irqreturn_t sun3_vec255(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 static void sun3_inthandle(unsigned int irq, struct pt_regs *fp)
 {
         *sun3_intreg &= ~(1 << irq);
 
 	do_IRQ(irq, fp);
 }
+#endif
 
 static void sun3_irq_enable(struct irq_data *data)
 {
@@ -108,15 +114,21 @@ static struct irq_chip sun3_irq_chip = {
 	.irq_shutdown	= m68k_irq_shutdown,
 	.irq_enable	= sun3_irq_enable,
 	.irq_disable	= sun3_irq_disable,
+#ifdef CONFIG_GENERIC_HARDIRQS
+	.irq_mask	= sun3_irq_disable,
+	.irq_unmask	= sun3_irq_enable,
+#endif
 };
 
 void __init sun3_init_IRQ(void)
 {
 	*sun3_intreg = 1;
 
+#ifndef CONFIG_GENERIC_HARDIRQS
 	m68k_setup_auto_interrupt(sun3_inthandle);
-	m68k_setup_irq_controller(&sun3_irq_chip, handle_simple_irq,
-				  IRQ_AUTO_1, 7);
+#endif
+	m68k_setup_irq_controller(&sun3_irq_chip, handle_level_irq, IRQ_AUTO_1,
+				  7);
 	m68k_setup_user_interrupt(VEC_USER, 128, NULL);
 
 	if (request_irq(IRQ_AUTO_5, sun3_int5, 0, "int5", NULL))
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ