SVN r351457 breaks drm-current

Michael Butler imb at protected-networks.net
Sat Aug 24 23:09:41 UTC 2019


On 2019-08-24 14:04, Konstantin Belousov wrote:
> On Sat, Aug 24, 2019 at 11:02:20AM -0600, Warner Losh wrote:
>> forward declaring struct pcpu; in md_var.h "fixes" this, but I'm not sure
>> that's the right fix.
> More correct way to fix it is to include sys/pcpu.h before machine/md_var.h,
> same as all in-tree consumers of the header do, apparently.
> 
> But another question is why the driver needs md_var.h, there are no
> externally usable definitions there.

There are uses of other variables from machine/md_var.h, notably
cpu_feature, in linux_compat.c.

Including sys/pcpu.h allows the build to continue .. as in ..

*** linuxkpi/gplv2/src/linux_compat.c~  Wed Aug  7 14:36:56 2019
--- linuxkpi/gplv2/src/linux_compat.c   Sat Aug 24 18:58:08 2019
***************
*** 2,7 ****
--- 2,8 ----
  #include <sys/kernel.h>
  #if defined(__i386__) || defined(__amd64__)
  #include <machine/specialreg.h>
+ #include <sys/pcpu.h>
  #include <machine/md_var.h>
  #endif
  #include <linux/bitops.h>

Locally, I've put this patch into graphics/drm-current-kmod/files so I
don't trip over it on subsequent builds,

	Michael


More information about the freebsd-current mailing list