[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 33/43] bsd-user: Make cpu_model and cpu_type visible to al
From: |
Kyle Evans |
Subject: |
Re: [PATCH v3 33/43] bsd-user: Make cpu_model and cpu_type visible to all of main.c |
Date: |
Sun, 5 Sep 2021 13:57:18 -0500 |
On Thu, Sep 2, 2021 at 6:53 PM <imp@bsdimp.com> wrote:
>
> From: Warner Losh <imp@FreeBSD.org>
>
> cpu_model and cpu_type will be used future commits, so move them from
> main() scoped to file scoped.
>
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> Acked-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> bsd-user/main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
I think we should reduce this one to just moving cpu_type. cpu_model
is really only used in main() to derive the appropriate cpu_type,
which we do use later.
>
> diff --git a/bsd-user/main.c b/bsd-user/main.c
> index 71fd9d5aba..50c8fdc1e2 100644
> --- a/bsd-user/main.c
> +++ b/bsd-user/main.c
> @@ -54,6 +54,8 @@
> int singlestep;
> unsigned long mmap_min_addr;
> uintptr_t guest_base;
> +static const char *cpu_model;
> +static const char *cpu_type;
> bool have_guest_base;
> unsigned long reserved_va;
>
> @@ -201,8 +203,6 @@ static void save_proc_pathname(char *argv0)
> int main(int argc, char **argv)
> {
> const char *filename;
> - const char *cpu_model;
> - const char *cpu_type;
> const char *log_file = NULL;
> const char *log_mask = NULL;
> const char *seed_optarg = NULL;
> --
> 2.32.0
>
- Re: [PATCH v3 21/43] bsd-user: pull in target_arch_thread.h update target_arch_elf.h, (continued)
- [PATCH v3 30/43] bsd-user: elf cleanup, imp, 2021/09/02
- [PATCH v3 19/43] bsd-user: start to move target CPU functions to target_arch*, imp, 2021/09/02
- [PATCH v3 15/43] bsd-user: assume pthreads and support of __thread, imp, 2021/09/02
- [PATCH v3 23/43] bsd-user: define max args in terms of pages, imp, 2021/09/02
- [PATCH v3 22/43] bsd-user: Include more things in qemu.h, imp, 2021/09/02
- [PATCH v3 24/43] bsd-user: Create target specific vmparam.h, imp, 2021/09/02
- [PATCH v3 33/43] bsd-user: Make cpu_model and cpu_type visible to all of main.c, imp, 2021/09/02
- Re: [PATCH v3 33/43] bsd-user: Make cpu_model and cpu_type visible to all of main.c,
Kyle Evans <=
- [PATCH v3 31/43] bsd-user: Remove dead #ifdefs from elfload.c, imp, 2021/09/02
- [PATCH v3 35/43] bsd-user: Add target_arch_reg to describe a target's register set, imp, 2021/09/02
- [PATCH v3 20/43] bsd-user: Move per-cpu code into target_arch_cpu.h, imp, 2021/09/02
- [PATCH v3 37/43] bsd-user: add stubbed out core dump support, imp, 2021/09/02
- [PATCH v3 41/43] bsd-user: Implement interlock for atomic operations, imp, 2021/09/02
- [PATCH v3 29/43] bsd-user: Add architecture specific signal tramp code, imp, 2021/09/02
- [PATCH v3 28/43] bsd-user: Move stack initializtion into a per-os file., imp, 2021/09/02