linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 00/34] idle: Consolidate idle implementations
@ 2013-03-21 21:52 Thomas Gleixner
  2013-03-21 21:52 ` [patch 01/34] arch: Cleanup enable/disable_hlt Thomas Gleixner
                   ` (37 more replies)
  0 siblings, 38 replies; 140+ messages in thread
From: Thomas Gleixner @ 2013-03-21 21:52 UTC (permalink / raw)
  To: LKML
  Cc: linux-arch, Linus Torvalds, Andrew Morton, Rusty Russell,
	Paul McKenney, Ingo Molnar, Peter Zijlstra, Srivatsa S. Bhat,
	Magnus Damm

Each architecture implements its own cpu_idle() code, which is more or
less the same on all architectures (plus/minus a few bugs and a few
missing extra functionalities, instrumentation ...). That also forces
everyone who is interested in idle related features to add new
functionality to every architecture. What a waste.

Aside of that pointless code duplicaiton the ongoing quest to
consolidate the cpu hotplug code needs a common entry point for the
non boot cpus.

The following series implements a generic idle function and converts
most architectures over. I left out SPARC (it involves sparc asm) and
UM (it made me barf). If we can move those architectures as well, we
can get rid of the extra config switch and have everything
consolidated.

I spent a lot of time to make sure that the conversion preserved the
non obvious differences of the architecture implementations, but I
really need help from the affected maintainers to prove the
correctness.

Thanks,

	tglx
---
 arch/openrisc/kernel/idle.c                         |   73 ------------
 linux-2.6/arch/Kconfig                              |    3 
 linux-2.6/arch/alpha/Kconfig                        |    1 
 linux-2.6/arch/alpha/include/asm/thread_info.h      |    2 
 linux-2.6/arch/alpha/kernel/process.c               |   19 ---
 linux-2.6/arch/alpha/kernel/smp.c                   |    3 
 linux-2.6/arch/arc/Kconfig                          |    1 
 linux-2.6/arch/arc/kernel/process.c                 |   27 ----
 linux-2.6/arch/arc/kernel/smp.c                     |    2 
 linux-2.6/arch/arm/Kconfig                          |    2 
 linux-2.6/arch/arm/include/asm/system_misc.h        |    3 
 linux-2.6/arch/arm/kernel/process.c                 |  100 ++++-------------
 linux-2.6/arch/arm/kernel/smp.c                     |    2 
 linux-2.6/arch/arm/mach-gemini/idle.c               |    4 
 linux-2.6/arch/arm/mach-gemini/irq.c                |    2 
 linux-2.6/arch/arm/mach-ixp4xx/common.c             |    2 
 linux-2.6/arch/arm/mach-omap1/pm.c                  |    5 
 linux-2.6/arch/arm/mach-omap2/omap_hwmod.c          |    6 -
 linux-2.6/arch/arm/mach-omap2/pm.c                  |    5 
 linux-2.6/arch/arm/mach-orion5x/board-dt.c          |    2 
 linux-2.6/arch/arm/mach-orion5x/common.c            |    2 
 linux-2.6/arch/arm/mach-shark/core.c                |    2 
 linux-2.6/arch/arm/mach-shmobile/suspend.c          |    4 
 linux-2.6/arch/arm/mach-w90x900/dev.c               |    2 
 linux-2.6/arch/arm64/Kconfig                        |    1 
 linux-2.6/arch/arm64/kernel/process.c               |   43 -------
 linux-2.6/arch/arm64/kernel/smp.c                   |    2 
 linux-2.6/arch/avr32/Kconfig                        |    1 
 linux-2.6/arch/avr32/kernel/process.c               |   13 --
 linux-2.6/arch/avr32/kernel/time.c                  |    8 +
 linux-2.6/arch/avr32/mach-at32ap/include/mach/pm.h  |   24 ----
 linux-2.6/arch/avr32/mach-at32ap/pm-at32ap700x.S    |    7 -
 linux-2.6/arch/blackfin/Kconfig                     |    1 
 linux-2.6/arch/blackfin/kernel/process.c            |   30 -----
 linux-2.6/arch/blackfin/mach-common/smp.c           |    2 
 linux-2.6/arch/c6x/Kconfig                          |    1 
 linux-2.6/arch/c6x/kernel/process.c                 |   28 ----
 linux-2.6/arch/cris/Kconfig                         |    1 
 linux-2.6/arch/cris/arch-v10/kernel/process.c       |    3 
 linux-2.6/arch/cris/arch-v32/kernel/process.c       |   12 --
 linux-2.6/arch/cris/arch-v32/kernel/smp.c           |    4 
 linux-2.6/arch/cris/include/asm/processor.h         |    7 -
 linux-2.6/arch/cris/kernel/process.c                |   49 --------
 linux-2.6/arch/frv/Kconfig                          |    1 
 linux-2.6/arch/frv/kernel/process.c                 |   27 ----
 linux-2.6/arch/h8300/Kconfig                        |    1 
 linux-2.6/arch/h8300/kernel/process.c               |   35 ------
 linux-2.6/arch/hexagon/Kconfig                      |    1 
 linux-2.6/arch/hexagon/kernel/process.c             |   23 ----
 linux-2.6/arch/hexagon/kernel/smp.c                 |    2 
 linux-2.6/arch/ia64/Kconfig                         |    1 
 linux-2.6/arch/ia64/include/asm/thread_info.h       |    2 
 linux-2.6/arch/ia64/kernel/perfmon.c                |   13 --
 linux-2.6/arch/ia64/kernel/process.c                |   83 ++------------
 linux-2.6/arch/ia64/kernel/smpboot.c                |    2 
 linux-2.6/arch/m32r/Kconfig                         |    1 
 linux-2.6/arch/m32r/kernel/process.c                |   18 ---
 linux-2.6/arch/m32r/kernel/smpboot.c                |    2 
 linux-2.6/arch/m68k/Kconfig                         |    1 
 linux-2.6/arch/m68k/kernel/process.c                |   32 -----
 linux-2.6/arch/metag/Kconfig                        |    1 
 linux-2.6/arch/metag/include/asm/thread_info.h      |    2 
 linux-2.6/arch/metag/kernel/process.c               |   32 -----
 linux-2.6/arch/metag/kernel/smp.c                   |    2 
 linux-2.6/arch/microblaze/Kconfig                   |    2 
 linux-2.6/arch/microblaze/include/asm/processor.h   |    5 
 linux-2.6/arch/microblaze/include/asm/thread_info.h |    1 
 linux-2.6/arch/microblaze/kernel/process.c          |   65 -----------
 linux-2.6/arch/mips/Kconfig                         |    1 
 linux-2.6/arch/mips/kernel/process.c                |   46 ++------
 linux-2.6/arch/mips/kernel/smp.c                    |    2 
 linux-2.6/arch/mn10300/Kconfig                      |    1 
 linux-2.6/arch/mn10300/include/asm/thread_info.h    |    2 
 linux-2.6/arch/mn10300/kernel/process.c             |   70 +-----------
 linux-2.6/arch/mn10300/kernel/smp.c                 |    7 -
 linux-2.6/arch/openrisc/Kconfig                     |    1 
 linux-2.6/arch/openrisc/include/asm/thread_info.h   |    2 
 linux-2.6/arch/parisc/Kconfig                       |    1 
 linux-2.6/arch/parisc/include/asm/thread_info.h     |    2 
 linux-2.6/arch/parisc/kernel/process.c              |   22 ---
 linux-2.6/arch/parisc/kernel/smp.c                  |    2 
 linux-2.6/arch/powerpc/Kconfig                      |    1 
 linux-2.6/arch/powerpc/include/asm/thread_info.h    |    4 
 linux-2.6/arch/powerpc/kernel/idle.c                |   78 +++----------
 linux-2.6/arch/powerpc/kernel/smp.c                 |    2 
 linux-2.6/arch/s390/kernel/process.c                |   25 +---
 linux-2.6/arch/s390/kernel/smp.c                    |    3 
 linux-2.6/arch/score/Kconfig                        |    1 
 linux-2.6/arch/score/kernel/process.c               |   18 ---
 linux-2.6/arch/sh/Kconfig                           |    2 
 linux-2.6/arch/sh/include/asm/thread_info.h         |    4 
 linux-2.6/arch/sh/kernel/idle.c                     |  102 +----------------
 linux-2.6/arch/sh/kernel/smp.c                      |    2 
 linux-2.6/arch/sparc/include/asm/thread_info_32.h   |    2 
 linux-2.6/arch/sparc/include/asm/thread_info_64.h   |    2 
 linux-2.6/arch/tile/include/asm/thread_info.h       |    2 
 linux-2.6/arch/tile/kernel/process.c                |   61 +---------
 linux-2.6/arch/tile/kernel/smpboot.c                |    4 
 linux-2.6/arch/unicore32/Kconfig                    |    1 
 linux-2.6/arch/unicore32/kernel/process.c           |   21 ---
 linux-2.6/arch/x86/Kconfig                          |    1 
 linux-2.6/arch/x86/include/asm/thread_info.h        |    2 
 linux-2.6/arch/x86/kernel/process.c                 |  106 +++++-------------
 linux-2.6/arch/x86/kernel/smpboot.c                 |    2 
 linux-2.6/arch/x86/xen/smp.c                        |    2 
 linux-2.6/arch/xtensa/Kconfig                       |    1 
 linux-2.6/arch/xtensa/kernel/process.c              |   14 --
 linux-2.6/include/linux/cpu.h                       |   16 ++
 linux-2.6/include/linux/sched.h                     |   41 +++++++
 linux-2.6/init/main.c                               |    2 
 linux-2.6/kernel/Makefile                           |    1 
 linux-2.6/kernel/cpu/Makefile                       |    1 
 linux-2.6/kernel/cpu/idle.c                         |  115 ++++++++++++++++++++
 linux-2.6/kernel/sched/core.c                       |    5 
 114 files changed, 432 insertions(+), 1237 deletions(-)

^ permalink raw reply	[flat|nested] 140+ messages in thread

end of thread, other threads:[~2013-11-22 22:32 UTC | newest]

Thread overview: 140+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-21 21:52 [patch 00/34] idle: Consolidate idle implementations Thomas Gleixner
2013-03-21 21:52 ` [patch 01/34] arch: Cleanup enable/disable_hlt Thomas Gleixner
2013-03-21 21:52   ` Thomas Gleixner
2013-03-21 21:52 ` [patch 02/34] arch: Consolidate tsk_is_polling() Thomas Gleixner
2013-03-21 21:52   ` Thomas Gleixner
2013-03-22  5:01   ` Tony Breeds
2013-03-22  5:20   ` Tony Breeds
2013-03-22  9:26     ` Thomas Gleixner
2013-03-21 21:52 ` [patch 03/34] idle: Implement set/clr functions for need_resched poll Thomas Gleixner
2013-03-21 21:52   ` Thomas Gleixner
2013-03-22  9:38   ` James Hogan
2013-03-21 21:52 ` [patch 04/34] idle: Provide a generic entry point for the idle code Thomas Gleixner
2013-03-21 21:52   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 05/34] idle: Implement generic idle function Thomas Gleixner
2013-03-23  8:56   ` Heiko Carstens
2013-03-25 10:39     ` Thomas Gleixner
2013-03-28 15:39   ` Srivatsa S. Bhat
2013-11-18  6:05   ` Viresh Kumar
2013-11-22 22:32     ` Thomas Gleixner
2013-03-21 21:53 ` [patch 06/34] arc: Use generic idle loop Thomas Gleixner
2013-03-22  9:02   ` Vineet Gupta
2013-03-21 21:53 ` [patch 07/34] alpha: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-28 15:37   ` Srivatsa S. Bhat
2013-03-29 11:22     ` Thomas Gleixner
2013-03-21 21:53 ` [patch 08/34] arm: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-22 21:24   ` Kevin Hilman
2013-03-22 21:24     ` Kevin Hilman
2013-03-25 11:31     ` Thomas Gleixner
2013-03-25 11:48       ` Russell King - ARM Linux
2013-03-25 11:48         ` Russell King - ARM Linux
2013-03-25 14:02         ` Thomas Gleixner
2013-04-08 21:47           ` Russell King - ARM Linux
2013-04-09  9:20             ` Thomas Gleixner
2013-04-09  9:20               ` Thomas Gleixner
2013-04-09  9:38               ` Russell King - ARM Linux
2013-04-09  9:38                 ` Russell King - ARM Linux
2013-04-25 20:03                 ` Stephen Boyd
2013-04-25 21:01                   ` Thomas Gleixner
2013-04-25 21:01                     ` Thomas Gleixner
2013-05-01  0:49                     ` Stephen Boyd
2013-05-01  0:55                       ` Paul E. McKenney
2013-05-21  0:57                         ` [PATCH] ARM: smp: Drop RCU_NONIDLE usage in cpu_die() Stephen Boyd
2013-03-21 21:53 ` [patch 09/34] arm64: Use generic idle loop Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-25 18:06   ` Catalin Marinas
2013-03-21 21:53 ` [patch 10/34] avr32: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 12/34] c6x: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 11/34] bfin: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 13/34] cris: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-27 15:04   ` Jesper Nilsson
2013-03-27 15:04     ` Jesper Nilsson
2013-03-27 17:10     ` Thomas Gleixner
2013-03-21 21:53 ` [patch 14/34] frv: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 15/34] h8300: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 16/34] hexagon: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 17/34] ia64: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-28 15:40   ` Srivatsa S. Bhat
2013-03-28 15:40     ` Srivatsa S. Bhat
2013-03-21 21:53 ` [patch 18/34] m32r: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 19/34] m68k: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 20/34] metag: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-22 10:16   ` James Hogan
2013-03-25 11:26     ` Thomas Gleixner
2013-03-21 21:53 ` [patch 21/34] microblaze: " Thomas Gleixner
2013-03-21 21:53 ` [patch 22/34] mips: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-28 15:42   ` Srivatsa S. Bhat
2013-03-28 15:42     ` Srivatsa S. Bhat
2013-03-21 21:53 ` [patch 24/34] openrisc: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 23/34] mn10300: " Thomas Gleixner
2013-03-21 21:53 ` [patch 25/34] parisc: " Thomas Gleixner
2013-03-21 21:53 ` [patch 26/34] powerpc: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-28 15:40   ` Srivatsa S. Bhat
2013-03-28 15:40     ` Srivatsa S. Bhat
2013-04-01  9:13     ` Deepthi Dharwar
2013-04-01  9:13       ` Deepthi Dharwar
2013-03-21 21:53 ` [patch 27/34] s390: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-23  9:38   ` Heiko Carstens
2013-03-23  9:38     ` Heiko Carstens
2013-03-23  9:39   ` Heiko Carstens
2013-03-21 21:53 ` [patch 28/34] score: " Thomas Gleixner
2013-03-21 21:53 ` [patch 30/34] tile: Enter idle with preemption disabled Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-22 20:34   ` Chris Metcalf
2013-03-22 20:40   ` Chris Metcalf
2013-03-28 15:43   ` Srivatsa S. Bhat
2013-03-28 15:43     ` Srivatsa S. Bhat
2013-03-21 21:53 ` [patch 29/34] sh: Use generic idle loop Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-28 15:40   ` Srivatsa S. Bhat
2013-03-21 21:53 ` [patch 31/34] tile: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-28 15:41   ` Srivatsa S. Bhat
2013-03-29 11:24     ` Thomas Gleixner
2013-03-21 21:53 ` [patch 32/34] unicore: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-21 21:53 ` [patch 33/34] x86: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-28 15:43   ` Srivatsa S. Bhat
2013-03-28 15:43     ` Srivatsa S. Bhat
2013-03-21 21:53 ` [patch 34/34] xtensa: " Thomas Gleixner
2013-03-21 21:53   ` Thomas Gleixner
2013-03-22 12:37   ` Max Filippov
2013-03-22 12:37     ` Max Filippov
2013-03-22 20:09 ` [patch 00/34] idle: Consolidate idle implementations Sam Ravnborg
     [not found] ` <alpine.LFD.2.02.1303271940150.22263@ionos>
     [not found]   ` <5153EC43.7070808@zankel.net>
2013-03-28  9:24     ` Thomas Gleixner
2013-03-28 22:16       ` Chris Zankel
2013-03-29 16:19 ` Sam Ravnborg
2013-03-29 16:19   ` Sam Ravnborg
2013-03-29 20:29   ` [PATCH] sparc: Use generic idle loop Sam Ravnborg
2013-03-31 23:46     ` David Miller
2013-04-01  6:53     ` Srivatsa S. Bhat
2013-04-01  6:53       ` Srivatsa S. Bhat
2013-04-01  9:06       ` Sam Ravnborg
2013-04-01  9:06         ` Sam Ravnborg
2013-04-08 12:33         ` Srivatsa S. Bhat
2013-04-08 12:33           ` Srivatsa S. Bhat
2013-04-08 17:10           ` Sam Ravnborg
2013-04-08 19:24             ` David Miller
2013-04-11 19:38               ` [PATCH v2] " Sam Ravnborg
2013-04-11 19:38                 ` Sam Ravnborg
2013-04-12 18:56                 ` Thomas Gleixner
2013-04-12 18:58                   ` David Miller
2013-05-03  9:47 ` [patch 00/34] idle: Consolidate idle implementations Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).