linux-openrisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h
@ 2025-04-26  3:08 Randy Dunlap
  2025-04-26  6:00 ` Stafford Horne
  2025-05-03 16:01 ` Masahiro Yamada
  0 siblings, 2 replies; 8+ messages in thread
From: Randy Dunlap @ 2025-04-26  3:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Masahiro Yamada, Jonas Bonn, Stefan Kristiansson,
	Stafford Horne, linux-openrisc, linux-kbuild

Since openrisc does not support PERF_EVENTS, omit the HDRTEST of
bpf_perf_event.h for arch/openrisc/.

Fixes a build error:
usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Stafford Horne <shorne@gmail.com>
Cc: linux-openrisc@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org
---
 usr/include/Makefile |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-next-20250424.orig/usr/include/Makefile
+++ linux-next-20250424/usr/include/Makefile
@@ -59,6 +59,10 @@ ifeq ($(SRCARCH),arc)
 no-header-test += linux/bpf_perf_event.h
 endif
 
+ifeq ($(SRCARCH),openrisc)
+no-header-test += linux/bpf_perf_event.h
+endif
+
 ifeq ($(SRCARCH),powerpc)
 no-header-test += linux/bpf_perf_event.h
 endif

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h
  2025-04-26  3:08 [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h Randy Dunlap
@ 2025-04-26  6:00 ` Stafford Horne
  2025-04-26 15:45   ` Randy Dunlap
  2025-05-03 16:01 ` Masahiro Yamada
  1 sibling, 1 reply; 8+ messages in thread
From: Stafford Horne @ 2025-04-26  6:00 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Masahiro Yamada, Jonas Bonn, Stefan Kristiansson,
	linux-openrisc, linux-kbuild

Hi Randy,

On Fri, Apr 25, 2025 at 08:08:15PM -0700, Randy Dunlap wrote:
> Since openrisc does not support PERF_EVENTS, omit the HDRTEST of
> bpf_perf_event.h for arch/openrisc/.
>
> Fixes a build error:
> usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type

This looks ok to me, but do you have any pointer of how to reproduce this?

-Stafford

> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Jonas Bonn <jonas@southpole.se>
> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> Cc: Stafford Horne <shorne@gmail.com>
> Cc: linux-openrisc@vger.kernel.org
> Cc: linux-kbuild@vger.kernel.org
> ---
>  usr/include/Makefile |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- linux-next-20250424.orig/usr/include/Makefile
> +++ linux-next-20250424/usr/include/Makefile
> @@ -59,6 +59,10 @@ ifeq ($(SRCARCH),arc)
>  no-header-test += linux/bpf_perf_event.h
>  endif
>  
> +ifeq ($(SRCARCH),openrisc)
> +no-header-test += linux/bpf_perf_event.h
> +endif
> +
>  ifeq ($(SRCARCH),powerpc)
>  no-header-test += linux/bpf_perf_event.h
>  endif

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h
  2025-04-26  6:00 ` Stafford Horne
@ 2025-04-26 15:45   ` Randy Dunlap
  2025-04-26 16:14     ` Stafford Horne
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2025-04-26 15:45 UTC (permalink / raw)
  To: Stafford Horne
  Cc: linux-kernel, Masahiro Yamada, Jonas Bonn, Stefan Kristiansson,
	linux-openrisc, linux-kbuild



On 4/25/25 11:00 PM, Stafford Horne wrote:
> Hi Randy,
> 
> On Fri, Apr 25, 2025 at 08:08:15PM -0700, Randy Dunlap wrote:
>> Since openrisc does not support PERF_EVENTS, omit the HDRTEST of
>> bpf_perf_event.h for arch/openrisc/.
>>
>> Fixes a build error:
>> usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type
> 
> This looks ok to me, but do you have any pointer of how to reproduce this?
> 

All I did was 'make allmodconfig' or 'make allyesconfig'. Either of them cause
this error.

> -Stafford
> 
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Masahiro Yamada <masahiroy@kernel.org>
>> Cc: Jonas Bonn <jonas@southpole.se>
>> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
>> Cc: Stafford Horne <shorne@gmail.com>
>> Cc: linux-openrisc@vger.kernel.org
>> Cc: linux-kbuild@vger.kernel.org
>> ---
>>  usr/include/Makefile |    4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> --- linux-next-20250424.orig/usr/include/Makefile
>> +++ linux-next-20250424/usr/include/Makefile
>> @@ -59,6 +59,10 @@ ifeq ($(SRCARCH),arc)
>>  no-header-test += linux/bpf_perf_event.h
>>  endif
>>  
>> +ifeq ($(SRCARCH),openrisc)
>> +no-header-test += linux/bpf_perf_event.h
>> +endif
>> +
>>  ifeq ($(SRCARCH),powerpc)
>>  no-header-test += linux/bpf_perf_event.h
>>  endif

-- 
~Randy


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h
  2025-04-26 15:45   ` Randy Dunlap
@ 2025-04-26 16:14     ` Stafford Horne
  0 siblings, 0 replies; 8+ messages in thread
From: Stafford Horne @ 2025-04-26 16:14 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Masahiro Yamada, Jonas Bonn, Stefan Kristiansson,
	linux-openrisc, linux-kbuild

On Sat, Apr 26, 2025 at 08:45:38AM -0700, Randy Dunlap wrote:
> 
> 
> On 4/25/25 11:00 PM, Stafford Horne wrote:
> > Hi Randy,
> > 
> > On Fri, Apr 25, 2025 at 08:08:15PM -0700, Randy Dunlap wrote:
> >> Since openrisc does not support PERF_EVENTS, omit the HDRTEST of
> >> bpf_perf_event.h for arch/openrisc/.
> >>
> >> Fixes a build error:
> >> usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type
> > 
> > This looks ok to me, but do you have any pointer of how to reproduce this?
> > 
> 
> All I did was 'make allmodconfig' or 'make allyesconfig'. Either of them cause
> this error.

Thanks, I was just now able to figure this out after some more reading of
usr/include/Makefile.  As long as I have CONFIG_UAPI_HEADER_TEST enabled the
HDRTEST's will run and I could produce this.

I suppose this should go via the Yamada-san's make tree. So:

Acked-by: Stafford Horne <shorne@gmail.com>

> > -Stafford
> > 
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Cc: Masahiro Yamada <masahiroy@kernel.org>
> >> Cc: Jonas Bonn <jonas@southpole.se>
> >> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> >> Cc: Stafford Horne <shorne@gmail.com>
> >> Cc: linux-openrisc@vger.kernel.org
> >> Cc: linux-kbuild@vger.kernel.org
> >> ---
> >>  usr/include/Makefile |    4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> --- linux-next-20250424.orig/usr/include/Makefile
> >> +++ linux-next-20250424/usr/include/Makefile
> >> @@ -59,6 +59,10 @@ ifeq ($(SRCARCH),arc)
> >>  no-header-test += linux/bpf_perf_event.h
> >>  endif
> >>  
> >> +ifeq ($(SRCARCH),openrisc)
> >> +no-header-test += linux/bpf_perf_event.h
> >> +endif
> >> +
> >>  ifeq ($(SRCARCH),powerpc)
> >>  no-header-test += linux/bpf_perf_event.h
> >>  endif
> 
> -- 
> ~Randy
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h
  2025-04-26  3:08 [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h Randy Dunlap
  2025-04-26  6:00 ` Stafford Horne
@ 2025-05-03 16:01 ` Masahiro Yamada
  2025-05-03 16:13   ` Masahiro Yamada
  1 sibling, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2025-05-03 16:01 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	linux-openrisc, linux-kbuild

On Sat, Apr 26, 2025 at 12:08 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Since openrisc does not support PERF_EVENTS, omit the HDRTEST of
> bpf_perf_event.h for arch/openrisc/.
>
> Fixes a build error:
> usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type



Where can I get openrisc compiler that enables CONFIG_CC_CAN_LINK?




> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Jonas Bonn <jonas@southpole.se>
> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> Cc: Stafford Horne <shorne@gmail.com>
> Cc: linux-openrisc@vger.kernel.org
> Cc: linux-kbuild@vger.kernel.org
> ---
>  usr/include/Makefile |    4 ++++
>  1 file changed, 4 insertions(+)
>
> --- linux-next-20250424.orig/usr/include/Makefile
> +++ linux-next-20250424/usr/include/Makefile
> @@ -59,6 +59,10 @@ ifeq ($(SRCARCH),arc)
>  no-header-test += linux/bpf_perf_event.h
>  endif
>
> +ifeq ($(SRCARCH),openrisc)
> +no-header-test += linux/bpf_perf_event.h
> +endif
> +
>  ifeq ($(SRCARCH),powerpc)
>  no-header-test += linux/bpf_perf_event.h
>  endif



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h
  2025-05-03 16:01 ` Masahiro Yamada
@ 2025-05-03 16:13   ` Masahiro Yamada
  2025-05-03 23:23     ` Randy Dunlap
  0 siblings, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2025-05-03 16:13 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	linux-openrisc, linux-kbuild

On Sun, May 4, 2025 at 1:01 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sat, Apr 26, 2025 at 12:08 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >
> > Since openrisc does not support PERF_EVENTS, omit the HDRTEST of
> > bpf_perf_event.h for arch/openrisc/.
> >
> > Fixes a build error:
> > usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type
>
>
>
> Where can I get openrisc compiler that enables CONFIG_CC_CAN_LINK?

Never mind.
I downloaded a one from
https://github.com/stffrdhrn/or1k-toolchain-build/releases

Hmm, I did not observe an error like that.

Instead, I got a different error message.

  HDRTEST usr/include/linux/bpf_perf_event.h
In file included from <command-line>:
./usr/include/linux/bpf_perf_event.h:15:9: error: unknown type name '__u64'
   15 |         __u64 sample_period;
      |         ^~~~~
./usr/include/linux/bpf_perf_event.h:16:9: error: unknown type name '__u64'
   16 |         __u64 addr;
      |         ^~~~~




diff --git a/include/uapi/linux/bpf_perf_event.h
b/include/uapi/linux/bpf_perf_event.h
index eb1b9d21250c..61264bdda988 100644
--- a/include/uapi/linux/bpf_perf_event.h
+++ b/include/uapi/linux/bpf_perf_event.h
@@ -8,6 +8,7 @@
 #ifndef _UAPI__LINUX_BPF_PERF_EVENT_H__
 #define _UAPI__LINUX_BPF_PERF_EVENT_H__

+#include <linux/types.h>
 #include <asm/bpf_perf_event.h>

 struct bpf_perf_event_data {











>
>
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Cc: Masahiro Yamada <masahiroy@kernel.org>
> > Cc: Jonas Bonn <jonas@southpole.se>
> > Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> > Cc: Stafford Horne <shorne@gmail.com>
> > Cc: linux-openrisc@vger.kernel.org
> > Cc: linux-kbuild@vger.kernel.org
> > ---
> >  usr/include/Makefile |    4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > --- linux-next-20250424.orig/usr/include/Makefile
> > +++ linux-next-20250424/usr/include/Makefile
> > @@ -59,6 +59,10 @@ ifeq ($(SRCARCH),arc)
> >  no-header-test += linux/bpf_perf_event.h
> >  endif
> >
> > +ifeq ($(SRCARCH),openrisc)
> > +no-header-test += linux/bpf_perf_event.h
> > +endif
> > +
> >  ifeq ($(SRCARCH),powerpc)
> >  no-header-test += linux/bpf_perf_event.h
> >  endif
>
>
>
> --
> Best Regards
> Masahiro Yamada



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h
  2025-05-03 16:13   ` Masahiro Yamada
@ 2025-05-03 23:23     ` Randy Dunlap
  2025-05-03 23:31       ` Masahiro Yamada
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2025-05-03 23:23 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	linux-openrisc, linux-kbuild



On 5/3/25 9:13 AM, Masahiro Yamada wrote:
> On Sun, May 4, 2025 at 1:01 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>>
>> On Sat, Apr 26, 2025 at 12:08 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>>
>>> Since openrisc does not support PERF_EVENTS, omit the HDRTEST of
>>> bpf_perf_event.h for arch/openrisc/.
>>>
>>> Fixes a build error:
>>> usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type
>>
>>
>>
>> Where can I get openrisc compiler that enables CONFIG_CC_CAN_LINK?
> 
> Never mind.
> I downloaded a one from
> https://github.com/stffrdhrn/or1k-toolchain-build/releases
> 
> Hmm, I did not observe an error like that.
> 
> Instead, I got a different error message.
> 
>   HDRTEST usr/include/linux/bpf_perf_event.h
> In file included from <command-line>:
> ./usr/include/linux/bpf_perf_event.h:15:9: error: unknown type name '__u64'
>    15 |         __u64 sample_period;
>       |         ^~~~~
> ./usr/include/linux/bpf_perf_event.h:16:9: error: unknown type name '__u64'
>    16 |         __u64 addr;
>       |         ^~~~~
> 

Does HDRTEST use the #include files from the header that is being tested?

usr/include/linux/bpf_perf_event.h #includes <asm/bpf_perf_event.h>
(from usr/include/ ??) which #includes <asm-generic/bpf_perf_event.h>
(from usr/include/ ??) which #includes <linux/ptrace.h> (from usr/include/ ??)
which #includes <linux/types.h>.  I don't see this problem in my builds.

I do still continue to see this failure:

  HDRTEST usr/include/linux/bpf_perf_event.h
In file included from <command-line>:
./usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type
   14 |         bpf_user_pt_regs_t regs;
      |                            ^~~~
make[5]: *** [../usr/include/Makefile:85: usr/include/linux/bpf_perf_event.hdrtest] Error 1

> 
> 
> 
> diff --git a/include/uapi/linux/bpf_perf_event.h
> b/include/uapi/linux/bpf_perf_event.h
> index eb1b9d21250c..61264bdda988 100644
> --- a/include/uapi/linux/bpf_perf_event.h
> +++ b/include/uapi/linux/bpf_perf_event.h
> @@ -8,6 +8,7 @@
>  #ifndef _UAPI__LINUX_BPF_PERF_EVENT_H__
>  #define _UAPI__LINUX_BPF_PERF_EVENT_H__
> 
> +#include <linux/types.h>
>  #include <asm/bpf_perf_event.h>
> 
>  struct bpf_perf_event_data {
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>>
>>
>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>>> Cc: Masahiro Yamada <masahiroy@kernel.org>
>>> Cc: Jonas Bonn <jonas@southpole.se>
>>> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
>>> Cc: Stafford Horne <shorne@gmail.com>
>>> Cc: linux-openrisc@vger.kernel.org
>>> Cc: linux-kbuild@vger.kernel.org
>>> ---
>>>  usr/include/Makefile |    4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> --- linux-next-20250424.orig/usr/include/Makefile
>>> +++ linux-next-20250424/usr/include/Makefile
>>> @@ -59,6 +59,10 @@ ifeq ($(SRCARCH),arc)
>>>  no-header-test += linux/bpf_perf_event.h
>>>  endif
>>>
>>> +ifeq ($(SRCARCH),openrisc)
>>> +no-header-test += linux/bpf_perf_event.h
>>> +endif
>>> +
>>>  ifeq ($(SRCARCH),powerpc)
>>>  no-header-test += linux/bpf_perf_event.h
>>>  endif
>>
>>
>>
>> --
>> Best Regards
>> Masahiro Yamada
> 
> 
> 

-- 
~Randy


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h
  2025-05-03 23:23     ` Randy Dunlap
@ 2025-05-03 23:31       ` Masahiro Yamada
  0 siblings, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2025-05-03 23:31 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Jonas Bonn, Stefan Kristiansson, Stafford Horne,
	linux-openrisc, linux-kbuild

On Sun, May 4, 2025 at 8:23 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
>
>
> On 5/3/25 9:13 AM, Masahiro Yamada wrote:
> > On Sun, May 4, 2025 at 1:01 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >>
> >> On Sat, Apr 26, 2025 at 12:08 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>>
> >>> Since openrisc does not support PERF_EVENTS, omit the HDRTEST of
> >>> bpf_perf_event.h for arch/openrisc/.
> >>>
> >>> Fixes a build error:
> >>> usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type
> >>
> >>
> >>
> >> Where can I get openrisc compiler that enables CONFIG_CC_CAN_LINK?
> >
> > Never mind.
> > I downloaded a one from
> > https://github.com/stffrdhrn/or1k-toolchain-build/releases
> >
> > Hmm, I did not observe an error like that.
> >
> > Instead, I got a different error message.
> >
> >   HDRTEST usr/include/linux/bpf_perf_event.h
> > In file included from <command-line>:
> > ./usr/include/linux/bpf_perf_event.h:15:9: error: unknown type name '__u64'
> >    15 |         __u64 sample_period;
> >       |         ^~~~~
> > ./usr/include/linux/bpf_perf_event.h:16:9: error: unknown type name '__u64'
> >    16 |         __u64 addr;
> >       |         ^~~~~
> >
>
> Does HDRTEST use the #include files from the header that is being tested?
>
> usr/include/linux/bpf_perf_event.h #includes <asm/bpf_perf_event.h>
> (from usr/include/ ??) which #includes <asm-generic/bpf_perf_event.h>
> (from usr/include/ ??) which #includes <linux/ptrace.h> (from usr/include/ ??)
> which #includes <linux/types.h>.  I don't see this problem in my builds.
>
> I do still continue to see this failure:
>
>   HDRTEST usr/include/linux/bpf_perf_event.h
> In file included from <command-line>:
> ./usr/include/linux/bpf_perf_event.h:14:28: error: field 'regs' has incomplete type
>    14 |         bpf_user_pt_regs_t regs;
>       |                            ^~~~
> make[5]: *** [../usr/include/Makefile:85: usr/include/linux/bpf_perf_event.hdrtest] Error 1


Sorry, my local issue.

Applied now.



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-05-03 23:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-26  3:08 [PATCH] usr/include: openrisc: don't HDRTEST bpf_perf_event.h Randy Dunlap
2025-04-26  6:00 ` Stafford Horne
2025-04-26 15:45   ` Randy Dunlap
2025-04-26 16:14     ` Stafford Horne
2025-05-03 16:01 ` Masahiro Yamada
2025-05-03 16:13   ` Masahiro Yamada
2025-05-03 23:23     ` Randy Dunlap
2025-05-03 23:31       ` Masahiro Yamada

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).