Hi,

In the context of systemtap testsuite, I had some compilation issues
"invalid lvalue output in asm 1". I have root-caused that to code in
the tool that is a (old) duplicate of arch/arm/include/asm/uaccess.h
macro __put_user_asm_dword(x, __pu_addr, err) => 64bits storage.
__pu_addr is storage address

The xxx_byte/half/word versions are OK. The main difference is that
__pu_addr is only read while read and write in dword version (inline
assembly "+r" modifier)

#define __stp_put_user_asm_dword(x,__pu_addr,err)               \
        __asm__ __volatile__(                                   \
        "1:     str     " __reg_oper1 ", [%1], #4\n"            \ ->
__pu_addr is read but also written for next operation
        "2:     str     " __reg_oper0 ", [%1], #0\n"            \
...
        : "+r" (err), "+r" (__pu_addr)                          \ ->
"r" (__pu_addr) for other versions
        : "r" (x), "i" (-EFAULT)                                \
        : "cc")

As my knowledge of inline assembly is poor, I am checking if this
reminds anything to anyone (compilation option, out of date syntax,
...) before investigating deeper.

I have put most recent code version from kernel in the tool but still
it fails. However, looking again at kernel code while writing this
mail, macro may be used only if CONFIG_MMU is not defined. I will
cross-check tomorrow.

Regards
Fred

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to