android_pipe: auto-detect PIPE_REG_ACCESS_PARAMS size
The PIPE_REG_ACCESS_PARAMS structure can be one of two sizes depending
on the type of host kernel. As the pipe code is shared between both
32 bit and 64 bit worlds it needs to be able to handle both.
Introspecting the CPU type is impractical as a 64 bit CPU may be booting
a 32 bit kernel. Fortunately due to the overlap of the structures it's
possible to detect the use of a 64 bit structure as it implies a
non-zero value of the (currently) unused flags field.
This also opens the way to the 32 bit code using the 64 bit structure at
a later date.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2 files changed