mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
Revert "tasklet: Introduce new initialization API"
This reverts commit 21dc5a1de2 which is
commit 12cc923f1ccc1df467e046b02a72c2b3b321b6a2 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Iefe5dc5762b9c1645414301ecab9e35c1e79f78f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
fa82985d52
commit
51aa3bfef8
2 changed files with 2 additions and 44 deletions
|
|
@ -575,9 +575,6 @@ 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/20200716081538.2sivhkj4hcyrusem@linutronix.de
|
||||
|
||||
Main feature differing them of generic softirqs: tasklet
|
||||
is running only on one CPU simultaneously.
|
||||
|
||||
|
|
@ -601,31 +598,10 @@ struct tasklet_struct
|
|||
struct tasklet_struct *next;
|
||||
unsigned long state;
|
||||
atomic_t count;
|
||||
bool use_callback;
|
||||
union {
|
||||
void (*func)(unsigned long data);
|
||||
void (*callback)(struct tasklet_struct *t);
|
||||
};
|
||||
void (*func)(unsigned long);
|
||||
unsigned long 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 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), \
|
||||
|
|
@ -705,8 +681,6 @@ 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:
|
||||
|
|
|
|||
|
|
@ -520,10 +520,7 @@ static void tasklet_action_common(struct softirq_action *a,
|
|||
if (!test_and_clear_bit(TASKLET_STATE_SCHED,
|
||||
&t->state))
|
||||
BUG();
|
||||
if (t->use_callback)
|
||||
t->callback(t);
|
||||
else
|
||||
t->func(t->data);
|
||||
t->func(t->data);
|
||||
tasklet_unlock(t);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -549,18 +546,6 @@ static __latent_entropy void tasklet_hi_action(struct softirq_action *a)
|
|||
tasklet_action_common(a, this_cpu_ptr(&tasklet_hi_vec), HI_SOFTIRQ);
|
||||
}
|
||||
|
||||
void tasklet_setup(struct tasklet_struct *t,
|
||||
void (*callback)(struct tasklet_struct *))
|
||||
{
|
||||
t->next = NULL;
|
||||
t->state = 0;
|
||||
atomic_set(&t->count, 0);
|
||||
t->callback = callback;
|
||||
t->use_callback = true;
|
||||
t->data = 0;
|
||||
}
|
||||
EXPORT_SYMBOL(tasklet_setup);
|
||||
|
||||
void tasklet_init(struct tasklet_struct *t,
|
||||
void (*func)(unsigned long), unsigned long data)
|
||||
{
|
||||
|
|
@ -568,7 +553,6 @@ void tasklet_init(struct tasklet_struct *t,
|
|||
t->state = 0;
|
||||
atomic_set(&t->count, 0);
|
||||
t->func = func;
|
||||
t->use_callback = false;
|
||||
t->data = data;
|
||||
}
|
||||
EXPORT_SYMBOL(tasklet_init);
|
||||
|
|
|
|||
Loading…
Reference in a new issue