]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc: Add macros for the ibm_architecture_vec[] lengths
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 29 Aug 2014 07:01:43 +0000 (17:01 +1000)
committerJiri Slaby <jslaby@suse.cz>
Fri, 7 Oct 2016 07:42:32 +0000 (09:42 +0200)
commit9dcc5e15a0c2f491d6e3794625007a825d293411
tree61fc0b413de56649834ba7d9ce03d396030956a7
parentac080ae1df7ef5145348571484cba47e6678557b
powerpc: Add macros for the ibm_architecture_vec[] lengths

commit e8a4fd0afe05d5213d809fa686d3b8319464acfd upstream.

The encoding of the lengths in the ibm_architecture_vec array is
"interesting" to say the least. It's non-obvious how the number of bytes
we provide relates to the length value.

In fact we already got it wrong once, see 11e9ed43ca8a "Fix up
ibm_architecture_vec definition".

So add some macros to make it (hopefully) clearer. These at least have
the property that the integer present in the code is equal to the number
of bytes that follows it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/powerpc/kernel/prom_init.c