Lines Matching refs:td
104 struct smpboot_thread_data *td = data; in smpboot_thread_fn() local
105 struct smp_hotplug_thread *ht = td->ht; in smpboot_thread_fn()
114 if (ht->cleanup && td->status != HP_THREAD_NONE) in smpboot_thread_fn()
115 ht->cleanup(td->cpu, cpu_online(td->cpu)); in smpboot_thread_fn()
116 kfree(td); in smpboot_thread_fn()
123 if (ht->park && td->status == HP_THREAD_ACTIVE) { in smpboot_thread_fn()
124 BUG_ON(td->cpu != smp_processor_id()); in smpboot_thread_fn()
125 ht->park(td->cpu); in smpboot_thread_fn()
126 td->status = HP_THREAD_PARKED; in smpboot_thread_fn()
133 BUG_ON(td->cpu != smp_processor_id()); in smpboot_thread_fn()
136 switch (td->status) { in smpboot_thread_fn()
141 ht->setup(td->cpu); in smpboot_thread_fn()
142 td->status = HP_THREAD_ACTIVE; in smpboot_thread_fn()
149 ht->unpark(td->cpu); in smpboot_thread_fn()
150 td->status = HP_THREAD_ACTIVE; in smpboot_thread_fn()
154 if (!ht->thread_should_run(td->cpu)) { in smpboot_thread_fn()
160 ht->thread_fn(td->cpu); in smpboot_thread_fn()
169 struct smpboot_thread_data *td; in __smpboot_create_thread() local
174 td = kzalloc_node(sizeof(*td), GFP_KERNEL, cpu_to_node(cpu)); in __smpboot_create_thread()
175 if (!td) in __smpboot_create_thread()
177 td->cpu = cpu; in __smpboot_create_thread()
178 td->ht = ht; in __smpboot_create_thread()
180 tsk = kthread_create_on_cpu(smpboot_thread_fn, td, cpu, in __smpboot_create_thread()
183 kfree(td); in __smpboot_create_thread()