Lines Matching refs:td
109 struct smpboot_thread_data *td = data; in smpboot_thread_fn() local
110 struct smp_hotplug_thread *ht = td->ht; in smpboot_thread_fn()
119 if (ht->cleanup && td->status != HP_THREAD_NONE) in smpboot_thread_fn()
120 ht->cleanup(td->cpu, cpu_online(td->cpu)); in smpboot_thread_fn()
121 kfree(td); in smpboot_thread_fn()
128 if (ht->park && td->status == HP_THREAD_ACTIVE) { in smpboot_thread_fn()
129 BUG_ON(td->cpu != smp_processor_id()); in smpboot_thread_fn()
130 ht->park(td->cpu); in smpboot_thread_fn()
131 td->status = HP_THREAD_PARKED; in smpboot_thread_fn()
138 BUG_ON(td->cpu != smp_processor_id()); in smpboot_thread_fn()
141 switch (td->status) { in smpboot_thread_fn()
146 ht->setup(td->cpu); in smpboot_thread_fn()
147 td->status = HP_THREAD_ACTIVE; in smpboot_thread_fn()
154 ht->unpark(td->cpu); in smpboot_thread_fn()
155 td->status = HP_THREAD_ACTIVE; in smpboot_thread_fn()
159 if (!ht->thread_should_run(td->cpu)) { in smpboot_thread_fn()
165 ht->thread_fn(td->cpu); in smpboot_thread_fn()
174 struct smpboot_thread_data *td; in __smpboot_create_thread() local
179 td = kzalloc_node(sizeof(*td), GFP_KERNEL, cpu_to_node(cpu)); in __smpboot_create_thread()
180 if (!td) in __smpboot_create_thread()
182 td->cpu = cpu; in __smpboot_create_thread()
183 td->ht = ht; in __smpboot_create_thread()
185 tsk = kthread_create_on_cpu(smpboot_thread_fn, td, cpu, in __smpboot_create_thread()
188 kfree(td); in __smpboot_create_thread()