Re: [PATCH] clocksource: Add debugfs support
From: Thomas Gleixner
Date: Tue Mar 31 2020 - 18:06:43 EST
Thierry,
Thierry Reding <thierry.reding@xxxxxxxxx> writes:
> Add a top-level "clocksource" directory to debugfs. For each clocksource
> registered with the system, a subdirectory will be added with attributes
> that can be queried to obtain information about the clocksource.
first of all this does tell what this patch does but omits the more
important information about the WHY.
What's even worse is that the changelog is blantantly wrong.
> +static int clocksource_debugfs_counter_show(struct seq_file *s, void *data)
> +{
> + struct clocksource *cs = s->private;
> +
> + seq_printf(s, "%llu\n", cs->read(cs));
> +
> + return 0;
> +}
> +DEFINE_SHOW_ATTRIBUTE(clocksource_debugfs_counter);
> +
> +static void clocksource_debugfs_add(struct clocksource *cs)
> +{
> + if (!debugfs_root)
> + return;
> +
> + cs->debugfs = debugfs_create_dir(cs->name, debugfs_root);
> +
> + debugfs_create_file("counter", 0444, cs->debugfs, cs,
> + &clocksource_debugfs_counter_fops);
> +}
It does not provide any information about the clocksource, it provides
an interface to read the counter - nothing else.
Try again.
Thanks,
tglx