2
0

0003-ARM-msm-kill-off-hotplug.c.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. From b5a3a19e3efa6238c6a00a8f36a8ab2c25eeebc3 Mon Sep 17 00:00:00 2001
  2. From: Kumar Gala <[email protected]>
  3. Date: Fri, 31 Jan 2014 13:48:29 -0600
  4. Subject: [PATCH 003/182] ARM: msm: kill off hotplug.c
  5. Right now hotplug.c only really implements msm_cpu_die as a wfi. Just
  6. move that implementation into platsmp.c. At the same time we use the
  7. existing wfi() instead of inline asm.
  8. Signed-off-by: Kumar Gala <[email protected]>
  9. ---
  10. arch/arm/mach-msm/Makefile | 1 -
  11. arch/arm/mach-msm/common.h | 1 -
  12. arch/arm/mach-msm/hotplug.c | 51 -------------------------------------------
  13. arch/arm/mach-msm/platsmp.c | 7 ++++++
  14. 4 files changed, 7 insertions(+), 53 deletions(-)
  15. delete mode 100644 arch/arm/mach-msm/hotplug.c
  16. --- a/arch/arm/mach-msm/Makefile
  17. +++ b/arch/arm/mach-msm/Makefile
  18. @@ -18,7 +18,6 @@ obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.
  19. CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
  20. -obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
  21. obj-$(CONFIG_SMP) += platsmp.o
  22. obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
  23. --- a/arch/arm/mach-msm/common.h
  24. +++ b/arch/arm/mach-msm/common.h
  25. @@ -24,7 +24,6 @@ extern void __iomem *__msm_ioremap_calle
  26. unsigned int mtype, void *caller);
  27. extern struct smp_operations msm_smp_ops;
  28. -extern void msm_cpu_die(unsigned int cpu);
  29. struct msm_mmc_platform_data;
  30. --- a/arch/arm/mach-msm/hotplug.c
  31. +++ /dev/null
  32. @@ -1,51 +0,0 @@
  33. -/*
  34. - * Copyright (C) 2002 ARM Ltd.
  35. - * All Rights Reserved
  36. - *
  37. - * This program is free software; you can redistribute it and/or modify
  38. - * it under the terms of the GNU General Public License version 2 as
  39. - * published by the Free Software Foundation.
  40. - */
  41. -#include <linux/kernel.h>
  42. -#include <linux/errno.h>
  43. -#include <linux/smp.h>
  44. -
  45. -#include <asm/smp_plat.h>
  46. -
  47. -#include "common.h"
  48. -
  49. -static inline void cpu_enter_lowpower(void)
  50. -{
  51. -}
  52. -
  53. -static inline void cpu_leave_lowpower(void)
  54. -{
  55. -}
  56. -
  57. -static inline void platform_do_lowpower(unsigned int cpu)
  58. -{
  59. - asm("wfi"
  60. - :
  61. - :
  62. - : "memory", "cc");
  63. -}
  64. -
  65. -/*
  66. - * platform-specific code to shutdown a CPU
  67. - *
  68. - * Called with IRQs disabled
  69. - */
  70. -void __ref msm_cpu_die(unsigned int cpu)
  71. -{
  72. - /*
  73. - * we're ready for shutdown now, so do it
  74. - */
  75. - cpu_enter_lowpower();
  76. - platform_do_lowpower(cpu);
  77. -
  78. - /*
  79. - * bring this CPU back into the world of cache
  80. - * coherency, and then restore interrupts
  81. - */
  82. - cpu_leave_lowpower();
  83. -}
  84. --- a/arch/arm/mach-msm/platsmp.c
  85. +++ b/arch/arm/mach-msm/platsmp.c
  86. @@ -29,6 +29,13 @@ extern void secondary_startup(void);
  87. static DEFINE_SPINLOCK(boot_lock);
  88. +#ifdef CONFIG_HOTPLUG_CPU
  89. +static void __ref msm_cpu_die(unsigned int cpu)
  90. +{
  91. + wfi();
  92. +}
  93. +#endif
  94. +
  95. static inline int get_core_count(void)
  96. {
  97. /* 1 + the PART[1:0] field of MIDR */