18 Jul, 2019

1 commit

  • * pm-cpufreq:
    cpufreq: Make cpufreq_generic_init() return void
    cpufreq: imx-cpufreq-dt: Add i.MX8MN support
    cpufreq: Add QoS requests for userspace constraints
    cpufreq: intel_pstate: Reuse refresh_frequency_limits()
    cpufreq: Register notifiers with the PM QoS framework
    PM / QoS: Add support for MIN/MAX frequency constraints
    PM / QOS: Pass request type to dev_pm_qos_read_value()
    PM / QOS: Rename __dev_pm_qos_read_value() and dev_pm_qos_raw_read_value()
    PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier()

    Rafael J. Wysocki
     

16 Jul, 2019

1 commit

  • It always returns 0 (success) and its return type should really be void.

    Over that, many drivers have added error handling code based on its
    return value, which is not required at all.

    Change its return type to void and update all the callers.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

08 Apr, 2019

1 commit

  • The call to of_find_node_by_name returns a node pointer with refcount
    incremented thus it must be explicitly decremented after the last
    usage.

    Detected by coccinelle with the following warnings:
    ./drivers/cpufreq/pmac32-cpufreq.c:557:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 552, but without a corresponding object release within this function.
    ./drivers/cpufreq/pmac32-cpufreq.c:569:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 552, but without a corresponding object release within this function.
    ./drivers/cpufreq/pmac32-cpufreq.c:598:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 587, but without a corresponding object release within this function.

    Signed-off-by: Wen Yang
    Cc: "Rafael J. Wysocki"
    Cc: Viresh Kumar
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: linux-pm@vger.kernel.org
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Viresh Kumar

    Wen Yang
     

26 Nov, 2018

1 commit

  • Today, powerpc has three CONFIG labels which means exactly the same:
    - CONFIG_6xx
    - CONFIG_PPC_BOOK3S_32
    - CONFIG_PPC_STD_MMU_32

    By consistency with PPC64, CONFIG_PPC_BOOK3S_32 is the preferred one.
    Using a label with includes _PPC_ also makes it clearer that it is
    linked to powerpc.

    In preparation of the removal of CONFIG_6xx, this patch replaces it
    by CONFIG_PPC_BOOK3S_32

    Signed-off-by: Christophe Leroy
    Acked-by: Viresh Kumar
    Signed-off-by: Michael Ellerman

    Christophe Leroy
     

26 Jul, 2017

1 commit

  • The policy->transition_latency field is used for multiple purposes
    today and its not straight forward at all. This is how it is used:

    A. Set the correct transition_latency value.

    B. Set it to CPUFREQ_ETERNAL because:
    1. We don't want automatic dynamic switching (with
    ondemand/conservative) to happen at all.
    2. We don't know the transition latency.

    This patch handles the B.1. case in a more readable way. A new flag for
    the cpufreq drivers is added to disallow use of cpufreq governors which
    have dynamic_switching flag set.

    All the current cpufreq drivers which are setting transition_latency
    unconditionally to CPUFREQ_ETERNAL are updated to use it. They don't
    need to set transition_latency anymore.

    There shouldn't be any functional change after this patch.

    Signed-off-by: Viresh Kumar
    Reviewed-by: Dominik Brodowski
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

21 May, 2016

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Highlights:
    - Support for Power ISA 3.0 (Power9) Radix Tree MMU from Aneesh Kumar K.V
    - Live patching support for ppc64le (also merged via livepatching.git)

    Various cleanups & minor fixes from:
    - Aaro Koskinen, Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V,
    Chris Smart, Daniel Axtens, Frederic Barrat, Gavin Shan, Ian Munsie,
    Lennart Sorensen, Madhavan Srinivasan, Mahesh Salgaonkar, Markus Elfring,
    Michael Ellerman, Oliver O'Halloran, Paul Gortmaker, Paul Mackerras,
    Rashmica Gupta, Russell Currey, Suraj Jitindar Singh, Thiago Jung
    Bauermann, Valentin Rothberg, Vipin K Parashar.

    General:
    - Update LMB associativity index during DLPAR add/remove from Nathan
    Fontenot
    - Fix branching to OOL handlers in relocatable kernel from Hari Bathini
    - Add support for userspace Power9 copy/paste from Chris Smart
    - Always use STRICT_MM_TYPECHECKS from Michael Ellerman
    - Add mask of possible MMU features from Michael Ellerman

    PCI:
    - Enable pass through of NVLink to guests from Alexey Kardashevskiy
    - Cleanups in preparation for powernv PCI hotplug from Gavin Shan
    - Don't report error in eeh_pe_reset_and_recover() from Gavin Shan
    - Restore initial state in eeh_pe_reset_and_recover() from Gavin Shan
    - Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"
    from Guilherme G Piccoli
    - Remove the dependency on EEH struct in DDW mechanism from Guilherme
    G Piccoli

    selftests:
    - Test cp_abort during context switch from Chris Smart
    - Add several tests for transactional memory support from Rashmica
    Gupta

    perf:
    - Add support for sampling interrupt register state from Anju T
    - Add support for unwinding perf-stackdump from Chandan Kumar

    cxl:
    - Configure the PSL for two CAPI ports on POWER8NVL from Philippe
    Bergheaud
    - Allow initialization on timebase sync failures from Frederic Barrat
    - Increase timeout for detection of AFU mmio hang from Frederic
    Barrat
    - Handle num_of_processes larger than can fit in the SPA from Ian
    Munsie
    - Ensure PSL interrupt is configured for contexts with no AFU IRQs
    from Ian Munsie
    - Add kernel API to allow a context to operate with relocate disabled
    from Ian Munsie
    - Check periodically the coherent platform function's state from
    Christophe Lombard

    Freescale:
    - Updates from Scott: "Contains 86xx fixes, minor device tree fixes,
    an erratum workaround, and a kconfig dependency fix."

    * tag 'powerpc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (192 commits)
    powerpc/86xx: Fix PCI interrupt map definition
    powerpc/86xx: Move pci1 definition to the include file
    powerpc/fsl: Fix build of the dtb embedded kernel images
    powerpc/fsl: Fix rcpm compatible string
    powerpc/fsl: Remove FSL_SOC dependency from FSL_LBC
    powerpc/fsl-pci: Add a workaround for PCI 5 errata
    powerpc/fsl: Fix SPI compatible on t208xrdb and t1040rdb
    powerpc/powernv/npu: Add PE to PHB's list
    powerpc/powernv: Fix insufficient memory allocation
    powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism
    Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell"
    powerpc/eeh: Drop unnecessary label in eeh_pe_change_owner()
    powerpc/eeh: Ignore handlers in eeh_pe_reset_and_recover()
    powerpc/eeh: Restore initial state in eeh_pe_reset_and_recover()
    powerpc/eeh: Don't report error in eeh_pe_reset_and_recover()
    Revert "powerpc/powernv: Exclude root bus in pnv_pci_reset_secondary_bus()"
    powerpc/powernv/npu: Enable NVLink pass through
    powerpc/powernv/npu: Rework TCE Kill handling
    powerpc/powernv/npu: Add set/unset window helpers
    powerpc/powernv/ioda2: Export debug helper pe_level_printk()
    ...

    Linus Torvalds
     

01 May, 2016

1 commit


09 Apr, 2016

2 commits


02 Oct, 2014

1 commit


07 Apr, 2014

1 commit

  • Currently cpufreq frequency table has two fields: frequency and driver_data.
    driver_data is only for drivers' internal use and cpufreq core shouldn't use
    it at all. But with the introduction of BOOST frequencies, this assumption
    was broken and we started using it as a flag instead.

    There are two problems due to this:
    - It is against the description of this field, as driver's data is used by
    the core now.
    - if drivers fill it with -3 for any frequency, then those frequencies are
    never considered by cpufreq core as it is exactly same as value of
    CPUFREQ_BOOST_FREQ, i.e. ~2.

    The best way to get this fixed is by creating another field flags which
    will be used for such flags. This patch does that. Along with that various
    drivers need modifications due to the change of struct cpufreq_frequency_table.

    Reviewed-by: Gautham R Shenoy
    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

31 Oct, 2013

1 commit

  • Most of the drivers do following in their ->target_index() routines:

    struct cpufreq_freqs freqs;
    freqs.old = old freq...
    freqs.new = new freq...

    cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);

    /* Change rate here */

    cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);

    This is replicated over all cpufreq drivers today and there doesn't exists a
    good enough reason why this shouldn't be moved to cpufreq core instead.

    There are few special cases though, like exynos5440, which doesn't do everything
    on the call to ->target_index() routine and call some kind of bottom halves for
    doing this work, work/tasklet/etc..

    They may continue doing notification from their own code as flag:
    CPUFREQ_ASYNC_NOTIFICATION is already set for them.

    All drivers are also modified in this patch to avoid breaking 'git bisect', as
    double notification would happen otherwise.

    Acked-by: Hans-Christian Egtvedt
    Acked-by: Jesper Nilsson
    Acked-by: Linus Walleij
    Acked-by: Russell King
    Acked-by: Stephen Warren
    Tested-by: Andrew Lunn
    Tested-by: Nicolas Pitre
    Reviewed-by: Lan Tianyu
    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

26 Oct, 2013

1 commit

  • Currently, the prototype of cpufreq_drivers target routines is:

    int target(struct cpufreq_policy *policy, unsigned int target_freq,
    unsigned int relation);

    And most of the drivers call cpufreq_frequency_table_target() to get a valid
    index of their frequency table which is closest to the target_freq. And they
    don't use target_freq and relation after that.

    So, it makes sense to just do this work in cpufreq core before calling
    cpufreq_frequency_table_target() and simply pass index instead. But this can be
    done only with drivers which expose their frequency table with cpufreq core. For
    others we need to stick with the old prototype of target() until those drivers
    are converted to expose frequency tables.

    This patch implements the new light weight prototype for target_index() routine.
    It looks like this:

    int target_index(struct cpufreq_policy *policy, unsigned int index);

    CPUFreq core will call cpufreq_frequency_table_target() before calling this
    routine and pass index to it. Because CPUFreq core now requires to call routines
    present in freq_table.c CONFIG_CPU_FREQ_TABLE must be enabled all the time.

    This also marks target() interface as deprecated. So, that new drivers avoid
    using it. And Documentation is updated accordingly.

    It also converts existing .target() to newly defined light weight
    .target_index() routine for many driver.

    Acked-by: Hans-Christian Egtvedt
    Acked-by: Jesper Nilsson
    Acked-by: Linus Walleij
    Acked-by: Russell King
    Acked-by: David S. Miller
    Tested-by: Andrew Lunn
    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

16 Oct, 2013

3 commits


01 Oct, 2013

1 commit


23 Aug, 2013

1 commit

  • Pull DT/core/cpufreq cpu_ofnode updates for v3.12 from Sudeep KarkadaNagesha.

    * 'cpu_of_node' of git://linux-arm.org/linux-skn:
    cpufreq: pmac32-cpufreq: remove device tree parsing for cpu nodes
    cpufreq: pmac64-cpufreq: remove device tree parsing for cpu nodes
    cpufreq: maple-cpufreq: remove device tree parsing for cpu nodes
    cpufreq: arm_big_little: remove device tree parsing for cpu nodes
    cpufreq: kirkwood-cpufreq: remove device tree parsing for cpu nodes
    cpufreq: spear-cpufreq: remove device tree parsing for cpu nodes
    cpufreq: highbank-cpufreq: remove device tree parsing for cpu nodes
    cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes
    cpufreq: imx6q-cpufreq: remove device tree parsing for cpu nodes
    drivers/bus: arm-cci: avoid parsing DT for cpu device nodes
    ARM: mvebu: remove device tree parsing for cpu nodes
    ARM: topology: remove hwid/MPIDR dependency from cpu_capacity
    of/device: add helper to get cpu device node from logical cpu index
    driver/core: cpu: initialize of_node in cpu's device struture
    ARM: DT/kernel: define ARM specific arch_match_cpu_phys_id
    of: move of_get_cpu_node implementation to DT core library
    powerpc: refactor of_get_cpu_node to support other architectures
    openrisc: remove undefined of_get_cpu_node declaration
    microblaze: remove undefined of_get_cpu_node declaration

    Rafael J. Wysocki
     

21 Aug, 2013

1 commit


10 Aug, 2013

1 commit


07 Jun, 2013

1 commit