}
}
- pr_err("Block at PC 0x%x is not in cache\n", block->pc);
+ pr_err("Block at "PC_FMT" is not in cache\n", block->pc);
}
static bool lightrec_block_is_old(const struct lightrec_state *state,
if (ENABLE_THREADED_COMPILER)
lightrec_recompiler_remove(state->rec, block);
- pr_debug("Freeing outdated block at PC 0x%08x\n", block->pc);
+ pr_debug("Freeing outdated block at "PC_FMT"\n", block->pc);
remove_from_code_lut(cache, block);
lightrec_unregister_block(cache, block);
lightrec_free_block(state, block);
lightrec_free_blocks(cache, except, false);
}
-void lightrec_free_block_cache(struct blockcache *cache)
+void lightrec_free_all_blocks(struct blockcache *cache)
{
lightrec_free_blocks(cache, NULL, true);
+}
+
+void lightrec_free_block_cache(struct blockcache *cache)
+{
+ lightrec_free_all_blocks(cache);
lightrec_free(cache->state, MEM_FOR_LIGHTREC, sizeof(*cache), cache);
}