• Hidetoshi Seto's avatar
    ACPI: fix for lapic_timer_propagate_broadcast() · 918aae42
    Hidetoshi Seto authored
    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
    f833bab8:
    
     > @@ -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: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
    Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    918aae42
processor_idle.c 31 KB