|
@@ -380,29 +380,11 @@ static int octeon_update_boot_vector(unsigned int cpu)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int octeon_cpu_callback(struct notifier_block *nfb,
|
|
|
- unsigned long action, void *hcpu)
|
|
|
-{
|
|
|
- unsigned int cpu = (unsigned long)hcpu;
|
|
|
-
|
|
|
- switch (action & ~CPU_TASKS_FROZEN) {
|
|
|
- case CPU_UP_PREPARE:
|
|
|
- octeon_update_boot_vector(cpu);
|
|
|
- break;
|
|
|
- case CPU_ONLINE:
|
|
|
- pr_info("Cpu %d online\n", cpu);
|
|
|
- break;
|
|
|
- case CPU_DEAD:
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- return NOTIFY_OK;
|
|
|
-}
|
|
|
-
|
|
|
static int register_cavium_notifier(void)
|
|
|
{
|
|
|
- hotcpu_notifier(octeon_cpu_callback, 0);
|
|
|
- return 0;
|
|
|
+ return cpuhp_setup_state_nocalls(CPUHP_MIPS_SOC_PREPARE,
|
|
|
+ "mips/cavium:prepare",
|
|
|
+ octeon_update_boot_vector, NULL);
|
|
|
}
|
|
|
late_initcall(register_cavium_notifier);
|
|
|
|