[PATCH 01/24] exec/cpu-all: Include missing 'exec/cpu-defs.h' header

Philippe Mathieu-Daudé posted 24 patches 1 week, 6 days ago
[PATCH 01/24] exec/cpu-all: Include missing 'exec/cpu-defs.h' header
Posted by Philippe Mathieu-Daudé 1 week, 6 days ago
TARGET_PAGE_BITS is defined in "exec/cpu-defs.h".
Include it in order to avoid when refactoring:

  In file included from ../../system/watchpoint.c:23:
  include/exec/cpu-all.h:356:19: error: use of undeclared identifier 'TARGET_PAGE_BITS'
    356 | QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & TLB_SLOW_FLAGS_MASK);
        |                   ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/exec/cpu-all.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 45e6676938..1c40e27672 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -136,7 +136,7 @@ static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val
 #endif
 
 /* page related stuff */
-
+#include "exec/cpu-defs.h"
 #ifdef TARGET_PAGE_BITS_VARY
 # include "exec/page-vary.h"
 extern const TargetPageBits target_page;
-- 
2.45.2


Re: [PATCH 01/24] exec/cpu-all: Include missing 'exec/cpu-defs.h' header
Posted by Thomas Huth 1 week, 6 days ago
On 14/11/2024 02.12, Philippe Mathieu-Daudé wrote:
> TARGET_PAGE_BITS is defined in "exec/cpu-defs.h".

Actually, it's rather defined in cpu-param.h, but that header gets included 
from cpu-defs.h, so the patch is fine. But maybe adjust the commit message 
to avoid confusion?

  Thomas


Re: [PATCH 01/24] exec/cpu-all: Include missing 'exec/cpu-defs.h' header
Posted by Richard Henderson 1 week, 5 days ago
On 11/14/24 00:29, Thomas Huth wrote:
> On 14/11/2024 02.12, Philippe Mathieu-Daudé wrote:
>> TARGET_PAGE_BITS is defined in "exec/cpu-defs.h".
> 
> Actually, it's rather defined in cpu-param.h, but that header gets included from cpu- 
> defs.h, so the patch is fine. But maybe adjust the commit message to avoid confusion?

+1.

With that,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

Re: [PATCH 01/24] exec/cpu-all: Include missing 'exec/cpu-defs.h' header
Posted by Pierrick Bouvier 1 week, 6 days ago

On 11/13/24 17:12, Philippe Mathieu-Daudé wrote:
> TARGET_PAGE_BITS is defined in "exec/cpu-defs.h".
> Include it in order to avoid when refactoring:
> 
>    In file included from ../../system/watchpoint.c:23:
>    include/exec/cpu-all.h:356:19: error: use of undeclared identifier 'TARGET_PAGE_BITS'
>      356 | QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & TLB_SLOW_FLAGS_MASK);
>          |                   ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/exec/cpu-all.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
> index 45e6676938..1c40e27672 100644
> --- a/include/exec/cpu-all.h
> +++ b/include/exec/cpu-all.h
> @@ -136,7 +136,7 @@ static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val
>   #endif
>   
>   /* page related stuff */
> -
> +#include "exec/cpu-defs.h"
>   #ifdef TARGET_PAGE_BITS_VARY
>   # include "exec/page-vary.h"
>   extern const TargetPageBits target_page;

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>