platsmp.c 851 B

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * SMP support for R-Mobile / SH-Mobile
  4. *
  5. * Copyright (C) 2010 Magnus Damm
  6. * Copyright (C) 2011 Paul Mundt
  7. *
  8. * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved
  9. */
  10. #include <linux/init.h>
  11. #include <asm/cacheflush.h>
  12. #include <asm/smp_plat.h>
  13. #include "common.h"
  14. extern unsigned long shmobile_smp_fn[];
  15. extern unsigned long shmobile_smp_arg[];
  16. extern unsigned long shmobile_smp_mpidr[];
  17. void shmobile_smp_hook(unsigned int cpu, unsigned long fn, unsigned long arg)
  18. {
  19. shmobile_smp_fn[cpu] = 0;
  20. flush_cache_all();
  21. shmobile_smp_mpidr[cpu] = cpu_logical_map(cpu);
  22. shmobile_smp_fn[cpu] = fn;
  23. shmobile_smp_arg[cpu] = arg;
  24. flush_cache_all();
  25. }
  26. #ifdef CONFIG_HOTPLUG_CPU
  27. bool shmobile_smp_cpu_can_disable(unsigned int cpu)
  28. {
  29. return true; /* Hotplug of any CPU is supported */
  30. }
  31. #endif