Add type checking to __local_ctl_load() and __local_ctl_store(). For
both functions enforce to pass an array consisting of unsigned longs.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
\
_esize = (_high - _low + 1) * sizeof(unsigned long); \
BUILD_BUG_ON(sizeof(struct addrtype) != _esize); \
+ typecheck(unsigned long, array[0]); \
asm volatile( \
" lctlg %[_low],%[_high],%[_arr]\n" \
: \
\
_esize = (_high - _low + 1) * sizeof(unsigned long); \
BUILD_BUG_ON(sizeof(struct addrtype) != _esize); \
+ typecheck(unsigned long, array[0]); \
asm volatile( \
" stctg %[_low],%[_high],%[_arr]\n" \
: [_arr] "=Q" (*(struct addrtype *)(&array)) \