mbox series

[v6,0/2] soc: ti: k3-socinfo: Add module build support to the k3 socinfo driver

Message ID 20221117095419.171906-1-nfrayer@baylibre.com (mailing list archive)
Headers show
Series soc: ti: k3-socinfo: Add module build support to the k3 socinfo driver | expand

Message

Nicolas Frayer Nov. 17, 2022, 9:54 a.m. UTC
In order for the TI K3 SoC info driver to be built as a module, the
following changes have been made:
- Converted memory allocations to devm and added the remove callback
- Added necessary code to build the driver as a module

v2->v3:
dropped module conversion part of this series while other driver
dependencies on socinfo are worked out.
A dependency issue is introduced by changing subsys_initcall()
to module_platform_driver(). Some drivers using the socinfo information
probe before the socinfo driver itself and it makes their probe fail.

v3->v4:
reintegrated the module build support and added patches for udma and mdio
drivers to allow for deferred probe if socinfo hasn't probed yet.

v4->v5:
Remove the k3 udma and mdio patches from this series and sent them
individually

v5->v6:
Add k3-socinfo to the subject

Nicolas Frayer (2):
  soc: ti: k3-socinfo: Convert allocations to devm
  soc: ti: k3-socinfo: Add module build support

 arch/arm64/Kconfig.platforms |  1 -
 drivers/soc/ti/Kconfig       |  3 ++-
 drivers/soc/ti/k3-socinfo.c  | 47 +++++++++++++++++++++++-------------
 3 files changed, 32 insertions(+), 19 deletions(-)

Comments

Kevin Hilman Nov. 18, 2022, 8:09 p.m. UTC | #1
Nicolas Frayer <nfrayer@baylibre.com> writes:

> In order for the TI K3 SoC info driver to be built as a module, the
> following changes have been made:
> - Converted memory allocations to devm and added the remove callback
> - Added necessary code to build the driver as a module

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Nishanth Menon Nov. 21, 2022, 9:55 p.m. UTC | #2
Hi Nicolas Frayer,

On Thu, 17 Nov 2022 10:54:17 +0100, Nicolas Frayer wrote:
> In order for the TI K3 SoC info driver to be built as a module, the
> following changes have been made:
> - Converted memory allocations to devm and added the remove callback
> - Added necessary code to build the driver as a module
> 
> v2->v3:
> dropped module conversion part of this series while other driver
> dependencies on socinfo are worked out.
> A dependency issue is introduced by changing subsys_initcall()
> to module_platform_driver(). Some drivers using the socinfo information
> probe before the socinfo driver itself and it makes their probe fail.
> 
> [...]

I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!

[1/2] soc: ti: k3-socinfo: Convert allocations to devm
      commit: 6ae5071b6a53844da27fddddf026c01eb4088c85
[2/2] soc: ti: k3-socinfo: Add module build support
      commit: 79480500de33a6a702f7188fc3ecd7164e897639

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
Kevin Hilman Nov. 22, 2022, 8:48 p.m. UTC | #3
Hi Nishanth,

Nishanth Menon <nm@ti.com> writes:

> Hi Nicolas Frayer,
>
> On Thu, 17 Nov 2022 10:54:17 +0100, Nicolas Frayer wrote:
>> In order for the TI K3 SoC info driver to be built as a module, the
>> following changes have been made:
>> - Converted memory allocations to devm and added the remove callback
>> - Added necessary code to build the driver as a module
>> 
>> v2->v3:
>> dropped module conversion part of this series while other driver
>> dependencies on socinfo are worked out.
>> A dependency issue is introduced by changing subsys_initcall()
>> to module_platform_driver(). Some drivers using the socinfo information
>> probe before the socinfo driver itself and it makes their probe fail.
>> 
>> [...]
>
> I have applied the following to branch ti-drivers-soc-next on [1].
> Thank you!

Sorry for the churn here, but I think these need to be reverted.

We've discoverd some more complexities/issues when socinfo is modular,
and I think the socinfo core code needs some work before this can
actually work reliably for all socinfo users.

Basically, I think we need to finish converting all the socinfo users to
modules before we can be sure of all the corner cases when socinfo
itself is a module.

Sorry about this churn, but I think it's better to be a bit conservative
here and revert before this lands in mainline.

Thanks,

Kevin
Nishanth Menon Nov. 22, 2022, 10:41 p.m. UTC | #4
On 12:48-20221122, Kevin Hilman wrote:
> Hi Nishanth,
> 
> Nishanth Menon <nm@ti.com> writes:
> 
> > Hi Nicolas Frayer,
> >
> > On Thu, 17 Nov 2022 10:54:17 +0100, Nicolas Frayer wrote:
> >> In order for the TI K3 SoC info driver to be built as a module, the
> >> following changes have been made:
> >> - Converted memory allocations to devm and added the remove callback
> >> - Added necessary code to build the driver as a module
> >> 
> >> v2->v3:
> >> dropped module conversion part of this series while other driver
> >> dependencies on socinfo are worked out.
> >> A dependency issue is introduced by changing subsys_initcall()
> >> to module_platform_driver(). Some drivers using the socinfo information
> >> probe before the socinfo driver itself and it makes their probe fail.
> >> 
> >> [...]
> >
> > I have applied the following to branch ti-drivers-soc-next on [1].
> > Thank you!
> 
> Sorry for the churn here, but I think these need to be reverted.
> 
> We've discoverd some more complexities/issues when socinfo is modular,
> and I think the socinfo core code needs some work before this can
> actually work reliably for all socinfo users.
> 
> Basically, I think we need to finish converting all the socinfo users to
> modules before we can be sure of all the corner cases when socinfo
> itself is a module.
> 
> Sorry about this churn, but I think it's better to be a bit conservative
> here and revert before this lands in mainline.

Understood, and thanks for the headsup and explanation offline (explains
why I had'nt caught it in my regression checks). I have
dropped the series (since we managed to catch it just in time before
arnd picked it up), updated the next and send out a new PR.