forked from analogdevicesinc/linux
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'tasklets-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/k…
…ernel/git/kees/linux Pull tasklets API update from Kees Cook: "These are the infrastructure updates needed to support converting the tasklet API to something more modern (and hopefully for removal further down the road). There is a 300-patch series waiting in the wings to get set out to subsystem maintainers, but these changes need to be present in the kernel first. Since this has some treewide changes, I carried this series for -next instead of paining Thomas with it in -tip, but it's got his Ack. This is similar to the timer_struct modernization from a while back, but not nearly as messy (I hope). :) - Prepare for tasklet API modernization (Romain Perier, Allen Pais, Kees Cook)" * tag 'tasklets-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: tasklet: Introduce new initialization API treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() usb: gadget: udc: Avoid tasklet passing a global
- Loading branch information
Showing
17 changed files
with
70 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -585,6 +585,9 @@ static inline struct task_struct *this_cpu_ksoftirqd(void) | |
|
||
/* Tasklets --- multithreaded analogue of BHs. | ||
This API is deprecated. Please consider using threaded IRQs instead: | ||
https://lore.kernel.org/lkml/[email protected] | ||
Main feature differing them of generic softirqs: tasklet | ||
is running only on one CPU simultaneously. | ||
|
@@ -608,16 +611,42 @@ struct tasklet_struct | |
struct tasklet_struct *next; | ||
unsigned long state; | ||
atomic_t count; | ||
void (*func)(unsigned long); | ||
bool use_callback; | ||
union { | ||
void (*func)(unsigned long data); | ||
void (*callback)(struct tasklet_struct *t); | ||
}; | ||
unsigned long data; | ||
}; | ||
|
||
#define DECLARE_TASKLET(name, func, data) \ | ||
struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data } | ||
#define DECLARE_TASKLET(name, _callback) \ | ||
struct tasklet_struct name = { \ | ||
.count = ATOMIC_INIT(0), \ | ||
.callback = _callback, \ | ||
.use_callback = true, \ | ||
} | ||
|
||
#define DECLARE_TASKLET_DISABLED(name, _callback) \ | ||
struct tasklet_struct name = { \ | ||
.count = ATOMIC_INIT(1), \ | ||
.callback = _callback, \ | ||
.use_callback = true, \ | ||
} | ||
|
||
#define DECLARE_TASKLET_DISABLED(name, func, data) \ | ||
struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data } | ||
#define from_tasklet(var, callback_tasklet, tasklet_fieldname) \ | ||
container_of(callback_tasklet, typeof(*var), tasklet_fieldname) | ||
|
||
#define DECLARE_TASKLET_OLD(name, _func) \ | ||
struct tasklet_struct name = { \ | ||
.count = ATOMIC_INIT(0), \ | ||
.func = _func, \ | ||
} | ||
|
||
#define DECLARE_TASKLET_DISABLED_OLD(name, _func) \ | ||
struct tasklet_struct name = { \ | ||
.count = ATOMIC_INIT(1), \ | ||
.func = _func, \ | ||
} | ||
|
||
enum | ||
{ | ||
|
@@ -686,6 +715,8 @@ extern void tasklet_kill(struct tasklet_struct *t); | |
extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); | ||
extern void tasklet_init(struct tasklet_struct *t, | ||
void (*func)(unsigned long), unsigned long data); | ||
extern void tasklet_setup(struct tasklet_struct *t, | ||
void (*callback)(struct tasklet_struct *)); | ||
|
||
/* | ||
* Autoprobing for irqs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters