hotplug.c 726 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (C) STMicroelectronics 2009
  3. * Copyright (C) ST-Ericsson SA 2010
  4. *
  5. * License Terms: GNU General Public License v2
  6. * Based on ARM realview platform
  7. *
  8. * Author: Sundar Iyer <sundar.iyer@stericsson.com>
  9. *
  10. */
  11. #include <linux/kernel.h>
  12. #include <linux/errno.h>
  13. #include <linux/smp.h>
  14. #include <asm/smp_plat.h>
  15. #include "setup.h"
  16. /*
  17. * platform-specific code to shutdown a CPU
  18. *
  19. * Called with IRQs disabled
  20. */
  21. void ux500_cpu_die(unsigned int cpu)
  22. {
  23. /* directly enter low power state, skipping secure registers */
  24. for (;;) {
  25. __asm__ __volatile__("dsb\n\t" "wfi\n\t"
  26. : : : "memory");
  27. if (pen_release == cpu_logical_map(cpu)) {
  28. /*
  29. * OK, proper wakeup, we're done
  30. */
  31. break;
  32. }
  33. }
  34. }