Merge branch 'powernv-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/benh...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Apr 2014 20:47:29 +0000 (13:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Apr 2014 20:47:29 +0000 (13:47 -0700)
Pull powerpc non-virtualized cpuidle from Ben Herrenschmidt:
 "This is the branch I mentioned in my other pull request which contains
  our improved cpuidle support for the "powernv" platform
  (non-virtualized).

  It adds support for the "fast sleep" feature of the processor which
  provides higher power savings than our usual "nap" mode but at the
  cost of losing the timers while asleep, and thus exploits the new
  timer broadcast framework to work around that limitation.

  It's based on a tip timer tree that you seem to have already merged"

* 'powernv-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  cpuidle/powernv: Parse device tree to setup idle states
  cpuidle/powernv: Add "Fast-Sleep" CPU idle state
  powerpc/powernv: Add OPAL call to resync timebase on wakeup
  powerpc/powernv: Add context management for Fast Sleep
  powerpc: Split timer_interrupt() into timer handling and interrupt handling routines
  powerpc: Implement tick broadcast IPI as a fixed IPI message
  powerpc: Free up the slot of PPC_MSG_CALL_FUNC_SINGLE IPI message

1  2 
arch/powerpc/Kconfig
arch/powerpc/include/asm/opal.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/platforms/powernv/opal-wrappers.S
drivers/cpuidle/cpuidle-powernv.c

Simple merge
index ffafab037ba860b5eaada654528a8bb9332ee338,c71c72e47d475875ccef284f31a388eb42f41240..fe2aa0b48d2b00e43e47212ddb55ce6c5142537f
@@@ -161,10 -154,7 +161,11 @@@ extern int opal_enter_rtas(struct rtas_
  #define OPAL_FLASH_VALIDATE                   76
  #define OPAL_FLASH_MANAGE                     77
  #define OPAL_FLASH_UPDATE                     78
+ #define OPAL_RESYNC_TIMEBASE                  79
 +#define OPAL_DUMP_INIT                                81
 +#define OPAL_DUMP_INFO                                82
 +#define OPAL_DUMP_READ                                83
 +#define OPAL_DUMP_ACK                         84
  #define OPAL_GET_MSG                          85
  #define OPAL_CHECK_ASYNC_COMPLETION           86
  #define OPAL_SYNC_HOST_REBOOT                 87
@@@ -915,14 -862,11 +916,15 @@@ extern void opal_get_rtc_time(struct rt
  extern unsigned long opal_get_boot_time(void);
  extern void opal_nvram_init(void);
  extern void opal_flash_init(void);
 +extern int opal_elog_init(void);
 +extern void opal_platform_dump_init(void);
 +extern void opal_sys_param_init(void);
  
  extern int opal_machine_check(struct pt_regs *regs);
 +extern bool opal_mce_check_early_recovery(struct pt_regs *regs);
  
  extern void opal_shutdown(void);
+ extern int opal_resync_timebase(void);
  
  extern void opal_lpc_init(void);
  
Simple merge
index 75c89df8d71e95b130dc827e036f25330cc1d6ad,aab54b60334fc1cfb29216a2f06bf8ef78f5aee6..bb90f9a4e0270be18a63a4126841fe81ff84cb12
@@@ -131,15 -126,7 +131,16 @@@ OPAL_CALL(opal_write_elog,                       OPAL_ELOG_
  OPAL_CALL(opal_validate_flash,                        OPAL_FLASH_VALIDATE);
  OPAL_CALL(opal_manage_flash,                  OPAL_FLASH_MANAGE);
  OPAL_CALL(opal_update_flash,                  OPAL_FLASH_UPDATE);
+ OPAL_CALL(opal_resync_timebase,                       OPAL_RESYNC_TIMEBASE);
 +OPAL_CALL(opal_dump_init,                     OPAL_DUMP_INIT);
 +OPAL_CALL(opal_dump_info,                     OPAL_DUMP_INFO);
 +OPAL_CALL(opal_dump_info2,                    OPAL_DUMP_INFO2);
 +OPAL_CALL(opal_dump_read,                     OPAL_DUMP_READ);
 +OPAL_CALL(opal_dump_ack,                      OPAL_DUMP_ACK);
  OPAL_CALL(opal_get_msg,                               OPAL_GET_MSG);
  OPAL_CALL(opal_check_completion,              OPAL_CHECK_ASYNC_COMPLETION);
 +OPAL_CALL(opal_dump_resend_notification,      OPAL_DUMP_RESEND);
  OPAL_CALL(opal_sync_host_reboot,              OPAL_SYNC_HOST_REBOOT);
 +OPAL_CALL(opal_sensor_read,                   OPAL_SENSOR_READ);
 +OPAL_CALL(opal_get_param,                     OPAL_GET_PARAM);
 +OPAL_CALL(opal_set_param,                     OPAL_SET_PARAM);
index f48607cd254024f07501bd802112e90991d697b1,fdae1c476e2755e4fd76cb102bdbab83c77fb2ff..719f6fb5b1c35d00108c47a61918741200eae75d
  
  #include <asm/machdep.h>
  #include <asm/firmware.h>
 +#include <asm/runlatch.h>
  
+ /* Flags and constants used in PowerNV platform */
+ #define MAX_POWERNV_IDLE_STATES       8
+ #define IDLE_USE_INST_NAP     0x00010000 /* Use nap instruction */
+ #define IDLE_USE_INST_SLEEP   0x00020000 /* Use sleep instruction */
  struct cpuidle_driver powernv_idle_driver = {
        .name             = "powernv_idle",
        .owner            = THIS_MODULE,