Avoid maintaining large functions in header, rely on the
linker to optimize at linking time.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 include/system/ram_addr.h | 11 ++---------
 system/physmem.c          |  7 +++++++
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/system/ram_addr.h b/include/system/ram_addr.h
index e65f479e266..7197913d761 100644
--- a/include/system/ram_addr.h
+++ b/include/system/ram_addr.h
@@ -19,8 +19,6 @@
 #ifndef SYSTEM_RAM_ADDR_H
 #define SYSTEM_RAM_ADDR_H
 
-#include "system/tcg.h"
-#include "exec/cputlb.h"
 #include "exec/ramlist.h"
 #include "system/ramblock.h"
 #include "system/memory.h"
@@ -166,13 +164,8 @@ uint64_t cpu_physical_memory_set_dirty_lebitmap(unsigned 
long *bitmap,
                                                 ram_addr_t pages);
 #endif /* not _WIN32 */
 
-static inline void cpu_physical_memory_dirty_bits_cleared(ram_addr_t addr,
-                                                          ram_addr_t length)
-{
-    if (tcg_enabled()) {
-        tlb_reset_dirty_range_all(addr, length);
-    }
-}
+void cpu_physical_memory_dirty_bits_cleared(ram_addr_t addr, ram_addr_t 
length);
+
 bool cpu_physical_memory_test_and_clear_dirty(ram_addr_t start,
                                               ram_addr_t length,
                                               unsigned client);
diff --git a/system/physmem.c b/system/physmem.c
index e78ca410ebf..c475ce0a5db 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -902,6 +902,13 @@ void tlb_reset_dirty_range_all(ram_addr_t addr, ram_addr_t 
length)
     }
 }
 
+void cpu_physical_memory_dirty_bits_cleared(ram_addr_t addr, ram_addr_t length)
+{
+    if (tcg_enabled()) {
+        tlb_reset_dirty_range_all(addr, length);
+    }
+}
+
 static bool physical_memory_get_dirty(ram_addr_t addr, ram_addr_t length,
                                       unsigned client)
 {
-- 
2.51.0


Reply via email to