Skip to content

Commit

Permalink
Merge branch 'pm-cpufreq'
Browse files Browse the repository at this point in the history
* pm-cpufreq: (63 commits)
  intel_pstate: Clean up get_target_pstate_use_performance()
  intel_pstate: Use sample.core_avg_perf in get_avg_pstate()
  intel_pstate: Clarify average performance computation
  intel_pstate: Avoid unnecessary synchronize_sched() during initialization
  cpufreq: schedutil: Make default depend on CONFIG_SMP
  cpufreq: powernv: del_timer_sync when global and local pstate are equal
  cpufreq: powernv: Move smp_call_function_any() out of irq safe block
  intel_pstate: Clean up intel_pstate_get()
  cpufreq: schedutil: Make it depend on CONFIG_SMP
  cpufreq: governor: Fix handling of special cases in dbs_update()
  cpufreq: intel_pstate: Ignore _PPC processing under HWP
  cpufreq: arm_big_little: use generic OPP functions for {init, free}_opp_table
  cpufreq: tango: Use generic platdev driver
  cpufreq: Fix GOV_LIMITS handling for the userspace governor
  cpufreq: mvebu: Move cpufreq code into drivers/cpufreq/
  cpufreq: dt: Kill platform-data
  mvebu: Use dev_pm_opp_set_sharing_cpus() to mark OPP tables as shared
  cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2
  cpufreq: governor: Change confusing struct field and variable names
  cpufreq: intel_pstate: Enable PPC enforcement for servers
  ...
  • Loading branch information
rafaeljw committed May 16, 2016
2 parents 29cff18 + 1aa7a6e commit c47b3bd
Show file tree
Hide file tree
Showing 77 changed files with 2,248 additions and 1,049 deletions.
5 changes: 5 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1661,6 +1661,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
hwp_only
Only load intel_pstate on systems which support
hardware P state control (HWP) if available.
support_acpi_ppc
Enforce ACPI _PPC performance limits. If the Fixed ACPI
Description Table, specifies preferred power management
profile as "Enterprise Server" or "Performance Server",
then this feature is turned on by default.

intremap= [X86-64, Intel-IOMMU]
on enable Interrupt Remapping (default)
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,7 @@ F: drivers/rtc/rtc-armada38x.c
F: arch/arm/boot/dts/armada*
F: arch/arm/boot/dts/kirkwood*
F: arch/arm64/boot/dts/marvell/armada*
F: drivers/cpufreq/mvebu-cpufreq.c


ARM/Marvell Berlin SoC support
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-berlin/berlin.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,13 @@
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h>

static void __init berlin_init_late(void)
{
platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
}

static const char * const berlin_dt_compat[] = {
"marvell,berlin",
NULL,
};

DT_MACHINE_START(BERLIN_DT, "Marvell Berlin")
.dt_compat = berlin_dt_compat,
.init_late = berlin_init_late,
/*
* with DT probing for L2CCs, berlin_init_machine can be removed.
* Note: 88DE3005 (Armada 1500-mini) uses pl310 l2cc
Expand Down
29 changes: 0 additions & 29 deletions arch/arm/mach-exynos/exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,33 +213,6 @@ static void __init exynos_init_irq(void)
exynos_map_pmu();
}

static const struct of_device_id exynos_cpufreq_matches[] = {
{ .compatible = "samsung,exynos3250", .data = "cpufreq-dt" },
{ .compatible = "samsung,exynos4210", .data = "cpufreq-dt" },
{ .compatible = "samsung,exynos4212", .data = "cpufreq-dt" },
{ .compatible = "samsung,exynos4412", .data = "cpufreq-dt" },
{ .compatible = "samsung,exynos5250", .data = "cpufreq-dt" },
#ifndef CONFIG_BL_SWITCHER
{ .compatible = "samsung,exynos5420", .data = "cpufreq-dt" },
{ .compatible = "samsung,exynos5800", .data = "cpufreq-dt" },
#endif
{ /* sentinel */ }
};

static void __init exynos_cpufreq_init(void)
{
struct device_node *root = of_find_node_by_path("/");
const struct of_device_id *match;

match = of_match_node(exynos_cpufreq_matches, root);
if (!match) {
platform_device_register_simple("exynos-cpufreq", -1, NULL, 0);
return;
}

platform_device_register_simple(match->data, -1, NULL, 0);
}

static void __init exynos_dt_machine_init(void)
{
/*
Expand All @@ -262,8 +235,6 @@ static void __init exynos_dt_machine_init(void)
of_machine_is_compatible("samsung,exynos5250"))
platform_device_register(&exynos_cpuidle);

exynos_cpufreq_init();

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

Expand Down
10 changes: 0 additions & 10 deletions arch/arm/mach-imx/imx27-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@
#include "common.h"
#include "mx27.h"

static void __init imx27_dt_init(void)
{
struct platform_device_info devinfo = { .name = "cpufreq-dt", };

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

platform_device_register_full(&devinfo);
}

static const char * const imx27_dt_board_compat[] __initconst = {
"fsl,imx27",
NULL
Expand All @@ -36,6 +27,5 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
.map_io = mx27_map_io,
.init_early = imx27_init_early,
.init_irq = mx27_init_irq,
.init_machine = imx27_dt_init,
.dt_compat = imx27_dt_board_compat,
MACHINE_END
3 changes: 0 additions & 3 deletions arch/arm/mach-imx/mach-imx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ static void __init imx51_ipu_mipi_setup(void)

static void __init imx51_dt_init(void)
{
struct platform_device_info devinfo = { .name = "cpufreq-dt", };

imx51_ipu_mipi_setup();
imx_src_init();

of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
platform_device_register_full(&devinfo);
}

static void __init imx51_init_late(void)
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-imx/mach-imx53.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ static void __init imx53_dt_init(void)
static void __init imx53_init_late(void)
{
imx53_pm_init();

platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
}

static const char * const imx53_dt_board_compat[] __initconst = {
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-imx/mach-imx7d.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,13 @@ static void __init imx7d_init_irq(void)
irqchip_init();
}

static void __init imx7d_init_late(void)
{
platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
}

static const char *const imx7d_dt_compat[] __initconst = {
"fsl,imx7d",
NULL,
};

DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)")
.init_irq = imx7d_init_irq,
.init_late = imx7d_init_late,
.init_machine = imx7d_init_machine,
.dt_compat = imx7d_dt_compat,
MACHINE_END
85 changes: 0 additions & 85 deletions arch/arm/mach-mvebu/pmsu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include <linux/clk.h>
#include <linux/cpu_pm.h>
#include <linux/cpufreq-dt.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/io.h>
Expand All @@ -29,7 +28,6 @@
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_opp.h>
#include <linux/resource.h>
#include <linux/slab.h>
#include <linux/smp.h>
Expand Down Expand Up @@ -608,86 +606,3 @@ int mvebu_pmsu_dfs_request(int cpu)

return 0;
}

struct cpufreq_dt_platform_data cpufreq_dt_pd = {
.independent_clocks = true,
};

static int __init armada_xp_pmsu_cpufreq_init(void)
{
struct device_node *np;
struct resource res;
int ret, cpu;

if (!of_machine_is_compatible("marvell,armadaxp"))
return 0;

/*
* In order to have proper cpufreq handling, we need to ensure
* that the Device Tree description of the CPU clock includes
* the definition of the PMU DFS registers. If not, we do not
* register the clock notifier and the cpufreq driver. This
* piece of code is only for compatibility with old Device
* Trees.
*/
np = of_find_compatible_node(NULL, NULL, "marvell,armada-xp-cpu-clock");
if (!np)
return 0;

ret = of_address_to_resource(np, 1, &res);
if (ret) {
pr_warn(FW_WARN "not enabling cpufreq, deprecated armada-xp-cpu-clock binding\n");
of_node_put(np);
return 0;
}

of_node_put(np);

/*
* For each CPU, this loop registers the operating points
* supported (which are the nominal CPU frequency and half of
* it), and registers the clock notifier that will take care
* of doing the PMSU part of a frequency transition.
*/
for_each_possible_cpu(cpu) {
struct device *cpu_dev;
struct clk *clk;
int ret;

cpu_dev = get_cpu_device(cpu);
if (!cpu_dev) {
pr_err("Cannot get CPU %d\n", cpu);
continue;
}

clk = clk_get(cpu_dev, 0);
if (IS_ERR(clk)) {
pr_err("Cannot get clock for CPU %d\n", cpu);
return PTR_ERR(clk);
}

/*
* In case of a failure of dev_pm_opp_add(), we don't
* bother with cleaning up the registered OPP (there's
* no function to do so), and simply cancel the
* registration of the cpufreq device.
*/
ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk), 0);
if (ret) {
clk_put(clk);
return ret;
}

ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk) / 2, 0);
if (ret) {
clk_put(clk);
return ret;
}
}

platform_device_register_data(NULL, "cpufreq-dt", -1,
&cpufreq_dt_pd, sizeof(cpufreq_dt_pd));
return 0;
}

device_initcall(armada_xp_pmsu_cpufreq_init);
7 changes: 2 additions & 5 deletions arch/arm/mach-omap2/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,10 @@ static void __init omap4_init_voltages(void)

static inline void omap_init_cpufreq(void)
{
struct platform_device_info devinfo = { };
struct platform_device_info devinfo = { .name = "omap-cpufreq" };

if (!of_have_populated_dt())
devinfo.name = "omap-cpufreq";
else
devinfo.name = "cpufreq-dt";
platform_device_register_full(&devinfo);
platform_device_register_full(&devinfo);
}

static int __init omap2_common_pm_init(void)
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-rockchip/rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ static void __init rockchip_dt_init(void)
{
rockchip_suspend_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
platform_device_register_simple("cpufreq-dt", 0, NULL, 0);
}

static const char * const rockchip_board_dt_compat[] = {
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-shmobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o

# PM objects
obj-$(CONFIG_SUSPEND) += suspend.o
obj-$(CONFIG_CPU_FREQ) += cpufreq.o
obj-$(CONFIG_PM_RCAR) += pm-rcar.o
obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o
obj-$(CONFIG_ARCH_RCAR_GEN2) += pm-rcar-gen2.o
Expand Down
7 changes: 0 additions & 7 deletions arch/arm/mach-shmobile/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,9 @@ static inline int shmobile_suspend_init(void) { return 0; }
static inline void shmobile_smp_apmu_suspend_init(void) { }
#endif

#ifdef CONFIG_CPU_FREQ
int shmobile_cpufreq_init(void);
#else
static inline int shmobile_cpufreq_init(void) { return 0; }
#endif

static inline void __init shmobile_init_late(void)
{
shmobile_suspend_init();
shmobile_cpufreq_init();
}

#endif /* __ARCH_MACH_COMMON_H */
19 changes: 0 additions & 19 deletions arch/arm/mach-shmobile/cpufreq.c

This file was deleted.

9 changes: 0 additions & 9 deletions arch/arm/mach-sunxi/sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@

#include <asm/mach/arch.h>

static void __init sunxi_dt_cpufreq_init(void)
{
platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
}

static const char * const sunxi_board_dt_compat[] = {
"allwinner,sun4i-a10",
"allwinner,sun5i-a10s",
Expand All @@ -32,7 +27,6 @@ static const char * const sunxi_board_dt_compat[] = {

DT_MACHINE_START(SUNXI_DT, "Allwinner sun4i/sun5i Families")
.dt_compat = sunxi_board_dt_compat,
.init_late = sunxi_dt_cpufreq_init,
MACHINE_END

static const char * const sun6i_board_dt_compat[] = {
Expand All @@ -53,7 +47,6 @@ static void __init sun6i_timer_init(void)
DT_MACHINE_START(SUN6I_DT, "Allwinner sun6i (A31) Family")
.init_time = sun6i_timer_init,
.dt_compat = sun6i_board_dt_compat,
.init_late = sunxi_dt_cpufreq_init,
MACHINE_END

static const char * const sun7i_board_dt_compat[] = {
Expand All @@ -63,7 +56,6 @@ static const char * const sun7i_board_dt_compat[] = {

DT_MACHINE_START(SUN7I_DT, "Allwinner sun7i (A20) Family")
.dt_compat = sun7i_board_dt_compat,
.init_late = sunxi_dt_cpufreq_init,
MACHINE_END

static const char * const sun8i_board_dt_compat[] = {
Expand All @@ -77,7 +69,6 @@ static const char * const sun8i_board_dt_compat[] = {
DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family")
.init_time = sun6i_timer_init,
.dt_compat = sun8i_board_dt_compat,
.init_late = sunxi_dt_cpufreq_init,
MACHINE_END

static const char * const sun9i_board_dt_compat[] = {
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-zynq/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ static void __init zynq_init_late(void)
*/
static void __init zynq_init_machine(void)
{
struct platform_device_info devinfo = { .name = "cpufreq-dt", };
struct soc_device_attribute *soc_dev_attr;
struct soc_device *soc_dev;
struct device *parent = NULL;
Expand Down Expand Up @@ -145,7 +144,6 @@ static void __init zynq_init_machine(void)
of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);

platform_device_register(&zynq_cpuidle_device);
platform_device_register_full(&devinfo);
}

static void __init zynq_timer_init(void)
Expand Down
Loading

0 comments on commit c47b3bd

Please sign in to comment.