On 9/28/21 7:32 AM, Gerd Hoffmann wrote:
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 608d768a4371..72e4e3b5bb89 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -160,7 +160,9 @@ void tlb_flush_page_all_cpus_synced(CPUState *src, target_ulong addr); * so this is generally safe. If more selective flushing is required * use one of the other functions for efficiency. */ +#ifdef TCG_DIRECT_CALL void tlb_flush(CPUState *cpu); +#endif
I'm pretty sure you can drop these ifdefs. Just because there's a regular declaration for a function doesn't mean a subsequent inline definition does not apply.
And even if that didn't work, I'd be willing to trade inline expansion for not adding lots of ifdefs...
+static inline void tlb_flush(CPUState *cpu) +{ + tcg.tlb_flush(cpu); +}
... these could just as well be out-of-line. r~