-static int qedi_cpu_callback(struct notifier_block *nfb,
- unsigned long action, void *hcpu)
-{
- unsigned int cpu = (unsigned long)hcpu;
-
- switch (action) {
- case CPU_ONLINE:
- case CPU_ONLINE_FROZEN:
- QEDI_ERR(NULL, "CPU %d online.\n", cpu);
- qedi_percpu_thread_create(cpu);
- break;
- case CPU_DEAD:
- case CPU_DEAD_FROZEN:
- QEDI_ERR(NULL, "CPU %d offline.\n", cpu);
- qedi_percpu_thread_destroy(cpu);
- break;
- default:
- break;
- }
-
- return NOTIFY_OK;
-}
-
-static struct notifier_block qedi_cpu_notifier = {
- .notifier_call = qedi_cpu_callback,
-};
-