aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpufreq
AgeCommit message (Collapse)AuthorFilesLines
2020-03-26cpufreq: intel_pstate: Select schedutil as the default governorRafael J. Wysocki2-1/+4
Modify cpufreq Kconfig to select schedutil as the default governor if the intel_pstate driver has been selected and SMP support is enabled (because schedutil depends on SMP). Also select schedutil as well as the performance governor from the intel_pstate Kconfig section to ensure the equivalence of the passive and active mode governor configuration options. Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-03-26cpufreq: intel_pstate: Simplify intel_pstate_cpu_init()Rafael J. Wysocki1-4/+5
The initial policy value set by intel_pstate_cpu_init() depends on whether or not CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is set, but that is not necessary, because the core will set the policy to "performance" in cpufreq_init_policy() if the default governor is "performance" anyway. Accordingly, change intel_pstate_cpu_init() to always set policy to CPUFREQ_POLICY_POWERSAVE initially to provide a valid fallback value to cpufreq_init_policy() in case the default cpufreq governor is neither "powersave" nor "performance". Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-03-25Merge branch 'x86/cpu' into perf/core, to resolve conflictIngo Molnar15-73/+61
Conflicts: arch/x86/events/intel/uncore.c Signed-off-by: Ingo Molnar <[email protected]>
2020-03-25cpufreq/intel_pstate: Fix wrong macro conversionThomas Gleixner1-1/+1
The feature flag hwp_support_ids are supposed to match on is X86_FEATURE_HWP, not X86_FEATURE_APERFMPERF. Fix it. [ bp: Write commit message. ] Fixes: b11d77fa300d ("cpufreq: Convert to new X86 CPU match macros") Reported-by: kernel test robot <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/20200324060124.GC11705@shao2-debian
2020-03-25cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fnPratik Rajesh Sampat1-5/+8
The patch avoids allocating cpufreq_policy on stack hence fixing frame size overflow in 'powernv_cpufreq_work_fn' Fixes: 227942809b52 ("cpufreq: powernv: Restore cpu frequency to policy->cur on unthrottling") Signed-off-by: Pratik Rajesh Sampat <[email protected]> Reviewed-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-03-24cpufreq: Convert to new X86 CPU match macrosThomas Gleixner15-73/+59
The new macro set has a consistent namespace and uses C99 initializers instead of the grufty C89 ones. Get rid the of most local macro wrappers for consistency. The ones which make sense for readability are renamed to X86_MATCH*. In the centrino driver this also removes the two extra duplicates of family 6 model 13 which have no value at all. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2020-03-24x86/devicetable: Move x86 specific macro out of generic codeThomas Gleixner2-0/+2
There is no reason that this gunk is in a generic header file. The wildcard defines need to stay as they are required by file2alias. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2020-03-23Merge branch 'cpufreq/arm/linux-next' of ↵Rafael J. Wysocki8-48/+249
git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq drivers updates for v5.7 from Viresh Kumar: "This pull request contains: - update to imx cpufreq drivers to improve their support (Anson Huang, Christoph Niedermaier, and Peng Fan). - Update to qcom cpufreq to support other krait based SoCs (Ansuel Smith). - Update ti cpufreq driver to support OPP_PLUS (Lokesh Vutla). - Update cpufreq-dt driver to allow platfoem specific intermediate callbacks (Peng Fan)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: qcom: Add support for krait based socs cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handling cpufreq: dt: Allow platform specific intermediate callbacks cpufreq: imx-cpufreq-dt: Correct i.MX8MP's market segment fuse location cpufreq: imx6q: read OCOTP through nvmem for imx6q cpufreq: imx6q: fix error handling cpufreq: imx-cpufreq-dt: Add "cpu-supply" property check cpufreq: ti-cpufreq: Add support for OPP_PLUS cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL
2020-03-20cpufreq: qcom: Add support for krait based socsAnsuel Smith3-17/+181
In Certain QCOM SoCs like ipq8064, apq8064, msm8960, msm8974 that has KRAIT processors the voltage/current value of each OPP varies based on the silicon variant in use. The required OPP related data is determined based on the efuse value. This is similar to the existing code for kryo cores. So adding support for krait cores here. Signed-off-by: Sricharan R <[email protected]> Signed-off-by: Ansuel Smith <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-03-17cpufreq: imx6q-cpufreq: Improve the logic of -EPROBE_DEFER handlingAnson Huang1-5/+3
Improve the -EPROBE_DEFER handling logic to simplify the code. Signed-off-by: Anson Huang <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-03-14cpufreq: Use scnprintf() for avoiding potential buffer overflowTakashi Iwai1-7/+7
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-03-14cpufreq: intel_pstate: Consolidate policy verificationRafael J. Wysocki1-9/+8
There is still some code duplication between intel_pstate_verify_policy() and intel_cpufreq_verify_policy(), so avoid it by moving the common code into a separate function and calling it from both these places. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-03-13cpufreq: powernv: Fix unsafe notifiersOliver O'Halloran1-6/+5
The PowerNV cpufreq driver registers two notifiers: one to catch throttle messages from the OCC and one to bump the CPU frequency back to normal before a reboot. Both require the cpufreq driver to be registered in order to function since the notifier callbacks use various cpufreq_*() functions. Right now we register both notifiers before we've initialised the driver. This seems to work, but we should head off any protential problems by registering the notifiers after the driver is initialised. Signed-off-by: Oliver O'Halloran <[email protected]> Reviewed-by: Gautham R. Shenoy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-03-13cpufreq: powernv: Fix use-after-freeOliver O'Halloran1-0/+6
The cpufreq driver has a use-after-free that we can hit if: a) There's an OCC message pending when the notifier is registered, and b) The cpufreq driver fails to register with the core. When a) occurs the notifier schedules a workqueue item to handle the message. The backing work_struct is located on chips[].throttle and when b) happens we clean up by freeing the array. Once we get to the (now free) queued item and the kernel crashes. Fixes: c5e29ea7ac14 ("cpufreq: powernv: Fix bugs in powernv_cpufreq_{init/exit}") Cc: [email protected] # v4.6+ Signed-off-by: Oliver O'Halloran <[email protected]> Reviewed-by: Gautham R. Shenoy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-03-12cpufreq: dt: Allow platform specific intermediate callbacksPeng Fan2-0/+8
Platforms may need to implement platform specific get_intermediate and target_intermediate hooks. Update cpufreq-dt driver's platform data to contain those for such platforms. Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-03-11cpufreq: imx-cpufreq-dt: Correct i.MX8MP's market segment fuse locationAnson Huang1-1/+9
i.MX8MP's market segment fuse field is bit[6:5], correct it. Fixes: 83fe39ad0a48 ("cpufreq: imx-cpufreq-dt: Add i.MX8MP support") Signed-off-by: Anson Huang <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-03-06cpufreq: add function to get the hardware max frequencyIonela Voinescu1-0/+20
Add weak function to return the hardware maximum frequency of a CPU, with the default implementation returning cpuinfo.max_freq, which is the best information we can generically get from the cpufreq framework. The default can be overwritten by a strong function in platforms that want to provide an alternative implementation, with more accurate information, obtained either from hardware or firmware. Signed-off-by: Ionela Voinescu <[email protected]> Reviewed-by: Valentin Schneider <[email protected]> Acked-by: Viresh Kumar <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
2020-03-06Merge branch 'linus' into sched/core, to pick up fixesIngo Molnar1-2/+10
Signed-off-by: Ingo Molnar <[email protected]>
2020-03-05docs: cpufreq: fix a broken referenceMauro Carvalho Chehab1-1/+1
The old cpufreq docs got moved. Let's also update its pointer inside Kconfig.x86. Fixes: 03b22496502d ("Documentation: cpufreq: Move legacy driver documentation") Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-03-03cpufreq: imx6q: read OCOTP through nvmem for imx6qPeng Fan1-29/+38
Directly accessing OCOTP registers should be avoided, because it could not handle OCOTP clks and could not handle defer proper. With nvmem API, it is safe to access OCOTP registers. To make sure old dtb could work, the original code still kept. Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-03-03cpufreq: imx6q: fix error handlingPeng Fan1-4/+5
When speed checking failed, direclty jumping to put_node label is not correct. Need jump to out_free_opp to avoid resources leak. Fixes: 2733fb0d0699 ("cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull") Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-02-27cpufreq: Fix policy initialization for internal governor driversRafael J. Wysocki1-2/+10
Before commit 1e4f63aecb53 ("cpufreq: Avoid creating excessively large stack frames") the initial value of the policy field in struct cpufreq_policy set by the driver's ->init() callback was implicitly passed from cpufreq_init_policy() to cpufreq_set_policy() if the default governor was neither "performance" nor "powersave". After that commit, however, cpufreq_init_policy() must take that case into consideration explicitly and handle it as appropriate, so make that happen. Fixes: 1e4f63aecb53 ("cpufreq: Avoid creating excessively large stack frames") Link: https://lore.kernel.org/linux-pm/[email protected]/ Reported-by: Artem Bityutskiy <[email protected]> Cc: 5.4+ <[email protected]> # 5.4+ Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Viresh Kumar <[email protected]>
2020-02-24Merge tag 'v5.6-rc3' into sched/core, to pick up fixes and dependent patchesIngo Molnar19-132/+144
Signed-off-by: Ingo Molnar <[email protected]>
2020-02-17cpufreq: imx-cpufreq-dt: Add "cpu-supply" property checkAnson Huang1-0/+3
The cpufreq-dt driver allows cpufreq driver enabled without valid regulator assigned, however, all i.MX platforms using cpufreq-dt driver now require valid regulator, add "cpu-supply" property check to avoid i.MX platforms' cpufreq enabled without valid regulator and lead to system unstable. Signed-off-by: Anson Huang <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-02-14Merge branch 'pm-cpufreq'Rafael J. Wysocki1-3/+2
* pm-cpufreq: cpufreq: Make cpufreq_global_kobject static
2020-02-12cpufreq: ti-cpufreq: Add support for OPP_PLUSLokesh Vutla1-0/+7
DRA762 SoC introduces OPP_PLUS which runs at 1.8GHz. Add support for this OPP in ti-cpufreq driver. Acked-by: Dave Gerlach <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-02-12cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULLChristoph Niedermaier1-0/+3
imx6ul_opp_check_speed_grading is called for both i.MX6UL and i.MX6ULL. Since the i.MX6ULL was introduced to a separate ocotp compatible node later, it is possible that the i.MX6ULL has also dtbs with "fsl,imx6ull-ocotp". On a system without nvmem-cell speed grade a missing check on this node causes a driver fail without considering the cpu speed grade. This patch prevents unwanted cpu overclocking on i.MX6ULL with compatible node "fsl,imx6ull-ocotp" in old dtbs without nvmem-cell speed grade. Fixes: 2733fb0d0699 ("cpufreq: imx6q: read OCOTP through nvmem for imx6ul/imx6ull") Signed-off-by: Christoph Niedermaier <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-02-08Merge tag 'armsoc-drivers' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC-related driver updates from Olof Johansson: "Various driver updates for platforms: - Nvidia: Fuse support for Tegra194, continued memory controller pieces for Tegra30 - NXP/FSL: Refactorings of QuickEngine drivers to support ARM/ARM64/PPC - NXP/FSL: i.MX8MP SoC driver pieces - TI Keystone: ring accelerator driver - Qualcomm: SCM driver cleanup/refactoring + support for new SoCs. - Xilinx ZynqMP: feature checking interface for firmware. Mailbox communication for power management - Overall support patch set for cpuidle on more complex hierarchies (PSCI-based) and misc cleanups, refactorings of Marvell, TI, other platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (166 commits) drivers: soc: xilinx: Use mailbox IPI callback dt-bindings: power: reset: xilinx: Add bindings for ipi mailbox drivers: soc: ti: knav_qmss_queue: Pass lockdep expression to RCU lists MAINTAINERS: Add brcmstb PCIe controller entry soc/tegra: fuse: Unmap registers once they are not needed anymore soc/tegra: fuse: Correct straps' address for older Tegra124 device trees soc/tegra: fuse: Warn if straps are not ready soc/tegra: fuse: Cache values of straps and Chip ID registers memory: tegra30-emc: Correct error message for timed out auto calibration memory: tegra30-emc: Firm up hardware programming sequence memory: tegra30-emc: Firm up suspend/resume sequence soc/tegra: regulators: Do nothing if voltage is unchanged memory: tegra: Correct reset value of xusb_hostr soc/tegra: fuse: Add APB DMA dependency for Tegra20 bus: tegra-aconnect: Remove PM_CLK dependency dt-bindings: mediatek: add MT6765 power dt-bindings soc: mediatek: cmdq: delete not used define memory: tegra: Add support for the Tegra194 memory controller memory: tegra: Only include support for enabled SoCs memory: tegra: Support DVFS on Tegra186 and later ...
2020-02-03cpufreq: Make cpufreq_global_kobject staticYangtao Li1-3/+2
The cpufreq_global_kobject is only used internally by cpufreq.c after commit 2361be236662 ("cpufreq: Don't create empty /sys/devices/system/cpu/cpufreq directory"). Make it static. Signed-off-by: Yangtao Li <[email protected]> [ rjw: Add empty line after cpufreq_global_kobject definition ] Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-01-31Merge tag 'pm-5.6-rc1-2' of ↵Linus Torvalds10-111/+96
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power manadement updates from Rafael Wysocki: "Prevent cpufreq from creating excessively large stack frames and fix the handling of devices deleted during system-wide resume in the PM core (Rafael Wysocki), revert a problematic commit affecting the cpupower utility and correct its man page (Thomas Renninger, Brahadambal Srinivasan), and improve the intel_pstate_tracer utility (Doug Smythies)" * tag 'pm-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools/power/x86/intel_pstate_tracer: change several graphs to autoscale y-axis tools/power/x86/intel_pstate_tracer: changes for python 3 compatibility Correction to manpage of cpupower cpufreq: Avoid creating excessively large stack frames PM: core: Fix handling of devices deleted during system-wide resume cpupower: Revert library ABI changes from commit ae2917093fb60bdc1ed3e
2020-01-28x86/intel_pstate: Handle runtime turbo disablement/enablement in frequency ↵Giovanni Gherdovich1-0/+1
invariance On some platforms such as the Dell XPS 13 laptop the firmware disables turbo when the machine is disconnected from AC, and viceversa it enables it again when it's reconnected. In these cases a _PPC ACPI notification is issued. The scheduler needs to know freq_max for frequency-invariant calculations. To account for turbo availability to come and go, record freq_max at boot as if turbo was available and store it in a helper variable. Use a setter function to swap between freq_base and freq_max every time turbo goes off or on. Signed-off-by: Giovanni Gherdovich <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2020-01-27Merge tag 'ioremap-5.6' of git://git.infradead.org/users/hch/ioremapLinus Torvalds1-1/+1
Pull ioremap updates from Christoph Hellwig: "Remove the ioremap_nocache API (plus wrappers) that are always identical to ioremap" * tag 'ioremap-5.6' of git://git.infradead.org/users/hch/ioremap: remove ioremap_nocache and devm_ioremap_nocache MIPS: define ioremap_nocache to ioremap
2020-01-27cpufreq: Avoid creating excessively large stack framesRafael J. Wysocki10-111/+96
In the process of modifying a cpufreq policy, the cpufreq core makes a copy of it including all of the internals which is stored on the CPU stack. Because struct cpufreq_policy is relatively large, this may cause the size of the stack frame to exceed the 2 KB limit and so the GCC complains when -Wframe-larger-than= is used. In fact, it is not necessary to copy the entire policy structure in order to modify it, however. First, because cpufreq_set_policy() obtains the min and max policy limits from frequency QoS now, it is not necessary to pass the limits to it from the callers. The only things that need to be passed to it from there are the new governor pointer or (if there is a built-in governor in the driver) the "policy" value representing the governor choice. They both can be passed as individual arguments, though, so make cpufreq_set_policy() take them this way and rework its callers accordingly. This avoids making copies of cpufreq policies in the callers of cpufreq_set_policy(). Second, cpufreq_set_policy() still needs to pass the new policy data to the ->verify() callback of the cpufreq driver whose task is to sanitize the min and max policy limits. It still does not need to make a full copy of struct cpufreq_policy for this purpose, but it needs to pass a few items from it to the driver in case they are needed (different drivers have different needs in that respect and all of them have to be covered). For this reason, introduce struct cpufreq_policy_data to hold copies of the members of struct cpufreq_policy used by the existing ->verify() driver callbacks and pass a pointer to a temporary structure of that type to ->verify() (instead of passing a pointer to full struct cpufreq_policy to it). While at it, notice that intel_pstate and longrun don't really need to verify the "policy" value in struct cpufreq_policy, so drop those check from them to avoid copying "policy" into struct cpufreq_policy_data (which allows it to be slightly smaller). Also while at it fix up white space in a couple of places and make cpufreq_set_policy() static (as it can be so). Fixes: 3000ce3c52f8 ("cpufreq: Use per-policy frequency QoS") Link: https://lore.kernel.org/linux-pm/CAMuHMdX6-jb1W8uC2_237m8ctCpsnGp=JCxqt8pCWVqNXHmkVg@mail.gmail.com Reported-by: kbuild test robot <[email protected]> Reported-by: Geert Uytterhoeven <[email protected]> Cc: 5.4+ <[email protected]> # 5.4+ Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Viresh Kumar <[email protected]>
2020-01-27Merge branch 'cpufreq/arm/linux-next' of ↵Rafael J. Wysocki7-10/+30
git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq material for v5.6 from Viresh Kumar: "This contains: - Update to imx cpufreq driver to add support for i.MX8MP platform. - Blacklists few NVIDIA SoCs from cpufreq-dt-platdev layer. - Convertion of few platform drivers to use devm_platform_ioremap_resource(). - Fixed refcount imbalance in few drivers." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: brcmstb-avs: fix imbalance of cpufreq policy refcount cpufreq: s3c: fix unbalances of cpufreq policy refcount cpufreq: imx-cpufreq-dt: Add i.MX8MP support cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading cpufreq: tegra186: convert to devm_platform_ioremap_resource cpufreq: kirkwood: convert to devm_platform_ioremap_resource
2020-01-23cpufreq: loongson2_cpufreq: adjust cpufreq uses of LOONGSON_CHIPCFGAlexandre Oliva1-3/+5
The post-fork cleanup of loongson2ef from loongson64 changed LOONGSON_CHIPCFG from a single-argument functional macro to a non-functional macro with an mmio address in loongson2ef, but loongson2_cpufreq still uses the notation of a functional macro call expecting it to be an lvalue. Fixed based on loongson_suspend_enter. Signed-off-by: Alexandre Oliva <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-01-20cpufreq: brcmstb-avs: fix imbalance of cpufreq policy refcountchenqiwu1-0/+2
brcm_avs_cpufreq_get() calls cpufreq_cpu_get() to get the cpufreq policy, meanwhile, it also increments the kobject reference count to mark it busy. However, a corresponding call of cpufreq_cpu_put() is ignored to decrement the kobject reference count back, which may lead to a potential stuck risk that the cpuhp thread deadly waits for dropping of kobject refcount when cpufreq policy free. With this patch, the cpuhp thread can be easily exercised by attempting to force an unbind of the CPUfreq driver. Signed-off-by: chenqiwu <[email protected]> [ Viresh: Dropped !policy check ] Signed-off-by: Viresh Kumar <[email protected]>
2020-01-13cpufreq: intel_pstate: fix spelling mistake: "Whethet" -> "Whether"Harry Pan1-1/+1
Fix a spelling typo in the comment, no function change. Signed-off-by: Harry Pan <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2020-01-13Merge back cpufreq fixes for v5.6.Rafael J. Wysocki1-2/+6
2020-01-08Merge tag 'cpuidle_psci-v5.5-rc4' of ↵Olof Johansson1-1/+1
git://git.linaro.org/people/ulf.hansson/linux-pm into arm/drivers Initial support for hierarchical CPU arrangement, managed by PSCI and its corresponding cpuidle driver. This support is based upon using the generic PM domain, which already supports devices belonging to CPUs. Finally, these is a DTS patch that enables the hierarchical topology to be used for the Qcom 410c Dragonboard, which supports the PSCI OS-initiated mode. * tag 'cpuidle_psci-v5.5-rc4' of git://git.linaro.org/people/ulf.hansson/linux-pm: (611 commits) arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 cpuidle: psci: Add support for PM domains by using genpd PM / Domains: Introduce a genpd OF helper that removes a subdomain cpuidle: psci: Support CPU hotplug for the hierarchical model cpuidle: psci: Manage runtime PM in the idle path cpuidle: psci: Prepare to use OS initiated suspend mode via PM domains cpuidle: psci: Attach CPU devices to their PM domains cpuidle: psci: Add a helper to attach a CPU to its PM domain cpuidle: psci: Support hierarchical CPU idle states cpuidle: psci: Simplify OF parsing of CPU idle state nodes cpuidle: dt: Support hierarchical CPU idle states of: base: Add of_get_cpu_state_node() to get idle states for a CPU node firmware: psci: Export functions to manage the OSI mode dt: psci: Update DT bindings to support hierarchical PSCI states cpuidle: psci: Align psci_power_state count with idle state count Linux 5.5-rc4 locks: print unsigned ino in /proc/locks riscv: export flush_icache_all to modules riscv: reject invalid syscalls below -1 riscv: fix compile failure with EXPORT_SYMBOL() & !MMU ... Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Olof Johansson <[email protected]>
2020-01-07Merge branch 'cpufreq/arm/fixes' of ↵Rafael J. Wysocki1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq driver fix for v5.5-rc6 from Viresh Kumar: "Blacklist Tegra20/30 for probing by cpufreq-dt driver." * 'cpufreq/arm/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs
2020-01-07cpufreq: s3c: fix unbalances of cpufreq policy refcountchenqiwu2-2/+21
The cpufreq_reboot_notifier_evt() call cpufreq_cpu_get() to get the cpufreq policy of cpu0, meanwhile, it also increments the kobject reference count to mark it busy. However, a corresponding call of cpufreq_cpu_put() is ignored to decrement the kobject reference count back, which may lead to a potential stuck risk that the cpuhp thread deadly waits for dropping of kobject refcount when cpufreq policy free. With this patch, the cpuhp thread can be easily exercised by attempting to force an unbind of the CPUfreq driver. Signed-off-by: chenqiwu <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-01-07cpufreq: imx-cpufreq-dt: Add i.MX8MP supportAnson Huang1-2/+4
Add i.MX8MP cpufreq DT support for speed grading and market segment check. Reviewed-by: Abel Vesa <[email protected]> Signed-off-by: Anson Huang <[email protected]> [ Viresh: Minor formatting fixes ] Signed-off-by: Viresh Kumar <[email protected]>
2020-01-07cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed gradingAnson Huang1-0/+1
Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle speed grading bits just like other i.MX8M SoCs. Signed-off-by: Anson Huang <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-01-07cpufreq: tegra186: convert to devm_platform_ioremap_resourceYangtao Li1-3/+1
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-01-07cpufreq: kirkwood: convert to devm_platform_ioremap_resourceYangtao Li1-3/+1
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
2020-01-06remove ioremap_nocache and devm_ioremap_nocacheChristoph Hellwig1-1/+1
ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2019-12-29cpufreq: CPPC: put ACPI table after using itHanjun Guo1-0/+2
Put the ACPI table to release the table mapping after using it successfully. Signed-off-by: Hanjun Guo <[email protected]> [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki <[email protected]>
2019-12-29cpufreq : CPPC: Break out if HiSilicon CPPC workaround is matchedHanjun Guo1-2/+4
Bail out if we match the OEM information, to save some possible extra iteration. Also update the code to fix minor coding style issue. Signed-off-by: Hanjun Guo <[email protected]> [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki <[email protected]>
2019-12-24cpufreq: scmi: Match scmi device by both name and protocol idSudeep Holla1-1/+1
The scmi bus now has support to match the driver with devices not only based on their protocol id but also based on their device name if one is available. This was added to cater the need to support multiple devices and drivers for the same protocol. Let us add the name "cpufreq" to scmi_device_id table in the driver so that in matches only with device with the same name and protocol id SCMI_PROTOCOL_PERF. This will help to add "devfreq" device/driver. Cc: "Rafael J. Wysocki" <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
2019-12-16cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCsDmitry Osipenko1-0/+2
Both NVIDIA Tegra20 and Tegra30 SoCs should be blacklisted because CPU OPPs use supported_hw and thus platdev isn't suitable for these SoCs. Currently cpufreq-dt driver produces a bit annoying warning splats during boot because valid OPPs are not found, this will be fixed once tegra20-cpufreq driver will be update to support cpufreq-dt. The warnings will also happen on older stable kernels using newer device-trees, thus this patch should be backported to stable kernels as well. Cc: <[email protected]> Reported-by: Jon Hunter <[email protected]> Fixes: 4053aa65c517 ("ARM: tegra: cardhu-a04: Add CPU Operating Performance Points") Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>