On Thu, 2010-01-21 at 04:27 -0500, [email protected] wrote:

>  
> +int check_nmi_wdt_touched(void)
> +{
> +     unsigned int this_cpu = smp_processor_id();
> +     unsigned int cpu;
> +
> +     cpumask_t mask = cpu_online_map;
> +
> +     if (!atomic_read(&nmi_touched[this_cpu]))
> +             return 1;
> +
> +     atomic_set(&nmi_touched[this_cpu], 0);
> +
> +     cpu_clear(this_cpu, mask);
> +     for_each_cpu_mask(cpu, mask) {
> +             blackfin_dcache_invalidate_range(
> +                     (unsigned long)(&nmi_touched[cpu]),
> +                             (unsigned long)(&nmi_touched[cpu]));
> +             if (!atomic_read(&nmi_touched[cpu]))
> +                     return 1;
> +             atomic_set(&nmi_touched[cpu], 0);
> +     }
> +
> +     return 0;
> +}
> +

check_nmi_wdt_touched() - the name and return value seems confusing to
me: it returns 0 means touched, returns 1 means not touched?

> +static void nmi_wdt_timer(void *data)
> +{
> +     if (!check_nmi_wdt_touched())
> +             nmi_wdt_keepalive();
> +
Does this make more sense?
if (check_nmi_wdt_touched())
        nmi_wdt_keepalive();

> +     mod_timer(&ntimer, jiffies + NMI_CHECK_TIMEOUT);
> +}

-Yi

_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to