03 May, 2016

9 commits

  • - Typo in comments fixed
    - Unnecessary return statement removed

    Signed-off-by: MyungJoo Ham

    MyungJoo Ham
     
  • This patch use the phandle to find the instance of devfreq-event device in
    Device Tree when calling the devfreq_event_get_edev_by_phandle() because there
    is two type devfreq-event devices as following:

    First case, exynos-ppmu.c driver provides the maximum four event of each PPMU.
    So, when getting the instance of devfreq-event device, using the unique name of
    struct devfreq_event_desc.

    Second case, exynos-nocp.c driver provide the only one event of each NoC Probe
    device. So, when getting the instance of devfreq-event device, using the
    phandle of each NoC probe device.

    Signed-off-by: Chanwoo Choi
    Acked-by: MyungJoo Ham

    Chanwoo Choi
     
  • This patch adds NoC (Network on Chip) Probe driver which provides
    the primitive values to get the performance data. The packets that the Network
    on Chip (NoC) probes detects are transported over the network infrastructure.
    Exynos542x bus has multiple NoC probes to provide bandwidth information about
    behavior of the SoC that you can use while analyzing system performance.

    Signed-off-by: Chanwoo Choi
    Tested-by: Markus Reichl
    Tested-by: Anand Moon
    Reviewed-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch removes the unused exynos4/5 busfreq driver. Instead,
    generic exynos-bus frequency driver support the all Exynos SoCs.

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the support of bus frequency feature for sub-blocks which share
    the one power line. If each bus depends on the power line, each bus is not able
    to change the voltage by oneself. To optimize the power-consumption on runtime,
    some buses using the same power line should change the source clock and
    regulator at the same time. So, this patch uses the passive governor to support
    the bus frequency for all buses which sharing the one power line.

    For example,

    Exynos3250 include the two power line for AXI buses as following:
    : VDD_MIF : MIF (Memory Interface) provide the DMC (Dynamic Memory Controller)
    with the power (regulator).
    : VDD_INT : INT (Internal) provide the various sub-blocks with the power
    (regulator).

    Each bus is included in as follwoing block. In the case of VDD_MIF, only DMC bus
    use the power line. So, there is no any depencency between buese. But, in the
    case of VDD_INT, various buses share the one power line of VDD_INT. We need to
    make the depenency between buses. When using passive governor, there is no
    problem to support the bus frequency as DVFS for all buses. One bus should be
    operated as the parent bus device which gathering the current load of INT block
    and then decides the new frequency with some governors except of passive
    governor. After deciding the new frequency by the parent bus device, the rest
    bus devices will change the each source clock according to new frequency of the
    parent bus device.

    - MIF (Memory Interface) block
    : VDD_MIF |--- DMC

    - INT (Internal) block
    : VDD_INT |--- LEFTBUS (parent)
    |--- PERIL
    |--- MFC
    |--- G3D
    |--- RIGHTBUS
    |--- FSYS
    |--- LCD0
    |--- PERIR
    |--- ISP
    |--- CAM

    Signed-off-by: Chanwoo Choi
    [tjakobi: Reported debugfs error during booting and cw00.choi fix it.]
    Reported-by: Tobias Jakobi
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the new passive governor for DEVFREQ framework. The following
    governors are already present and used for DVFS (Dynamic Voltage and Frequency
    Scaling) drivers. The following governors are independently used for one device
    driver which don't give the influence to other device drviers and also don't
    receive the effect from other device drivers.
    - ondemand / performance / powersave / userspace

    The passive governor depends on operation of parent driver with specific
    governos extremely and is not able to decide the new frequency by oneself.
    According to the decided new frequency of parent driver with governor,
    the passive governor uses it to decide the appropriate frequency for own
    device driver. The passive governor must need the following information
    from device tree:
    - the source clock and OPP tables
    - the instance of parent device

    For exameple,
    there are one more devfreq device drivers which need to change their source
    clock according to their utilization on runtime. But, they share the same
    power line (e.g., regulator). So, specific device driver is operated as parent
    with ondemand governor and then the rest device driver with passive governor
    is influenced by parent device.

    Suggested-by: Myungjoo Ham
    Signed-off-by: Chanwoo Choi
    [tjakobi: Reported RCU locking issue and cw00.choi fix it]
    Reported-by: Tobias Jakobi
    [linux.amoon: Reported possible recursive locking and cw00.choi fix it]
    Reported-by: Anand Moon
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the new DEVFREQ_TRANSITION_NOTIFIER notifier to send
    the notification when the frequency of device is changed.
    This notifier has two state as following:
    - DEVFREQ_PRECHANGE : Notify it before chaning the frequency of device
    - DEVFREQ_POSTCHANGE : Notify it after changed the frequency of device

    And this patch adds the resourced-managed function to release the resource
    automatically when error happen.

    Signed-off-by: Chanwoo Choi
    [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
    Tested-by: Markus Reichl
    Tested-by: Anand Moon
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the new devfreq_get_devfreq_by_phandle() OF helper function
    which can find the instance of devfreq device by using phandle ("devfreq").

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham
    [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
    Tested-by: Markus Reichl
    Tested-by: Anand Moon
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     
  • This patch adds the generic exynos bus frequency driver for AMBA AXI bus
    of sub-blocks in exynos SoC with DEVFREQ framework. The Samsung Exynos SoC
    have the common architecture for bus between DRAM and sub-blocks in SoC.
    This driver can support the generic bus frequency driver for Exynos SoCs.

    In devicetree, Each bus block has a bus clock, regulator, operation-point
    and devfreq-event devices which measure the utilization of each bus block.

    Signed-off-by: Chanwoo Choi
    [m.reichl and linux.amoon: Tested it on exynos4412-odroidu3 board]
    Tested-by: Markus Reichl
    Tested-by: Anand Moon
    Signed-off-by: MyungJoo Ham
    Acked-by: Krzysztof Kozlowski

    Chanwoo Choi
     

17 Mar, 2016

1 commit


23 Feb, 2016

1 commit

  • As per the documentation of the devfreq_dev_profile.target callback, set
    the freq argument to the new frequency before returning.

    This caused endless messages like this after recent changes in the core:

    devfreq 6000c800.actmon: Couldn't update frequency transition information.

    Signed-off-by: Tomeu Vizoso
    Reported-by: Tyler Baker
    Tested-by: Thierry Reding
    Acked-by: Thierry Reding
    Signed-off-by: MyungJoo Ham

    Tomeu Vizoso
     

13 Jan, 2016

6 commits

  • Before this patch for a device without statistics support,

    $ cat trans_stat
    From : To
    : time(ms)
    Total transitions : 0
    $

    After this patch applied for such a device,

    $ cat trans_stat
    Not Supported.
    $

    Signed-off-by: MyungJoo Ham

    MyungJoo Ham
     
  • This patch modifies the indentation of 'trans_stat' sysfs to improve readability.
    The 1GHz is 1000,000,000. So it needs the least 10 position to show the GHz unit.

    - Before apply this patch,
    -sh-3.2# cat trans_stat
    From : To
    :50000000100000000133000000200000000400000000 time(ms)
    *50000000: 0 0 0 0 7 1817635
    100000000: 4 0 0 0 4 1590
    133000000: 1 4 0 0 7 975
    200000000: 2 2 7 0 1 2655
    400000000: 0 2 5 12 0 1860
    Total transition : 58

    - After apply this patch,
    -sh-3.2# cat trans_stat
    From : To
    : 50000000 100000000 133000000 200000000 400000000 time(ms)
    * 50000000: 0 0 0 0 7 14405
    100000000: 4 0 0 0 3 2015
    133000000: 2 3 0 0 7 1020
    200000000: 1 2 7 0 0 2970
    400000000: 0 2 5 10 0 1575
    Total transition : 53

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Chanwoo Choi
     
  • This patch initialize the freq_table array of each devfreq device by using
    the devfreq_set_freq_table(). If freq_table is NULL, the devfreq framework
    is not able to support the frequency transtion information through sysfs.

    The OPP core uses the integer type for the number of opps in the opp list
    and uses the 'unsigned long' type for each frequency. So, this patch
    modifies the type of some variable as following:
    - the type of freq_table : unsigned int -> unsigned long
    - the type of max_state : unsigned int -> int

    - Corrected types, format strings, mutex usages by MyungJoo

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Chanwoo Choi
     
  • This patch adds the 'show_one' macro to simplify the duplicate code
    of both max_freq_show() and min_freq_show().

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Chanwoo Choi
     
  • This patch just fixes following error and warning by using
    scripts/checkpatch.pl.

    - Follwoing issue from checkpatch.pl:
    ERROR: space prohibited before that close parenthesis ')'
    + if (count < 0 ) {

    WARNING: line over 80 characters
    + ptr = devres_alloc(devm_devfreq_event_release, sizeof(*ptr), GFP_KERNEL);

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Chanwoo Choi
     
  • This patch just removes the error log when
    devfreq_event_get_edev_by_phandle() fail to get the instance of
    devfreq-event device. It is related to sequence of the probe() of each
    driver. So, this error log might show the always during kernel booting.
    Each driver using this function can show the appropriate error log.

    Signed-off-by: Chanwoo Choi
    Signed-off-by: MyungJoo Ham

    Chanwoo Choi
     

02 Oct, 2015

1 commit

  • When device_register() fails, kfree(devfreq) is called already in
    devfreq_dev_release(), hence there is no need to call kfree(devfreq)
    in err_dev again.

    Signed-off-by: Geliang Tang
    Signed-off-by: MyungJoo Ham

    Geliang Tang
     

30 Sep, 2015

1 commit


11 Sep, 2015

7 commits


31 Mar, 2015

6 commits


30 Mar, 2015

2 commits


14 Feb, 2015

1 commit

  • * pm-cpufreq:
    cpufreq: speedstep-smi: enable interrupts when waiting

    * pm-cpuidle:
    intel_idle: support additional Broadwell model

    * pm-devfreq:
    PM / devfreq: event: testing the wrong variable

    * pm-opp:
    PM / OPP / clk: Remove unnecessary OOM message

    * pm-tools:
    tools/power turbostat: support additional Broadwell model
    tools/power turbostat: update parameters, documentation
    tools/power turbostat: Skip printing disabled package C-states

    Rafael J. Wysocki
     

12 Feb, 2015

1 commit


11 Feb, 2015

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "We have a few new features this time, including a new SFI-based
    cpufreq driver, a new devfreq driver for Tegra Activity Monitor, a new
    devfreq class for providing its governors with raw utilization data
    and a new ACPI driver for AMD SoCs.

    Still, the majority of changes here are reworks of existing code to
    make it more straightforward or to prepare it for implementing new
    features on top of it. The primary example is the rework of ACPI
    resources handling from Jiang Liu, Thomas Gleixner and Lv Zheng with
    support for IOAPIC hotplug implemented on top of it, but there is
    quite a number of changes of this kind in the cpufreq core, ACPICA,
    ACPI EC driver, ACPI processor driver and the generic power domains
    core code too.

    The most active developer is Viresh Kumar with his cpufreq changes.

    Specifics:

    - Rework of the core ACPI resources parsing code to fix issues in it
    and make using resource offsets more convenient and consolidation
    of some resource-handing code in a couple of places that have grown
    analagous data structures and code to cover the the same gap in the
    core (Jiang Liu, Thomas Gleixner, Lv Zheng).

    - ACPI-based IOAPIC hotplug support on top of the resources handling
    rework (Jiang Liu, Yinghai Lu).

    - ACPICA update to upstream release 20150204 including an interrupt
    handling rework that allows drivers to install raw handlers for
    ACPI GPEs which then become entirely responsible for the given GPE
    and the ACPICA core code won't touch it (Lv Zheng, David E Box,
    Octavian Purdila).

    - ACPI EC driver rework to fix several concurrency issues and other
    problems related to events handling on top of the ACPICA's new
    support for raw GPE handlers (Lv Zheng).

    - New ACPI driver for AMD SoCs analogous to the LPSS (Low-Power
    Subsystem) driver for Intel chips (Ken Xue).

    - Two minor fixes of the ACPI LPSS driver (Heikki Krogerus, Jarkko
    Nikula).

    - Two new blacklist entries for machines (Samsung 730U3E/740U3E and
    510R) where the native backlight interface doesn't work correctly
    while the ACPI one does (Hans de Goede).

    - Rework of the ACPI processor driver's handling of idle states to
    make the code more straightforward and less bloated overall (Rafael
    J Wysocki).

    - Assorted minor fixes related to ACPI and SFI (Andreas Ruprecht,
    Andy Shevchenko, Hanjun Guo, Jan Beulich, Rafael J Wysocki, Yaowei
    Bai).

    - PCI core power management modification to avoid resuming (some)
    runtime-suspended devices during system suspend if they are in the
    right states already (Rafael J Wysocki).

    - New SFI-based cpufreq driver for Intel platforms using SFI
    (Srinidhi Kasagar).

    - cpufreq core fixes, cleanups and simplifications (Viresh Kumar,
    Doug Anderson, Wolfram Sang).

    - SkyLake CPU support and other updates for the intel_pstate driver
    (Kristen Carlson Accardi, Srinivas Pandruvada).

    - cpufreq-dt driver cleanup (Markus Elfring).

    - Init fix for the ARM big.LITTLE cpuidle driver (Sudeep Holla).

    - Generic power domains core code fixes and cleanups (Ulf Hansson).

    - Operating Performance Points (OPP) core code cleanups and kernel
    documentation update (Nishanth Menon).

    - New dabugfs interface to make the list of PM QoS constraints
    available to user space (Nishanth Menon).

    - New devfreq driver for Tegra Activity Monitor (Tomeu Vizoso).

    - New devfreq class (devfreq_event) to provide raw utilization data
    to devfreq governors (Chanwoo Choi).

    - Assorted minor fixes and cleanups related to power management
    (Andreas Ruprecht, Krzysztof Kozlowski, Rickard Strandqvist, Pavel
    Machek, Todd E Brandt, Wonhong Kwon).

    - turbostat updates (Len Brown) and cpupower Makefile improvement
    (Sriram Raghunathan)"

    * tag 'pm+acpi-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (151 commits)
    tools/power turbostat: relax dependency on APERF_MSR
    tools/power turbostat: relax dependency on invariant TSC
    Merge branch 'pci/host-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci into acpi-resources
    tools/power turbostat: decode MSR_*_PERF_LIMIT_REASONS
    tools/power turbostat: relax dependency on root permission
    ACPI / video: Add disable_native_backlight quirk for Samsung 510R
    ACPI / PM: Remove unneeded nested #ifdef
    USB / PM: Remove unneeded #ifdef and associated dead code
    intel_pstate: provide option to only use intel_pstate with HWP
    ACPI / EC: Add GPE reference counting debugging messages
    ACPI / EC: Add query flushing support
    ACPI / EC: Refine command storm prevention support
    ACPI / EC: Add command flushing support.
    ACPI / EC: Introduce STARTED/STOPPED flags to replace BLOCKED flag
    ACPI: add AMD ACPI2Platform device support for x86 system
    ACPI / table: remove duplicate NULL check for the handler of acpi_table_parse()
    ACPI / EC: Update revision due to raw handler mode.
    ACPI / EC: Reduce ec_poll() by referencing the last register access timestamp.
    ACPI / EC: Fix several GPE handling issues by deploying ACPI_GPE_DISPATCH_RAW_HANDLER mode.
    ACPICA: Events: Enable APIs to allow interrupt/polling adaptive request based GPE handling model
    ...

    Linus Torvalds
     

30 Jan, 2015

2 commits

  • This patch fixes the build break of the exynos-ppmu driver because Makefile
    in drivers/devfreq don't include the entry of devfreq-event.c driver.

    The original patch[1] includes the entry to build devfreq-event.c without
    the build break. This build break is generated in the process of merging the
    patch.
    [1] https://lkml.org/lkml/2015/1/25/579
    - [PATCH v10 1/7] devfreq: event: Add new devfreq_event class to provide basic
    data for devfreq governor

    CC init/version.o
    LD init/built-in.o
    drivers/built-in.o: In function `exynos_ppmu_probe':
    binder.c:(.text+0x4447ec): undefined reference to `devm_devfreq_event_add_edev'
    make: *** [vmlinux] Error 1

    Cc: Rafael J. Wysocki
    Cc: MyungJoo Ham
    Signed-off-by: Chanwoo Choi

    Chanwoo Choi
     
  • This patch adds a new class in devfreq, devfreq_event, which provides
    raw data (e.g., memory bus utilization, GPU utilization) for devfreq
    governors.

    - devfreq_event device : Provides raw data for a governor of a devfreq device
    - devfreq device : Monitors device state and changes frequency/voltage
    of the device using the raw data from its
    devfreq_event device.

    A devfreq device dertermines performance states (normally the frequency
    and the voltage vlues) based on the results its designtated devfreq governor:
    e.g., ondemand, performance, powersave.

    In order to give such results required by a devfreq device, the devfreq
    governor requires data that indicates the performance requirement given
    to the devfreq device. The conventional (previous) implementatino of
    devfreq subsystem requires a devfreq device driver to implement its own
    mechanism to acquire performance requirement for its governor. However,
    there had been issues with such requirements:

    1. Although performance requirement of such devices is usually acquired
    from common devices (PMU/PPMU), we do not have any abstract structure to
    represent them properly.
    2. Such performance requirement devices (PMU/PPMU) are actual hardware
    pieces that may be represented by Device Tree directly while devfreq device
    itself is a virtual entity that are not considered to be represented by
    Device Tree according to Device Tree folks.

    In order to address such issues, a devferq_event device (represented by
    this patch) provides a template for device drivers representing
    performance monitoring unit, which gives the basic or raw data for
    preformance requirement, which in turn, is required by devfreq governors.

    The following description explains the feature of two kind of devfreq class:
    - devfreq class (existing)
    : devfreq consumer device use raw data from devfreq_event device for
    determining proper current system state and change voltage/frequency
    dynamically using various governors.

    - devfreq_event class (new)
    : Provide measured raw data to devfreq device for governor

    Cc: MyungJoo Ham
    Cc: Kyungmin Park
    Signed-off-by: Chanwoo Choi
    [Commit message rewritten & conflict resolved by MyungJoo]
    Signed-off-by: MyungJoo Ham

    Chanwoo Choi
     

29 Jan, 2015

1 commit

  • The ACTMON block can monitor several counters, providing averaging and firing
    interrupts based on watermarking configuration. This implementation monitors
    the MCALL and MCCPU counters to choose an appropriate frequency for the
    external memory clock.

    This patch is based on work by Alex Frid and Mikko
    Perttunen .

    Signed-off-by: Tomeu Vizoso
    Signed-off-by: MyungJoo Ham

    Tomeu Vizoso