From: Thomas Gleixner <tglx@linutronix.de>
To: Saravana Kannan <saravanak@google.com>
Cc: Ionela Voinescu <ionela.voinescu@arm.com>,
LKML <linux-kernel@vger.kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
linux-tip-commits@vger.kernel.org, x86 <x86@kernel.org>,
liviu.dudau@arm.com, sudeep.holla@arm.com,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Jon Hunter <jonathanh@nvidia.com>,
Pawel Moll <pawel.moll@arm.com>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [tip: timers/core] clocksource/drivers/timer-probe: Avoid creating dead devices
Date: Thu, 26 Mar 2020 11:33:56 +0100 [thread overview]
Message-ID: <87imirxv57.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CAGETcx_3GSKmSveiGrM2vQp=q57iZYc0T4ELMY7Zw8UwzPEnYA@mail.gmail.com>
Saravana Kannan <saravanak@google.com> writes:
> On Wed, Mar 25, 2020 at 2:47 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>
>> Saravana Kannan <saravanak@google.com> writes:
>> > On Tue, Mar 24, 2020 at 11:34 AM Saravana Kannan <saravanak@google.com> wrote:
>> > I took a closer look. So two different drivers [1] [2] are saying they
>> > know how to handle "arm,vexpress-sysreg" and are expecting to run at
>> > the same time. That seems a bit unusual to me. I wonder if this is a
>> > violation of the device-driver model because this expectation would
>> > never be allowed if these device drivers were actual drivers
>> > registered with driver-core. But that's a discussion for another time.
>> >
>> > To fix this issue you are facing, this patch should work:
>> > https://lore.kernel.org/lkml/20200324195302.203115-1-saravanak@google.com/T/#u
>>
>> Sorry, that's not a fix. That's a crude hack.
>
> If device nodes are being handled by drivers without binding a driver
> to struct devices, then not setting OF_POPULATED is wrong. So the
> original patch sets it. There are also very valid reasons for allowing
> OF_POPULATED to be cleared by a driver as discussed here [1].
>
> The approach of the original patch (setting the flag and letting the
> driver sometimes clear it) is also followed by many other frameworks
> like irq, clk, i2c, etc. Even ingenic-timer.c already does it for the
> exact same reason.
>
> So, why is the vexpress fix a crude hack?
If it's the right thing to do and accepted by the DT folks, then the
changelog should provide a proper explanation for it. The one you
provided just baffles me. Plus the clearing of the flag really needs a
big fat comment.
It still does not make any sense to me.
arm,vexpress-sysreg is a MFD device, so can the ARM people please
explain, why the sched clock part is not just another MFD sub-device or
simply has it's own DT match?
>> As this is also causing trouble on tegra30-cardhu-a04 the only sane
>> solution is to revert it and start over with a proper solution for the
>> vexpress problem and a root cause analysis for the tegra.
>
> If someone can tell me which of the timer drivers are relevant for
> tegra30-cardhu-a04, I can help fix it.
git grep perhaps? And that's pretty much the same problem:
drivers/clocksource/timer-tegra.c:TIMER_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc);
drivers/rtc/rtc-tegra.c: { .compatible = "nvidia,tegra20-rtc", },
Without looking deeper I suspect that these two are not the only ones.
Can the DT folks pretty please comment on this and provide some guidance
how to fix that w/o sprinkling
of_node_clear_flag(node, OF_POPULATED);
all over the place?
Thanks,
tglx
next prev parent reply other threads:[~2020-03-26 10:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-11 5:21 [PATCH v1] clocksource: Avoid creating dead devices Saravana Kannan
2020-02-19 2:20 ` Saravana Kannan
2020-02-27 9:06 ` Daniel Lezcano
2020-02-27 21:22 ` Saravana Kannan
2020-03-04 19:30 ` Saravana Kannan
2020-03-04 19:56 ` Daniel Lezcano
2020-03-08 5:53 ` Saravana Kannan
2020-03-16 14:57 ` Daniel Lezcano
2020-03-16 17:49 ` Saravana Kannan
2020-03-16 18:07 ` Daniel Lezcano
2020-03-16 18:15 ` Saravana Kannan
[not found] ` <5e70b653.1c69fb81.b03d8.d2bbSMTPIN_ADDED_MISSING@mx.google.com>
2020-03-17 18:08 ` Saravana Kannan
2020-03-17 18:18 ` Daniel Lezcano
2020-03-19 8:47 ` [tip: timers/core] clocksource/drivers/timer-probe: " tip-bot2 for Saravana Kannan
2020-03-24 17:59 ` Ionela Voinescu
2020-03-24 18:34 ` Saravana Kannan
2020-03-24 19:56 ` Saravana Kannan
2020-03-25 21:47 ` Thomas Gleixner
2020-03-25 22:56 ` Saravana Kannan
2020-03-25 23:06 ` Saravana Kannan
2020-03-26 10:17 ` Daniel Lezcano
2020-03-26 17:35 ` Saravana Kannan
2020-03-26 10:33 ` Thomas Gleixner [this message]
2020-03-26 15:02 ` Rob Herring
2020-03-26 18:08 ` Saravana Kannan
2020-03-28 2:23 ` Rob Herring
[not found] ` <20200324175955.GA16972-5wv7dgnIgG8@public.gmane.org>
2020-03-25 21:29 ` Jon Hunter
2020-03-25 21:29 ` Jon Hunter
[not found] ` <e75ae529-264c-9aa6-f711-2afe28ceec36-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2020-03-26 1:21 ` Dmitry Osipenko
2020-03-26 1:21 ` Dmitry Osipenko
2020-03-28 10:30 ` [tip: timers/core] Revert "clocksource/drivers/timer-probe: Avoid creating dead devices" tip-bot2 for Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87imirxv57.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=daniel.lezcano@linaro.org \
--cc=ionela.voinescu@arm.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
--cc=sudeep.holla@arm.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.