diff mbox series

[FFmpeg-devel] avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD

Message ID ZjhM1sRdNVJNOrP7@humpty.home.comstyle.com
State Accepted
Commit 115c96b9bd53e775f425f23d5b73fa0a9dedbd08
Headers show
Series [FFmpeg-devel] avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Brad Smith May 6, 2024, 3:21 a.m. UTC
avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD

Use the machdep.altivec sysctl on NetBSD for AltiVec detection
as is done with OpenBSD.

Signed-off-by: Brad Smith <brad@comstyle.com>
---
 libavutil/ppc/cpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Sean McGovern May 6, 2024, 2:15 p.m. UTC | #1
Hi Brad,

On Sun, May 5, 2024 at 11:22 PM Brad Smith
<brad-at-comstyle.com@ffmpeg.org> wrote:
>
> avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
>
> Use the machdep.altivec sysctl on NetBSD for AltiVec detection
> as is done with OpenBSD.
>
> Signed-off-by: Brad Smith <brad@comstyle.com>
> ---
>  libavutil/ppc/cpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libavutil/ppc/cpu.c b/libavutil/ppc/cpu.c
> index bc8bb5f47c..2b13cda662 100644
> --- a/libavutil/ppc/cpu.c
> +++ b/libavutil/ppc/cpu.c
> @@ -27,7 +27,7 @@
>  #if HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
> -#elif defined(__OpenBSD__)
> +#elif defined(__NetBSD__) || defined(__OpenBSD__)
>  #include <sys/types.h>
>  #include <sys/sysctl.h>
>  #include <machine/cpu.h>
> @@ -56,8 +56,8 @@ int ff_get_cpu_flags_ppc(void)
>      if (result == VECTORTYPE_ALTIVEC)
>          return AV_CPU_FLAG_ALTIVEC;
>      return 0;
> -#elif defined(__APPLE__) || defined(__OpenBSD__)
> -#ifdef __OpenBSD__
> +#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__)
> +#if defined(__NetBSD__) || defined(__OpenBSD__)
>      int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
>  #else
>      int sels[2] = {CTL_HW, HW_VECTORUNIT};
> --
> 2.44.0
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

OK, looks good to me.

-- Sean McGovern
Michael Niedermayer May 7, 2024, 2:24 a.m. UTC | #2
On Sun, May 05, 2024 at 11:21:58PM -0400, Brad Smith wrote:
> avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
> 
> Use the machdep.altivec sysctl on NetBSD for AltiVec detection
> as is done with OpenBSD.
> 
> Signed-off-by: Brad Smith <brad@comstyle.com>
> ---
>  libavutil/ppc/cpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

you seem to be sending alot of bsd related patches, maybe
you want to send a patch that adds you to the MAINTAINERs file?

thx

[...]
Brad Smith May 11, 2024, 7:55 p.m. UTC | #3
On 2024-05-06 10:24 p.m., Michael Niedermayer wrote:
> On Sun, May 05, 2024 at 11:21:58PM -0400, Brad Smith wrote:
>> avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
>>
>> Use the machdep.altivec sysctl on NetBSD for AltiVec detection
>> as is done with OpenBSD.
>>
>> Signed-off-by: Brad Smith<brad@comstyle.com>
>> ---
>>   libavutil/ppc/cpu.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
> you seem to be sending alot of bsd related patches, maybe
> you want to send a patch that adds you to the MAINTAINERs file?
>
> thx

I try to help where I can. I am an OpenBSD developer and take a look at
what the other *BSD's have for local patches and push things upstream to
benefit both sides, but I am not sure I have enough time to be in a position
to be considered any kind of official MAINTAINER.
Michael Niedermayer May 11, 2024, 9:49 p.m. UTC | #4
On Sat, May 11, 2024 at 03:55:44PM -0400, Brad Smith wrote:
> On 2024-05-06 10:24 p.m., Michael Niedermayer wrote:
> > On Sun, May 05, 2024 at 11:21:58PM -0400, Brad Smith wrote:
> > > avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
> > > 
> > > Use the machdep.altivec sysctl on NetBSD for AltiVec detection
> > > as is done with OpenBSD.
> > > 
> > > Signed-off-by: Brad Smith<brad@comstyle.com>
> > > ---
> > >   libavutil/ppc/cpu.c | 6 +++---
> > >   1 file changed, 3 insertions(+), 3 deletions(-)
> > you seem to be sending alot of bsd related patches, maybe
> > you want to send a patch that adds you to the MAINTAINERs file?
> > 
> > thx
> 
> I try to help where I can. I am an OpenBSD developer and take a look at
> what the other *BSD's have for local patches and push things upstream to
> benefit both sides, but I am not sure I have enough time to be in a position
> to be considered any kind of official MAINTAINER.

Iam not asking you to do more work
Id like to give you a git write account so you can push your BSD related
fixes yourself.
(everyone who has git write should be in MAINTAINERs)

thx

[...]
Brad Smith May 11, 2024, 10:24 p.m. UTC | #5
On 2024-05-11 5:49 p.m., Michael Niedermayer wrote:
> On Sat, May 11, 2024 at 03:55:44PM -0400, Brad Smith wrote:
>> On 2024-05-06 10:24 p.m., Michael Niedermayer wrote:
>>> On Sun, May 05, 2024 at 11:21:58PM -0400, Brad Smith wrote:
>>>> avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
>>>>
>>>> Use the machdep.altivec sysctl on NetBSD for AltiVec detection
>>>> as is done with OpenBSD.
>>>>
>>>> Signed-off-by: Brad Smith<brad@comstyle.com>
>>>> ---
>>>>    libavutil/ppc/cpu.c | 6 +++---
>>>>    1 file changed, 3 insertions(+), 3 deletions(-)
>>> you seem to be sending alot of bsd related patches, maybe
>>> you want to send a patch that adds you to the MAINTAINERs file?
>>>
>>> thx
>> I try to help where I can. I am an OpenBSD developer and take a look at
>> what the other *BSD's have for local patches and push things upstream to
>> benefit both sides, but I am not sure I have enough time to be in a position
>> to be considered any kind of official MAINTAINER.
> Iam not asking you to do more work
> Id like to give you a git write account so you can push your BSD related
> fixes yourself.
> (everyone who has git write should be in MAINTAINERs)
>
> thx

Oh, my misunderstanding. I would be fine with that.
Michael Niedermayer May 12, 2024, 12:13 a.m. UTC | #6
Hi

On Sat, May 11, 2024 at 06:24:32PM -0400, Brad Smith wrote:
> On 2024-05-11 5:49 p.m., Michael Niedermayer wrote:
> > On Sat, May 11, 2024 at 03:55:44PM -0400, Brad Smith wrote:
> > > On 2024-05-06 10:24 p.m., Michael Niedermayer wrote:
> > > > On Sun, May 05, 2024 at 11:21:58PM -0400, Brad Smith wrote:
> > > > > avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
> > > > > 
> > > > > Use the machdep.altivec sysctl on NetBSD for AltiVec detection
> > > > > as is done with OpenBSD.
> > > > > 
> > > > > Signed-off-by: Brad Smith<brad@comstyle.com>
> > > > > ---
> > > > >    libavutil/ppc/cpu.c | 6 +++---
> > > > >    1 file changed, 3 insertions(+), 3 deletions(-)
> > > > you seem to be sending alot of bsd related patches, maybe
> > > > you want to send a patch that adds you to the MAINTAINERs file?
> > > > 
> > > > thx
> > > I try to help where I can. I am an OpenBSD developer and take a look at
> > > what the other *BSD's have for local patches and push things upstream to
> > > benefit both sides, but I am not sure I have enough time to be in a position
> > > to be considered any kind of official MAINTAINER.
> > Iam not asking you to do more work
> > Id like to give you a git write account so you can push your BSD related
> > fixes yourself.
> > (everyone who has git write should be in MAINTAINERs)
> > 
> > thx
> 
> Oh, my misunderstanding. I would be fine with that.

Than please post a patch that adds you to MAINTAINERs
the idea behind this is so that teh whole community can always
object anyone receiving git wriet access
I can post a patch adding you too, but i dont know what exactly
you want listed in it. For git write it just matters that you are
in the file anywhere

thx


[...]
Brad Smith May 12, 2024, 12:15 a.m. UTC | #7
On 2024-05-11 8:13 p.m., Michael Niedermayer wrote:
> Hi
>
> On Sat, May 11, 2024 at 06:24:32PM -0400, Brad Smith wrote:
>> On 2024-05-11 5:49 p.m., Michael Niedermayer wrote:
>>> On Sat, May 11, 2024 at 03:55:44PM -0400, Brad Smith wrote:
>>>> On 2024-05-06 10:24 p.m., Michael Niedermayer wrote:
>>>>> On Sun, May 05, 2024 at 11:21:58PM -0400, Brad Smith wrote:
>>>>>> avutil/ppc/cpu: Also use the machdep.altivec sysctl on NetBSD
>>>>>>
>>>>>> Use the machdep.altivec sysctl on NetBSD for AltiVec detection
>>>>>> as is done with OpenBSD.
>>>>>>
>>>>>> Signed-off-by: Brad Smith<brad@comstyle.com>
>>>>>> ---
>>>>>>     libavutil/ppc/cpu.c | 6 +++---
>>>>>>     1 file changed, 3 insertions(+), 3 deletions(-)
>>>>> you seem to be sending alot of bsd related patches, maybe
>>>>> you want to send a patch that adds you to the MAINTAINERs file?
>>>>>
>>>>> thx
>>>> I try to help where I can. I am an OpenBSD developer and take a look at
>>>> what the other *BSD's have for local patches and push things upstream to
>>>> benefit both sides, but I am not sure I have enough time to be in a position
>>>> to be considered any kind of official MAINTAINER.
>>> Iam not asking you to do more work
>>> Id like to give you a git write account so you can push your BSD related
>>> fixes yourself.
>>> (everyone who has git write should be in MAINTAINERs)
>>>
>>> thx
>> Oh, my misunderstanding. I would be fine with that.
> Than please post a patch that adds you to MAINTAINERs
> the idea behind this is so that teh whole community can always
> object anyone receiving git wriet access
> I can post a patch adding you too, but i dont know what exactly
> you want listed in it. For git write it just matters that you are
> in the file anywhere
>
> thx

Thanks. Will do.
diff mbox series

Patch

diff --git a/libavutil/ppc/cpu.c b/libavutil/ppc/cpu.c
index bc8bb5f47c..2b13cda662 100644
--- a/libavutil/ppc/cpu.c
+++ b/libavutil/ppc/cpu.c
@@ -27,7 +27,7 @@ 
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#elif defined(__OpenBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #include <machine/cpu.h>
@@ -56,8 +56,8 @@  int ff_get_cpu_flags_ppc(void)
     if (result == VECTORTYPE_ALTIVEC)
         return AV_CPU_FLAG_ALTIVEC;
     return 0;
-#elif defined(__APPLE__) || defined(__OpenBSD__)
-#ifdef __OpenBSD__
+#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
     int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
 #else
     int sels[2] = {CTL_HW, HW_VECTORUNIT};