Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-10-12 Thread Warner Losh
I talked to Gleb and this will move to opt_global.h. this will fix all
these problems.

Warner

On Thu, Sep 26, 2019, 2:08 PM Cy Schubert  wrote:

> In message <6f50f518-0f8e-4e82-a9e9-b9db14cdb...@www.fastmail.com>, "Josh
> Paetz
> el" writes:
> >
> >
> > On Thu, Sep 26, 2019, at 12:34 PM, Warner Losh wrote:
> > > Kinda my point exactly...
> > >
> > > Warner
> > >
> > > On Thu, Sep 26, 2019 at 11:25 AM Ryan Stone  wrote:
> > >> We also shouldn't have ifdef's that change the size of a kernel
> > >>  structure that's part of the KBI. Isn't struct epoch_tracker part of
> > >>  the KBI?
> > >>
> > >>  On Thu, Sep 26, 2019 at 12:46 PM Warner Losh  wrote:
> > >>  >
> > >>  > But we shouldn't be including opt_foo.h files in sys/*.h files.
> That's
> > the root cause of trouble here.
> > >>  >
> > >>  > Warner
> > >>  >
> > >>  > On Thu, Sep 26, 2019 at 9:11 AM Niclas Zeising <
> zeis...@freebsd.org> wr
> > ote:
> > >>  >>
> > >>  >> On 2019-09-26 17:03, Charlie Li via freebsd-x11 wrote:
> > >>  >> > Kyle Evans wrote:
> > >>  >> >> On Thu, Sep 26, 2019 at 9:49 AM Charlie Li wrote:
> > >>  >> >>> This breaks building the drm-kmod ports, as the build cannot
> find
> > >>  >> >>> opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod
> dies t
> > he
> > >>  >> >>> exact same way):
> > >>  >> >>>
> > >>  >> >>> --- linux_anon_inodes.o ---
> > >>  >> >>> cc -O2 -pipe -fno-strict-aliasing -include
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/dr
> > ivers/gpu/drm/drm_os_config.h
> > >>  >> >>> '-DKBUILD_MODNAME="linuxkpi_gplv2"' -Werror -D_KERNEL
> -DKLD_MODULE
> > >>  >> >>> -nostdinc
> > >>  >> >>>
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/
> > include
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/lin
> > uxkpi/dummy/include
> > >>  >> >>>
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/
> > linuxkpi/gplv2/include
> > >>  >> >>> -I/usr/src/sys/compat/linuxkpi/common/include -I.
> -I/usr/src/sys
> > >>  >> >>> -I/usr/src/sys/contrib/ck/include -fno-common
> -fno-omit-frame-poin
> > ter
> > >>  >> >>> -mno-omit-leaf-frame-pointer
> > >>  >> >>> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
> > >>  >> >>> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
> > >>  >> >>> -MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o
> -mcmodel=ker
> > nel
> > >>  >> >>> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> > >>  >> >>> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv
> -fstack-pro
> > tector
> > >>  >> >>> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> > >>  >> >>> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
> > >>  >> >>> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
> > >>  >> >>> -Wmissing-include-dirs -fdiagnostics-show-option
> -Wno-unknown-prag
> > mas
> > >>  >> >>> -Wno-error-tautological-compare -Wno-error-empty-body
> > >>  >> >>> -Wno-error-parentheses-equality -Wno-error-unused-function
> > >>  >> >>> -Wno-error-pointer-sign -Wno-error-shift-negative-value
> > >>  >> >>> -Wno-address-of-packed-member -Wno-format-zero-length
> -Wno-pointer
> > -arith
> > >>  >> >>> -mno-aes -mno-avx -std=iso9899:1999 -c
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> > nuxkpi/gplv2/src/linux_anon_inodes.c
> > >>  >> >>> -o linux_anon_inodes.o
> > >>  >> >>> In file included from
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> > nuxkpi/gplv2/src/linux_anon_inodes.c:12:
> > >>  >> >>> In file included from
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> > nuxkpi/gplv2/include/linux/anon_inodes.h:4:
> > >>  >> >>> In file included from
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> > nuxkpi/gplv2/include/linux/fs.h:6:
> > >>  >> >>> In file included from
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> > nuxkpi/gplv2/include/linux/shrinker.h:5:
> > >>  >> >>> In file included from
> > >>  >> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> > >>  >> >>> In file included from /usr/src/sys/net/if_var.h:83:
> > >>  >> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h'
> file no
> > t found
> > >>  >> >>> #include "opt_epoch.h"
> > >>  >> >>> ^
> > >>  >> >>> --- linux_anon_inodefs.o ---
> > >>  >> >>> In file included from
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> > nuxkpi/gplv2/src/linux_anon_inodefs.c:45:
> > >>  >> >>> In file included from
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> > nuxkpi/gplv2/include/linux/debugfs.h:18:
> > >>  >> >>> In file included from
> > >>  >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> > nuxkpi/gplv2/include/linux/fs.h:6:
> > >>  >> >>> In file included from
> > >>  >> >>>
> 

Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-10-12 Thread Josh Paetzel



On Thu, Sep 26, 2019, at 12:34 PM, Warner Losh wrote:
> Kinda my point exactly...
> 
> Warner
> 
> On Thu, Sep 26, 2019 at 11:25 AM Ryan Stone  wrote:
>> We also shouldn't have ifdef's that change the size of a kernel
>>  structure that's part of the KBI. Isn't struct epoch_tracker part of
>>  the KBI?
>> 
>>  On Thu, Sep 26, 2019 at 12:46 PM Warner Losh  wrote:
>>  >
>>  > But we shouldn't be including opt_foo.h files in sys/*.h files. That's 
>> the root cause of trouble here.
>>  >
>>  > Warner
>>  >
>>  > On Thu, Sep 26, 2019 at 9:11 AM Niclas Zeising  
>> wrote:
>>  >>
>>  >> On 2019-09-26 17:03, Charlie Li via freebsd-x11 wrote:
>>  >> > Kyle Evans wrote:
>>  >> >> On Thu, Sep 26, 2019 at 9:49 AM Charlie Li wrote:
>>  >> >>> This breaks building the drm-kmod ports, as the build cannot find
>>  >> >>> opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
>>  >> >>> exact same way):
>>  >> >>>
>>  >> >>> --- linux_anon_inodes.o ---
>>  >> >>> cc -O2 -pipe -fno-strict-aliasing -include
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
>>  >> >>> '-DKBUILD_MODNAME="linuxkpi_gplv2"' -Werror -D_KERNEL -DKLD_MODULE
>>  >> >>> -nostdinc
>>  >> >>> 
>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include 
>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
>>  >> >>> 
>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
>>  >> >>> -I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
>>  >> >>> -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-pointer
>>  >> >>> -mno-omit-leaf-frame-pointer
>>  >> >>> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
>>  >> >>> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
>>  >> >>> -MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=kernel
>>  >> >>> -mno-red-zone -mno-mmx -mno-sse -msoft-float
>>  >> >>> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv 
>> -fstack-protector
>>  >> >>> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
>>  >> >>> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
>>  >> >>> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
>>  >> >>> -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
>>  >> >>> -Wno-error-tautological-compare -Wno-error-empty-body
>>  >> >>> -Wno-error-parentheses-equality -Wno-error-unused-function
>>  >> >>> -Wno-error-pointer-sign -Wno-error-shift-negative-value
>>  >> >>> -Wno-address-of-packed-member -Wno-format-zero-length 
>> -Wno-pointer-arith
>>  >> >>> -mno-aes -mno-avx -std=iso9899:1999 -c
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
>>  >> >>> -o linux_anon_inodes.o
>>  >> >>> In file included from
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
>>  >> >>> In file included from
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
>>  >> >>> In file included from
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
>>  >> >>> In file included from
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
>>  >> >>> In file included from
>>  >> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
>>  >> >>> In file included from /usr/src/sys/net/if_var.h:83:
>>  >> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not 
>> found
>>  >> >>> #include "opt_epoch.h"
>>  >> >>> ^
>>  >> >>> --- linux_anon_inodefs.o ---
>>  >> >>> In file included from
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
>>  >> >>> In file included from
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
>>  >> >>> In file included from
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
>>  >> >>> In file included from
>>  >> >>> 
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
>>  >> >>> In file included from
>>  >> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
>>  >> >>> In file included from /usr/src/sys/net/if_var.h:83:
>>  >> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not 
>> found
>>  >> >>> #include "opt_epoch.h"
>>  >> >>> ^
>>  >> >>> --- linux_anon_inodes.o ---
>>  >> >>> 1 error generated.
>>  >> >>> *** [linux_anon_inodes.o] Error code 1
>>  >> >>>
>>  >> >>> make[2]: stopped in
>>  >> >>> 
>> 

Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-10-12 Thread Cy Schubert
In message <6f50f518-0f8e-4e82-a9e9-b9db14cdb...@www.fastmail.com>, "Josh 
Paetz
el" writes:
>
>
> On Thu, Sep 26, 2019, at 12:34 PM, Warner Losh wrote:
> > Kinda my point exactly...
> > 
> > Warner
> > 
> > On Thu, Sep 26, 2019 at 11:25 AM Ryan Stone  wrote:
> >> We also shouldn't have ifdef's that change the size of a kernel
> >>  structure that's part of the KBI. Isn't struct epoch_tracker part of
> >>  the KBI?
> >> 
> >>  On Thu, Sep 26, 2019 at 12:46 PM Warner Losh  wrote:
> >>  >
> >>  > But we shouldn't be including opt_foo.h files in sys/*.h files. That's 
> the root cause of trouble here.
> >>  >
> >>  > Warner
> >>  >
> >>  > On Thu, Sep 26, 2019 at 9:11 AM Niclas Zeising  wr
> ote:
> >>  >>
> >>  >> On 2019-09-26 17:03, Charlie Li via freebsd-x11 wrote:
> >>  >> > Kyle Evans wrote:
> >>  >> >> On Thu, Sep 26, 2019 at 9:49 AM Charlie Li wrote:
> >>  >> >>> This breaks building the drm-kmod ports, as the build cannot find
> >>  >> >>> opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies t
> he
> >>  >> >>> exact same way):
> >>  >> >>>
> >>  >> >>> --- linux_anon_inodes.o ---
> >>  >> >>> cc -O2 -pipe -fno-strict-aliasing -include
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/dr
> ivers/gpu/drm/drm_os_config.h
> >>  >> >>> '-DKBUILD_MODNAME="linuxkpi_gplv2"' -Werror -D_KERNEL -DKLD_MODULE
> >>  >> >>> -nostdinc
> >>  >> >>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/
> include -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/lin
> uxkpi/dummy/include
> >>  >> >>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/
> linuxkpi/gplv2/include
> >>  >> >>> -I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
> >>  >> >>> -I/usr/src/sys/contrib/ck/include -fno-common -fno-omit-frame-poin
> ter
> >>  >> >>> -mno-omit-leaf-frame-pointer
> >>  >> >>> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
> >>  >> >>> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
> >>  >> >>> -MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=ker
> nel
> >>  >> >>> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> >>  >> >>> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-pro
> tector
> >>  >> >>> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> >>  >> >>> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
> >>  >> >>> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
> >>  >> >>> -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-prag
> mas
> >>  >> >>> -Wno-error-tautological-compare -Wno-error-empty-body
> >>  >> >>> -Wno-error-parentheses-equality -Wno-error-unused-function
> >>  >> >>> -Wno-error-pointer-sign -Wno-error-shift-negative-value
> >>  >> >>> -Wno-address-of-packed-member -Wno-format-zero-length -Wno-pointer
> -arith
> >>  >> >>> -mno-aes -mno-avx -std=iso9899:1999 -c
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/src/linux_anon_inodes.c
> >>  >> >>> -o linux_anon_inodes.o
> >>  >> >>> In file included from
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/src/linux_anon_inodes.c:12:
> >>  >> >>> In file included from
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/include/linux/anon_inodes.h:4:
> >>  >> >>> In file included from
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/include/linux/fs.h:6:
> >>  >> >>> In file included from
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/include/linux/shrinker.h:5:
> >>  >> >>> In file included from
> >>  >> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> >>  >> >>> In file included from /usr/src/sys/net/if_var.h:83:
> >>  >> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file no
> t found
> >>  >> >>> #include "opt_epoch.h"
> >>  >> >>> ^
> >>  >> >>> --- linux_anon_inodefs.o ---
> >>  >> >>> In file included from
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/src/linux_anon_inodefs.c:45:
> >>  >> >>> In file included from
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/include/linux/debugfs.h:18:
> >>  >> >>> In file included from
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/include/linux/fs.h:6:
> >>  >> >>> In file included from
> >>  >> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/li
> nuxkpi/gplv2/include/linux/shrinker.h:5:
> >>  >> >>> In file included from
> >>  >> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> >>  >> >>> In file included from /usr/src/sys/net/if_var.h:83:
> >>  >> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file no
> t found
> >>  >> >>> #include "opt_epoch.h"
> >>  >> >>> ^

Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-27 Thread Warner Losh
On Fri, Sep 27, 2019, 2:00 AM Niclas Zeising  wrote:

> On 2019-09-27 01:27, Warner Losh wrote:
> > I talked to Gleb and this will move to opt_global.h. this will fix all
> > these problems.
> >
> > Warner
> >
>
> [ trimming CC list ]
> So, in conclusion, the changes made to any out of tree kmods to handle
> this should be reverted?
>

Yes. It was a momentary blip.

Warner


Regards
> --
> Niclas Zeising
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-27 Thread Niclas Zeising

On 2019-09-27 01:27, Warner Losh wrote:
I talked to Gleb and this will move to opt_global.h. this will fix all 
these problems.


Warner



[ trimming CC list ]
So, in conclusion, the changes made to any out of tree kmods to handle 
this should be reverted?

Regards
--
Niclas Zeising
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-26 Thread Kubilay Kocak

On 27/09/2019 12:48 am, Charlie Li via svn-src-head wrote:

Gleb Smirnoff wrote:

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Wed Sep 25 18:09:19 2019(r352706)
+++ head/sys/conf/options   Wed Sep 25 18:26:31 2019(r352707)
@@ -712,6 +712,8 @@ WITNESS_SKIPSPINopt_witness.h
  WITNESS_COUNT opt_witness.h
  OPENSOLARIS_WITNESS   opt_global.h
  
+EPOCH_TRACE		opt_epoch.h

+
  # options for ACPI support
  ACPI_DEBUGopt_acpi.h
  ACPI_MAX_TASKSopt_acpi.h

Modified: head/sys/sys/epoch.h
==
--- head/sys/sys/epoch.hWed Sep 25 18:09:19 2019(r352706)
+++ head/sys/sys/epoch.hWed Sep 25 18:26:31 2019(r352707)
@@ -41,6 +41,8 @@ typedef struct epoch_context *epoch_context_t;
  #include 
  #include 
  
+#include "opt_epoch.h"

+
  struct epoch;
  typedef struct epoch *epoch_t;
  

This breaks building the drm-kmod ports, as the build cannot find
opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
exact same way):


I started to get pkg-fallout emails in net/aquantia-atlantic-kmod with 
the same build failure


https://github.com/Aquantia/aqtion-freebsd/issues/4


--- linux_anon_inodes.o ---
cc  -O2 -pipe -fno-strict-aliasing -include
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
'-DKBUILD_MODNAME="linuxkpi_gplv2"'  -Werror -D_KERNEL -DKLD_MODULE
-nostdinc
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include 
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
-I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
-I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
-MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=kernel
-mno-red-zone -mno-mmx -mno-sse -msoft-float
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-address-of-packed-member -Wno-format-zero-length -Wno-pointer-arith
   -mno-aes -mno-avx  -std=iso9899:1999 -c
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
-o linux_anon_inodes.o
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
In file included from /usr/src/sys/net/if_var.h:83:
/usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
#include "opt_epoch.h"
  ^
--- linux_anon_inodefs.o ---
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
In file included from /usr/src/sys/net/if_var.h:83:
/usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
#include "opt_epoch.h"
  ^
--- linux_anon_inodes.o ---
1 error generated.
*** [linux_anon_inodes.o] Error code 1

make[2]: stopped in
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi
--- linux_anon_inodefs.o ---
1 error generated.
*** [linux_anon_inodefs.o] Error code 1

Interestingly enough, does not happen when drm-current-kmod is built as
part of buildkernel (using an existing installed package with SOURCE on).




___

Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-26 Thread Warner Losh
Kinda my point exactly...

Warner

On Thu, Sep 26, 2019 at 11:25 AM Ryan Stone  wrote:

> We also shouldn't have ifdef's that change the size of a kernel
> structure that's part of the KBI.  Isn't struct epoch_tracker part of
> the KBI?
>
> On Thu, Sep 26, 2019 at 12:46 PM Warner Losh  wrote:
> >
> > But we shouldn't be including opt_foo.h files in sys/*.h files. That's
> the root cause of trouble here.
> >
> > Warner
> >
> > On Thu, Sep 26, 2019 at 9:11 AM Niclas Zeising 
> wrote:
> >>
> >> On 2019-09-26 17:03, Charlie Li via freebsd-x11 wrote:
> >> > Kyle Evans wrote:
> >> >> On Thu, Sep 26, 2019 at 9:49 AM Charlie Li wrote:
> >> >>> This breaks building the drm-kmod ports, as the build cannot find
> >> >>> opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
> >> >>> exact same way):
> >> >>>
> >> >>> --- linux_anon_inodes.o ---
> >> >>> cc  -O2 -pipe -fno-strict-aliasing -include
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
> >> >>> '-DKBUILD_MODNAME="linuxkpi_gplv2"'  -Werror -D_KERNEL -DKLD_MODULE
> >> >>> -nostdinc
> >> >>>
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
> >> >>>
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
> >> >>> -I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
> >> >>> -I/usr/src/sys/contrib/ck/include -fno-common
> -fno-omit-frame-pointer
> >> >>> -mno-omit-leaf-frame-pointer
> >> >>> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
> >> >>> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
> >> >>> -MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o
> -mcmodel=kernel
> >> >>> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> >> >>> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv
> -fstack-protector
> >> >>> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> >> >>> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
> >> >>> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
> >> >>> -Wmissing-include-dirs -fdiagnostics-show-option
> -Wno-unknown-pragmas
> >> >>> -Wno-error-tautological-compare -Wno-error-empty-body
> >> >>> -Wno-error-parentheses-equality -Wno-error-unused-function
> >> >>> -Wno-error-pointer-sign -Wno-error-shift-negative-value
> >> >>> -Wno-address-of-packed-member -Wno-format-zero-length
> -Wno-pointer-arith
> >> >>>-mno-aes -mno-avx  -std=iso9899:1999 -c
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
> >> >>> -o linux_anon_inodes.o
> >> >>> In file included from
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
> >> >>> In file included from
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
> >> >>> In file included from
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
> >> >>> In file included from
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
> >> >>> In file included from
> >> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> >> >>> In file included from /usr/src/sys/net/if_var.h:83:
> >> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not
> found
> >> >>> #include "opt_epoch.h"
> >> >>>   ^
> >> >>> --- linux_anon_inodefs.o ---
> >> >>> In file included from
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
> >> >>> In file included from
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
> >> >>> In file included from
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
> >> >>> In file included from
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
> >> >>> In file included from
> >> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> >> >>> In file included from /usr/src/sys/net/if_var.h:83:
> >> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not
> found
> >> >>> #include "opt_epoch.h"
> >> >>>   ^
> >> >>> --- linux_anon_inodes.o ---
> >> >>> 1 error generated.
> >> >>> *** [linux_anon_inodes.o] Error code 1
> >> >>>
> >> >>> make[2]: stopped in
> >> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi
> >> >>> --- linux_anon_inodefs.o ---
> >> >>> 1 error generated.
> >> >>> *** [linux_anon_inodefs.o] Error code 1
> >> >>>
> >> >>> Interestingly enough, does not happen when drm-current-kmod is
> built as
> >> >>> part of 

Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-26 Thread Ryan Stone
We also shouldn't have ifdef's that change the size of a kernel
structure that's part of the KBI.  Isn't struct epoch_tracker part of
the KBI?

On Thu, Sep 26, 2019 at 12:46 PM Warner Losh  wrote:
>
> But we shouldn't be including opt_foo.h files in sys/*.h files. That's the 
> root cause of trouble here.
>
> Warner
>
> On Thu, Sep 26, 2019 at 9:11 AM Niclas Zeising  wrote:
>>
>> On 2019-09-26 17:03, Charlie Li via freebsd-x11 wrote:
>> > Kyle Evans wrote:
>> >> On Thu, Sep 26, 2019 at 9:49 AM Charlie Li wrote:
>> >>> This breaks building the drm-kmod ports, as the build cannot find
>> >>> opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
>> >>> exact same way):
>> >>>
>> >>> --- linux_anon_inodes.o ---
>> >>> cc  -O2 -pipe -fno-strict-aliasing -include
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
>> >>> '-DKBUILD_MODNAME="linuxkpi_gplv2"'  -Werror -D_KERNEL -DKLD_MODULE
>> >>> -nostdinc
>> >>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include
>> >>>  
>> >>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
>> >>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
>> >>> -I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
>> >>> -I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer
>> >>> -mno-omit-leaf-frame-pointer
>> >>> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
>> >>> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
>> >>> -MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=kernel
>> >>> -mno-red-zone -mno-mmx -mno-sse -msoft-float
>> >>> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector
>> >>> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
>> >>> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
>> >>> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
>> >>> -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
>> >>> -Wno-error-tautological-compare -Wno-error-empty-body
>> >>> -Wno-error-parentheses-equality -Wno-error-unused-function
>> >>> -Wno-error-pointer-sign -Wno-error-shift-negative-value
>> >>> -Wno-address-of-packed-member -Wno-format-zero-length -Wno-pointer-arith
>> >>>-mno-aes -mno-avx  -std=iso9899:1999 -c
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
>> >>> -o linux_anon_inodes.o
>> >>> In file included from
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
>> >>> In file included from
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
>> >>> In file included from
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
>> >>> In file included from
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
>> >>> In file included from
>> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
>> >>> In file included from /usr/src/sys/net/if_var.h:83:
>> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
>> >>> #include "opt_epoch.h"
>> >>>   ^
>> >>> --- linux_anon_inodefs.o ---
>> >>> In file included from
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
>> >>> In file included from
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
>> >>> In file included from
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
>> >>> In file included from
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
>> >>> In file included from
>> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
>> >>> In file included from /usr/src/sys/net/if_var.h:83:
>> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
>> >>> #include "opt_epoch.h"
>> >>>   ^
>> >>> --- linux_anon_inodes.o ---
>> >>> 1 error generated.
>> >>> *** [linux_anon_inodes.o] Error code 1
>> >>>
>> >>> make[2]: stopped in
>> >>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi
>> >>> --- linux_anon_inodefs.o ---
>> >>> 1 error generated.
>> >>> *** [linux_anon_inodefs.o] Error code 1
>> >>>
>> >>> Interestingly enough, does not happen when drm-current-kmod is built as
>> >>> part of buildkernel (using an existing installed package with SOURCE on).
>> >>>
>> >>
>> >> FWIW, johalun noticed this yesterday and addressed it here:
>> >> https://github.com/FreeBSDDesktop/kms-drm/commit/b486949e7e9f0cfe8dac5f0ac7fe1a660300981d
>> >>
>> > Ah, of course I would miss these 

Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-26 Thread Warner Losh
But we shouldn't be including opt_foo.h files in sys/*.h files. That's the
root cause of trouble here.

Warner

On Thu, Sep 26, 2019 at 9:11 AM Niclas Zeising  wrote:

> On 2019-09-26 17:03, Charlie Li via freebsd-x11 wrote:
> > Kyle Evans wrote:
> >> On Thu, Sep 26, 2019 at 9:49 AM Charlie Li wrote:
> >>> This breaks building the drm-kmod ports, as the build cannot find
> >>> opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
> >>> exact same way):
> >>>
> >>> --- linux_anon_inodes.o ---
> >>> cc  -O2 -pipe -fno-strict-aliasing -include
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
> >>> '-DKBUILD_MODNAME="linuxkpi_gplv2"'  -Werror -D_KERNEL -DKLD_MODULE
> >>> -nostdinc
> >>>
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
> >>>
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
> >>> -I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
> >>> -I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer
> >>> -mno-omit-leaf-frame-pointer
> >>> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
> >>> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
> >>> -MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=kernel
> >>> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> >>> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv
> -fstack-protector
> >>> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> >>> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
> >>> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
> >>> -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
> >>> -Wno-error-tautological-compare -Wno-error-empty-body
> >>> -Wno-error-parentheses-equality -Wno-error-unused-function
> >>> -Wno-error-pointer-sign -Wno-error-shift-negative-value
> >>> -Wno-address-of-packed-member -Wno-format-zero-length
> -Wno-pointer-arith
> >>>-mno-aes -mno-avx  -std=iso9899:1999 -c
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
> >>> -o linux_anon_inodes.o
> >>> In file included from
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
> >>> In file included from
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
> >>> In file included from
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
> >>> In file included from
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
> >>> In file included from
> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> >>> In file included from /usr/src/sys/net/if_var.h:83:
> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not
> found
> >>> #include "opt_epoch.h"
> >>>   ^
> >>> --- linux_anon_inodefs.o ---
> >>> In file included from
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
> >>> In file included from
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
> >>> In file included from
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
> >>> In file included from
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
> >>> In file included from
> >>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> >>> In file included from /usr/src/sys/net/if_var.h:83:
> >>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not
> found
> >>> #include "opt_epoch.h"
> >>>   ^
> >>> --- linux_anon_inodes.o ---
> >>> 1 error generated.
> >>> *** [linux_anon_inodes.o] Error code 1
> >>>
> >>> make[2]: stopped in
> >>>
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi
> >>> --- linux_anon_inodefs.o ---
> >>> 1 error generated.
> >>> *** [linux_anon_inodefs.o] Error code 1
> >>>
> >>> Interestingly enough, does not happen when drm-current-kmod is built as
> >>> part of buildkernel (using an existing installed package with SOURCE
> on).
> >>>
> >>
> >> FWIW, johalun noticed this yesterday and addressed it here:
> >>
> https://github.com/FreeBSDDesktop/kms-drm/commit/b486949e7e9f0cfe8dac5f0ac7fe1a660300981d
> >>
> > Ah, of course I would miss these commits in the kms-drm repo,
> > considering that I watch them roll in. Will wait for the updated
> > snapshots in ports.
> >
>
> I'll get to updating the ports as soon as I can.
> Regards
> --
> Niclas Zeising
> ___
> 

Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-26 Thread Niclas Zeising

On 2019-09-26 17:03, Charlie Li via freebsd-x11 wrote:

Kyle Evans wrote:

On Thu, Sep 26, 2019 at 9:49 AM Charlie Li wrote:

This breaks building the drm-kmod ports, as the build cannot find
opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
exact same way):

--- linux_anon_inodes.o ---
cc  -O2 -pipe -fno-strict-aliasing -include
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
'-DKBUILD_MODNAME="linuxkpi_gplv2"'  -Werror -D_KERNEL -DKLD_MODULE
-nostdinc
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include 
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
-I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
-I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
-MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=kernel
-mno-red-zone -mno-mmx -mno-sse -msoft-float
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-address-of-packed-member -Wno-format-zero-length -Wno-pointer-arith
   -mno-aes -mno-avx  -std=iso9899:1999 -c
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
-o linux_anon_inodes.o
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
In file included from /usr/src/sys/net/if_var.h:83:
/usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
#include "opt_epoch.h"
  ^
--- linux_anon_inodefs.o ---
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
In file included from /usr/src/sys/net/if_var.h:83:
/usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
#include "opt_epoch.h"
  ^
--- linux_anon_inodes.o ---
1 error generated.
*** [linux_anon_inodes.o] Error code 1

make[2]: stopped in
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi
--- linux_anon_inodefs.o ---
1 error generated.
*** [linux_anon_inodefs.o] Error code 1

Interestingly enough, does not happen when drm-current-kmod is built as
part of buildkernel (using an existing installed package with SOURCE on).



FWIW, johalun noticed this yesterday and addressed it here:
https://github.com/FreeBSDDesktop/kms-drm/commit/b486949e7e9f0cfe8dac5f0ac7fe1a660300981d


Ah, of course I would miss these commits in the kms-drm repo,
considering that I watch them roll in. Will wait for the updated
snapshots in ports.



I'll get to updating the ports as soon as I can.
Regards
--
Niclas Zeising
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-26 Thread Charlie Li via svn-src-head
Kyle Evans wrote:
> On Thu, Sep 26, 2019 at 9:49 AM Charlie Li wrote:
>> This breaks building the drm-kmod ports, as the build cannot find
>> opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
>> exact same way):
>>
>> --- linux_anon_inodes.o ---
>> cc  -O2 -pipe -fno-strict-aliasing -include
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
>> '-DKBUILD_MODNAME="linuxkpi_gplv2"'  -Werror -D_KERNEL -DKLD_MODULE
>> -nostdinc
>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include 
>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
>> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
>> -I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
>> -I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer
>> -mno-omit-leaf-frame-pointer
>> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
>> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
>> -MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=kernel
>> -mno-red-zone -mno-mmx -mno-sse -msoft-float
>> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector
>> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
>> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
>> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
>> -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
>> -Wno-error-tautological-compare -Wno-error-empty-body
>> -Wno-error-parentheses-equality -Wno-error-unused-function
>> -Wno-error-pointer-sign -Wno-error-shift-negative-value
>> -Wno-address-of-packed-member -Wno-format-zero-length -Wno-pointer-arith
>>   -mno-aes -mno-avx  -std=iso9899:1999 -c
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
>> -o linux_anon_inodes.o
>> In file included from
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
>> In file included from
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
>> In file included from
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
>> In file included from
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
>> In file included from
>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
>> In file included from /usr/src/sys/net/if_var.h:83:
>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
>> #include "opt_epoch.h"
>>  ^
>> --- linux_anon_inodefs.o ---
>> In file included from
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
>> In file included from
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
>> In file included from
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
>> In file included from
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
>> In file included from
>> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
>> In file included from /usr/src/sys/net/if_var.h:83:
>> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
>> #include "opt_epoch.h"
>>  ^
>> --- linux_anon_inodes.o ---
>> 1 error generated.
>> *** [linux_anon_inodes.o] Error code 1
>>
>> make[2]: stopped in
>> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi
>> --- linux_anon_inodefs.o ---
>> 1 error generated.
>> *** [linux_anon_inodefs.o] Error code 1
>>
>> Interestingly enough, does not happen when drm-current-kmod is built as
>> part of buildkernel (using an existing installed package with SOURCE on).
>>
> 
> FWIW, johalun noticed this yesterday and addressed it here:
> https://github.com/FreeBSDDesktop/kms-drm/commit/b486949e7e9f0cfe8dac5f0ac7fe1a660300981d
> 
Ah, of course I would miss these commits in the kms-drm repo,
considering that I watch them roll in. Will wait for the updated
snapshots in ports.

-- 
Charlie Li
…nope, still don't have an exit line.

(This email address is for mailing list use; replace local-part with
vishwin for off-list communication if possible)



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-26 Thread Kyle Evans
On Thu, Sep 26, 2019 at 9:49 AM Charlie Li  wrote:
>
> Gleb Smirnoff wrote:
> > Modified: head/sys/conf/options
> > ==
> > --- head/sys/conf/options Wed Sep 25 18:09:19 2019(r352706)
> > +++ head/sys/conf/options Wed Sep 25 18:26:31 2019(r352707)
> > @@ -712,6 +712,8 @@ WITNESS_SKIPSPIN  opt_witness.h
> >  WITNESS_COUNTopt_witness.h
> >  OPENSOLARIS_WITNESS  opt_global.h
> >
> > +EPOCH_TRACE  opt_epoch.h
> > +
> >  # options for ACPI support
> >  ACPI_DEBUG   opt_acpi.h
> >  ACPI_MAX_TASKS   opt_acpi.h
> >
> > Modified: head/sys/sys/epoch.h
> > ==
> > --- head/sys/sys/epoch.h  Wed Sep 25 18:09:19 2019(r352706)
> > +++ head/sys/sys/epoch.h  Wed Sep 25 18:26:31 2019(r352707)
> > @@ -41,6 +41,8 @@ typedef struct epoch_context *epoch_context_t;
> >  #include 
> >  #include 
> >
> > +#include "opt_epoch.h"
> > +
> >  struct epoch;
> >  typedef struct epoch *epoch_t;
> >
> This breaks building the drm-kmod ports, as the build cannot find
> opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
> exact same way):
>
> --- linux_anon_inodes.o ---
> cc  -O2 -pipe -fno-strict-aliasing -include
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
> '-DKBUILD_MODNAME="linuxkpi_gplv2"'  -Werror -D_KERNEL -DKLD_MODULE
> -nostdinc
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include 
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
> -I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
> -I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
> -I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer
> -mno-omit-leaf-frame-pointer
> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
> -MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector
> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__
> -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
> -Wno-error-tautological-compare -Wno-error-empty-body
> -Wno-error-parentheses-equality -Wno-error-unused-function
> -Wno-error-pointer-sign -Wno-error-shift-negative-value
> -Wno-address-of-packed-member -Wno-format-zero-length -Wno-pointer-arith
>   -mno-aes -mno-avx  -std=iso9899:1999 -c
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
> -o linux_anon_inodes.o
> In file included from
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
> In file included from
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
> In file included from
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
> In file included from
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
> In file included from
> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> In file included from /usr/src/sys/net/if_var.h:83:
> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
> #include "opt_epoch.h"
>  ^
> --- linux_anon_inodefs.o ---
> In file included from
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
> In file included from
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
> In file included from
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
> In file included from
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
> In file included from
> /usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
> In file included from /usr/src/sys/net/if_var.h:83:
> /usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
> #include "opt_epoch.h"
>  ^
> --- linux_anon_inodes.o ---
> 1 error generated.
> *** [linux_anon_inodes.o] Error code 1
>
> make[2]: stopped in
> /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi
> --- linux_anon_inodefs.o ---
> 1 error generated.
> *** [linux_anon_inodefs.o] Error code 1
>
> Interestingly enough, does not happen when drm-current-kmod is built as
> part of buildkernel (using an existing installed package with 

Re: svn commit: r352707 - in head/sys: conf kern net sys

2019-09-26 Thread Charlie Li via svn-src-head
Gleb Smirnoff wrote:
> Modified: head/sys/conf/options
> ==
> --- head/sys/conf/options Wed Sep 25 18:09:19 2019(r352706)
> +++ head/sys/conf/options Wed Sep 25 18:26:31 2019(r352707)
> @@ -712,6 +712,8 @@ WITNESS_SKIPSPIN  opt_witness.h
>  WITNESS_COUNTopt_witness.h
>  OPENSOLARIS_WITNESS  opt_global.h
>  
> +EPOCH_TRACE  opt_epoch.h
> +
>  # options for ACPI support
>  ACPI_DEBUG   opt_acpi.h
>  ACPI_MAX_TASKS   opt_acpi.h
> 
> Modified: head/sys/sys/epoch.h
> ==
> --- head/sys/sys/epoch.h  Wed Sep 25 18:09:19 2019(r352706)
> +++ head/sys/sys/epoch.h  Wed Sep 25 18:26:31 2019(r352707)
> @@ -41,6 +41,8 @@ typedef struct epoch_context *epoch_context_t;
>  #include 
>  #include 
>  
> +#include "opt_epoch.h"
> +
>  struct epoch;
>  typedef struct epoch *epoch_t;
>  
This breaks building the drm-kmod ports, as the build cannot find
opt_epoch.h (drm-devel-kmod example shown, drm-current-kmod dies the
exact same way):

--- linux_anon_inodes.o ---
cc  -O2 -pipe -fno-strict-aliasing -include
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/drivers/gpu/drm/drm_os_config.h
'-DKBUILD_MODNAME="linuxkpi_gplv2"'  -Werror -D_KERNEL -DKLD_MODULE
-nostdinc
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/include 
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/dummy/include
-I/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include
-I/usr/src/sys/compat/linuxkpi/common/include -I. -I/usr/src/sys
-I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include -MD
-MF.depend.linux_anon_inodes.o -MTlinux_anon_inodes.o -mcmodel=kernel
-mno-red-zone -mno-mmx -mno-sse -msoft-float
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef
-Wno-pointer-sign -D__printf__=__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error-tautological-compare -Wno-error-empty-body
-Wno-error-parentheses-equality -Wno-error-unused-function
-Wno-error-pointer-sign -Wno-error-shift-negative-value
-Wno-address-of-packed-member -Wno-format-zero-length -Wno-pointer-arith
  -mno-aes -mno-avx  -std=iso9899:1999 -c
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c
-o linux_anon_inodes.o
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodes.c:12:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/anon_inodes.h:4:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
In file included from /usr/src/sys/net/if_var.h:83:
/usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
#include "opt_epoch.h"
 ^
--- linux_anon_inodefs.o ---
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/src/linux_anon_inodefs.c:45:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/debugfs.h:18:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/fs.h:6:
In file included from
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi/gplv2/include/linux/shrinker.h:5:
In file included from
/usr/src/sys/compat/linuxkpi/common/include/linux/list.h:56:
In file included from /usr/src/sys/net/if_var.h:83:
/usr/src/sys/sys/epoch.h:44:10: fatal error: 'opt_epoch.h' file not found
#include "opt_epoch.h"
 ^
--- linux_anon_inodes.o ---
1 error generated.
*** [linux_anon_inodes.o] Error code 1

make[2]: stopped in
/wrkdirs/usr/ports/graphics/drm-devel-kmod/work/kms-drm-dc414a9/linuxkpi
--- linux_anon_inodefs.o ---
1 error generated.
*** [linux_anon_inodefs.o] Error code 1

Interestingly enough, does not happen when drm-current-kmod is built as
part of buildkernel (using an existing installed package with SOURCE on).

-- 
Charlie Li
…nope, still don't have an exit line.

(This email address is for mailing list use; replace local-part with
vishwin for off-list communication if possible)



signature.asc
Description: OpenPGP digital signature


svn commit: r352707 - in head/sys: conf kern net sys

2019-09-25 Thread Gleb Smirnoff
Author: glebius
Date: Wed Sep 25 18:26:31 2019
New Revision: 352707
URL: https://svnweb.freebsd.org/changeset/base/352707

Log:
  Add debugging facility EPOCH_TRACE that checks that epochs entered are
  properly nested and warns about recursive entrances.  Unlike with locks,
  there is nothing fundamentally wrong with such use, the intent of tracer
  is to help to review complex epoch-protected code paths, and we mean the
  network stack here.
  
  Reviewed by:  hselasky
  Sponsored by: Netflix
  Pull Request: https://reviews.freebsd.org/D21610

Modified:
  head/sys/conf/options
  head/sys/kern/kern_thread.c
  head/sys/kern/subr_epoch.c
  head/sys/kern/subr_stack.c
  head/sys/net/if.c
  head/sys/sys/epoch.h
  head/sys/sys/proc.h
  head/sys/sys/stack.h

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Wed Sep 25 18:09:19 2019(r352706)
+++ head/sys/conf/options   Wed Sep 25 18:26:31 2019(r352707)
@@ -712,6 +712,8 @@ WITNESS_SKIPSPINopt_witness.h
 WITNESS_COUNT  opt_witness.h
 OPENSOLARIS_WITNESSopt_global.h
 
+EPOCH_TRACEopt_epoch.h
+
 # options for ACPI support
 ACPI_DEBUG opt_acpi.h
 ACPI_MAX_TASKS opt_acpi.h

Modified: head/sys/kern/kern_thread.c
==
--- head/sys/kern/kern_thread.c Wed Sep 25 18:09:19 2019(r352706)
+++ head/sys/kern/kern_thread.c Wed Sep 25 18:26:31 2019(r352707)
@@ -668,6 +668,7 @@ thread_link(struct thread *td, struct proc *p)
LIST_INIT(>td_contested);
LIST_INIT(>td_lprof[0]);
LIST_INIT(>td_lprof[1]);
+   SLIST_INIT(>td_epochs);
sigqueue_init(>td_sigqueue, p);
callout_init(>td_slpcallout, 1);
TAILQ_INSERT_TAIL(>p_threads, td, td_plist);
@@ -684,6 +685,8 @@ thread_unlink(struct thread *td)
struct proc *p = td->td_proc;
 
PROC_LOCK_ASSERT(p, MA_OWNED);
+   MPASS(SLIST_EMPTY(>td_epochs));
+
TAILQ_REMOVE(>p_threads, td, td_plist);
p->p_numthreads--;
/* could clear a few other things here */

Modified: head/sys/kern/subr_epoch.c
==
--- head/sys/kern/subr_epoch.c  Wed Sep 25 18:09:19 2019(r352706)
+++ head/sys/kern/subr_epoch.c  Wed Sep 25 18:26:31 2019(r352707)
@@ -30,7 +30,6 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -47,6 +46,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef EPOCH_TRACE
+#include 
+#include 
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -80,6 +84,7 @@ struct epoch {
struct sx e_drain_sx;
struct mtx e_drain_mtx;
volatile int e_drain_count;
+   const char *e_name;
 };
 
 /* arbitrary --- needs benchmarking */
@@ -134,6 +139,103 @@ __read_mostly epoch_t global_epoch_preempt;
 static void epoch_call_task(void *context __unused);
 static uma_zone_t pcpu_zone_record;
 
+#ifdef EPOCH_TRACE
+struct stackentry {
+   RB_ENTRY(stackentry) se_node;
+   struct stack se_stack;
+};
+
+static int
+stackentry_compare(struct stackentry *a, struct stackentry *b)
+{
+
+   if (a->se_stack.depth > b->se_stack.depth)
+   return (1);
+   if (a->se_stack.depth < b->se_stack.depth)
+   return (-1);
+   for (int i = 0; i < a->se_stack.depth; i++) {
+   if (a->se_stack.pcs[i] > b->se_stack.pcs[i])
+   return (1);
+   if (a->se_stack.pcs[i] < b->se_stack.pcs[i])
+   return (-1);
+   }
+
+   return (0);
+}
+
+RB_HEAD(stacktree, stackentry) epoch_stacks = RB_INITIALIZER(_stacks);
+RB_GENERATE_STATIC(stacktree, stackentry, se_node, stackentry_compare);
+
+static struct mtx epoch_stacks_lock;
+MTX_SYSINIT(epochstacks, _stacks_lock, "epoch_stacks", MTX_DEF);
+
+static void epoch_trace_report(const char *fmt, ...) __printflike(1, 2);
+static inline void
+epoch_trace_report(const char *fmt, ...)
+{
+   va_list ap;
+   struct stackentry se, *new;
+
+   stack_zero(_stack);   /* XXX: is it really needed? */
+   stack_save(_stack);
+
+   /* Tree is never reduced - go lockless. */
+   if (RB_FIND(stacktree, _stacks, ) != NULL)
+   return;
+
+   new = malloc(sizeof(*new), M_STACK, M_NOWAIT);
+   if (new != NULL) {
+   bcopy(_stack, >se_stack, sizeof(struct stack));
+
+   mtx_lock(_stacks_lock);
+   new = RB_INSERT(stacktree, _stacks, new);
+   mtx_unlock(_stacks_lock);
+   if (new != NULL)
+   free(new, M_STACK);
+   }
+
+   va_start(ap, fmt);
+   (void)vprintf(fmt, ap);
+   va_end(ap);
+   stack_print_ddb(_stack);
+}
+
+static inline void
+epoch_trace_enter(struct thread *td, epoch_t epoch, epoch_tracker_t et,
+