mbox

[git,pull] Consolidate cpuidle functionality

Message ID CAMXH7KEwQM37R++8moXB8Q41_fBXOnVY2hXJGFQmTQ20oeFPEQ@mail.gmail.com
State New
Headers show

Pull-request

git://git.linaro.org/people/rob_lee/linux.git cpuidle_consol_pull

Message

Rob March 9, 2012, 1:58 a.m. UTC
Hello Stephen,

The following changes since commit 192cfd58774b4d17b2fe8bdc77d89c2ef4e0591d:

  Linux 3.3-rc6 (2012-03-03 17:08:09 -0800)

are available in the git repository at:
  git://git.linaro.org/people/rob_lee/linux.git cpuidle_consol_pull

Robert Lee (8):
      cpuidle: Add common time keeping and irq enabling
      ARM: at91: Consolidate time keeping and irq enable
      ARM: kirkwood: Consolidate time keeping and irq enable
      ARM: davinci: Consolidate time keeping and irq enable
      ARM: omap: Consolidate OMAP3 time keeping and irq enable
      ARM: omap: Consolidate OMAP4 time keeping and irq enable
      ARM: shmobile: Consolidate time keeping and irq enable
      SH: shmobile: Consolidate time keeping and irq enable

 arch/arm/include/asm/cpuidle.h        |   22 +++++++++
 arch/arm/kernel/Makefile              |    2 +-
 arch/arm/kernel/cpuidle.c             |   21 ++++++++
 arch/arm/mach-at91/cpuidle.c          |   67 ++++++++++-----------------
 arch/arm/mach-davinci/cpuidle.c       |   82 +++++++++++++-------------------
 arch/arm/mach-kirkwood/cpuidle.c      |   72 ++++++++--------------------
 arch/arm/mach-omap2/cpuidle34xx.c     |   42 +++++++----------
 arch/arm/mach-omap2/cpuidle44xx.c     |   21 +-------
 arch/arm/mach-shmobile/cpuidle.c      |   31 +++----------
 arch/sh/kernel/cpu/shmobile/cpuidle.c |   10 +---
 drivers/cpuidle/cpuidle.c             |   79 +++++++++++++++++++++++++------
 include/linux/cpuidle.h               |   13 +++++-
 12 files changed, 227 insertions(+), 235 deletions(-)
 create mode 100644 arch/arm/include/asm/cpuidle.h
 create mode 100644 arch/arm/kernel/cpuidle.c

The top-commit id is

	bd7fd2ab3ee38df371ece6cd4997d6660b3e1c95

Acked-by: Jean Pihet<j-pihet@ti.com>  (v6)
Tested-by: Jean Pihet<j-pihet@ti.com>  (v6, omap3)
Tested-by: Amit Daniel<amit.kachhap@linaro.org>  (v6, Exynos4)
Tested-by: Robert Lee<rob.lee@linaro.org>  (imx51, imx6q)
Reviewed-by: Kevin Hilman <khilman@ti.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Deepthi Dharwar<deepthi@linux.vnet.ibm.com> (core cpuidle only)

These changes move various functionality duplicated in platform
cpuidle drivers to the core cpuidle driver and common arch arm code. Also,
the irq disabling in the platform code was removed as all calls into
cpuidle_call_idle() will have already called local_irq_disable().

This patchset is bisect safe.  Also, the core cpuidle and arch changes of the
first commit do not require any changes to the arch and platform cpuidle
drivers, though those arch and platform change should be made to take
advantage of the new consolidation function.

Stephen, this patch has been reviewed, tested, and ACK'd per the list above but
cpuidle maintainer Len Brown has been out on vacation for a couple of weeks so
I am sending you this pull request as time is running out to get this into
v3.4.  I've had a brief communication with Andrew Morton about
this as well so he is aware of this situation.  I am fairly new to the
community so please let me know if you see anything that needs my attention or
anything I should be doing differently.

I've checked these changes against the recent linux-next tags and there is
currently one small conflict due to a small change in
arch/arm/mach-at91/cpuidle.c.  I'd be happy to assist in resolving this issue
if needed.  Also, in my patchset submissions I include changes for a
Samsung Exynos cpuidle platform driver patch that was accepted a couple of
weeks ago but it hasn't yet made it to an rc so I am not including it in this
request.

---------------------------

patchset submission history:

v7 submission can be found here:
http://www.spinics.net/lists/arm-kernel/msg162290.html

v7 changes:
* Made some  struct whitespace alignment changes.
* Fixed a coding style violation (thanks Jean Pihet)
* Fixed a bug in davinci cpuidle (thanks Jean Pihet)
* Corrected the common ARM cpuidle WFI state description to be ARM platform
 agnostic (thanks Kevin Hilman)
* Fixed the problem causing x86 and PPC builds to fail (thanks Deepthi)
* Re-added a line of code that was mistakenly removed (thanks Deepthi)

v6 submission can be found here:
http://www.spinics.net/lists/arm-kernel/msg162018.html

v6 changes:
* Fixed mindless bug in CONFIG_ARCH_HAS_RELAX code in drivers/cpuidle/cpuidle.c
* Removed inline from wrapper function (thanks Mike Turquette and Rob Herring)
* Add zeroing out of last_residency if error value is returned (thanks Mike)
* Made drivers/cpuidle/cpuidle.c more intelligently handle en_core_tk_irqen
flag allowing removal of the if (en_core_tk_irqen) in cpuidle_idle_call (thanks
Daniel Lezcano)
* Moved CPUIDLE_ARM_WFI_STATE macro to arch/arm/include/asm/cpuidle.h (thanks
Jean Pihet)
* Cleaned up some comments and a stray change (thanks Jean)

v5 submission can be found here:
http://www.spinics.net/lists/arm-kernel/msg161596.html

v5 changes:
* Added common cpu_do_idle function to core cpuidle
* Added time keep irq en wrapper to core cpuidle
* Removed pre/post enter
* Re-added platforms that can use new common code.

v4 submission can be found here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-January/082742.html

v4 changes:
* Removed drivers/cpuidle/common.c
** Removed the initialization helper functions
** Removed the wrapper used to consolidate time keeping and irq enable/disable
* Add time keeping and local_irq_disable handling in cpuidle_call_idle().
* Made necessary modifications to a few platforms that required the most changes
** Note on omap3: changed structure of omap3_idle_drvdata and added
  per_next_state and per_saved_state vars to accomodate new framework.

v3 submission can be found here:
http://www.spinics.net/lists/arm-kernel/msg156751.html

v3 changes:
* Made various code organization and style changes as suggested in v2 review.
 (thanks Mark Brown, Rob Herring, Mike Turquette, Kevin Hillman, Daniel Lezcano)
* Removed at91 use of common code.  A separate effort is underway to clean
at91 code and the author has offered to convert to common interface as part
of those changes (if this common interface is accepted in time).
* Made platform cpuidle_driver objects __initdata and dynamically added one
persistent instance of this object in common code.
* Removed imx5 pm usage of gpc_dvfs clock as it is no longer needed after
being enabled during clock initialization.
* Re-organized patches.

v2 submission can be found here:
http://comments.gmane.org/gmane.linux.ports.arm.kernel/144199

v2 changes:
* Common interface moved to drivers/cpuidle and made non arch-specific.
* Made various fixes and suggested additions to the common cpuidle
code from v1 review. (Thanks Rob Herring and Mark Brown)
* Added callback for filling in driver_data field as needed.
* Modified the various platforms with these changes.

v1 submission can be found here:
http://comments.gmane.org/gmane.linux.ports.arm.kernel/142791

Thanks,
Rob

Comments

Stephen Rothwell March 9, 2012, 6:40 a.m. UTC | #1
Hi Rob,

On Thu, 8 Mar 2012 19:58:23 -0600 Rob Lee <rob.lee@linaro.org> wrote:
>
>   git://git.linaro.org/people/rob_lee/linux.git cpuidle_consol_pull
> 
> These changes move various functionality duplicated in platform
> cpuidle drivers to the core cpuidle driver and common arch arm code. Also,
> the irq disabling in the platform code was removed as all calls into
> cpuidle_call_idle() will have already called local_irq_disable().
> 
> This patchset is bisect safe.  Also, the core cpuidle and arch changes of the
> first commit do not require any changes to the arch and platform cpuidle
> drivers, though those arch and platform change should be made to take
> advantage of the new consolidation function.
> 
> Stephen, this patch has been reviewed, tested, and ACK'd per the list above but
> cpuidle maintainer Len Brown has been out on vacation for a couple of weeks so
> I am sending you this pull request as time is running out to get this into
> v3.4.  I've had a brief communication with Andrew Morton about
> this as well so he is aware of this situation.  I am fairly new to the
> community so please let me know if you see anything that needs my attention or
> anything I should be doing differently.

I will add this tree from today.  Lets see if anyone screams.

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgment of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
	Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.
Rob March 12, 2012, 6:45 p.m. UTC | #2
Len and Andrew,

Please consider this an official merge request of this cpuidle
patchset for v3.4.

There were two small conflicts Stephen Rothwell found when merging to
linux-next.  The first conflict is with patch 1/9 in the
drivers/cpuidle/cpuidle.c file which is trivially to resolve.  I'm
told this fixup is trivially enough to not require anyone to carry it.

The second is with patch 2/9 in mach-at91/cpuidle.c due to some minor
cleanup changes.  The fix is also pretty simple but I'm waiting to
hear back about who will carry it.

Please let me know if you need any other action or information on my part.

Thanks,
Rob


On Fri, Mar 9, 2012 at 12:40 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Rob,
>
> On Thu, 8 Mar 2012 19:58:23 -0600 Rob Lee <rob.lee@linaro.org> wrote:
>>
>>   git://git.linaro.org/people/rob_lee/linux.git cpuidle_consol_pull
>>
>> These changes move various functionality duplicated in platform
>> cpuidle drivers to the core cpuidle driver and common arch arm code. Also,
>> the irq disabling in the platform code was removed as all calls into
>> cpuidle_call_idle() will have already called local_irq_disable().
>>
>> This patchset is bisect safe.  Also, the core cpuidle and arch changes of the
>> first commit do not require any changes to the arch and platform cpuidle
>> drivers, though those arch and platform change should be made to take
>> advantage of the new consolidation function.
>>
>> Stephen, this patch has been reviewed, tested, and ACK'd per the list above but
>> cpuidle maintainer Len Brown has been out on vacation for a couple of weeks so
>> I am sending you this pull request as time is running out to get this into
>> v3.4.  I've had a brief communication with Andrew Morton about
>> this as well so he is aware of this situation.  I am fairly new to the
>> community so please let me know if you see anything that needs my attention or
>> anything I should be doing differently.
>
> I will add this tree from today.  Lets see if anyone screams.
>
> Thanks for adding your subsystem tree as a participant of linux-next.  As
> you may know, this is not a judgment of your code.  The purpose of
> linux-next is for integration testing and to lower the impact of
> conflicts between subsystems in the next merge window.
>
> You will need to ensure that the patches/commits in your tree/series have
> been:
>     * submitted under GPL v2 (or later) and include the Contributor's
>        Signed-off-by,
>     * posted to the relevant mailing list,
>     * reviewed by you (or another maintainer of your subsystem tree),
>     * successfully unit tested, and
>     * destined for the current or next Linux merge window.
>
> Basically, this should be just what you would send to Linus (or ask him
> to fetch).  It is allowed to be rebased if you deem it necessary.
>
> --
> Cheers,
> Stephen Rothwell
> sfr@canb.auug.org.au
>
> Legal Stuff:
> By participating in linux-next, your subsystem tree contributions are
> public and will be included in the linux-next trees.  You may be sent
> e-mail messages indicating errors or other issues when the
> patches/commits from your subsystem tree are merged and tested in
> linux-next.  These messages may also be cross-posted to the linux-next
> mailing list, the linux-kernel mailing list, etc.  The linux-next tree
> project and IBM (my employer) make no warranties regarding the linux-next
> project, the testing procedures, the results, the e-mails, etc.  If you
> don't agree to these ground rules, let me know and I'll remove your tree
> from participation in linux-next.