qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] memory-internal.h: Remove obsolete claim that h


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH] memory-internal.h: Remove obsolete claim that header is obsolete
Date: Tue, 21 Nov 2017 12:57:50 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Hi Peter,

On 11/21/2017 12:08 PM, Peter Maydell wrote:
> The memory-internal.h header claims that it is for "obsolete
> exec.c functions" which "will be removed soon". This statement
> was added in 2011, six years ago, but the header is still here.
> (Admittedly none of the prototypes added in commit 67d95c153bef55f6
> are still in the header.)
> 
> It's convenient to have a place to put prototypes for functions
> which are used internally to the various .c files of the memory
> system or by the accel/tcg code, which is inevitably fairly
> closely coupled. So keep the header but update the comments to
> reflect what we're actually using it for.

Until your NotDirtyInfo addition, the only prototype used was
memory_region_access_valid() (in s390-pci-inst.c).

Since "none of the prototypes added in commit 67d95c153bef55f6 are still
in the header" we could restrict it out of include/exec/ (kinda 'revert'
022c62cbbc) and only keep memory_region_access_valid() + NotDirtyInfo
exposed in include/exec/.

(During 2.12)

> 
> Signed-off-by: Peter Maydell <address@hidden>
> ---
>  include/exec/memory-internal.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h
> index 98d8296..4162474 100644
> --- a/include/exec/memory-internal.h
> +++ b/include/exec/memory-internal.h
> @@ -1,5 +1,5 @@
>  /*
> - * Declarations for obsolete exec.c functions
> + * Declarations for functions which are internal to the memory subsystem.
>   *
>   * Copyright 2011 Red Hat, Inc. and/or its affiliates
>   *
> @@ -12,8 +12,9 @@
>   */
>  
>  /*
> - * This header is for use by exec.c and memory.c ONLY.  Do not include it.
> - * The functions declared here will be removed soon.
> + * 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
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]