Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2b874f5 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpu_pm: Add level to the cluster pm notification" into msm-4.8

parents 0d834459 de7c75eb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -36,11 +36,11 @@ static int highbank_suspend_finish(unsigned long val)
static int highbank_pm_enter(suspend_state_t state)
{
	cpu_pm_enter();
	cpu_cluster_pm_enter();
	cpu_cluster_pm_enter(0);

	cpu_suspend(0, highbank_suspend_finish);

	cpu_cluster_pm_exit();
	cpu_cluster_pm_exit(0);
	cpu_pm_exit();

	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
		 * to save GIC and wakeupgen context.
		 */
		if (mpuss_can_lose_context)
			cpu_cluster_pm_enter();
			cpu_cluster_pm_enter(0);
	}

	omap4_enter_lowpower(dev->cpu, cx->cpu_state);
@@ -165,7 +165,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
	 * to restore GIC and wakeupgen context.
	 */
	if (dev->cpu == 0 && mpuss_can_lose_context)
		cpu_cluster_pm_exit();
		cpu_cluster_pm_exit(0);

	tick_broadcast_exit();

+2 −2
Original line number Diff line number Diff line
@@ -192,13 +192,13 @@ void tegra_idle_lp2_last(void)
{
	tegra_pm_set(TEGRA_SUSPEND_LP2);

	cpu_cluster_pm_enter();
	cpu_cluster_pm_enter(0);
	suspend_cpu_complex();

	cpu_suspend(PHYS_OFFSET - PAGE_OFFSET, &tegra_sleep_cpu);

	restore_cpu_complex();
	cpu_cluster_pm_exit();
	cpu_cluster_pm_exit(0);
}

enum tegra_suspend_mode tegra_pm_validate_suspend_mode(
+13 −3
Original line number Diff line number Diff line
@@ -710,7 +710,8 @@ void gic_cpu_restore(struct gic_chip_data *gic)
	gic_cpu_if_up(gic);
}

static int gic_notifier(struct notifier_block *self, unsigned long cmd,	void *v)
static int gic_notifier(struct notifier_block *self, unsigned long cmd,
			void *aff_level)
{
	int i;

@@ -729,10 +730,19 @@ static int gic_notifier(struct notifier_block *self, unsigned long cmd, void *v)
			gic_cpu_restore(&gic_data[i]);
			break;
		case CPU_CLUSTER_PM_ENTER:
			/*
			 * Affinity level of the node
			 * eg:
			 *    cpu level = 0
			 *    l2 level  = 1
			 *    cci level = 2
			 */
			if (!(unsigned long)aff_level)
				gic_dist_save(&gic_data[i]);
			break;
		case CPU_CLUSTER_PM_ENTER_FAILED:
		case CPU_CLUSTER_PM_EXIT:
			if (!(unsigned long)aff_level)
				gic_dist_restore(&gic_data[i]);
			break;
		}
+4 −4
Original line number Diff line number Diff line
@@ -71,8 +71,8 @@ int cpu_pm_register_notifier(struct notifier_block *nb);
int cpu_pm_unregister_notifier(struct notifier_block *nb);
int cpu_pm_enter(void);
int cpu_pm_exit(void);
int cpu_cluster_pm_enter(void);
int cpu_cluster_pm_exit(void);
int cpu_cluster_pm_enter(unsigned long aff_level);
int cpu_cluster_pm_exit(unsigned long aff_level);

#else

@@ -96,12 +96,12 @@ static inline int cpu_pm_exit(void)
	return 0;
}

static inline int cpu_cluster_pm_enter(void)
static inline int cpu_cluster_pm_enter(unsigned long aff_level)
{
	return 0;
}

static inline int cpu_cluster_pm_exit(void)
static inline int cpu_cluster_pm_exit(unsigned long aff_level)
{
	return 0;
}
Loading