similarity index 86%
rename from include/exec/cputlb.h
rename to include/exec/sysemu/cputlb.h
@@ -17,15 +17,18 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CPUTLB_H
-#define CPUTLB_H
+#ifndef EXEC_SYSEMU_CPUTLB_H
+#define EXEC_SYSEMU_CPUTLB_H
+
+#ifdef CONFIG_USER_ONLY
+#error Cannot include sysemu specific header from user emulation
+#endif
#include "exec/cpu-common.h"
-#if !defined(CONFIG_USER_ONLY)
/* cputlb.c */
void tlb_protect_code(ram_addr_t ram_addr);
void tlb_unprotect_code(ram_addr_t ram_addr);
void tlb_flush_counts(size_t *full, size_t *part, size_t *elide);
-#endif
+
#endif
@@ -23,7 +23,7 @@
#include "exec/exec-all.h"
#include "exec/memory.h"
#include "exec/cpu_ldst.h"
-#include "exec/cputlb.h"
+#include "exec/sysemu/cputlb.h"
#include "exec/tb-hash.h"
#include "exec/memory-internal.h"
#include "exec/ram_addr.h"
@@ -42,11 +42,11 @@
#include <libutil.h>
#endif
#endif
-#else
+#else /* !CONFIG_USER_ONLY */
+#include "exec/sysemu/cputlb.h"
#include "exec/ram_addr.h"
-#endif
+#endif /* CONFIG_USER_ONLY */
-#include "exec/cputlb.h"
#include "exec/tb-hash.h"
#include "exec/translate-all.h"
#include "qemu/bitmap.h"
@@ -131,6 +131,7 @@ F: include/exec/helper*.h
F: include/exec/tb-hash.h
F: include/exec/sysemu/hwaddr.h
F: include/sysemu/cpus.h
+F: include/exec/sysemu/cputlb.h
F: include/sysemu/tcg.h
F: include/hw/core/tcg-cpu-ops.h
To make it clearer the cputlb.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/cputlb.h,exec/sysemu/cputlb.h, $(git grep -l exec/cputlb.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- include/exec/{ => sysemu}/cputlb.h | 11 +++++++---- accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 6 +++--- MAINTAINERS | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) rename include/exec/{ => sysemu}/cputlb.h (86%)