Re: [PATCH 6/7] Revert "iommu/arm-smmu: Make arm-smmu explicitly non-modular"

From: Jordan Crouse
Date: Thu Oct 31 2019 - 11:33:00 EST


On Thu, Oct 31, 2019 at 12:03:28PM +0000, Will Deacon wrote:
> On Wed, Oct 30, 2019 at 05:09:41PM -0600, Jordan Crouse wrote:
> > On Wed, Oct 30, 2019 at 02:51:11PM +0000, Will Deacon wrote:
> > > @@ -2235,12 +2237,16 @@ static const struct dev_pm_ops arm_smmu_pm_ops = {
> > >
> > > static struct platform_driver arm_smmu_driver = {
> > > .driver = {
> > > - .name = "arm-smmu",
> > > - .of_match_table = of_match_ptr(arm_smmu_of_match),
> > > - .pm = &arm_smmu_pm_ops,
> > > - .suppress_bind_attrs = true,
> > > + .name = "arm-smmu",
> > > + .of_match_table = of_match_ptr(arm_smmu_of_match),
> > > + .pm = &arm_smmu_pm_ops,
> > > },
> > > .probe = arm_smmu_device_probe,
> > > + .remove = arm_smmu_device_remove,
> > > .shutdown = arm_smmu_device_shutdown,
> > > };
> > > -builtin_platform_driver(arm_smmu_driver);
> > > +module_platform_driver(arm_smmu_driver);
> >
> > I know this is a revert, but wouldn't you still want to be at device_init()
> > level for built in drivers? It always preferable to not defer if given the
> > choice to do so and device_init() is the right level for this driver IMO.
>
> Hmm, not sure I'm following you completely here. With this change,
> module_init() is used to invoke platform_driver_register(). For builtin
> drivers, module_initx() expands to __initcall(x), which itself expands
> to device_initcall(x). Or are you referrring to something else?

Oh, yep, I was off. For whatever reason I thought device and module were at
different levels. Sorry for the noise.

Jordan

--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project