Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1383854

Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular

From Paul Gortmaker <paul.gortmaker@windriver.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular
Date 2016-04-21 05:20 +0200
Message-ID <rqdjQ-27E-13@gated-at.bofh.it> (permalink)
References <rllrK-6RI-47@gated-at.bofh.it> <rq2eK-1vN-15@gated-at.bofh.it> <rq4Tg-3DS-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Re: [PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular] On 20/04/2016 (Wed 20:13) Daniel Lezcano wrote:

> On Wed, Apr 20, 2016 at 11:25:06AM -0400, Paul Gortmaker wrote:
> > The Kconfig for this driver is currently declared with:
> > 
> > config INTEL_IDLE
> >         bool "Cpuidle Driver for Intel Processors"
> > 
> > ...meaning that it currently is not being built as a module by anyone.
> > 
> > This was done in commit 6ce9cd8669fa1195fdc21643370e34523c7ac988
> > ("intel_idle: disable module support") since "...the module capability
> > is cauing more trouble than it is worth."
> > 
> > This was done over 5y ago, and Daniel adds that:
> > 
> >     ...the modular support has been removed from almost all the cpuidle
> >     drivers and the cpuidle framework is no longer assuming driver could
> >     be unloaded.
> > 
> >     Removing the modular dead code in the driver makes sense as this
> >     what have been done in the others drivers.
> > 
> > So lets remove the modular code that is essentially orphaned, so that
> > when reading the driver there is no doubt it is builtin-only.
> > 
> > Since module_init translates to device_initcall in the non-modular
> > case, the init ordering remains unchanged with this commit.  At a
> > later date we might want to consider whether subsys_init or another
> > init category seems more appropriate than device_init.
> > 
> > We replace module.h with moduleparam.h since the file does declare
> > some module parameters, and leaving them as such is currently the
> > easiest way to remain compatible with existing boot arg use cases.
> 
> What about using __setup() ? so module* disappear from the file.

No, it can't be __setup since moduleparam uses an instance of the
filename as a prefix to the boot arg, and __setup does not.  And we
should stay compatible with existing boot arg use cases for people
who have embedded such a setting in their grub config a long time
ago and forgot it.  It would take looking at and likely extending the
early_param macro to provide a syntax compatible instance of what
the module_param currently does if I recall correctly -- hence the
above comment in the commit log.

Paul.
--

> 
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/block/brd.c#n463
>  
> > Note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
> > 
> > Also note that we can't remove intel_idle_cpuidle_devices_uninit() as
> > that is still used for unwind purposes if the init fails.
> > 
> > We also delete the MODULE_LICENSE tag etc. since all that information
> > is already contained at the top of the file in the comments.
> > 
> > Cc: Len Brown <len.brown@intel.com>
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Cc: rcochran@linutronix.de
> > Cc: linux-pm@vger.kernel.org
> > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] drivers/idle: make intel_idle.c driver more explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-04-20 17:30 +0200
  Re: [PATCH v2] drivers/idle: make intel_idle.c driver more  explicitly non-modular Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-20 20:20 +0200
    Re: [PATCH v2] drivers/idle: make intel_idle.c driver more  explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-04-21 05:20 +0200
      Re: [PATCH v2] drivers/idle: make intel_idle.c driver more  explicitly non-modular Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-21 10:10 +0200
        Re: [PATCH v2] drivers/idle: make intel_idle.c driver more  explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-04-21 14:50 +0200
          Re: [PATCH v2] drivers/idle: make intel_idle.c driver more  explicitly non-modular Daniel Lezcano <daniel.lezcano@linaro.org> - 2016-04-21 15:30 +0200
            Re: [PATCH v2] drivers/idle: make intel_idle.c driver more  explicitly non-modular Paul Gortmaker <paul.gortmaker@windriver.com> - 2016-04-21 19:50 +0200

csiph-web