lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <27644998-b089-44ae-ae5f-95f4d7cbe756@app.fastmail.com>
Date: Tue, 01 Jul 2025 09:52:45 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "William McVicker" <willmcvicker@...gle.com>,
 "Daniel Lezcano" <daniel.lezcano@...aro.org>
Cc: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
 linux-kernel@...r.kernel.org,
 "Lorenzo Pieralisi" <lorenzo.pieralisi@...aro.org>,
 "Hans de Goede" <hansg@...nel.org>,
 Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 "Bryan O'Donoghue" <bryan.odonoghue@...aro.org>,
 "Rob Herring" <robh@...nel.org>, "Thomas Gleixner" <tglx@...utronix.de>,
 "John Stultz" <jstultz@...gle.com>, "Stephen Boyd" <sboyd@...nel.org>,
 "Saravana Kannan" <saravanak@...gle.com>,
 Linux-Arch <linux-arch@...r.kernel.org>,
 "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" <devicetree@...r.kernel.org>
Subject: Re: [PATCH RFC] timer: of: Create a platform_device before the framework is
 initialized

On Tue, Jul 1, 2025, at 01:53, William McVicker wrote:
>> @@ -1550,6 +1553,8 @@ typedef void (*of_init_fn_1)(struct device_node *);
>>  		_OF_DECLARE(table, name, compat, fn, of_init_fn_1_ret)
>>  #define OF_DECLARE_2(table, name, compat, fn) \
>>  		_OF_DECLARE(table, name, compat, fn, of_init_fn_2)
>> +#define OF_DECLARE_PDEV(table, name, compat, fn) \
>> +		_OF_DECLARE(table, name, compat, fn, of_init_fn_pdev)
>
> To support auto-module loading you'll need to also define the
> MODULE_DEVICE_TABLE() as part of TIMER_OF_DECLARE_PDEV().
>
> I haven't tested the patch yet, but aside from my comment above it LGTM.

The patch doesn't actually have a module_platform_driver_probe()
yet either, so loading the module wouldn't actually do anything.

I feel that this RFC by itself a good step in the direction we want, 
so Daniel should go ahead with prototyping the next two steps:
adding the platform_driver registration into OF_DECLARE_PDEV,
and converting a driver so it can be used either with the _OF_DECLARE()
or the platform_driver case.

Regarding the sh_early_platform_driver code that Rob mentioned,
I think this one is already better since it doesn't duplicate
parts of the platform_driver framework and it interfaces with
device tree based probing.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ