Skip to content
Snippets Groups Projects
Select Git revision
  • 3e05531243d032bbff157999c99a30a969966927
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

i915_debugfs.c

Blame
  • intel_idle.c 19.41 KiB
    /*
     * intel_idle.c - native hardware idle loop for modern Intel processors
     *
     * Copyright (c) 2013, Intel Corporation.
     * Len Brown <len.brown@intel.com>
     *
     * This program is free software; you can redistribute it and/or modify it
     * under the terms and conditions of the GNU General Public License,
     * version 2, as published by the Free Software Foundation.
     *
     * This program is distributed in the hope it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
     * more details.
     *
     * You should have received a copy of the GNU General Public License along with
     * this program; if not, write to the Free Software Foundation, Inc.,
     * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
     */
    
    /*
     * intel_idle is a cpuidle driver that loads on specific Intel processors
     * in lieu of the legacy ACPI processor_idle driver.  The intent is to
     * make Linux more efficient on these processors, as intel_idle knows
     * more than ACPI, as well as make Linux more immune to ACPI BIOS bugs.
     */
    
    /*
     * Design Assumptions
     *
     * All CPUs have same idle states as boot CPU
     *
     * Chipset BM_STS (bus master status) bit is a NOP
     *	for preventing entry into deep C-stats
     */
    
    /*
     * Known limitations
     *
     * The driver currently initializes for_each_online_cpu() upon modprobe.
     * It it unaware of subsequent processors hot-added to the system.
     * This means that if you boot with maxcpus=n and later online
     * processors above n, those processors will use C1 only.
     *
     * ACPI has a .suspend hack to turn off deep c-statees during suspend
     * to avoid complications with the lapic timer workaround.
     * Have not seen issues with suspend, but may need same workaround here.
     *
     * There is currently no kernel-based automatic probing/loading mechanism
     * if the driver is built as a module.
     */
    
    /* un-comment DEBUG to enable pr_debug() statements */
    #define DEBUG
    
    #include <linux/kernel.h>
    #include <linux/cpuidle.h>
    #include <linux/clockchips.h>
    #include <trace/events/power.h>
    #include <linux/sched.h>
    #include <linux/notifier.h>
    #include <linux/cpu.h>
    #include <linux/module.h>
    #include <asm/cpu_device_id.h>
    #include <asm/mwait.h>
    #include <asm/msr.h>
    
    #define INTEL_IDLE_VERSION "0.4"
    #define PREFIX "intel_idle: "