All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] softirq: Reserve a bit in tasklet.state for the user
@ 2017-01-23 15:33 Chris Wilson
  2017-01-23 15:44 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2017-01-23 15:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: Chris Wilson, Thomas Gleixner, Jens Axboe, Hannes Reinecke,
	Bjorn Helgaas, Chen Fan, Alexander Potapenko

Allow the user to communicate with the tasklet through the atomic state
field by assigning a bit for their use. This can be used, for example,
to differentiate between a tasklet called following an irq or from
process context, where some hardware state may only be valid after the
irq.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Cc: Alexander Potapenko <glider@google.com>
---
 include/linux/interrupt.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 53144e78a369..ab321552089b 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -542,7 +542,8 @@ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
 enum
 {
 	TASKLET_STATE_SCHED,	/* Tasklet is scheduled for execution */
-	TASKLET_STATE_RUN	/* Tasklet is running (SMP only) */
+	TASKLET_STATE_RUN,	/* Tasklet is running (SMP only) */
+	TASKLET_STATE_USER	/* Reserved for use by the owner */
 };
 
 #ifdef CONFIG_SMP
-- 
2.11.0

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

end of thread, other threads:[~2017-01-23 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 15:33 [PATCH] softirq: Reserve a bit in tasklet.state for the user Chris Wilson
2017-01-23 15:44 ` Jens Axboe
2017-01-23 15:57   ` [PATCH] drm/i915: Only run execlist context-switch handler after an interrupt Chris Wilson
2017-01-23 15:59   ` [PATCH] softirq: Reserve a bit in tasklet.state for the user Thomas Gleixner
2017-01-23 16:10     ` Peter Zijlstra

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.