On Mon, Dec 16, 2013 at 10:57:34AM +0000, Lorenzo Pieralisi wrote:
+#define MPIDR_AFFINITY_LEVEL(mpidr, level) \
((mpidr >> (MPIDR_LEVEL_BITS * level)) & MPIDR_LEVEL_MASK)
This macros does not cover all affinity levels, I have a patch that implements this macro in my arm64 cpu_{suspend}/{resume} series.
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-November/213031.h...
That hunk has been dropped from the latest postings of the series anyway, please see the more current threads (and I'm going to do another spin today too). It'd be good to get things like your helpers integrated so we don't have duplication of effort or people running around trying to keep track of out of tree patches.