mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Saravana Kannan <saravanak@google.com>,
	Russell King <linux@armlinux.org.uk>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: Rob Herring <robh@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"John Stultz" <john.stultz@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	<kernel-team@android.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] amba: Remove deferred device addition
Date: Tue, 12 Jul 2022 22:35:24 +0800	[thread overview]
Message-ID: <8efb2c6f-f00a-ea02-d5ae-ac454bb721f5@huawei.com> (raw)
In-Reply-To: <20220705083934.3974140-1-saravanak@google.com>


On 2022/7/5 16:39, Saravana Kannan wrote:
> The uevents generated for an amba device need PID and CID information
> that's available only when the amba device is powered on, clocked and
> out of reset. So, if those resources aren't available, the information
> can't be read to generate the uevents. To workaround this requirement,
> if the resources weren't available, the device addition was deferred and
> retried periodically.
>
> However, this deferred addition retry isn't based on resources becoming
> available. Instead, it's retried every 5 seconds and causes arbitrary
> probe delays for amba devices and their consumers.
>
> Also, maintaining a separate deferred-probe like mechanism is
> maintenance headache.
>
> With this commit, instead of deferring the device addition, we simply
> defer the generation of uevents for the device and probing of the device
> (because drivers needs PID and CID to match) until the PID and CID
> information can be read. This allows us to delete all the amba specific
> deferring code and also avoid the arbitrary probing delays.
>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Saravana Kannan <saravanak@google.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> ---
>
> v1 -> v2:
> - Dropped RFC tag
> - Complete rewrite to not use stub devices.
>
> v2 -> v3:
> - Flipped the if() condition for hard-coded periphids.
> - Added a stub driver to handle the case where all amba drivers are
>    modules loaded by uevents.
> - Cc Marek after I realized I forgot to add him.
>
> v3 -> v4:
> - Finally figured out and fixed the issue reported by Kefeng (bus match
>    can't return an error other than -EPROBE_DEFER).
> - I tested the patch on "V2P-CA15" on qemu
> - Marek tested v3, but that was so long ago and the rebase wasn't clean,
>    so I didn't include the tested-by.
>
> Marek/Kefeng,
>
> Mind giving a Tested-by?

Hi Saravana, I tested on my qemu, and previous panic[1] disappeared, so

Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>

[1] 
https://lore.kernel.org/linux-arm-kernel/CAGETcx8RLor0JcboBuMrB96xUot14P1CAcqoen7ZHnYRi7KMEQ@mail.gmail.com/


      parent reply	other threads:[~2022-07-12 14:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220705083944eucas1p23419f52b9529c79c03c8cc23e2aaf4c5@eucas1p2.samsung.com>
2022-07-05  8:39 ` Saravana Kannan
2022-07-05 11:04   ` Sudeep Holla
2022-07-05 19:16     ` Saravana Kannan
2022-07-12 12:25   ` Marek Szyprowski
2022-07-12 12:34     ` Marek Szyprowski
2022-07-12 19:38       ` Saravana Kannan
2022-07-12 19:53         ` Saravana Kannan
2022-07-13 15:04           ` Sudeep Holla
2022-07-13  6:52         ` Marek Szyprowski
2022-07-19  1:51           ` Saravana Kannan
2022-07-19 13:33             ` Sudeep Holla
2022-07-13 14:58         ` Sudeep Holla
2022-07-19  1:55           ` Saravana Kannan
2022-07-19 13:39             ` Sudeep Holla
2022-07-19 16:57               ` Saravana Kannan
2022-07-12 14:35   ` Kefeng Wang [this message]

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=8efb2c6f-f00a-ea02-d5ae-ac454bb721f5@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=geert+renesas@glider.be \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=saravanak@google.com \
    --cc=sudeep.holla@arm.com \
    --cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®