]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ARM: MCPM: move the algorithmic complexity to the core code
authorNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 11 Mar 2015 22:16:13 +0000 (18:16 -0400)
committerOlof Johansson <olof@lixom.net>
Fri, 3 Apr 2015 19:52:46 +0000 (12:52 -0700)
commitd3a875444ad8d5e64c5a932361ca579312e49801
tree88910c6b2e5b8f35541fbc57a975197981ea8113
parent824f25c1ccded5de2d3e18268b91cddccdad3868
ARM: MCPM: move the algorithmic complexity to the core code

All backends are reimplementing a variation of the same CPU reference
count handling. They are also responsible for driving the MCPM special
low-level locking. This is needless duplication, involving algorithmic
requirements that are not necessarily obvious to the uninitiated.
And from past code review experience, those were all initially
implemented badly.

After 3 years, it is time to refactor as much common code to the core
MCPM facility to make the backends as simple as possible.  To avoid a
flag day, the new scheme is introduced in parallel to the existing
backend interface.  When all backends are converted over, the
compatibility interface could be removed.

The new MCPM backend interface implements simpler methods addressing
very platform specific tasks performed under lock protection while
keeping the algorithmic complexity and race avoidance local to the
core code.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/common/mcpm_entry.c
arch/arm/include/asm/mcpm.h