diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-12-14 03:10:06 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-12-16 04:13:19 -0500 |
commit | 918aae42aa9b611a3663b16ae849fdedc67c2292 (patch) | |
tree | 7c152725227444722143bf9e2a7032223d632688 /drivers/acpi/processor_idle.c | |
parent | f67538f81e6b8da9175c82807d649fbdb0055844 (diff) |
ACPI: fix for lapic_timer_propagate_broadcast()
I got following warning on ia64 box:
In function 'acpi_processor_power_verify':
642: warning: passing argument 2 of 'smp_call_function_single' from
incompatible pointer type
This smp_call_function_single() was introduced by a commit
f833bab87fca5c3ce13778421b1365845843b976:
> @@ -162,8 +162,9 @@
> pr->power.timer_broadcast_on_state = state;
> }
>
> -static void lapic_timer_propagate_broadcast(struct acpi_processor *pr)
> +static void lapic_timer_propagate_broadcast(void *arg)
> {
> + struct acpi_processor *pr = (struct acpi_processor *) arg;
> unsigned long reason;
>
> reason = pr->power.timer_broadcast_on_state < INT_MAX ?
> @@ -635,7 +636,8 @@
> working++;
> }
>
> - lapic_timer_propagate_broadcast(pr);
> + smp_call_function_single(pr->id, lapic_timer_propagate_broadcast,
> + pr, 1);
>
> return (working);
> }
The problem is that the lapic_timer_propagate_broadcast() has 2 versions:
One is real code that modified in the above commit, and the other is NOP
code that used when !ARCH_APICTIMER_STOPS_ON_C3:
static void lapic_timer_propagate_broadcast(struct acpi_processor *pr) { }
So I got warning because of !ARCH_APICTIMER_STOPS_ON_C3.
We really want to do nothing here on !ARCH_APICTIMER_STOPS_ON_C3, so
modify lapic_timer_propagate_broadcast() of real version to use
smp_call_function_single() in it.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r-- | drivers/acpi/processor_idle.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index bbd066e7f854..d1676b1754d9 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -164,7 +164,7 @@ static void lapic_timer_check_state(int state, struct acpi_processor *pr, | |||
164 | pr->power.timer_broadcast_on_state = state; | 164 | pr->power.timer_broadcast_on_state = state; |
165 | } | 165 | } |
166 | 166 | ||
167 | static void lapic_timer_propagate_broadcast(void *arg) | 167 | static void __lapic_timer_propagate_broadcast(void *arg) |
168 | { | 168 | { |
169 | struct acpi_processor *pr = (struct acpi_processor *) arg; | 169 | struct acpi_processor *pr = (struct acpi_processor *) arg; |
170 | unsigned long reason; | 170 | unsigned long reason; |
@@ -175,6 +175,12 @@ static void lapic_timer_propagate_broadcast(void *arg) | |||
175 | clockevents_notify(reason, &pr->id); | 175 | clockevents_notify(reason, &pr->id); |
176 | } | 176 | } |
177 | 177 | ||
178 | static void lapic_timer_propagate_broadcast(struct acpi_processor *pr) | ||
179 | { | ||
180 | smp_call_function_single(pr->id, __lapic_timer_propagate_broadcast, | ||
181 | (void *)pr, 1); | ||
182 | } | ||
183 | |||
178 | /* Power(C) State timer broadcast control */ | 184 | /* Power(C) State timer broadcast control */ |
179 | static void lapic_timer_state_broadcast(struct acpi_processor *pr, | 185 | static void lapic_timer_state_broadcast(struct acpi_processor *pr, |
180 | struct acpi_processor_cx *cx, | 186 | struct acpi_processor_cx *cx, |
@@ -638,8 +644,7 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) | |||
638 | working++; | 644 | working++; |
639 | } | 645 | } |
640 | 646 | ||
641 | smp_call_function_single(pr->id, lapic_timer_propagate_broadcast, | 647 | lapic_timer_propagate_broadcast(pr); |
642 | pr, 1); | ||
643 | 648 | ||
644 | return (working); | 649 | return (working); |
645 | } | 650 | } |