diff mbox series

[for,6.2,39/49] bsd-user: Need to reset CPU after creation.

Message ID 20210807214242.82385-40-imp@bsdimp.com (mailing list archive)
State New, archived
Headers show
Series bsd-user updates to run hello world | expand

Commit Message

Warner Losh Aug. 7, 2021, 9:42 p.m. UTC
From: Warner Losh <imp@FreeBSD.org>

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Richard Henderson Aug. 10, 2021, 4:32 p.m. UTC | #1
On 8/7/21 11:42 AM, Warner Losh wrote:
> From: Warner Losh<imp@FreeBSD.org>
> 
> Signed-off-by: Warner Losh<imp@bsdimp.com>
> ---
>   bsd-user/main.c | 2 ++
>   1 file changed, 2 insertions(+)

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

Slightly amusing that the line was removed in patch 1, because it was ifdefed.


r~
Warner Losh Aug. 10, 2021, 10:40 p.m. UTC | #2
On Tue, Aug 10, 2021 at 10:32 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 8/7/21 11:42 AM, Warner Losh wrote:
> > From: Warner Losh<imp@FreeBSD.org>
> >
> > Signed-off-by: Warner Losh<imp@bsdimp.com>
> > ---
> >   bsd-user/main.c | 2 ++
> >   1 file changed, 2 insertions(+)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
> Slightly amusing that the line was removed in patch 1, because it was
> ifdefed.
>

Worth folding?

And good eye!

Warner
Richard Henderson Aug. 10, 2021, 11:39 p.m. UTC | #3
On 8/10/21 12:40 PM, Warner Losh wrote:
>     Slightly amusing that the line was removed in patch 1, because it was ifdefed.
> 
> Worth folding?

Might as well.


r~
diff mbox series

Patch

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 36852604f8..08f88d9668 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -405,8 +405,10 @@  int main(int argc, char **argv)
         accel_init_interfaces(ac);
         ac->init_machine(NULL);
     }
+
     cpu = cpu_create(cpu_type);
     env = cpu->env_ptr;
+    cpu_reset(cpu);
     thread_cpu = cpu;
 
     if (getenv("QEMU_STRACE")) {