From d4c9cab37fa440807a4f2bf87efd0511d5694b2c Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Mon, 17 Mar 2025 17:13:29 +0100 Subject: exec: Restrict memory-internal.h to system/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only file units within the system/ directory need access to "memory-internal.h". Restrict its scope by moving it there. The comment from commit 9d70618c684 ("memory-internal.h: Remove obsolete claim that header is obsolete") is now obsolete, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson Message-ID: <20250317161329.40300-3-philmd@linaro.org> --- include/exec/memory-internal.h | 66 ------------------------------------------ 1 file changed, 66 deletions(-) delete mode 100644 include/exec/memory-internal.h (limited to 'include/exec') diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h deleted file mode 100644 index c75178a3d6..0000000000 --- a/include/exec/memory-internal.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Declarations for functions which are internal to the memory subsystem. - * - * Copyright 2011 Red Hat, Inc. and/or its affiliates - * - * Authors: - * Avi Kivity - * - * This work is licensed under the terms of the GNU GPL, version 2 or - * later. See the COPYING file in the top-level directory. - * - */ - -/* - * This header is for use by exec.c, memory.c and accel/tcg/cputlb.c ONLY, - * for declarations which are shared between the memory subsystem's - * internals and the TCG TLB code. Do not include it from elsewhere. - */ - -#ifndef MEMORY_INTERNAL_H -#define MEMORY_INTERNAL_H - -#ifndef CONFIG_USER_ONLY -static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv) -{ - return fv->dispatch; -} - -static inline AddressSpaceDispatch *address_space_to_dispatch(AddressSpace *as) -{ - return flatview_to_dispatch(address_space_to_flatview(as)); -} - -FlatView *address_space_get_flatview(AddressSpace *as); -void flatview_unref(FlatView *view); - -extern const MemoryRegionOps unassigned_mem_ops; - -void flatview_add_to_dispatch(FlatView *fv, MemoryRegionSection *section); -AddressSpaceDispatch *address_space_dispatch_new(FlatView *fv); -void address_space_dispatch_compact(AddressSpaceDispatch *d); -void address_space_dispatch_free(AddressSpaceDispatch *d); - -void mtree_print_dispatch(struct AddressSpaceDispatch *d, - MemoryRegion *root); - -/* returns true if end is big endian. */ -static inline bool devend_big_endian(enum device_endian end) -{ - QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN != DEVICE_LITTLE_ENDIAN && - DEVICE_HOST_ENDIAN != DEVICE_BIG_ENDIAN); - - if (end == DEVICE_NATIVE_ENDIAN) { - return target_words_bigendian(); - } - return end == DEVICE_BIG_ENDIAN; -} - -/* enum device_endian to MemOp. */ -static inline MemOp devend_memop(enum device_endian end) -{ - return devend_big_endian(end) ? MO_BE : MO_LE; -} - -#endif -#endif -- cgit 1.4.1