[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 18/57] tcg/aarch64: Detect have_lse, have_lse2 for darwin
From: |
Peter Maydell |
Subject: |
Re: [PATCH v4 18/57] tcg/aarch64: Detect have_lse, have_lse2 for darwin |
Date: |
Fri, 5 May 2023 11:43:19 +0100 |
On Wed, 3 May 2023 at 08:19, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> These features are present for Apple M1.
>
> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> +#ifdef CONFIG_DARWIN
> +static bool sysctl_for_bool(const char *name)
> +{
> + int val = 0;
> + size_t len = sizeof(val);
> +
> + if (sysctlbyname(name, &val, &len, NULL, 0) == 0) {
> + return val != 0;
> + }
> +
> + /*
> + * We might in ask for properties not present in older kernels,
"might in ask" is a typo for something, but I'm not sure what.
> + * but we're only asking about static properties, all of which
> + * should be 'int'. So we shouln't see ENOMEM (val too small),
> + * or any of the other more exotic errors.
> + */
> + assert(errno == ENOENT);
> + return false;
> +}
> +#endif
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
- [PATCH v4 14/57] tcg/i386: Add have_atomic16, (continued)
- [PATCH v4 14/57] tcg/i386: Add have_atomic16, Richard Henderson, 2023/05/03
- [PATCH v4 15/57] accel/tcg: Use have_atomic16 in ldst_atomicity.c.inc, Richard Henderson, 2023/05/03
- [PATCH v4 16/57] accel/tcg: Add aarch64 specific support in ldst_atomicity, Richard Henderson, 2023/05/03
- [PATCH v4 17/57] tcg/aarch64: Detect have_lse, have_lse2 for linux, Richard Henderson, 2023/05/03
- [PATCH v4 18/57] tcg/aarch64: Detect have_lse, have_lse2 for darwin, Richard Henderson, 2023/05/03
- Re: [PATCH v4 18/57] tcg/aarch64: Detect have_lse, have_lse2 for darwin,
Peter Maydell <=
- [PATCH v4 19/57] accel/tcg: Add have_lse2 support in ldst_atomicity, Richard Henderson, 2023/05/03
- [PATCH v4 20/57] tcg: Introduce TCG_OPF_TYPE_MASK, Richard Henderson, 2023/05/03
- [PATCH v4 23/57] tcg/ppc: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/03
- [PATCH v4 21/57] tcg/i386: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/03
- [PATCH v4 22/57] tcg/aarch64: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/03
- [PATCH v4 24/57] tcg/loongarch64: Use full load/store helpers in user-only mode, Richard Henderson, 2023/05/03