* [PATCH] memory: use RCU_READ_LOCK_GUARD
@ 2019-12-13 14:08 Paolo Bonzini
2019-12-13 14:57 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2019-12-13 14:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Dr. David Alan Gilbert
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/exec/memory.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index e499dc2..e42a9d7 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -2165,7 +2165,7 @@ MemTxResult address_space_read(AddressSpace *as, hwaddr addr,
if (__builtin_constant_p(len)) {
if (len) {
- rcu_read_lock();
+ RCU_READ_LOCK_GUARD();
fv = address_space_to_flatview(as);
l = len;
mr = flatview_translate(fv, addr, &addr1, &l, false, attrs);
@@ -2176,7 +2176,6 @@ MemTxResult address_space_read(AddressSpace *as, hwaddr addr,
result = flatview_read_continue(fv, addr, attrs, buf, len,
addr1, l, mr);
}
- rcu_read_unlock();
}
} else {
result = address_space_read_full(as, addr, attrs, buf, len);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] memory: use RCU_READ_LOCK_GUARD
2019-12-13 14:08 [PATCH] memory: use RCU_READ_LOCK_GUARD Paolo Bonzini
@ 2019-12-13 14:57 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 2+ messages in thread
From: Dr. David Alan Gilbert @ 2019-12-13 14:57 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
* Paolo Bonzini (pbonzini@redhat.com) wrote:
> Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> include/exec/memory.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index e499dc2..e42a9d7 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -2165,7 +2165,7 @@ MemTxResult address_space_read(AddressSpace *as, hwaddr addr,
>
> if (__builtin_constant_p(len)) {
> if (len) {
> - rcu_read_lock();
> + RCU_READ_LOCK_GUARD();
> fv = address_space_to_flatview(as);
> l = len;
> mr = flatview_translate(fv, addr, &addr1, &l, false, attrs);
> @@ -2176,7 +2176,6 @@ MemTxResult address_space_read(AddressSpace *as, hwaddr addr,
> result = flatview_read_continue(fv, addr, attrs, buf, len,
> addr1, l, mr);
> }
> - rcu_read_unlock();
> }
> } else {
> result = address_space_read_full(as, addr, attrs, buf, len);
> --
> 1.8.3.1
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-13 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 14:08 [PATCH] memory: use RCU_READ_LOCK_GUARD Paolo Bonzini
2019-12-13 14:57 ` Dr. David Alan Gilbert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.