diff mbox series

[05/18] accel/tcg: Use tb_page_addr_t type in page_unprotect()

Message ID 20241212185341.2857-6-philmd@linaro.org
State New
Headers show
Series accel/tcg: Extract user APIs out of 'exec/[cpu, exec]-all.h' | expand

Commit Message

Philippe Mathieu-Daudé Dec. 12, 2024, 6:53 p.m. UTC
Match with the page_protect() prototype, use a tb_page_addr_t
argument instead of target_ulong.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/exec/translate-all.h | 2 +-
 accel/tcg/user-exec.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Pierrick Bouvier Dec. 12, 2024, 7:24 p.m. UTC | #1
On 12/12/24 10:53, Philippe Mathieu-Daudé wrote:
> Match with the page_protect() prototype, use a tb_page_addr_t
> argument instead of target_ulong.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/exec/translate-all.h | 2 +-
>   accel/tcg/user-exec.c        | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h
> index 85c9460c7ca..c50661a05d5 100644
> --- a/include/exec/translate-all.h
> +++ b/include/exec/translate-all.h
> @@ -27,7 +27,7 @@ void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
>   
>   #ifdef CONFIG_USER_ONLY
>   void page_protect(tb_page_addr_t page_addr);
> -int page_unprotect(target_ulong address, uintptr_t pc);
> +int page_unprotect(tb_page_addr_t address, uintptr_t pc);
>   #endif
>   
>   #endif /* TRANSLATE_ALL_H */
> diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
> index 06016eb0301..4ed6dd19f30 100644
> --- a/accel/tcg/user-exec.c
> +++ b/accel/tcg/user-exec.c
> @@ -696,7 +696,7 @@ void page_protect(tb_page_addr_t address)
>    * immediately exited. (We can only return 2 if the 'pc' argument is
>    * non-zero.)
>    */
> -int page_unprotect(target_ulong address, uintptr_t pc)
> +int page_unprotect(tb_page_addr_t address, uintptr_t pc)
>   {
>       PageFlagsNode *p;
>       bool current_tb_invalidated;

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

Patch

diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h
index 85c9460c7ca..c50661a05d5 100644
--- a/include/exec/translate-all.h
+++ b/include/exec/translate-all.h
@@ -27,7 +27,7 @@  void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
 
 #ifdef CONFIG_USER_ONLY
 void page_protect(tb_page_addr_t page_addr);
-int page_unprotect(target_ulong address, uintptr_t pc);
+int page_unprotect(tb_page_addr_t address, uintptr_t pc);
 #endif
 
 #endif /* TRANSLATE_ALL_H */
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 06016eb0301..4ed6dd19f30 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -696,7 +696,7 @@  void page_protect(tb_page_addr_t address)
  * immediately exited. (We can only return 2 if the 'pc' argument is
  * non-zero.)
  */
-int page_unprotect(target_ulong address, uintptr_t pc)
+int page_unprotect(tb_page_addr_t address, uintptr_t pc)
 {
     PageFlagsNode *p;
     bool current_tb_invalidated;