diff mbox series

[for-6.2,10/10] linux-user: Move DEBUG_REMAP undef to uaccess.c

Message ID 20210717232103.18047-11-peter.maydell@linaro.org
State Superseded
Headers show
Series linux-user: split internals out of qemu.h | expand

Commit Message

Peter Maydell July 17, 2021, 11:21 p.m. UTC
Since commit 687ca797893ca1e853, the code that looks at the debug
define DEBUG_REMAP is all in uaccess.c; move the #undef line to
there from qemu.h (thus reducing significantly the amount of code
that gets recompiled if you need to turn the debug on).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 linux-user/qemu.h    | 3 ---
 linux-user/uaccess.c | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

-- 
2.20.1

Comments

Peter Maydell July 17, 2021, 11:25 p.m. UTC | #1
On Sun, 18 Jul 2021 at 00:21, Peter Maydell <peter.maydell@linaro.org> wrote:
>

> Since commit 687ca797893ca1e853, the code that looks at the debug

> define DEBUG_REMAP is all in uaccess.c; move the #undef line to

> there from qemu.h (thus reducing significantly the amount of code

> that gets recompiled if you need to turn the debug on).

>

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> ---

>  linux-user/qemu.h    | 3 ---

>  linux-user/uaccess.c | 2 ++

>  2 files changed, 2 insertions(+), 3 deletions(-)


A minute after sending it out, I realized this patch is wrong:
there is still a use of DEBUG_REMAP in qemu.h. So this one should be
dropped.

thanks
-- PMM
diff mbox series

Patch

diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 5c713fa8ab2..acc215b1a48 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -3,9 +3,6 @@ 
 
 #include "cpu.h"
 #include "exec/cpu_ldst.h"
-
-#undef DEBUG_REMAP
-
 #include "exec/user/abitypes.h"
 
 #include "syscall_defs.h"
diff --git a/linux-user/uaccess.c b/linux-user/uaccess.c
index 425cbf677f7..56fb4358d4f 100644
--- a/linux-user/uaccess.c
+++ b/linux-user/uaccess.c
@@ -5,6 +5,8 @@ 
 #include "qemu.h"
 #include "user-internals.h"
 
+#undef DEBUG_REMAP
+
 void *lock_user(int type, abi_ulong guest_addr, ssize_t len, bool copy)
 {
     void *host_addr;