On Thu, Sep 12, 2019 at 3:17 PM Mark Brown <broonie@xxxxxxxxxx> wrote: > > On Thu, Sep 12, 2019 at 03:48:44AM +0530, Amit Kucheria wrote: > > > I was using initcall_debugging on a QCOM platform and ran across a bunch of > > driver initcalls that are enabled even if their SoC support is disabled. > > What exactly is the problem you're trying to fix here? For the > drivers I looked at these were bog standard register the driver > with the subsystem type initcalls on optional drivers so not > doing anything particularly disruptive or anything like that. I was trying to prune the defconfig only to drivers that make sense on the SoC. e.g. Why should I see a brcmstb_soc_device_early_init() call on a QCOM system when I've disabled ARCH_BRCMSTB? I came across this while trying to figure out how to make thermal and cpufreq frameworks initialise as early as possible. > For any given system that's going to be an issue for the > overwhelming majority of drivers on the tree, including those > that aren't associated with any particular architecture. Indeed. From a quick check, MFD and GPIO has a bunch of 'generic' drivers that aren't SoC-specific. I'm sure there are several such drivers in regulator framework too. They don't need to be 'fixed'. I was just trying to ring-fence obvious SoC-specific drivers behind a ARCH_FOO dependency since they seemed like low-hanging fruit. Let me know if it isn't a good use of everyone's time. Regards, Amit