From: Richard Henderson <richard.henderson@linaro.org>
To: Brad Smith <brad@comstyle.com>, Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Warner Losh <imp@bsdimp.com>
Subject: Re: [PATCH] util/cpuinfo-ppc: Add FreeBSD support
Date: Fri, 28 Jun 2024 09:19:21 -0700 [thread overview]
Message-ID: <352a9155-206e-400b-a907-50d275f90a05@linaro.org> (raw)
In-Reply-To: <Zn4ZIYX0uxwHf3I-@humpty.home.comstyle.com>
On 6/27/24 19:00, Brad Smith wrote:
> util/cpuinfo-ppc: Add FreeBSD support
>
> Signed-off-by: Brad Smith <brad@comstyle.com>
> ---
> With corrected sign-off.
>
> Also this was based on the tcg-next branch.
>
> util/cpuinfo-ppc.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c
> index 47af55aa0c..0ad634b46f 100644
> --- a/util/cpuinfo-ppc.c
> +++ b/util/cpuinfo-ppc.c
> @@ -14,6 +14,11 @@
> # include "elf.h"
> # endif
> #endif
> +#ifdef __FreeBSD__
> +# include <machine/cpu.h>
> +# define PPC_FEATURE2_ARCH_3_1 0
I assume freebsd will eventually add this bit.
Perhaps better with ifndef?
r~
> +# define PPC_FEATURE2_VEC_CRYPTO PPC_FEATURE2_HAS_VEC_CRYPTO
> +#endif
>
> unsigned cpuinfo;
>
> @@ -28,7 +33,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
>
> info = CPUINFO_ALWAYS;
>
> -#ifdef CONFIG_LINUX
> +#if defined(CONFIG_LINUX) || defined(__FreeBSD__)
> unsigned long hwcap = qemu_getauxval(AT_HWCAP);
> unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2);
>
next prev parent reply other threads:[~2024-06-28 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 2:00 [PATCH] util/cpuinfo-ppc: Add FreeBSD support Brad Smith
2024-06-28 16:19 ` Richard Henderson [this message]
2024-06-29 0:50 ` Brad Smith
-- strict thread matches above, loose matches on Subject: below --
2024-06-28 1:53 Brad Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=352a9155-206e-400b-a907-50d275f90a05@linaro.org \
--to=richard.henderson@linaro.org \
--cc=brad@comstyle.com \
--cc=imp@bsdimp.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).