linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev,
	"Linux Memory Management List" <linux-mm@kvack.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"kernel test robot" <lkp@intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: Re: [linux-next:master 11606/12643] arm-linux-gnueabi-ld: arch/arm/mach-pxa/devices.o:undefined reference to `gpio_set_wake'
Date: Mon, 15 Jul 2024 14:42:06 +0200	[thread overview]
Message-ID: <5637dbc2-de31-4b30-bd14-9c4d670ef790@app.fastmail.com> (raw)
In-Reply-To: <ZpH2s4byt7aby7_p@google.com>

On Sat, Jul 13, 2024, at 05:38, Dmitry Torokhov wrote:
> On Fri, Jul 12, 2024 at 08:41:58AM +0200, Arnd Bergmann wrote:
>> On Fri, Jul 12, 2024, at 07:31, Dmitry Torokhov wrote:
>> > @@ -684,6 +685,7 @@ struct platform_device pxa27x_device_gpio = {
>> >  		.platform_data	= &pxa2xx_gpio_info,
>> >  	},
>> >  };
>> > +#endif /* CONFIG_PXA25x || CONFIG_PXA27x */
>> > 
>> >  static struct resource pxa_dma_resource[] = {
>> >  	[0] = {
>> >
>> > If you are OK with this I'll submit proper patch.
>> 
>> Right, that's probably the easiest way. I was trying a more
>> elaborate change (see below), but there is a good chance I
>> introduce another regression in that, so let's go with
>> your patch. Please send it directly to soc@kernel.org
>> Cc:linux-arm-kernel and I'll pick it up.
>
> Done.

Merged now in preparation for my pull requests, thanks!

>> One more thing I noticed: if you are doing more patches
>> to convert devices in board files to use software nodes,
>> we should probably try to move them away from static
>> platform_device definitions towards a dynamic
>> platform_device_register_simple() or similar interface
>> at the same time.
>
> Sometimes platform_device_register_full() which operates on
> platform_device_info structure is very handy, but in general
> what is the issue with statically defined devices (when they
> are never unregistered)?

Greg has been asking for this for many years, but it has
been unrealistic in the past because of the large number
of board files using static platform devices. As far as I
understand it, having static platform devices prevents us
from better enforcing lifetime management rules on device
objects. Adding Greg to Cc in case he has something to add.

The other point of course is static memory usage: a platform
device structure in .data is much larger than a
platform_device_info, and this adds up in a kernel that
tries to support lots of boards.

     Arnd


  reply	other threads:[~2024-07-15 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 13:02 kernel test robot
2024-07-12  5:31 ` Dmitry Torokhov
2024-07-12  6:41   ` Arnd Bergmann
2024-07-13  3:38     ` Dmitry Torokhov
2024-07-15 12:42       ` Arnd Bergmann [this message]
2024-07-15 12:44         ` Greg Kroah-Hartman

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=5637dbc2-de31-4b30-bd14-9c4d670ef790@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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