mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
msm_rtb: Evaluate parameter only once in reads/writes
This reverts commit fc44c0ba38 ("msm_rtb: Don't lose
the __user tag on relaxed reads/writes"). This causes
address parameter, with side effects, to be evaluated
more than once.
Change-Id: Ib37665763736bdf562afcc8335b014a2724a7598
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
This commit is contained in:
parent
fc44c0ba38
commit
efff3931e0
1 changed files with 6 additions and 4 deletions
|
|
@ -69,10 +69,11 @@ int uncached_logk(enum logk_event_type log_type, void *data);
|
|||
/* Override the #defines in asm/io.h with the logged ones */
|
||||
#define __raw_read_logged(a, _l, _t) ({ \
|
||||
_t __a; \
|
||||
void *_addr = (void *)(a); \
|
||||
int _ret; \
|
||||
_ret = uncached_logk(LOGK_READL, (__force void *) a); \
|
||||
_ret = uncached_logk(LOGK_READL, _addr); \
|
||||
ETB_WAYPOINT; \
|
||||
__a = __raw_read##_l(a); \
|
||||
__a = __raw_read##_l(_addr); \
|
||||
if (_ret) \
|
||||
LOG_BARRIER; \
|
||||
__a; \
|
||||
|
|
@ -135,9 +136,10 @@ int uncached_logk(enum logk_event_type log_type, void *data);
|
|||
|
||||
#define __raw_write_logged(v, a, _t) ({ \
|
||||
int _ret; \
|
||||
_ret = uncached_logk(LOGK_WRITEL, (__force void *) a); \
|
||||
void *_addr = (void *)(a); \
|
||||
_ret = uncached_logk(LOGK_WRITEL, _addr); \
|
||||
ETB_WAYPOINT; \
|
||||
__raw_write##_t((v), a); \
|
||||
__raw_write##_t((v), _addr); \
|
||||
if (_ret) \
|
||||
LOG_BARRIER; \
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue