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]
Message-Id: <20090815201354.835D3526EA5@mailhub.coreip.homeip.net>
Date:	Sat, 15 Aug 2009 12:42:55 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Trilok Soni <soni.trilok@...il.com>,
	Pavel Machek <pavel@....cz>,
	Brian Swetland <swetland@...gle.com>,
	Joonyoung Shim <jy0922.shim@...sung.com>,
	m.szyprowski@...sung.com, t.fujak@...sung.com,
	kyungmin.park@...sung.com, David Brownell <david-b@...bell.net>,
	Daniel Ribeiro <drwyrm@...il.com>, arve@...roid.com,
	Barry Song <21cnbao@...il.com>
Subject: Re: [RFC patch 1/3] genirq: Add oneshot support

Hi Thomas,

On Sat, Aug 15, 2009 at 05:48:33PM -0000, Thomas Gleixner wrote:
>  
>  /**
> + *	irq_oneshot_primary_handler - Handle oneshot interrupt primary handler
> + *	@irq:		the interrupt number
> + *	@dev_id:	cookie to identify the device
> + *
> + *	For oneshot interrupts which keep the interrupt line masked
> + *	until the threaded handler has been executed, the only
> + *	functionality of the primary handler is to return
> + *	IRQ_WAKE_THREAD. This is the generic implementation which
> + *	avoids lots of duplicates all over the place
> + */
> +irqreturn_t irq_oneshot_primary_handler(int irq, void *dev_id)
> +{
> +	return IRQ_WAKE_THREAD;
> +}
> +EXPORT_SYMBOL_GPL(irq_oneshot_primary_handler);

This kind of handler is useful not only for users of oneshot interrupts
but also other drivers using threaded IRQs. So maybe we should rename it
to default_threaded_irq_handler() and instead of exporting it simply
have it installed automatically when driver requests NULL in place of
IRQ handler in request_threaded_irq()?

Also, if IRQF_ONESHOT definition would make into mainline sooner than
later that would be great - then I'd be able to put all the drivers that
will end up using it into my next branch and not be concerned of
breaking linux-next.

-- 
Dmitry
--
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