Skip to contentSkip to conversation

memory: remove unused memory_region_set_global_locking()

PATCH In review Marc-André Lureau 2 participants 2 messages Nov 6, 2017 – Nov 7, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory: remove unused memory_region_set_global_locking()

This was never used since its introduction in commit 196ea13104f8 ("memory: Add global-locking property to memory regions").

---
 include/exec/memory.h | 12 ------------
 memory.c              |  5 -----
 2 files changed, 17 deletions(-)
include/exec/memory.h +0 -12
index 5ed4042f87..a4cabdf44c 100644
@@ -1240,18 +1240,6 @@ void memory_region_set_flush_coalesced(MemoryRegion *mr);
  */
 void memory_region_clear_flush_coalesced(MemoryRegion *mr);
 
-/**
- * memory_region_set_global_locking: Declares the access processing requires
- *                                   QEMU's global lock.
- *
- * When this is invoked, accesses to the memory region will be processed while
- * holding the global lock of QEMU. This is the default behavior of memory
- * regions.
- *
- * @mr: the memory region to be updated.
- */
-void memory_region_set_global_locking(MemoryRegion *mr);
-
 /**
  * memory_region_clear_global_locking: Declares that access processing does
  *                                     not depend on the QEMU global lock.
memory.c +0 -5
index e26e5a3b1d..4b41fb837b 100644
@@ -2189,11 +2189,6 @@ void memory_region_clear_flush_coalesced(MemoryRegion *mr)
     }
 }
 
-void memory_region_set_global_locking(MemoryRegion *mr)
-{
-    mr->global_locking = true;
-}
-
 void memory_region_clear_global_locking(MemoryRegion *mr)
 {
     mr->global_locking = false;
Signature · 1 line
2.15.0.rc0.40.gaefcc5f6f
#1 lore raw
Quoted 5 lines · Marc-André Lureau

This was never used since its introduction in commit 196ea13104f8 ("memory: Add global-locking property to memory regions").

Indeed, it was introduced for symmetry with memory_region_clear_global_locking but it isn't very useful.

Adding qemu-trivial.

Paolo