__clksrc_of_table and "clocksource_probe: no matching clocksources found"

Guilherme Costa glhrmcosta91 at gmail.com
Tue Apr 23 16:07:14 EDT 2019


Hi,

I'm working with kernel 4.9.51 LTSI on a custom board with an AM3352.
The system seems to be working just fine, but I'm getting the
following message on boot:

"clocksource_probe: no matching clocksources found"

I did some snooping around and this message is printed by
clocksource_probe(), called during time_init(). This is the function
code:

void __init clocksource_probe(void)
{
   struct device_node *np;
   const struct of_device_id *match;
   of_init_fn_1_ret init_func_ret;
   unsigned clocksources = 0;
   int ret;

   for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
      if (!of_device_is_available(np))
         continue;

      init_func_ret = match->data;

      ret = init_func_ret(np);
      if (ret) {
         pr_err("Failed to initialize '%s': %d",
                of_node_full_name(np), ret);
         continue;
      }

      clocksources++;
   }

   clocksources += acpi_probe_device_table(clksrc);

   if (!clocksources)
      pr_crit("%s: no matching clocksources found\n", __func__);
}

>From the code, we can see that the message was printed because
clocksources == 0. This implies that there were no matching nodes on
the device tree,
and that acpi_probe_device_table returned 0 (which is correct, seeing
that the kernel has no ACPI support).

This leaves me with two questions:
1 - Is this message a problem indicator? I'm assuming it is, because
it's printed with a pr_crit...
2 - Why is for_each_matching_node_and_match not getting any matches? I
did not find where __clksrc_of_table is initialized, so maybe it's
because it is empty?

Cheers,
Guilherme



More information about the Kernelnewbies mailing list