Lines Matching refs:td
107 struct smpboot_thread_data *td = data; in smpboot_thread_fn() local
108 struct smp_hotplug_thread *ht = td->ht; in smpboot_thread_fn()
117 if (ht->cleanup && td->status != HP_THREAD_NONE) in smpboot_thread_fn()
118 ht->cleanup(td->cpu, cpu_online(td->cpu)); in smpboot_thread_fn()
119 kfree(td); in smpboot_thread_fn()
126 if (ht->park && td->status == HP_THREAD_ACTIVE) { in smpboot_thread_fn()
127 BUG_ON(td->cpu != smp_processor_id()); in smpboot_thread_fn()
128 ht->park(td->cpu); in smpboot_thread_fn()
129 td->status = HP_THREAD_PARKED; in smpboot_thread_fn()
136 BUG_ON(td->cpu != smp_processor_id()); in smpboot_thread_fn()
139 switch (td->status) { in smpboot_thread_fn()
144 ht->setup(td->cpu); in smpboot_thread_fn()
145 td->status = HP_THREAD_ACTIVE; in smpboot_thread_fn()
152 ht->unpark(td->cpu); in smpboot_thread_fn()
153 td->status = HP_THREAD_ACTIVE; in smpboot_thread_fn()
157 if (!ht->thread_should_run(td->cpu)) { in smpboot_thread_fn()
163 ht->thread_fn(td->cpu); in smpboot_thread_fn()
172 struct smpboot_thread_data *td; in __smpboot_create_thread() local
177 td = kzalloc_node(sizeof(*td), GFP_KERNEL, cpu_to_node(cpu)); in __smpboot_create_thread()
178 if (!td) in __smpboot_create_thread()
180 td->cpu = cpu; in __smpboot_create_thread()
181 td->ht = ht; in __smpboot_create_thread()
183 tsk = kthread_create_on_cpu(smpboot_thread_fn, td, cpu, in __smpboot_create_thread()
186 kfree(td); in __smpboot_create_thread()