diff options
-rw-r--r-- | arch/arm/mach-realview/hotplug.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/hotplug.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-tegra/hotplug.c | 20 |
3 files changed, 33 insertions, 27 deletions
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c index e06572e6c490..b6387cfe7044 100644 --- a/arch/arm/mach-realview/hotplug.c +++ b/arch/arm/mach-realview/hotplug.c | |||
@@ -53,7 +53,7 @@ static inline void cpu_leave_lowpower(void) | |||
53 | : "cc"); | 53 | : "cc"); |
54 | } | 54 | } |
55 | 55 | ||
56 | static inline void platform_do_lowpower(unsigned int cpu) | 56 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) |
57 | { | 57 | { |
58 | /* | 58 | /* |
59 | * there is no power-control hardware on this platform, so all | 59 | * there is no power-control hardware on this platform, so all |
@@ -77,16 +77,13 @@ static inline void platform_do_lowpower(unsigned int cpu) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | /* | 79 | /* |
80 | * getting here, means that we have come out of WFI without | 80 | * Getting here, means that we have come out of WFI without |
81 | * having been woken up - this shouldn't happen | 81 | * having been woken up - this shouldn't happen |
82 | * | 82 | * |
83 | * The trouble is, letting people know about this is not really | 83 | * Just note it happening - when we're woken, we can report |
84 | * possible, since we are currently running incoherently, and | 84 | * its occurrence. |
85 | * therefore cannot safely call printk() or anything else | ||
86 | */ | 85 | */ |
87 | #ifdef DEBUG | 86 | (*spurious)++; |
88 | printk("CPU%u: spurious wakeup call\n", cpu); | ||
89 | #endif | ||
90 | } | 87 | } |
91 | } | 88 | } |
92 | 89 | ||
@@ -102,17 +99,22 @@ int platform_cpu_kill(unsigned int cpu) | |||
102 | */ | 99 | */ |
103 | void platform_cpu_die(unsigned int cpu) | 100 | void platform_cpu_die(unsigned int cpu) |
104 | { | 101 | { |
102 | int spurious = 0; | ||
103 | |||
105 | /* | 104 | /* |
106 | * we're ready for shutdown now, so do it | 105 | * we're ready for shutdown now, so do it |
107 | */ | 106 | */ |
108 | cpu_enter_lowpower(); | 107 | cpu_enter_lowpower(); |
109 | platform_do_lowpower(cpu); | 108 | platform_do_lowpower(cpu, &spurious); |
110 | 109 | ||
111 | /* | 110 | /* |
112 | * bring this CPU back into the world of cache | 111 | * bring this CPU back into the world of cache |
113 | * coherency, and then restore interrupts | 112 | * coherency, and then restore interrupts |
114 | */ | 113 | */ |
115 | cpu_leave_lowpower(); | 114 | cpu_leave_lowpower(); |
115 | |||
116 | if (spurious) | ||
117 | pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); | ||
116 | } | 118 | } |
117 | 119 | ||
118 | int platform_cpu_disable(unsigned int cpu) | 120 | int platform_cpu_disable(unsigned int cpu) |
diff --git a/arch/arm/mach-s5pv310/hotplug.c b/arch/arm/mach-s5pv310/hotplug.c index ea951ef6ea54..951ba6d63d21 100644 --- a/arch/arm/mach-s5pv310/hotplug.c +++ b/arch/arm/mach-s5pv310/hotplug.c | |||
@@ -56,7 +56,7 @@ static inline void cpu_leave_lowpower(void) | |||
56 | : "cc"); | 56 | : "cc"); |
57 | } | 57 | } |
58 | 58 | ||
59 | static inline void platform_do_lowpower(unsigned int cpu) | 59 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) |
60 | { | 60 | { |
61 | /* | 61 | /* |
62 | * there is no power-control hardware on this platform, so all | 62 | * there is no power-control hardware on this platform, so all |
@@ -80,16 +80,13 @@ static inline void platform_do_lowpower(unsigned int cpu) | |||
80 | } | 80 | } |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * getting here, means that we have come out of WFI without | 83 | * Getting here, means that we have come out of WFI without |
84 | * having been woken up - this shouldn't happen | 84 | * having been woken up - this shouldn't happen |
85 | * | 85 | * |
86 | * The trouble is, letting people know about this is not really | 86 | * Just note it happening - when we're woken, we can report |
87 | * possible, since we are currently running incoherently, and | 87 | * its occurrence. |
88 | * therefore cannot safely call printk() or anything else | ||
89 | */ | 88 | */ |
90 | #ifdef DEBUG | 89 | (*spurious)++; |
91 | printk(KERN_WARN "CPU%u: spurious wakeup call\n", cpu); | ||
92 | #endif | ||
93 | } | 90 | } |
94 | } | 91 | } |
95 | 92 | ||
@@ -105,17 +102,22 @@ int platform_cpu_kill(unsigned int cpu) | |||
105 | */ | 102 | */ |
106 | void platform_cpu_die(unsigned int cpu) | 103 | void platform_cpu_die(unsigned int cpu) |
107 | { | 104 | { |
105 | int spurious = 0; | ||
106 | |||
108 | /* | 107 | /* |
109 | * we're ready for shutdown now, so do it | 108 | * we're ready for shutdown now, so do it |
110 | */ | 109 | */ |
111 | cpu_enter_lowpower(); | 110 | cpu_enter_lowpower(); |
112 | platform_do_lowpower(cpu); | 111 | platform_do_lowpower(cpu, &spurious); |
113 | 112 | ||
114 | /* | 113 | /* |
115 | * bring this CPU back into the world of cache | 114 | * bring this CPU back into the world of cache |
116 | * coherency, and then restore interrupts | 115 | * coherency, and then restore interrupts |
117 | */ | 116 | */ |
118 | cpu_leave_lowpower(); | 117 | cpu_leave_lowpower(); |
118 | |||
119 | if (spurious) | ||
120 | pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); | ||
119 | } | 121 | } |
120 | 122 | ||
121 | int platform_cpu_disable(unsigned int cpu) | 123 | int platform_cpu_disable(unsigned int cpu) |
diff --git a/arch/arm/mach-tegra/hotplug.c b/arch/arm/mach-tegra/hotplug.c index a5eeb9126645..17faf777af23 100644 --- a/arch/arm/mach-tegra/hotplug.c +++ b/arch/arm/mach-tegra/hotplug.c | |||
@@ -52,7 +52,7 @@ static inline void cpu_leave_lowpower(void) | |||
52 | : "cc"); | 52 | : "cc"); |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline void platform_do_lowpower(unsigned int cpu) | 55 | static inline void platform_do_lowpower(unsigned int cpu, int *spurious) |
56 | { | 56 | { |
57 | /* | 57 | /* |
58 | * there is no power-control hardware on this platform, so all | 58 | * there is no power-control hardware on this platform, so all |
@@ -76,16 +76,13 @@ static inline void platform_do_lowpower(unsigned int cpu) | |||
76 | /*}*/ | 76 | /*}*/ |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * getting here, means that we have come out of WFI without | 79 | * Getting here, means that we have come out of WFI without |
80 | * having been woken up - this shouldn't happen | 80 | * having been woken up - this shouldn't happen |
81 | * | 81 | * |
82 | * The trouble is, letting people know about this is not really | 82 | * Just note it happening - when we're woken, we can report |
83 | * possible, since we are currently running incoherently, and | 83 | * its occurrence. |
84 | * therefore cannot safely call printk() or anything else | ||
85 | */ | 84 | */ |
86 | #ifdef DEBUG | 85 | (*spurious)++; |
87 | printk(KERN_WARN "CPU%u: spurious wakeup call\n", cpu); | ||
88 | #endif | ||
89 | } | 86 | } |
90 | } | 87 | } |
91 | 88 | ||
@@ -101,17 +98,22 @@ int platform_cpu_kill(unsigned int cpu) | |||
101 | */ | 98 | */ |
102 | void platform_cpu_die(unsigned int cpu) | 99 | void platform_cpu_die(unsigned int cpu) |
103 | { | 100 | { |
101 | int spurious = 0; | ||
102 | |||
104 | /* | 103 | /* |
105 | * we're ready for shutdown now, so do it | 104 | * we're ready for shutdown now, so do it |
106 | */ | 105 | */ |
107 | cpu_enter_lowpower(); | 106 | cpu_enter_lowpower(); |
108 | platform_do_lowpower(cpu); | 107 | platform_do_lowpower(cpu, &spurious); |
109 | 108 | ||
110 | /* | 109 | /* |
111 | * bring this CPU back into the world of cache | 110 | * bring this CPU back into the world of cache |
112 | * coherency, and then restore interrupts | 111 | * coherency, and then restore interrupts |
113 | */ | 112 | */ |
114 | cpu_leave_lowpower(); | 113 | cpu_leave_lowpower(); |
114 | |||
115 | if (spurious) | ||
116 | pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); | ||
115 | } | 117 | } |
116 | 118 | ||
117 | int platform_cpu_disable(unsigned int cpu) | 119 | int platform_cpu_disable(unsigned int cpu) |