All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Saravana Kannan <saravanak@google.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Roy Zang <roy.zang@nxp.com>, PCI <linux-pci@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Minghuan Lian <minghuan.Lian@nxp.com>,
	Mingkai Hu <mingkai.hu@nxp.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver()
Date: Mon, 25 Jan 2021 20:49:32 +0100	[thread overview]
Message-ID: <a24391e62b107040435766fff52bdd31@walle.cc> (raw)
In-Reply-To: <CAMuHMdWvFej-6vkaLM44t7eX2LpkDSXu4_7VH-X-3XRueXTO=A@mail.gmail.com>

Am 2021-01-21 12:01, schrieb Geert Uytterhoeven:
> Hi Saravana,
> 
> On Thu, Jan 21, 2021 at 1:05 AM Saravana Kannan <saravanak@google.com> 
> wrote:
>> On Wed, Jan 20, 2021 at 3:53 PM Michael Walle <michael@walle.cc> 
>> wrote:
>> > Am 2021-01-20 20:47, schrieb Saravana Kannan:
>> > > On Wed, Jan 20, 2021 at 11:28 AM Michael Walle <michael@walle.cc>
>> > > wrote:
>> > >>
>> > >> [RESEND, fat-fingered the buttons of my mail client and converted
>> > >> all CCs to BCCs :(]
>> > >>
>> > >> Am 2021-01-20 20:02, schrieb Saravana Kannan:
>> > >> > On Wed, Jan 20, 2021 at 6:24 AM Rob Herring <robh@kernel.org> wrote:
>> > >> >>
>> > >> >> On Wed, Jan 20, 2021 at 4:53 AM Michael Walle <michael@walle.cc>
>> > >> >> wrote:
>> > >> >> >
>> > >> >> > fw_devlink will defer the probe until all suppliers are ready. We can't
>> > >> >> > use builtin_platform_driver_probe() because it doesn't retry after probe
>> > >> >> > deferral. Convert it to builtin_platform_driver().
>> > >> >>
>> > >> >> If builtin_platform_driver_probe() doesn't work with fw_devlink, then
>> > >> >> shouldn't it be fixed or removed?
>> > >> >
>> > >> > I was actually thinking about this too. The problem with fixing
>> > >> > builtin_platform_driver_probe() to behave like
>> > >> > builtin_platform_driver() is that these probe functions could be
>> > >> > marked with __init. But there are also only 20 instances of
>> > >> > builtin_platform_driver_probe() in the kernel:
>> > >> > $ git grep ^builtin_platform_driver_probe | wc -l
>> > >> > 20
>> > >> >
>> > >> > So it might be easier to just fix them to not use
>> > >> > builtin_platform_driver_probe().
>> > >> >
>> > >> > Michael,
>> > >> >
>> > >> > Any chance you'd be willing to help me by converting all these to
>> > >> > builtin_platform_driver() and delete builtin_platform_driver_probe()?
>> > >>
>> > >> If it just moving the probe function to the _driver struct and
>> > >> remove the __init annotations. I could look into that.
>> > >
>> > > Yup. That's pretty much it AFAICT.
>> > >
>> > > builtin_platform_driver_probe() also makes sure the driver doesn't ask
>> > > for async probe, etc. But I doubt anyone is actually setting async
>> > > flags and still using builtin_platform_driver_probe().
>> >
>> > Hasn't module_platform_driver_probe() the same problem? And there
>> > are ~80 drivers which uses that.
>> 
>> Yeah. The biggest problem with all of these is the __init markers.
>> Maybe some familiar with coccinelle can help?
> 
> And dropping them will increase memory usage.

Although I do have the changes for the builtin_platform_driver_probe()
ready, I don't think it makes much sense to send these unless we agree
on the increased memory footprint. While there are just a few
builtin_platform_driver_probe() and memory increase _might_ be
negligible, there are many more module_platform_driver_probe().

-michael

WARNING: multiple messages have this Message-ID (diff)
From: Michael Walle <michael@walle.cc>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roy Zang <roy.zang@nxp.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Saravana Kannan <saravanak@google.com>,
	PCI <linux-pci@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Minghuan Lian <minghuan.Lian@nxp.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Mingkai Hu <mingkai.hu@nxp.com>
Subject: Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver()
Date: Mon, 25 Jan 2021 20:49:32 +0100	[thread overview]
Message-ID: <a24391e62b107040435766fff52bdd31@walle.cc> (raw)
In-Reply-To: <CAMuHMdWvFej-6vkaLM44t7eX2LpkDSXu4_7VH-X-3XRueXTO=A@mail.gmail.com>

Am 2021-01-21 12:01, schrieb Geert Uytterhoeven:
> Hi Saravana,
> 
> On Thu, Jan 21, 2021 at 1:05 AM Saravana Kannan <saravanak@google.com> 
> wrote:
>> On Wed, Jan 20, 2021 at 3:53 PM Michael Walle <michael@walle.cc> 
>> wrote:
>> > Am 2021-01-20 20:47, schrieb Saravana Kannan:
>> > > On Wed, Jan 20, 2021 at 11:28 AM Michael Walle <michael@walle.cc>
>> > > wrote:
>> > >>
>> > >> [RESEND, fat-fingered the buttons of my mail client and converted
>> > >> all CCs to BCCs :(]
>> > >>
>> > >> Am 2021-01-20 20:02, schrieb Saravana Kannan:
>> > >> > On Wed, Jan 20, 2021 at 6:24 AM Rob Herring <robh@kernel.org> wrote:
>> > >> >>
>> > >> >> On Wed, Jan 20, 2021 at 4:53 AM Michael Walle <michael@walle.cc>
>> > >> >> wrote:
>> > >> >> >
>> > >> >> > fw_devlink will defer the probe until all suppliers are ready. We can't
>> > >> >> > use builtin_platform_driver_probe() because it doesn't retry after probe
>> > >> >> > deferral. Convert it to builtin_platform_driver().
>> > >> >>
>> > >> >> If builtin_platform_driver_probe() doesn't work with fw_devlink, then
>> > >> >> shouldn't it be fixed or removed?
>> > >> >
>> > >> > I was actually thinking about this too. The problem with fixing
>> > >> > builtin_platform_driver_probe() to behave like
>> > >> > builtin_platform_driver() is that these probe functions could be
>> > >> > marked with __init. But there are also only 20 instances of
>> > >> > builtin_platform_driver_probe() in the kernel:
>> > >> > $ git grep ^builtin_platform_driver_probe | wc -l
>> > >> > 20
>> > >> >
>> > >> > So it might be easier to just fix them to not use
>> > >> > builtin_platform_driver_probe().
>> > >> >
>> > >> > Michael,
>> > >> >
>> > >> > Any chance you'd be willing to help me by converting all these to
>> > >> > builtin_platform_driver() and delete builtin_platform_driver_probe()?
>> > >>
>> > >> If it just moving the probe function to the _driver struct and
>> > >> remove the __init annotations. I could look into that.
>> > >
>> > > Yup. That's pretty much it AFAICT.
>> > >
>> > > builtin_platform_driver_probe() also makes sure the driver doesn't ask
>> > > for async probe, etc. But I doubt anyone is actually setting async
>> > > flags and still using builtin_platform_driver_probe().
>> >
>> > Hasn't module_platform_driver_probe() the same problem? And there
>> > are ~80 drivers which uses that.
>> 
>> Yeah. The biggest problem with all of these is the __init markers.
>> Maybe some familiar with coccinelle can help?
> 
> And dropping them will increase memory usage.

Although I do have the changes for the builtin_platform_driver_probe()
ready, I don't think it makes much sense to send these unless we agree
on the increased memory footprint. While there are just a few
builtin_platform_driver_probe() and memory increase _might_ be
negligible, there are many more module_platform_driver_probe().

-michael

WARNING: multiple messages have this Message-ID (diff)
From: Michael Walle <michael@walle.cc>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roy Zang <roy.zang@nxp.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Saravana Kannan <saravanak@google.com>,
	PCI <linux-pci@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Minghuan Lian <minghuan.Lian@nxp.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Mingkai Hu <mingkai.hu@nxp.com>
Subject: Re: [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver()
Date: Mon, 25 Jan 2021 20:49:32 +0100	[thread overview]
Message-ID: <a24391e62b107040435766fff52bdd31@walle.cc> (raw)
In-Reply-To: <CAMuHMdWvFej-6vkaLM44t7eX2LpkDSXu4_7VH-X-3XRueXTO=A@mail.gmail.com>

Am 2021-01-21 12:01, schrieb Geert Uytterhoeven:
> Hi Saravana,
> 
> On Thu, Jan 21, 2021 at 1:05 AM Saravana Kannan <saravanak@google.com> 
> wrote:
>> On Wed, Jan 20, 2021 at 3:53 PM Michael Walle <michael@walle.cc> 
>> wrote:
>> > Am 2021-01-20 20:47, schrieb Saravana Kannan:
>> > > On Wed, Jan 20, 2021 at 11:28 AM Michael Walle <michael@walle.cc>
>> > > wrote:
>> > >>
>> > >> [RESEND, fat-fingered the buttons of my mail client and converted
>> > >> all CCs to BCCs :(]
>> > >>
>> > >> Am 2021-01-20 20:02, schrieb Saravana Kannan:
>> > >> > On Wed, Jan 20, 2021 at 6:24 AM Rob Herring <robh@kernel.org> wrote:
>> > >> >>
>> > >> >> On Wed, Jan 20, 2021 at 4:53 AM Michael Walle <michael@walle.cc>
>> > >> >> wrote:
>> > >> >> >
>> > >> >> > fw_devlink will defer the probe until all suppliers are ready. We can't
>> > >> >> > use builtin_platform_driver_probe() because it doesn't retry after probe
>> > >> >> > deferral. Convert it to builtin_platform_driver().
>> > >> >>
>> > >> >> If builtin_platform_driver_probe() doesn't work with fw_devlink, then
>> > >> >> shouldn't it be fixed or removed?
>> > >> >
>> > >> > I was actually thinking about this too. The problem with fixing
>> > >> > builtin_platform_driver_probe() to behave like
>> > >> > builtin_platform_driver() is that these probe functions could be
>> > >> > marked with __init. But there are also only 20 instances of
>> > >> > builtin_platform_driver_probe() in the kernel:
>> > >> > $ git grep ^builtin_platform_driver_probe | wc -l
>> > >> > 20
>> > >> >
>> > >> > So it might be easier to just fix them to not use
>> > >> > builtin_platform_driver_probe().
>> > >> >
>> > >> > Michael,
>> > >> >
>> > >> > Any chance you'd be willing to help me by converting all these to
>> > >> > builtin_platform_driver() and delete builtin_platform_driver_probe()?
>> > >>
>> > >> If it just moving the probe function to the _driver struct and
>> > >> remove the __init annotations. I could look into that.
>> > >
>> > > Yup. That's pretty much it AFAICT.
>> > >
>> > > builtin_platform_driver_probe() also makes sure the driver doesn't ask
>> > > for async probe, etc. But I doubt anyone is actually setting async
>> > > flags and still using builtin_platform_driver_probe().
>> >
>> > Hasn't module_platform_driver_probe() the same problem? And there
>> > are ~80 drivers which uses that.
>> 
>> Yeah. The biggest problem with all of these is the __init markers.
>> Maybe some familiar with coccinelle can help?
> 
> And dropping them will increase memory usage.

Although I do have the changes for the builtin_platform_driver_probe()
ready, I don't think it makes much sense to send these unless we agree
on the increased memory footprint. While there are just a few
builtin_platform_driver_probe() and memory increase _might_ be
negligible, there are many more module_platform_driver_probe().

-michael

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-01-25 20:18 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 10:52 [PATCH] PCI: dwc: layerscape: convert to builtin_platform_driver() Michael Walle
2021-01-20 10:52 ` Michael Walle
2021-01-20 10:52 ` Michael Walle
2021-01-20 14:23 ` Rob Herring
2021-01-20 14:23   ` Rob Herring
2021-01-20 14:23   ` Rob Herring
2021-01-20 14:34   ` Michael Walle
2021-01-20 14:34     ` Michael Walle
2021-01-20 14:34     ` Michael Walle
2021-01-20 15:50   ` Greg Kroah-Hartman
2021-01-20 15:50     ` Greg Kroah-Hartman
2021-01-20 15:50     ` Greg Kroah-Hartman
2021-01-20 19:02   ` Saravana Kannan
2021-01-20 19:02     ` Saravana Kannan
2021-01-20 19:02     ` Saravana Kannan
2021-01-20 19:25     ` Michael Walle
2021-01-20 19:28     ` Michael Walle
2021-01-20 19:28       ` Michael Walle
2021-01-20 19:28       ` Michael Walle
2021-01-20 19:47       ` Saravana Kannan
2021-01-20 19:47         ` Saravana Kannan
2021-01-20 19:47         ` Saravana Kannan
2021-01-20 19:47         ` Saravana Kannan
2021-01-20 19:47           ` Saravana Kannan
2021-01-20 19:47           ` Saravana Kannan
2021-01-20 23:53         ` Michael Walle
2021-01-20 23:53           ` Michael Walle
2021-01-20 23:53           ` Michael Walle
2021-01-20 23:58           ` Saravana Kannan
2021-01-20 23:58             ` Saravana Kannan
2021-01-20 23:58             ` Saravana Kannan
2021-01-21 11:01             ` Geert Uytterhoeven
2021-01-21 11:01               ` Geert Uytterhoeven
2021-01-21 11:01               ` Geert Uytterhoeven
2021-01-25 19:49               ` Michael Walle [this message]
2021-01-25 19:49                 ` Michael Walle
2021-01-25 19:49                 ` Michael Walle
2021-01-25 22:41                 ` Saravana Kannan
2021-01-25 22:41                   ` Saravana Kannan
2021-01-25 22:41                   ` Saravana Kannan
2021-01-26  8:50                   ` Geert Uytterhoeven
2021-01-26  8:50                     ` Geert Uytterhoeven
2021-01-26  8:50                     ` Geert Uytterhoeven
2021-01-27  0:44                     ` Saravana Kannan
2021-01-27  0:44                       ` Saravana Kannan
2021-01-27  0:44                       ` Saravana Kannan
2021-01-27  7:43                       ` Geert Uytterhoeven
2021-01-27  7:43                         ` Geert Uytterhoeven
2021-01-27  7:43                         ` Geert Uytterhoeven
2021-01-27 16:41                         ` Saravana Kannan
2021-01-27 16:41                           ` Saravana Kannan
2021-01-27 16:41                           ` Saravana Kannan
2021-01-27 16:56                           ` Geert Uytterhoeven
2021-01-27 16:56                             ` Geert Uytterhoeven
2021-01-27 16:56                             ` Geert Uytterhoeven
2021-01-27 17:10                             ` Saravana Kannan
2021-01-27 17:10                               ` Saravana Kannan
2021-01-27 17:10                               ` Saravana Kannan
2021-01-28  9:25                               ` Geert Uytterhoeven
2021-01-28  9:25                                 ` Geert Uytterhoeven
2021-01-28  9:25                                 ` Geert Uytterhoeven
2021-01-28 10:35                                 ` Tony Lindgren
2021-01-28 10:35                                   ` Tony Lindgren
2021-01-28 10:35                                   ` Tony Lindgren
2021-01-28 10:00                 ` Tony Lindgren
2021-01-28 10:00                   ` Tony Lindgren
2021-01-28 10:00                   ` Tony Lindgren
2021-01-25 16:50       ` Lorenzo Pieralisi
2021-01-25 16:50         ` Lorenzo Pieralisi
2021-01-25 16:50         ` Lorenzo Pieralisi
2021-01-25 18:58         ` Saravana Kannan
2021-01-25 18:58           ` Saravana Kannan
2021-01-25 18:58           ` Saravana Kannan
2021-01-25 19:44           ` Michael Walle
2021-01-25 19:44             ` Michael Walle
2021-01-25 19:44             ` Michael Walle
2021-01-26 10:02 ` Lorenzo Pieralisi
2021-01-26 10:02   ` Lorenzo Pieralisi
2021-01-26 10:02   ` Lorenzo Pieralisi
2021-01-26 10:39   ` Michael Walle
2021-01-26 10:39     ` Michael Walle
2021-01-26 10:39     ` Michael Walle
2021-01-26 10:56     ` Geert Uytterhoeven
2021-01-26 10:56       ` Geert Uytterhoeven
2021-01-26 10:56       ` Geert Uytterhoeven
2021-01-26 10:55 ` Lorenzo Pieralisi
2021-01-26 10:55   ` Lorenzo Pieralisi
2021-01-26 10:55   ` Lorenzo Pieralisi

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=a24391e62b107040435766fff52bdd31@walle.cc \
    --to=michael@walle.cc \
    --cc=bhelgaas@google.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=minghuan.Lian@nxp.com \
    --cc=mingkai.hu@nxp.com \
    --cc=roy.zang@nxp.com \
    --cc=saravanak@google.com \
    /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.