* [PATCH] alpha: add simd_enabled argument to perf_reg_validate()
@ 2026-10-21 8:18 Thomas Weißschuh
2026-10-21 10:23 ` Magnus Lindholm
2026-10-21 15:48 ` [tip: perf/urgent] " tip-bot2 for Thomas Weißschuh
0 siblings, 2 replies; 6+ messages in thread
From: Thomas Weißschuh @ 2026-10-21 8:18 UTC (permalink / raw)
To: Richard Henderson, Matt Turner, Magnus Lindholm, Linus Torvalds
Cc: linux-alpha, linux-kernel, Dapeng Mi, Peter Zijlstra (Intel),
Thomas Weißschuh
Align the alpha function with the generic function signature.
The alpha function was added in commit 9280e99d87dd ("alpha: add
HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support") while the
generic function signature was changed in commit a2c64c74c029 ("perf:
Enhance perf_reg_validate() with simd_enabled argument").
After both commits landed in Linus' tree the signatures now differ,
resulting in a build error:
arch/alpha/kernel/perf_regs.c:46:5: error: conflicting types for 'perf_reg_validate'; have 'int(u64)' {aka 'int(long long unsigned int)'}
46 | int perf_reg_validate(u64 mask)
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/perf_event.h:50,
from arch/alpha/kernel/perf_regs.c:4:
include/linux/perf_regs.h:13:5: note: previous declaration of 'perf_reg_validate' with type 'int(u64, bool)' {aka 'int(long long unsigned int, _Bool)'}
13 | int perf_reg_validate(u64 mask, bool simd_enabled);
| ^~~~~~~~~~~~~~~~~
Add the missing argument.
Fixes: 742f62b63904 ("Merge tag 'alpha-for-v7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/lindholm/alpha")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
arch/alpha/kernel/perf_regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/perf_regs.c b/arch/alpha/kernel/perf_regs.c
index 33ea2e831ba0..c5a55bfa15a5 100644
--- a/arch/alpha/kernel/perf_regs.c
+++ b/arch/alpha/kernel/perf_regs.c
@@ -43,7 +43,7 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
return *(unsigned long *)((void *)regs + pt_regs_offset[idx]);
}
-int perf_reg_validate(u64 mask)
+int perf_reg_validate(u64 mask, bool simd_enabled)
{
if (!mask || mask & REG_RESERVED)
return -EINVAL;
---
base-commit: 2c455ddca7827ad8fa3a64fdbf5a60efb928b46a
change-id: 20261021-alpha-perf_reg_validate-c9b0a144fd3c
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] alpha: add simd_enabled argument to perf_reg_validate()
2026-10-21 8:18 [PATCH] alpha: add simd_enabled argument to perf_reg_validate() Thomas Weißschuh
@ 2026-10-21 10:23 ` Magnus Lindholm
2026-10-21 11:49 ` Thomas Weißschuh
2026-10-21 15:48 ` [tip: perf/urgent] " tip-bot2 for Thomas Weißschuh
1 sibling, 1 reply; 6+ messages in thread
From: Magnus Lindholm @ 2026-10-21 10:23 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Richard Henderson, Matt Turner, Linus Torvalds, linux-alpha,
linux-kernel, Dapeng Mi, Peter Zijlstra (Intel)
Hi Thomas,
On Wed, Oct 21, 2026 at 10:18 AM Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> Align the alpha function with the generic function signature.
> The alpha function was added in commit 9280e99d87dd ("alpha: add
> HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support") while the
> generic function signature was changed in commit a2c64c74c029 ("perf:
> Enhance perf_reg_validate() with simd_enabled argument").
>
> After both commits landed in Linus' tree the signatures now differ,
> resulting in a build error:
>
> arch/alpha/kernel/perf_regs.c:46:5: error: conflicting types for 'perf_reg_validate'; have 'int(u64)' {aka 'int(long long unsigned int)'}
> 46 | int perf_reg_validate(u64 mask)
> | ^~~~~~~~~~~~~~~~~
> In file included from include/linux/perf_event.h:50,
> from arch/alpha/kernel/perf_regs.c:4:
> include/linux/perf_regs.h:13:5: note: previous declaration of 'perf_reg_validate' with type 'int(u64, bool)' {aka 'int(long long unsigned int, _Bool)'}
> 13 | int perf_reg_validate(u64 mask, bool simd_enabled);
> | ^~~~~~~~~~~~~~~~~
>
> Add the missing argument.
>
> Fixes: 742f62b63904 ("Merge tag 'alpha-for-v7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/lindholm/alpha")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> arch/alpha/kernel/perf_regs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/alpha/kernel/perf_regs.c b/arch/alpha/kernel/perf_regs.c
> index 33ea2e831ba0..c5a55bfa15a5 100644
> --- a/arch/alpha/kernel/perf_regs.c
> +++ b/arch/alpha/kernel/perf_regs.c
> @@ -43,7 +43,7 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
> return *(unsigned long *)((void *)regs + pt_regs_offset[idx]);
> }
>
> -int perf_reg_validate(u64 mask)
> +int perf_reg_validate(u64 mask, bool simd_enabled)
> {
> if (!mask || mask & REG_RESERVED)
> return -EINVAL;
>
> ---
> base-commit: 2c455ddca7827ad8fa3a64fdbf5a60efb928b46a
> change-id: 20261021-alpha-perf_reg_validate-c9b0a144fd3c
>
> Best regards,
> --
> Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>
Thanks for catching this. I reproduced the build failure on current
mainline and confirmed your fix with GENERIC SMP and DP264 UP builds.
Both also passed perf register validation and sampling tests in QEMU.
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
If you have a route for this patch upstream, please go ahead and take it,
unless Linus would prefer to pick it up directly.
Thanks,
Magnus
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] alpha: add simd_enabled argument to perf_reg_validate()
2026-10-21 10:23 ` Magnus Lindholm
@ 2026-10-21 11:49 ` Thomas Weißschuh
2026-10-21 15:38 ` Peter Zijlstra
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Weißschuh @ 2026-10-21 11:49 UTC (permalink / raw)
To: Magnus Lindholm
Cc: Richard Henderson, Matt Turner, Linus Torvalds, linux-alpha,
linux-kernel, Dapeng Mi, Peter Zijlstra (Intel)
Hi Magnus!
On Wed, Oct 21, 2026 at 12:23:55PM +0200, Magnus Lindholm wrote:
> On Wed, Oct 21, 2026 at 10:18 AM Thomas Weißschuh
> <thomas.weissschuh@linutronix.de> wrote:
(...)
> Thanks for catching this. I reproduced the build failure on current
> mainline and confirmed your fix with GENERIC SMP and DP264 UP builds.
> Both also passed perf register validation and sampling tests in QEMU.
>
> Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
> Tested-by: Magnus Lindholm <linmag7@gmail.com>
Thanks.
> If you have a route for this patch upstream, please go ahead and take it,
> unless Linus would prefer to pick it up directly.
I have no route upstream. I hope for Linus to pick it up.
But if that does not happen, maybe you could send a PR.
How this issue made it past -next would also be interesting to know.
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] alpha: add simd_enabled argument to perf_reg_validate()
2026-10-21 11:49 ` Thomas Weißschuh
@ 2026-10-21 15:38 ` Peter Zijlstra
2026-10-21 15:43 ` Peter Zijlstra
0 siblings, 1 reply; 6+ messages in thread
From: Peter Zijlstra @ 2026-10-21 15:38 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Magnus Lindholm, Richard Henderson, Matt Turner, Linus Torvalds,
linux-alpha, linux-kernel, Dapeng Mi
On Wed, Oct 21, 2026 at 01:49:35PM +0200, Thomas Weißschuh wrote:
> Hi Magnus!
>
> On Wed, Oct 21, 2026 at 12:23:55PM +0200, Magnus Lindholm wrote:
> > On Wed, Oct 21, 2026 at 10:18 AM Thomas Weißschuh
> > <thomas.weissschuh@linutronix.de> wrote:
>
> (...)
>
> > Thanks for catching this. I reproduced the build failure on current
> > mainline and confirmed your fix with GENERIC SMP and DP264 UP builds.
> > Both also passed perf register validation and sampling tests in QEMU.
> >
> > Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
> > Tested-by: Magnus Lindholm <linmag7@gmail.com>
>
> Thanks.
>
> > If you have a route for this patch upstream, please go ahead and take it,
> > unless Linus would prefer to pick it up directly.
>
> I have no route upstream. I hope for Linus to pick it up.
> But if that does not happen, maybe you could send a PR.
I can stick it in tip/perf/urgent if that helps :-) I'm the one merging
the broken patch in the first place I suppose :/
> How this issue made it past -next would also be interesting to know.
Yeah this; normally I get robots screaming at me for things like this.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] alpha: add simd_enabled argument to perf_reg_validate()
2026-10-21 15:38 ` Peter Zijlstra
@ 2026-10-21 15:43 ` Peter Zijlstra
0 siblings, 0 replies; 6+ messages in thread
From: Peter Zijlstra @ 2026-10-21 15:43 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Magnus Lindholm, Richard Henderson, Matt Turner, Linus Torvalds,
linux-alpha, linux-kernel, Dapeng Mi
On Wed, Oct 21, 2026 at 05:38:56PM +0200, Peter Zijlstra wrote:
> On Wed, Oct 21, 2026 at 01:49:35PM +0200, Thomas Weißschuh wrote:
> > Hi Magnus!
> >
> > On Wed, Oct 21, 2026 at 12:23:55PM +0200, Magnus Lindholm wrote:
> > > On Wed, Oct 21, 2026 at 10:18 AM Thomas Weißschuh
> > > <thomas.weissschuh@linutronix.de> wrote:
> >
> > (...)
> >
> > > Thanks for catching this. I reproduced the build failure on current
> > > mainline and confirmed your fix with GENERIC SMP and DP264 UP builds.
> > > Both also passed perf register validation and sampling tests in QEMU.
> > >
> > > Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
> > > Tested-by: Magnus Lindholm <linmag7@gmail.com>
> >
> > Thanks.
> >
> > > If you have a route for this patch upstream, please go ahead and take it,
> > > unless Linus would prefer to pick it up directly.
> >
> > I have no route upstream. I hope for Linus to pick it up.
> > But if that does not happen, maybe you could send a PR.
>
> I can stick it in tip/perf/urgent if that helps :-)
It should be there; please yell if I should drop it because someone else
(alpha tree) wants it or something.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [tip: perf/urgent] alpha: add simd_enabled argument to perf_reg_validate()
2026-10-21 8:18 [PATCH] alpha: add simd_enabled argument to perf_reg_validate() Thomas Weißschuh
2026-10-21 10:23 ` Magnus Lindholm
@ 2026-10-21 15:48 ` tip-bot2 for Thomas Weißschuh
1 sibling, 0 replies; 6+ messages in thread
From: tip-bot2 for Thomas Weißschuh @ 2026-10-21 15:48 UTC (permalink / raw)
To: linux-tip-commits
Cc: thomas.weissschuh, Peter Zijlstra (Intel),
Magnus Lindholm, x86, linux-kernel
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 2b774b5bbffabae7ac6be98a98e9641fb3c0bbb4
Gitweb: https://git.kernel.org/tip/2b774b5bbffabae7ac6be98a98e9641fb3c0bbb4
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate: Wed, 21 Oct 2026 10:18:22 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Wed, 21 Oct 2026 17:42:37 +02:00
alpha: add simd_enabled argument to perf_reg_validate()
Align the alpha function with the generic function signature.
The alpha function was added in commit 9280e99d87dd ("alpha: add
HAVE_PERF_REGS and HAVE_PERF_USER_STACK_DUMP support") while the
generic function signature was changed in commit a2c64c74c029 ("perf:
Enhance perf_reg_validate() with simd_enabled argument").
After both commits landed in Linus' tree the signatures now differ,
resulting in a build error:
arch/alpha/kernel/perf_regs.c:46:5: error: conflicting types for 'perf_reg_validate'; have 'int(u64)' {aka 'int(long long unsigned int)'}
46 | int perf_reg_validate(u64 mask)
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/perf_event.h:50,
from arch/alpha/kernel/perf_regs.c:4:
include/linux/perf_regs.h:13:5: note: previous declaration of 'perf_reg_validate' with type 'int(u64, bool)' {aka 'int(long long unsigned int, _Bool)'}
13 | int perf_reg_validate(u64 mask, bool simd_enabled);
| ^~~~~~~~~~~~~~~~~
Add the missing argument.
Fixes: 742f62b63904 ("Merge tag 'alpha-for-v7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/lindholm/alpha")
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Link: https://patch.msgid.link/20261021-alpha-perf_reg_validate-v1-1-a8e8cc23ea7a@linutronix.de
---
arch/alpha/kernel/perf_regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/perf_regs.c b/arch/alpha/kernel/perf_regs.c
index 33ea2e8..c5a55bf 100644
--- a/arch/alpha/kernel/perf_regs.c
+++ b/arch/alpha/kernel/perf_regs.c
@@ -43,7 +43,7 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
return *(unsigned long *)((void *)regs + pt_regs_offset[idx]);
}
-int perf_reg_validate(u64 mask)
+int perf_reg_validate(u64 mask, bool simd_enabled)
{
if (!mask || mask & REG_RESERVED)
return -EINVAL;
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-21 15:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 8:18 [PATCH] alpha: add simd_enabled argument to perf_reg_validate() Thomas Weißschuh
2026-10-21 10:23 ` Magnus Lindholm
2026-10-21 11:49 ` Thomas Weißschuh
2026-10-21 15:38 ` Peter Zijlstra
2026-10-21 15:43 ` Peter Zijlstra
2026-10-21 15:48 ` [tip: perf/urgent] " tip-bot2 for Thomas Weißschuh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®