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] [day] [month] [year] [list]
Date:	Wed, 29 Sep 2010 22:41:03 -0400
From:	Kyle McMartin <kyle@...artin.ca>
To:	Kyle McMartin <kyle@...artin.ca>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Christoph Hellwig <hch@...radead.org>,
	linux-alpha@...r.kernel.org, linux-cris-kernel@...s.com,
	Haavard Skinnemoen <hskinnemoen@...el.com>,
	Tony Luck <tony.luck@...el.com>, linux-ia64@...r.kernel.org,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	Hirokazu Takata <takata@...ux-m32r.org>,
	Greg Ungerer <gerg@...inux.org>, Jeff Dike <jdike@...toit.com>,
	linux-parisc@...r.kernel.org, Chris Zankel <chris@...kel.net>,
	linux-arch@...r.kernel.org
Subject: Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing
 __do_IRQ() code

On Wed, Sep 29, 2010 at 09:26:41PM -0400, Kyle McMartin wrote:
> I'd appreciate a second pair of eyes, and if it's ok, I'll clean it up
> and submit it.
> 

Let's do h8300 while we're at it, since that also /looks/ trivial...
(probably famous last words.)

No idea if it's edge or level or what, but given the handlers that would
be called in the __do_IRQ patch, handle_edge_irq seems most sensible.

Executive summary: kill implied .ack = NULL, rename enable to unmask,
kill empty .end since dummy_irq_chip.end will suit us fine. Kill some
unneeded irq_desc initializers that are also implicit...

Again, if someone could build/boot/whatever test this, that would be
fantastic, and I'll add their Tested-by and submit.

--kyle

---
 irq.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c
index c25dc2c..acdbc07 100644
--- a/arch/h8300/kernel/irq.c
+++ b/arch/h8300/kernel/irq.c
@@ -50,10 +50,6 @@ static void h8300_disable_irq(unsigned int irq)
 		IER_REGS &= ~(1 << (irq - EXT_IRQ0));
 }
 
-static void h8300_end_irq(unsigned int irq)
-{
-}
-
 static unsigned int h8300_startup_irq(unsigned int irq)
 {
 	if (is_ext_irq(irq))
@@ -75,10 +71,9 @@ struct irq_chip h8300irq_chip = {
 	.name		= "H8300-INTC",
 	.startup	= h8300_startup_irq,
 	.shutdown	= h8300_shutdown_irq,
-	.enable		= h8300_enable_irq,
+	.unmask		= h8300_enable_irq,
+	.mask		= h8300_disable_irq,
 	.disable	= h8300_disable_irq,
-	.ack		= NULL,
-	.end		= h8300_end_irq,
 };
 
 #if defined(CONFIG_RAMKERNEL)
@@ -161,17 +156,14 @@ void __init init_IRQ(void)
 	setup_vector();
 
 	for (c = 0; c < NR_IRQS; c++) {
-		irq_desc[c].status = IRQ_DISABLED;
-		irq_desc[c].action = NULL;
-		irq_desc[c].depth = 1;
-		irq_desc[c].chip = &h8300irq_chip;
+		set_irq_chip_and_handler(c, &h8300_irq_chip, handle_edge_irq);
 	}
 }
 
 asmlinkage void do_IRQ(int irq)
 {
 	irq_enter();
-	__do_IRQ(irq);
+	generic_handle_irq(irq);
 	irq_exit();
 }
 
--
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