[PATCH] hw/core/cpu: Add missing 'exec/cpu-common.h' include

Philippe Mathieu-Daudé posted 1 patch 3 years, 6 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200908123433.105706-1-philmd@redhat.com
hw/core/cpu.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] hw/core/cpu: Add missing 'exec/cpu-common.h' include
Posted by Philippe Mathieu-Daudé 3 years, 6 months ago
cpu_common_reset() uses tcg_flush_softmmu_tlb() which is
declared in "exec/cpu-common.h". Add the missing header
to avoid when refactoring other headers:

  hw/core/cpu.c: In function ‘cpu_common_reset’:
  hw/core/cpu.c:273:9: error: implicit declaration of function ‘tcg_flush_softmmu_tlb’ [-Werror=implicit-function-declaration]
    273 |         tcg_flush_softmmu_tlb(cpu);
        |         ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/core/cpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/core/cpu.c b/hw/core/cpu.c
index 22bc3f974a2..63ece3662d6 100644
--- a/hw/core/cpu.c
+++ b/hw/core/cpu.c
@@ -26,6 +26,7 @@
 #include "qemu/log.h"
 #include "qemu/main-loop.h"
 #include "exec/log.h"
+#include "exec/cpu-common.h"
 #include "qemu/error-report.h"
 #include "qemu/qemu-print.h"
 #include "sysemu/tcg.h"
-- 
2.26.2

Re: [PATCH] hw/core/cpu: Add missing 'exec/cpu-common.h' include
Posted by Philippe Mathieu-Daudé 3 years, 5 months ago
ping?

On 9/8/20 2:34 PM, Philippe Mathieu-Daudé wrote:
> cpu_common_reset() uses tcg_flush_softmmu_tlb() which is
> declared in "exec/cpu-common.h". Add the missing header
> to avoid when refactoring other headers:
> 
>   hw/core/cpu.c: In function ‘cpu_common_reset’:
>   hw/core/cpu.c:273:9: error: implicit declaration of function ‘tcg_flush_softmmu_tlb’ [-Werror=implicit-function-declaration]
>     273 |         tcg_flush_softmmu_tlb(cpu);
>         |         ^~~~~~~~~~~~~~~~~~~~~
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/core/cpu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/core/cpu.c b/hw/core/cpu.c
> index 22bc3f974a2..63ece3662d6 100644
> --- a/hw/core/cpu.c
> +++ b/hw/core/cpu.c
> @@ -26,6 +26,7 @@
>  #include "qemu/log.h"
>  #include "qemu/main-loop.h"
>  #include "exec/log.h"
> +#include "exec/cpu-common.h"
>  #include "qemu/error-report.h"
>  #include "qemu/qemu-print.h"
>  #include "sysemu/tcg.h"
> 


Re: [PATCH] hw/core/cpu: Add missing 'exec/cpu-common.h' include
Posted by Eduardo Habkost 3 years, 5 months ago
On Thu, Oct 01, 2020 at 07:44:57PM +0200, Philippe Mathieu-Daudé wrote:
> ping?
> 
> On 9/8/20 2:34 PM, Philippe Mathieu-Daudé wrote:
> > cpu_common_reset() uses tcg_flush_softmmu_tlb() which is
> > declared in "exec/cpu-common.h". Add the missing header
> > to avoid when refactoring other headers:
> > 
> >   hw/core/cpu.c: In function ‘cpu_common_reset’:
> >   hw/core/cpu.c:273:9: error: implicit declaration of function ‘tcg_flush_softmmu_tlb’ [-Werror=implicit-function-declaration]
> >     273 |         tcg_flush_softmmu_tlb(cpu);
> >         |         ^~~~~~~~~~~~~~~~~~~~~
> > 
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Qeueued, thanks!

-- 
Eduardo