Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 May 2010 23:14:17 +0000 (16:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 May 2010 23:14:17 +0000 (16:14 -0700)
* 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
  intel_idle: native hardware cpuidle driver for latest Intel processors
  ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case
  acpi_pad: uses MONITOR/MWAIT, so it doesn't need to clear TS_POLLING
  sched: clarify commment for TS_POLLING
  ACPI: allow a native cpuidle driver to displace ACPI
  cpuidle: make cpuidle_curr_driver static
  cpuidle: add cpuidle_unregister_driver() error check
  cpuidle: fail to register if !CONFIG_CPU_IDLE

1  2 
MAINTAINERS
arch/x86/include/asm/thread_info.h
drivers/acpi/acpi_pad.c
drivers/acpi/processor_idle.c

diff --combined MAINTAINERS
@@@ -131,12 -131,19 +131,12 @@@ L:      netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/typhoon*
  
 -3W-9XXX SATA-RAID CONTROLLER DRIVER
 -M:    Adam Radford <linuxraid@amcc.com>
 +3WARE SAS/SATA-RAID SCSI DRIVERS (3W-XXXX, 3W-9XXX, 3W-SAS)
 +M:    Adam Radford <linuxraid@lsi.com>
  L:    linux-scsi@vger.kernel.org
 -W:    http://www.amcc.com
 +W:    http://www.lsi.com
  S:    Supported
 -F:    drivers/scsi/3w-9xxx*
 -
 -3W-XXXX ATA-RAID CONTROLLER DRIVER
 -M:    Adam Radford <linuxraid@amcc.com>
 -L:    linux-scsi@vger.kernel.org
 -W:    http://www.amcc.com
 -S:    Supported
 -F:    drivers/scsi/3w-xxxx*
 +F:    drivers/scsi/3w-*
  
  53C700 AND 53C700-66 SCSI DRIVER
  M:    "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
@@@ -579,12 -586,6 +579,12 @@@ F:       drivers/mtd/nand/bcm_umi_bch.
  F:    drivers/mtd/nand/bcm_umi_hamming.c
  F:    drivers/mtd/nand/nand_bcm_umi.h
  
 +ARM/CAVIUM NETWORKS CNS3XXX MACHINE SUPPORT
 +M:    Anton Vorontsov <avorontsov@mvista.com>
 +S:    Maintained
 +F:    arch/arm/mach-cns3xxx/
 +T:    git git://git.infradead.org/users/cbou/linux-cns3xxx.git
 +
  ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE
  M:    Hartley Sweeten <hsweeten@visionengravers.com>
  M:    Ryan Mallon <ryan@bluewatersys.com>
@@@ -774,10 -775,11 +774,10 @@@ M:      Philipp Zabel <philipp.zabel@gmail.c
  S:    Maintained
  
  ARM/Marvell Loki/Kirkwood/MV78xx0/Orion SOC support
 -M:    Lennert Buytenhek <buytenh@marvell.com>
 -M:    Nicolas Pitre <nico@marvell.com>
 +M:    Lennert Buytenhek <kernel@wantstofly.org>
 +M:    Nicolas Pitre <nico@fluxnic.net>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -T:    git git://git.marvell.com/orion
 -S:    Maintained
 +S:    Odd Fixes
  F:    arch/arm/mach-loki/
  F:    arch/arm/mach-kirkwood/
  F:    arch/arm/mach-mv78xx0/
@@@ -812,7 -814,6 +812,7 @@@ ARM/QUALCOMM MSM MACHINE SUPPOR
  M:    David Brown <davidb@codeaurora.org>
  M:    Daniel Walker <dwalker@codeaurora.org>
  M:    Bryan Huntsman <bryanh@codeaurora.org>
 +L:    linux-arm-msm@vger.kernel.org
  F:    arch/arm/mach-msm/
  F:    drivers/video/msm/
  F:    drivers/mmc/host/msm_sdcc.c
@@@ -969,18 -970,6 +969,18 @@@ M:       Wan ZongShun <mcuos.com@gmail.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.mcuos.com
  S:    Maintained
 +F:    arch/arm/mach-w90x900/
 +F:    arch/arm/mach-nuc93x/
 +F:    drivers/input/keyboard/w90p910_keypad.c
 +F:    drivers/input/touchscreen/w90p910_ts.c
 +F:    drivers/watchdog/nuc900_wdt.c
 +F:    drivers/net/arm/w90p910_ether.c
 +F:    drivers/mtd/nand/w90p910_nand.c
 +F:    drivers/rtc/rtc-nuc900.c
 +F:    drivers/spi/spi_nuc900.c
 +F:    drivers/usb/host/ehci-w90x900.c
 +F:    drivers/video/nuc900fb.c
 +F:    drivers/sound/soc/nuc900/
  
  ARM/U300 MACHINE SUPPORT
  M:    Linus Walleij <linus.walleij@stericsson.com>
@@@ -1005,20 -994,6 +1005,20 @@@ W:     http://www.arm.linux.org.uk
  S:    Maintained
  F:    arch/arm/vfp/
  
 +ARM/VOIPAC PXA270 SUPPORT
 +M:    Marek Vasut <marek.vasut@gmail.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm/mach-pxa/vpac270.c
 +F:    arch/arm/mach-pxa/include/mach-pxa/vpac270.h
 +
 +ARM/ZIPIT Z2 SUPPORT
 +M:    Marek Vasut <marek.vasut@gmail.com>
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm/mach-pxa/z2.c
 +F:    arch/arm/mach-pxa/include/mach-pxa/z2.h
 +
  ASC7621 HARDWARE MONITOR DRIVER
  M:    George Joseph <george.joseph@fairview5.com>
  L:    lm-sensors@lm-sensors.org
@@@ -1526,10 -1501,9 +1526,10 @@@ M:    Andy Whitcroft <apw@canonical.com
  S:    Supported
  F:    scripts/checkpatch.pl
  
 -CISCO 10G ETHERNET DRIVER
 +CISCO VIC ETHERNET NIC DRIVER
  M:    Scott Feldman <scofeldm@cisco.com>
 -M:    Joe Eykholt <jeykholt@cisco.com>
 +M:    Vasanthy Kolluri <vkolluri@cisco.com>
 +M:    Roopa Prabhu <roprabhu@cisco.com>
  S:    Supported
  F:    drivers/net/enic/
  
@@@ -1755,20 -1729,6 +1755,20 @@@ W:    http://www.openfabrics.or
  S:    Supported
  F:    drivers/infiniband/hw/cxgb3/
  
 +CXGB4 ETHERNET DRIVER (CXGB4)
 +M:    Dimitris Michailidis <dm@chelsio.com>
 +L:    netdev@vger.kernel.org
 +W:    http://www.chelsio.com
 +S:    Supported
 +F:    drivers/net/cxgb4/
 +
 +CXGB4 IWARP RNIC DRIVER (IW_CXGB4)
 +M:    Steve Wise <swise@chelsio.com>
 +L:    linux-rdma@vger.kernel.org
 +W:    http://www.openfabrics.org
 +S:    Supported
 +F:    drivers/infiniband/hw/cxgb4/
 +
  CYBERPRO FB DRIVER
  M:    Russell King <linux@arm.linux.org.uk>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -2707,12 -2667,16 +2707,12 @@@ F:   Documentation/timers/hpet.tx
  F:    drivers/char/hpet.c
  F:    include/linux/hpet.h
  
 -HPET: i386
 -M:    "Venkatesh Pallipadi (Venki)" <venkatesh.pallipadi@intel.com>
 +HPET: x86
 +M:    "Venkatesh Pallipadi (Venki)" <venki@google.com>
  S:    Maintained
  F:    arch/x86/kernel/hpet.c
  F:    arch/x86/include/asm/hpet.h
  
 -HPET: x86_64
 -M:    Vojtech Pavlik <vojtech@suse.cz>
 -S:    Maintained
 -
  HPET: ACPI
  M:    Bob Picco <bob.picco@hp.com>
  S:    Maintained
@@@ -2753,7 -2717,6 +2753,7 @@@ M:      "Ben Dooks (embedded platforms)" <be
  L:    linux-i2c@vger.kernel.org
  W:    http://i2c.wiki.kernel.org/
  T:    quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/
 +T:    git git://git.fluff.org/bjdooks/linux.git
  S:    Maintained
  F:    Documentation/i2c/
  F:    drivers/i2c/
@@@ -2887,6 -2850,13 +2887,13 @@@ T:    git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    drivers/input/
  
+ INTEL IDLE DRIVER
+ M:    Len Brown <lenb@kernel.org>
+ L:    linux-pm@lists.linux-foundation.org
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6.git
+ S:    Supported
+ F:    drivers/idle/intel_idle.c
  INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
  M:    Maik Broemme <mbroemme@plusserver.de>
  L:    linux-fbdev@vger.kernel.org
@@@ -2990,17 -2960,6 +2997,17 @@@ S:    Odd Fixe
  F:    Documentation/networking/README.ipw2200
  F:    drivers/net/wireless/ipw2x00/ipw2200.*
  
 +INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
 +M:    Joseph Cihula <joseph.cihula@intel.com>
 +M:    Shane Wang <shane.wang@intel.com>
 +L:    tboot-devel@lists.sourceforge.net
 +W:    http://tboot.sourceforge.net
 +T:    Mercurial http://www.bughost.org/repos.hg/tboot.hg
 +S:    Supported
 +F:    Documentation/intel_txt.txt
 +F:    include/linux/tboot.h
 +F:    arch/x86/kernel/tboot.c
 +
  INTEL WIRELESS WIMAX CONNECTION 2400
  M:    Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
  M:    linux-wimax@intel.com
@@@ -3050,9 -3009,10 +3057,9 @@@ F:     net/ipv4/netfilter/ipt_MASQUERADE.
  IP1000A 10/100/1000 GIGABIT ETHERNET DRIVER
  M:    Francois Romieu <romieu@fr.zoreil.com>
  M:    Sorbica Shieh <sorbica@icplus.com.tw>
 -M:    Jesse Huang <jesse@icplus.com.tw>
  L:    netdev@vger.kernel.org
  S:    Maintained
 -F:    drivers/net/ipg.c
 +F:    drivers/net/ipg.*
  
  IPATH DRIVER
  M:    Ralph Campbell <infinipath@qlogic.com>
@@@ -3331,17 -3291,15 +3338,17 @@@ F:   include/linux/key-type.
  F:    include/keys/
  F:    security/keys/
  
 -KGDB
 +KGDB / KDB /debug_core
  M:    Jason Wessel <jason.wessel@windriver.com>
 +W:    http://kgdb.wiki.kernel.org/
  L:    kgdb-bugreport@lists.sourceforge.net
  S:    Maintained
  F:    Documentation/DocBook/kgdb.tmpl
  F:    drivers/misc/kgdbts.c
  F:    drivers/serial/kgdboc.c
 +F:    include/linux/kdb.h
  F:    include/linux/kgdb.h
 -F:    kernel/kgdb.c
 +F:    kernel/debug/
  
  KMEMCHECK
  M:    Vegard Nossum <vegardno@ifi.uio.no>
@@@ -3673,8 -3631,7 +3680,8 @@@ F:      drivers/net/wireless/mwl8k.
  
  MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
  M:    Nicolas Pitre <nico@fluxnic.net>
 -S:    Maintained
 +S:    Odd Fixes
 +F: drivers/mmc/host/mvsdio.*
  
  MARVELL YUKON / SYSKONNECT DRIVER
  M:    Mirko Lindner <mlindner@syskonnect.de>
@@@ -3902,6 -3859,7 +3909,6 @@@ M:      Ramkrishna Vepa <ram.vepa@neterion.c
  M:    Rastapur Santosh <santosh.rastapur@neterion.com>
  M:    Sivakumar Subramani <sivakumar.subramani@neterion.com>
  M:    Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
 -M:    Anil Murthy <anil.murthy@neterion.com>
  L:    netdev@vger.kernel.org
  W:    http://trac.neterion.com/cgi-bin/trac.cgi/wiki/Linux?Anonymous
  W:    http://trac.neterion.com/cgi-bin/trac.cgi/wiki/X3100Linux?Anonymous
@@@ -4006,7 -3964,6 +4013,7 @@@ F:      net/rfkill
  F:    net/wireless/
  F:    include/net/ieee80211*
  F:    include/linux/wireless.h
 +F:    include/linux/iw_handler.h
  F:    drivers/net/wireless/
  
  NETWORKING DRIVERS
@@@ -4215,7 -4172,6 +4222,7 @@@ OPROFIL
  M:    Robert Richter <robert.richter@amd.com>
  L:    oprofile-list@lists.sf.net
  S:    Maintained
 +F:    arch/*/include/asm/oprofile*.h
  F:    arch/*/oprofile/
  F:    drivers/oprofile/
  F:    include/linux/oprofile.h
@@@ -4404,13 -4360,13 +4411,13 @@@ M:   Paul Mackerras <paulus@samba.org
  M:    Ingo Molnar <mingo@elte.hu>
  M:    Arnaldo Carvalho de Melo <acme@redhat.com>
  S:    Supported
 -F:    kernel/perf_event.c
 +F:    kernel/perf_event*.c
  F:    include/linux/perf_event.h
 -F:    arch/*/kernel/perf_event.c
 -F:    arch/*/kernel/*/perf_event.c
 -F:    arch/*/kernel/*/*/perf_event.c
 +F:    arch/*/kernel/perf_event*.c
 +F:    arch/*/kernel/*/perf_event*.c
 +F:    arch/*/kernel/*/*/perf_event*.c
  F:    arch/*/include/asm/perf_event.h
 -F:    arch/*/lib/perf_event.c
 +F:    arch/*/lib/perf_event*.c
  F:    arch/*/kernel/perf_callchain.c
  F:    tools/perf/
  
@@@ -4628,14 -4584,6 +4635,14 @@@ S:    Supporte
  F:    Documentation/scsi/LICENSE.qla2xxx
  F:    drivers/scsi/qla2xxx/
  
 +QLOGIC QLA4XXX iSCSI DRIVER
 +M:    Ravi Anand <ravi.anand@qlogic.com>
 +M:    Vikas Chaudhary <vikas.chaudhary@qlogic.com>
 +M:    iscsi-driver@qlogic.com
 +L:    linux-scsi@vger.kernel.org
 +S:    Supported
 +F:    drivers/scsi/qla4xxx/
 +
  QLOGIC QLA3XXX NETWORK DRIVER
  M:    Ron Mercer <ron.mercer@qlogic.com>
  M:    linux-driver@qlogic.com
@@@ -4646,7 -4594,6 +4653,7 @@@ F:      drivers/net/qla3xxx.
  
  QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
  M:    Amit Kumar Salecha <amit.salecha@qlogic.com>
 +M:    Anirban Chakraborty <anirban.chakraborty@qlogic.com>
  M:    linux-driver@qlogic.com
  L:    netdev@vger.kernel.org
  S:    Supported
@@@ -4776,12 -4723,6 +4783,12 @@@ S:    Maintaine
  F:    Documentation/rfkill.txt
  F:    net/rfkill/
  
 +RICOH SMARTMEDIA/XD DRIVER
 +M:    Maxim Levitsky <maximlevitsky@gmail.com>
 +S:    Maintained
 +F:    drivers/mtd/nand/r822.c
 +F:    drivers/mtd/nand/r822.h
 +
  RISCOM8 DRIVER
  S:    Orphan
  F:    Documentation/serial/riscom8.txt
@@@ -4836,9 -4777,6 +4843,9 @@@ W:      http://www.ibm.com/developerworks/li
  S:    Supported
  F:    arch/s390/
  F:    drivers/s390/
 +F:    fs/partitions/ibm.c
 +F:    Documentation/s390/
 +F:    Documentation/DocBook/s390*
  
  S390 NETWORK DRIVERS
  M:    Ursula Braun <ursula.braun@de.ibm.com>
@@@ -5007,12 -4945,6 +5014,12 @@@ L:    linux-mmc@vger.kernel.or
  S:    Maintained
  F:    drivers/mmc/host/sdhci-s3c.c
  
 +SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER
 +M:    Viresh Kumar <viresh.kumar@st.com>
 +L:    linux-mmc@vger.kernel.org
 +S:    Maintained
 +F:    drivers/mmc/host/sdhci-spear.c
 +
  SECURITY SUBSYSTEM
  M:    James Morris <jmorris@namei.org>
  L:    linux-security-module@vger.kernel.org (suggested Cc:)
@@@ -5196,7 -5128,7 +5203,7 @@@ F:      mm/sl?b.
  
  SMC91x ETHERNET DRIVER
  M:    Nicolas Pitre <nico@fluxnic.net>
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/net/smc91x.*
  
  SMSC47B397 HARDWARE MONITOR DRIVER
@@@ -5327,46 -5259,6 +5334,46 @@@ F:    drivers/serial/sunsu.
  F:    drivers/serial/sunzilog.c
  F:    drivers/serial/sunzilog.h
  
 +SPEAR PLATFORM SUPPORT
 +M:    Viresh Kumar <viresh.kumar@st.com>
 +W:    http://www.st.com/spear
 +S:    Maintained
 +F:    arch/arm/plat-spear/
 +
 +SPEAR3XX MACHINE SUPPORT
 +M:    Viresh Kumar <viresh.kumar@st.com>
 +W:    http://www.st.com/spear
 +S:    Maintained
 +F:    arch/arm/mach-spear3xx/
 +
 +SPEAR6XX MACHINE SUPPORT
 +M:    Rajeev Kumar <rajeev-dlh.kumar@st.com>
 +W:    http://www.st.com/spear
 +S:    Maintained
 +F:    arch/arm/mach-spear6xx/
 +
 +SPEAR CLOCK FRAMEWORK SUPPORT
 +M:    Viresh Kumar <viresh.kumar@st.com>
 +W:    http://www.st.com/spear
 +S:    Maintained
 +F:    arch/arm/mach-spear*/clock.c
 +F:    arch/arm/mach-spear*/include/mach/clkdev.h
 +F:    arch/arm/plat-spear/clock.c
 +F:    arch/arm/plat-spear/include/plat/clock.h and clkdev.h
 +
 +SPEAR PAD MULTIPLEXING SUPPORT
 +M:    Viresh Kumar <viresh.kumar@st.com>
 +W:    http://www.st.com/spear
 +S:    Maintained
 +F:    arch/arm/plat-spear/include/plat/padmux.h
 +F:    arch/arm/plat-spear/padmux.c
 +F:    arch/arm/mach-spear*/spear*xx.c
 +F:    arch/arm/mach-spear*/include/mach/generic.h
 +F:    arch/arm/mach-spear3xx/spear3*0.c
 +F:    arch/arm/mach-spear3xx/spear3*0_evb.c
 +F:    arch/arm/mach-spear6xx/spear600.c
 +F:    arch/arm/mach-spear6xx/spear600_evb.c
 +
  SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
  M:    Roger Wolff <R.E.Wolff@BitWizard.nl>
  S:    Supported
@@@ -5995,7 -5887,7 +6002,7 @@@ M:      Laurent Pinchart <laurent.pinchart@s
  L:    linux-uvc-devel@lists.berlios.de (subscribers-only)
  L:    linux-media@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
 -W:    http://linux-uvc.berlios.de
 +W:    http://www.ideasonboard.org/uvc/
  S:    Maintained
  F:    drivers/media/video/uvc/
  
@@@ -87,12 -87,13 +87,12 @@@ struct thread_info 
  #define TIF_NOTSC             16      /* TSC is not accessible in userland */
  #define TIF_IA32              17      /* 32bit process */
  #define TIF_FORK              18      /* ret_from_fork */
 -#define TIF_MEMDIE            20
 +#define TIF_MEMDIE            20      /* is terminating due to OOM killer */
  #define TIF_DEBUG             21      /* uses debug registers */
  #define TIF_IO_BITMAP         22      /* uses I/O bitmap */
  #define TIF_FREEZE            23      /* is freezing for suspend */
  #define TIF_FORCED_TF         24      /* true if TF in eflags artificially */
 -#define TIF_DEBUGCTLMSR               25      /* uses thread_struct.debugctlmsr */
 -#define TIF_DS_AREA_MSR               26      /* uses thread_struct.ds_area_msr */
 +#define TIF_BLOCKSTEP         25      /* set when we want DEBUGCTLMSR_BTF */
  #define TIF_LAZY_MMU_UPDATES  27      /* task is updating the mmu lazily */
  #define TIF_SYSCALL_TRACEPOINT        28      /* syscall tracepoint instrumentation */
  
  #define _TIF_IO_BITMAP                (1 << TIF_IO_BITMAP)
  #define _TIF_FREEZE           (1 << TIF_FREEZE)
  #define _TIF_FORCED_TF                (1 << TIF_FORCED_TF)
 -#define _TIF_DEBUGCTLMSR      (1 << TIF_DEBUGCTLMSR)
 -#define _TIF_DS_AREA_MSR      (1 << TIF_DS_AREA_MSR)
 +#define _TIF_BLOCKSTEP                (1 << TIF_BLOCKSTEP)
  #define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES)
  #define _TIF_SYSCALL_TRACEPOINT       (1 << TIF_SYSCALL_TRACEPOINT)
  
  
  /* flags to check in __switch_to() */
  #define _TIF_WORK_CTXSW                                                       \
 -      (_TIF_IO_BITMAP|_TIF_DEBUGCTLMSR|_TIF_DS_AREA_MSR|_TIF_NOTSC)
 +      (_TIF_IO_BITMAP|_TIF_NOTSC|_TIF_BLOCKSTEP)
  
  #define _TIF_WORK_CTXSW_PREV (_TIF_WORK_CTXSW|_TIF_USER_RETURN_NOTIFY)
  #define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW|_TIF_DEBUG)
@@@ -239,9 -241,10 +239,9 @@@ static inline struct thread_info *curre
  #define TS_USEDFPU            0x0001  /* FPU was used by this task
                                           this quantum (SMP) */
  #define TS_COMPAT             0x0002  /* 32bit syscall active (64BIT)*/
- #define TS_POLLING            0x0004  /* true if in idle loop
-                                          and not sleeping */
+ #define TS_POLLING            0x0004  /* idle task polling need_resched,
+                                          skip sending interrupt */
  #define TS_RESTORE_SIGMASK    0x0008  /* restore signal mask in do_signal() */
 -#define TS_XSAVE              0x0010  /* Use xsave/xrstor */
  
  #define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
  
diff --combined drivers/acpi/acpi_pad.c
@@@ -43,10 -43,6 +43,10 @@@ static DEFINE_MUTEX(isolated_cpus_lock)
  #define CPUID5_ECX_EXTENSIONS_SUPPORTED (0x1)
  #define CPUID5_ECX_INTERRUPT_BREAK    (0x2)
  static unsigned long power_saving_mwait_eax;
 +
 +static unsigned char tsc_detected_unstable;
 +static unsigned char tsc_marked_unstable;
 +
  static void power_saving_mwait_init(void)
  {
        unsigned int eax, ebx, ecx, edx;
@@@ -91,8 -87,8 +91,8 @@@
  
                /*FALL THROUGH*/
        default:
 -              /* TSC could halt in idle, so notify users */
 -              mark_tsc_unstable("TSC halts in idle");
 +              /* TSC could halt in idle */
 +              tsc_detected_unstable = 1;
        }
  #endif
  }
@@@ -172,21 -168,9 +172,14 @@@ static int power_saving_thread(void *da
  
                do_sleep = 0;
  
                expire_time = jiffies + HZ * (100 - idle_pct) / 100;
  
                while (!need_resched()) {
 +                      if (tsc_detected_unstable && !tsc_marked_unstable) {
 +                              /* TSC could halt in idle, so notify users */
 +                              mark_tsc_unstable("TSC halts in idle");
 +                              tsc_marked_unstable = 1;
 +                      }
                        local_irq_disable();
                        cpu = smp_processor_id();
                        clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
                        }
                }
  
-               current_thread_info()->status |= TS_POLLING;
                /*
                 * current sched_rt has threshold for rt task running time.
                 * When a rt task uses 95% CPU time, the rt thread will be
@@@ -698,7 -698,7 +698,7 @@@ static int acpi_processor_power_seq_sho
                   "max_cstate:              C%d\n"
                   "maximum allowed latency: %d usec\n",
                   pr->power.state ? pr->power.state - pr->power.states : 0,
 -                 max_cstate, pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY));
 +                 max_cstate, pm_qos_request(PM_QOS_CPU_DMA_LATENCY));
  
        seq_puts(seq, "states:\n");
  
                        break;
                }
  
 -              if (pr->power.states[i].promotion.state)
 -                      seq_printf(seq, "promotion[C%zd] ",
 -                                 (pr->power.states[i].promotion.state -
 -                                  pr->power.states));
 -              else
 -                      seq_puts(seq, "promotion[--] ");
 +              seq_puts(seq, "promotion[--] ");
  
 -              if (pr->power.states[i].demotion.state)
 -                      seq_printf(seq, "demotion[C%zd] ",
 -                                 (pr->power.states[i].demotion.state -
 -                                  pr->power.states));
 -              else
 -                      seq_puts(seq, "demotion[--] ");
 +              seq_puts(seq, "demotion[--] ");
  
                seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n",
                           pr->power.states[i].latency,
@@@ -859,7 -869,6 +859,7 @@@ static int acpi_idle_enter_simple(struc
        struct acpi_processor *pr;
        struct acpi_processor_cx *cx = cpuidle_get_statedata(state);
        ktime_t  kt1, kt2;
 +      s64 idle_time_ns;
        s64 idle_time;
        s64 sleep_ticks = 0;
  
                return(acpi_idle_enter_c1(dev, state));
  
        local_irq_disable();
        if (cx->entry_method != ACPI_CSTATE_FFH) {
                current_thread_info()->status &= ~TS_POLLING;
                /*
                 * NEED_RESCHED:
                 */
                smp_mb();
-       }
  
-       if (unlikely(need_resched())) {
-               current_thread_info()->status |= TS_POLLING;
-               local_irq_enable();
-               return 0;
+               if (unlikely(need_resched())) {
+                       current_thread_info()->status |= TS_POLLING;
+                       local_irq_enable();
+                       return 0;
+               }
        }
  
        /*
        sched_clock_idle_sleep_event();
        acpi_idle_do_entry(cx);
        kt2 = ktime_get_real();
 -      idle_time =  ktime_to_us(ktime_sub(kt2, kt1));
 +      idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
 +      idle_time = idle_time_ns;
 +      do_div(idle_time, NSEC_PER_USEC);
  
        sleep_ticks = us_to_pm_timer_ticks(idle_time);
  
        /* Tell the scheduler how much we idled: */
 -      sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
 +      sched_clock_idle_wakeup_event(idle_time_ns);
  
        local_irq_enable();
-       current_thread_info()->status |= TS_POLLING;
+       if (cx->entry_method != ACPI_CSTATE_FFH)
+               current_thread_info()->status |= TS_POLLING;
  
        cx->usage++;
  
@@@ -936,7 -945,6 +938,7 @@@ static int acpi_idle_enter_bm(struct cp
        struct acpi_processor *pr;
        struct acpi_processor_cx *cx = cpuidle_get_statedata(state);
        ktime_t  kt1, kt2;
 +      s64 idle_time_ns;
        s64 idle_time;
        s64 sleep_ticks = 0;
  
        }
  
        local_irq_disable();
        if (cx->entry_method != ACPI_CSTATE_FFH) {
                current_thread_info()->status &= ~TS_POLLING;
                /*
                 * NEED_RESCHED:
                 */
                smp_mb();
-       }
  
-       if (unlikely(need_resched())) {
-               current_thread_info()->status |= TS_POLLING;
-               local_irq_enable();
-               return 0;
+               if (unlikely(need_resched())) {
+                       current_thread_info()->status |= TS_POLLING;
+                       local_irq_enable();
+                       return 0;
+               }
        }
  
        acpi_unlazy_tlb(smp_processor_id());
                spin_unlock(&c3_lock);
        }
        kt2 = ktime_get_real();
 -      idle_time =  ktime_to_us(ktime_sub(kt2, kt1));
 +      idle_time_ns = ktime_to_us(ktime_sub(kt2, kt1));
 +      idle_time = idle_time_ns;
 +      do_div(idle_time, NSEC_PER_USEC);
  
        sleep_ticks = us_to_pm_timer_ticks(idle_time);
        /* Tell the scheduler how much we idled: */
 -      sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS);
 +      sched_clock_idle_wakeup_event(idle_time_ns);
  
        local_irq_enable();
-       current_thread_info()->status |= TS_POLLING;
+       if (cx->entry_method != ACPI_CSTATE_FFH)
+               current_thread_info()->status |= TS_POLLING;
  
        cx->usage++;