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

Commit 7895f731 authored by Nicolas Pitre's avatar Nicolas Pitre
Browse files

ARM: MCPM: remove residency argument from mcpm_cpu_suspend()



This is currently unused.

If a suspend must be limited to CPU level only by preventing the last man
from triggering a cluster level suspend then this should be determined
according to many other criteria the MCPM layer is currently not aware of.
It is unlikely that mcpm_cpu_suspend() would be the proper conduit for
that information anyway.

Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
Acked-by: default avatarDave Martin <Dave.Martin@arm.com>
parent 1c2c7d51
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -321,7 +321,7 @@ int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster)
	return ret;
	return ret;
}
}


void mcpm_cpu_suspend(u64 expected_residency)
void mcpm_cpu_suspend(void)
{
{
	if (WARN_ON_ONCE(!platform_ops))
	if (WARN_ON_ONCE(!platform_ops))
		return;
		return;
+5 −10
Original line number Original line Diff line number Diff line
@@ -137,17 +137,12 @@ int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster);
/**
/**
 * mcpm_cpu_suspend - bring the calling CPU in a suspended state
 * mcpm_cpu_suspend - bring the calling CPU in a suspended state
 *
 *
 * @expected_residency: duration in microseconds the CPU is expected
 * The calling CPU is suspended.  This is similar to mcpm_cpu_power_down()
 *			to remain suspended, or 0 if unknown/infinity.
 * except for possible extra platform specific configuration steps to allow
 *
 * an asynchronous wake-up e.g. with a pending interrupt.
 * The calling CPU is suspended.  The expected residency argument is used
 * as a hint by the platform specific backend to implement the appropriate
 * sleep state level according to the knowledge it has on wake-up latency
 * for the given hardware.
 *
 *
 * If this CPU is found to be the "last man standing" in the cluster
 * If this CPU is found to be the "last man standing" in the cluster
 * then the cluster may be prepared for power-down too, if the expected
 * then the cluster may be prepared for power-down too.
 * residency makes it worthwhile.
 *
 *
 * This must be called with interrupts disabled.
 * This must be called with interrupts disabled.
 *
 *
@@ -157,7 +152,7 @@ int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster);
 * This will return if mcpm_platform_register() has not been called
 * This will return if mcpm_platform_register() has not been called
 * previously in which case the caller should take appropriate action.
 * previously in which case the caller should take appropriate action.
 */
 */
void mcpm_cpu_suspend(u64 expected_residency);
void mcpm_cpu_suspend(void);


/**
/**
 * mcpm_cpu_powered_up - housekeeping workafter a CPU has been powered up
 * mcpm_cpu_powered_up - housekeeping workafter a CPU has been powered up
+1 −7
Original line number Original line Diff line number Diff line
@@ -311,13 +311,7 @@ static int exynos5420_cpu_suspend(unsigned long arg)


	if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) {
	if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) {
		mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume);
		mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume);

		mcpm_cpu_suspend();
		/*
		 * Residency value passed to mcpm_cpu_suspend back-end
		 * has to be given clear semantics. Set to 0 as a
		 * temporary value.
		 */
		mcpm_cpu_suspend(0);
	}
	}


	pr_info("Failed to suspend the system\n");
	pr_info("Failed to suspend the system\n");
+1 −7
Original line number Original line Diff line number Diff line
@@ -108,13 +108,7 @@ static int notrace bl_powerdown_finisher(unsigned long arg)
	unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
	unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);


	mcpm_set_entry_vector(cpu, cluster, cpu_resume);
	mcpm_set_entry_vector(cpu, cluster, cpu_resume);

	mcpm_cpu_suspend();
	/*
	 * Residency value passed to mcpm_cpu_suspend back-end
	 * has to be given clear semantics. Set to 0 as a
	 * temporary value.
	 */
	mcpm_cpu_suspend(0);


	/* return value != 0 means failure */
	/* return value != 0 means failure */
	return 1;
	return 1;