NetBSD Problem Report #53320

From hauke@Espresso.Rhein-Neckar.DE  Sun May 27 19:25:27 2018
Return-Path: <hauke@Espresso.Rhein-Neckar.DE>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 44F2D7A167
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 27 May 2018 19:25:27 +0000 (UTC)
Message-Id: <201805271913.w4RJD7Zg015815@pizza.causeuse.org>
Date: Sun, 27 May 2018 21:13:07 +0200 (CEST)
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Reply-To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@NetBSD.org
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Subject: Kernel with savagedrm does not build
X-Send-Pr-Version: 3.95

>Number:         53320
>Category:       kern
>Synopsis:       Kernel with savagedrm does not build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    hauke
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 27 19:30:00 +0000 2018
>Closed-Date:    
>Last-Modified:  Sun Jun 03 12:15:01 +0000 2018
>Originator:     Hauke Fath
>Release:        NetBSD 8.0_RC1
>Organization:
Falling Raindrops
>Environment:


System: NetBSD pizza.causeuse.org 8.0_RC1 NetBSD 8.0_RC1 (BLACKBOX-$Revision: 1.85 $) #2: Sun May 20 22:53:45 CEST 2018 hauke@pizza.causeuse.org:/var/obj/netbsd-builds/8/amd64/sys/arch/amd64/compile/BLACKBOX amd64
Architecture: x86_64
Machine: amd64
>Description:

	An i386 kernel configured for a Thinkpad T23 with

# DRI legacy drivers
savagedrm*      at drm?         # S3 Savage DRM driver

	fails to build with

[...]
#   compile  T23/btc_dpm.o
/u3/netbsd-builds/8/i386/tools/bin/i486--netbsdelf-gcc -msoft-float -mno-mmx -mno-sse -mno-avx -mindirect-branch=thunk -mindirect-branch-register -ffreestanding -fno-zero-initialized-in-bss -O2 -fno-omit-frame-pointer -fstack-protector -Wstack-protector --param ssp-buffer-size=1 -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wextra -Wno-unused-parameter -Wold-style-definition -Wno-sign-compare -Wno-missing-prototypes --sysroot=/u3/netbsd-builds/8/i386/destdir -Di386 -I. -I/export/netbsd-8/sys/external/bsd/acpica/dist -I/export/netbsd-8/sys/../common/lib/libx86emu -I/export/netbsd-8/sys/../common/include -I/export/netbsd-8/sys/arch -I/export/netbsd-8/sys -nostdinc -DDEBUG -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/export/netbsd-8/sys/lib/libkern/../../../co!
 mmon/lib/libc/quad -I/export/netbsd-8/sys/lib/libkern/../../../common/lib/libc/string -I/export/netbsd-8/sys/lib/libkern/../../../common/lib/libc/arch/i386/string -D_FORTIFY_SOURCE=2 -I/export/netbsd-8/sys/external/bsd/ipf -I/export/netbsd-8/sys/external/isc/atheros_hal/dist -I/export/netbsd-8/sys/external/isc/atheros_hal/ic -I/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core -I/export/netbsd-8/sys/external/bsd/drm/dist/shared-core -I/export/netbsd-8/sys/external/bsd/common/include -I/export/netbsd-8/sys/external/bsd/drm2/include -I/export/netbsd-8/sys/external/bsd/common/include -I/export/netbsd-8/sys/external/bsd/drm2/include -I/export/netbsd-8/sys/external/bsd/drm2/include/drm -I/export/netbsd-8/sys/external/bsd/drm2/dist -I/export/netbsd-8/sys/external/bsd/drm2/dist/include -I/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm -I/export/netbsd-8/sys/external/bsd/drm2/dist/uapi -I/export/netbsd-8/sys/external/bsd/common/include -D__KERNEL__ -DCONFIG_FB=0 -DCONFIG_B!
 ACKLIGHT_CLASS_DEVICE=0 -DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE!
 =0 -I/export/netbsd-8/sys/../common/include -DCONFIG_AGP -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/i915 -I/export/netbsd-8/sys/external/bsd/drm2/i915drm -DCONFIG_DRM_I915_FBDEV=1 -DCONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=0 -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon -I/export/netbsd-8/sys/external/bsd/drm2/include/radeon -I/export/netbsd-8/sys/external/bsd/drm2/radeon -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau/core -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau/core/include -I/export/netbsd-8/sys/external/bsd/drm2/nouveau -DCONFIG_NOUVEAU_DEBUG=5 -DCONFIG_NOUVEAU_DEBUG_DEFAULT=3 -I/export/netbsd-8/sys/external/bsd/acpica/dist/include -c /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c -o btc_dpm.o
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:63:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/include/asm/byteorder.h:38:0: error: "cpu_to_le32" redefined [-Werror]
 #define cpu_to_le32 htole32
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:0:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:377:0: note: this is the location of the previous definition
 #define cpu_to_le32(x) htole32(x)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:63:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/include/asm/byteorder.h:45:0: error: "le32_to_cpu" redefined [-Werror]
 #define le32_to_cpu le32toh
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:0:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:378:0: note: this is the location of the previous definition
 #define le32_to_cpu(x) le32toh(x)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:64:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:48:23: error: conflicting types for 'atomic_t'
 typedef struct atomic atomic_t;
                       ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:122:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:34:19: note: previous declaration of 'atomic_t' was here
 typedef u_int32_t atomic_t;
                   ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:51:22: error: expected ')' before '*' token
 atomic_read(atomic_t *atomic)
                      ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:78:28: note: in definition of macro 'atomic_read'
 #define atomic_read(p)  (*(p))
                            ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:77:31: error: expected identifier or '(' before 'volatile'
 #define atomic_set(p, v)  (*((volatile uint32_t *)p) = (v))
                               ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:57:1: note: in expansion of macro 'atomic_set'
 atomic_set(atomic_t *atomic, int value)
 ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:57:12: error: expected ')' before 'atomic_t'
 atomic_set(atomic_t *atomic, int value)
            ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:77:51: note: in definition of macro 'atomic_set'
 #define atomic_set(p, v)  (*((volatile uint32_t *)p) = (v))
                                                   ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:77:54: error: expected ')' before '=' token
 #define atomic_set(p, v)  (*((volatile uint32_t *)p) = (v))
                                                      ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:57:1: note: in expansion of macro 'atomic_set'
 atomic_set(atomic_t *atomic, int value)
 ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:81:26: error: conflicting types for 'atomic_add_int'
 #define atomic_add(n, p) atomic_add_int(p, n)
                          ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:63:1: note: in expansion of macro 'atomic_add'
 atomic_add(int addend, atomic_t *atomic)
 ^
In file included from ./machine/pmap.h:71:0,
                 from /export/netbsd-8/sys/uvm/uvm_pmap.h:115,
                 from /export/netbsd-8/sys/uvm/uvm_extern.h:516,
                 from /export/netbsd-8/sys/sys/sysctl.h:52,
                 from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:62,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/sys/atomic.h:45:7: note: previous declaration of 'atomic_add_int' was here
 void  atomic_add_int(volatile unsigned int *, int);
       ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:64:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h: In function 'atomic_add_int':
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:65:17: error: passing argument 1 of 'atomic_add_int' from incompatible pointer type [-Werror=incompatible-pointer-types]
  atomic_add_int(&atomic->a_u.au_uint, addend);
                 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:122:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:81:26: note: expected 'atomic_t * {aka struct atomic *}' but argument is of type 'volatile unsigned int *'
 #define atomic_add(n, p) atomic_add_int(p, n)
                          ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:63:1: note: in expansion of macro 'atomic_add'
 atomic_add(int addend, atomic_t *atomic)
 ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h: At top level:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:82:44: error: expected declaration specifiers or '...' before '-' token
 #define atomic_sub(n, p) atomic_add_int(p, -(n))
                                            ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:69:1: note: in expansion of macro 'atomic_sub'
 atomic_sub(int subtrahend, atomic_t *atomic)
 ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:79:24: error: conflicting types for 'atomic_inc_uint'
 #define atomic_inc(p)  atomic_inc_uint(p)
                        ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:81:1: note: in expansion of macro 'atomic_inc'
 atomic_inc(atomic_t *atomic)
 ^
In file included from ./machine/pmap.h:71:0,
                 from /export/netbsd-8/sys/uvm/uvm_pmap.h:115,
                 from /export/netbsd-8/sys/uvm/uvm_extern.h:516,
                 from /export/netbsd-8/sys/sys/sysctl.h:52,
                 from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:62,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/sys/atomic.h:139:7: note: previous declaration of 'atomic_inc_uint' was here
 void  atomic_inc_uint(volatile unsigned int *);
       ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:64:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h: In function 'atomic_inc_uint':
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:83:18: error: passing argument 1 of 'atomic_inc_uint' from incompatible pointer type [-Werror=incompatible-pointer-types]
  atomic_inc_uint(&atomic->a_u.au_uint);
                  ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:122:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:79:24: note: expected 'atomic_t * {aka struct atomic *}' but argument is of type 'volatile unsigned int *'
 #define atomic_inc(p)  atomic_inc_uint(p)
                        ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:81:1: note: in expansion of macro 'atomic_inc'
 atomic_inc(atomic_t *atomic)
 ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h: At top level:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:80:24: error: conflicting types for 'atomic_dec_uint'
 #define atomic_dec(p)  atomic_dec_uint(p)
                        ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:87:1: note: in expansion of macro 'atomic_dec'
 atomic_dec(atomic_t *atomic)
 ^
In file included from ./machine/pmap.h:71:0,
                 from /export/netbsd-8/sys/uvm/uvm_pmap.h:115,
                 from /export/netbsd-8/sys/uvm/uvm_extern.h:516,
                 from /export/netbsd-8/sys/sys/sysctl.h:52,
                 from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:62,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/sys/atomic.h:124:7: note: previous declaration of 'atomic_dec_uint' was here
 void  atomic_dec_uint(volatile unsigned int *);
       ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:64:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h: In function 'atomic_dec_uint':
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:89:18: error: passing argument 1 of 'atomic_dec_uint' from incompatible pointer type [-Werror=incompatible-pointer-types]
  atomic_dec_uint(&atomic->a_u.au_uint);
                  ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:122:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:80:24: note: expected 'atomic_t * {aka struct atomic *}' but argument is of type 'volatile unsigned int *'
 #define atomic_dec(p)  atomic_dec_uint(p)
                        ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:87:1: note: in expansion of macro 'atomic_dec'
 atomic_dec(atomic_t *atomic)
 ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h: At top level:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:93:17: error: expected declaration specifiers or '...' before '(' token
  atomic_set_int(((volatile uint32_t *)(volatile void *)p) + (b >> 5),\
                 ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:86:49: note: in definition of macro 'atomic_set_int'
 #define atomic_set_int(p, bits)  atomic_or_uint(p, bits)
                                                 ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:193:1: note: in expansion of macro 'set_bit'
 set_bit(unsigned int bit, volatile unsigned long *ptr)
 ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:94:4: error: expected declaration specifiers or '...' before '(' token
    (1 << (b & 0x1f)))
    ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:86:52: note: in definition of macro 'atomic_set_int'
 #define atomic_set_int(p, bits)  atomic_or_uint(p, bits)
                                                    ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:193:1: note: in expansion of macro 'set_bit'
 set_bit(unsigned int bit, volatile unsigned long *ptr)
 ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:97:19: error: expected declaration specifiers or '...' before '(' token
  atomic_clear_int(((volatile uint32_t *)(volatile void *)p) + (b >> 5), \
                   ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:87:51: note: in definition of macro 'atomic_clear_int'
 #define atomic_clear_int(p, bits) atomic_and_uint(p, ~(bits))
                                                   ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:201:1: note: in expansion of macro 'clear_bit'
 clear_bit(unsigned int bit, volatile unsigned long *ptr)
 ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:87:54: error: expected declaration specifiers or '...' before '~' token
 #define atomic_clear_int(p, bits) atomic_and_uint(p, ~(bits))
                                                      ^
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:97:2: note: in expansion of macro 'atomic_clear_int'
  atomic_clear_int(((volatile uint32_t *)(volatile void *)p) + (b >> 5), \
  ^
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:201:1: note: in expansion of macro 'clear_bit'
 clear_bit(unsigned int bit, volatile unsigned long *ptr)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:64:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/include/linux/atomic.h:220:1: error: conflicting types for 'test_and_set_bit'
 test_and_set_bit(unsigned int bit, volatile unsigned long *ptr)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:122:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_atomic.h:104:1: note: previous definition of 'test_and_set_bit' was here
 test_and_set_bit(int b, volatile void *p)
 ^
In file included from /export/netbsd-8/sys/external/bsd/common/include/linux/list.h:50:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/kernel.h:96:0: error: "upper_32_bits" redefined [-Werror]
 #define upper_32_bits(X) ((uint32_t) (((X) >> 16) >> 16))
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:0:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:698:0: note: this is the location of the previous definition
 #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:56:8: error: redefinition of 'struct list_head'
 struct list_head {
        ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:35:8: note: originally defined here
 struct list_head {
        ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:64:1: error: conflicting types for 'INIT_LIST_HEAD'
 INIT_LIST_HEAD(struct list_head *head)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:43:1: note: previous definition of 'INIT_LIST_HEAD' was here
 INIT_LIST_HEAD(struct list_head *head) {
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:95:1: error: conflicting types for 'list_empty'
 list_empty(const struct list_head *head)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:49:1: note: previous definition of 'list_empty' was here
 list_empty(struct list_head *head) {
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:122:1: error: conflicting types for 'list_add'
 list_add(struct list_head *node, struct list_head *head)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:54:1: note: previous definition of 'list_add' was here
 list_add(struct list_head *new, struct list_head *head) {
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:128:1: error: conflicting types for 'list_add_tail'
 list_add_tail(struct list_head *node, struct list_head *head)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:62:1: note: previous definition of 'list_add_tail' was here
 list_add_tail(struct list_head *entry, struct list_head *head) {
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:134:1: error: conflicting types for 'list_del'
 list_del(struct list_head *entry)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:70:1: note: previous definition of 'list_del' was here
 list_del(struct list_head *entry) {
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:192:1: error: conflicting types for 'list_del_init'
 list_del_init(struct list_head *node)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:76:1: note: previous definition of 'list_del_init' was here
 list_del_init(struct list_head *entry) {
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:198:0: error: "list_entry" redefined [-Werror]
 #define list_entry(PTR, TYPE, FIELD) container_of(PTR, TYPE, FIELD)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:39:0: note: this is the location of the previous definition
 #define list_entry(ptr, type, member) container_of(ptr,type,member)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:208:0: error: "list_for_each" redefined [-Werror]
 #define list_for_each(VAR, HEAD)     \
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:82:0: note: this is the location of the previous definition
 #define list_for_each(entry, head)    \
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:213:0: error: "list_for_each_safe" redefined [-Werror]
 #define list_for_each_safe(VAR, NEXT, HEAD)    \
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:89:0: note: this is the location of the previous definition
 #define list_for_each_safe(entry, temp, head)   \
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:230:0: error: "list_for_each_entry_safe" redefined [-Werror]
 #define list_for_each_entry_safe(VAR, NEXT, HEAD, FIELD)  \
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:101:0: note: this is the location of the previous definition
 #define list_for_each_entry_safe(pos, n, head, member)   \
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:66:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/common/include/linux/list.h:298:0: error: "hlist_entry" redefined [-Werror]
 #define hlist_entry(PTR, TYPE, FIELD) container_of(PTR, TYPE, FIELD)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:121:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drm_linux_list.h:40:0: note: this is the location of the previous definition
 #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h:50:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:74,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/include/linux/mm.h:45:0: error: "PAGE_ALIGN" redefined [-Werror]
 #define PAGE_ALIGN(x)  (((x) + (PAGE_SIZE-1)) & ~(PAGE_SIZE-1))
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:25:0:
/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core/drmP.h:298:0: note: this is the location of the previous definition
 #define PAGE_ALIGN(addr) round_page(addr)
 ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_driver.h:37:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:75,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:14:66: error: 'struct agp_bridge_data' declared inside parameter list [-Werror]
 static inline void drm_free_agp(struct agp_bridge_data *, struct agp_memory *, int);
                                                                  ^
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:14:66: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:15:65: error: 'struct agp_bridge_data' declared inside parameter list [-Werror]
 static inline int drm_bind_agp(struct agp_bridge_data *, struct agp_memory *, unsigned);
                                                                 ^
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:16:67: error: 'struct agp_bridge_data' declared inside parameter list [-Werror]
 static inline int drm_unbind_agp(struct agp_bridge_data *, struct agp_memory *);
                                                                   ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:75:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_driver.h:1145:13: error: 'struct agp_bridge_data' declared inside parameter list [-Werror]
      struct page *dummy_read_page);
             ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_crtc.h:77:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_mode.h:33,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:81,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_modes.h: In function 'drm_mode_is_stereo':
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_modes.h:179:23: error: 'DRM_MODE_FLAG_3D_MASK' undeclared (first use in this function)
  return mode->flags & DRM_MODE_FLAG_3D_MASK;
                       ^
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_modes.h:179:23: note: each undeclared identifier is reported only once for each function it appears in
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_mode.h:33:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:81,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_crtc.h: At top level:
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_crtc.h:673:18: error: 'struct drm_mode_fb_cmd2' declared inside parameter list [-Werror]
           struct drm_mode_fb_cmd2 *mode_cmd);
                  ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_mode.h:37:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:81,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_crtc_helper.h:142:16: error: 'struct drm_mode_fb_cmd2' declared inside parameter list [-Werror]
         struct drm_mode_fb_cmd2 *mode_cmd);
                ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:81:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_mode.h:801:33: error: unknown type name 'ktime_t'
           int *vpos, int *hpos, ktime_t *stime,
                                 ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_mode.h:802:11: error: unknown type name 'ktime_t'
           ktime_t *etime);
           ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_mode.h:855:16: error: 'struct drm_mode_fb_cmd2' declared inside parameter list [-Werror]
         struct drm_gem_object *obj);
                ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:0:
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:489:25: error: field 'gem_base' has incomplete type
  struct drm_gem_object  gem_base;
                         ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:526:2: error: unknown type name 'drm_waitqueue_t'
  drm_waitqueue_t  wq;
  ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:570:15: error: 'struct drm_mode_create_dumb' declared inside parameter list [-Werror]
        struct drm_mode_create_dumb *args);
               ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:802:2: error: unknown type name 'drm_waitqueue_t'
  drm_waitqueue_t   vblank_queue;
  ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:0:
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:1925:86: error: 'struct seq_file' declared inside parameter list [-Werror]
   void (*debugfs_print_current_performance_level)(struct radeon_device *rdev, struct seq_file *m);
                                                                                      ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2323:2: error: unknown type name 'drm_waitqueue_t'
  drm_waitqueue_t   fence_queue;
  ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:3003:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_object.h:145:12: error: 'struct vm_area_struct' declared inside parameter list [-Werror]
     struct vm_area_struct *vma);
            ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:27:0:
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:422:21: error: 'struct seq_file' declared inside parameter list [-Werror]
              struct seq_file *m);
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:438:21: error: 'struct seq_file' declared inside parameter list [-Werror]
              struct seq_file *m);
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:475:21: error: 'struct seq_file' declared inside parameter list [-Werror]
              struct seq_file *m);
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:555:19: error: 'struct seq_file' declared inside parameter list [-Werror]
            struct seq_file *m);
                   ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:571:20: error: 'struct seq_file' declared inside parameter list [-Werror]
             struct seq_file *m);
                    ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:631:18: error: 'struct seq_file' declared inside parameter list [-Werror]
           struct seq_file *m);
                  ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:650:16: error: 'struct seq_file' declared inside parameter list [-Werror]
         struct seq_file *m);
                ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:705:18: error: 'struct seq_file' declared inside parameter list [-Werror]
           struct seq_file *m);
                  ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:805:18: error: 'struct seq_file' declared inside parameter list [-Werror]
           struct seq_file *m);
                  ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon_asic.h:826:18: error: 'struct seq_file' declared inside parameter list [-Werror]
           struct seq_file *m);
                  ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c: In function 'btc_initialize_mc_reg_table':
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2025:10: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]
  table = kzalloc(sizeof(struct atom_mc_reg_table), GFP_KERNEL);
          ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2025:8: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
  table = kzalloc(sizeof(struct atom_mc_reg_table), GFP_KERNEL);
        ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2061:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
  kfree(table);
  ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c: In function 'btc_dpm_init':
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2591:8: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
  eg_pi = kzalloc(sizeof(struct evergreen_power_info), GFP_KERNEL);
        ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2616:60: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
  rdev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries =
                                                            ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:0:
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2721:42: error: 'struct drm_device' has no member named 'pdev'
 #define ASIC_IS_LOMBOK(rdev) ((rdev->ddev->pdev->device == 0x6849) || \
                                          ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2723:6: note: in expansion of macro 'ASIC_IS_LOMBOK'
  if (ASIC_IS_LOMBOK(rdev))
      ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2722:21: error: 'struct drm_device' has no member named 'pdev'
          (rdev->ddev->pdev->device == 0x6850) || \
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2723:6: note: in expansion of macro 'ASIC_IS_LOMBOK'
  if (ASIC_IS_LOMBOK(rdev))
      ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2723:21: error: 'struct drm_device' has no member named 'pdev'
          (rdev->ddev->pdev->device == 0x6858) || \
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2723:6: note: in expansion of macro 'ASIC_IS_LOMBOK'
  if (ASIC_IS_LOMBOK(rdev))
      ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2724:21: error: 'struct drm_device' has no member named 'pdev'
          (rdev->ddev->pdev->device == 0x6859) || \
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2723:6: note: in expansion of macro 'ASIC_IS_LOMBOK'
  if (ASIC_IS_LOMBOK(rdev))
      ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2725:21: error: 'struct drm_device' has no member named 'pdev'
          (rdev->ddev->pdev->device == 0x6840) || \
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2723:6: note: in expansion of macro 'ASIC_IS_LOMBOK'
  if (ASIC_IS_LOMBOK(rdev))
      ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2726:21: error: 'struct drm_device' has no member named 'pdev'
          (rdev->ddev->pdev->device == 0x6841) || \
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2723:6: note: in expansion of macro 'ASIC_IS_LOMBOK'
  if (ASIC_IS_LOMBOK(rdev))
      ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2727:21: error: 'struct drm_device' has no member named 'pdev'
          (rdev->ddev->pdev->device == 0x6842) || \
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2723:6: note: in expansion of macro 'ASIC_IS_LOMBOK'
  if (ASIC_IS_LOMBOK(rdev))
      ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:2728:21: error: 'struct drm_device' has no member named 'pdev'
          (rdev->ddev->pdev->device == 0x6843))
                     ^
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:2723:6: note: in expansion of macro 'ASIC_IS_LOMBOK'
  if (ASIC_IS_LOMBOK(rdev))
      ^
In file included from /export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_driver.h:37:0,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/radeon.h:75,
                 from /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c:26:
/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c: At top level:
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:14:20: error: 'drm_free_agp' declared 'static' but never defined [-Werror=unused-function]
 static inline void drm_free_agp(struct agp_bridge_data *, struct agp_memory *, int);
                    ^
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:15:19: error: 'drm_bind_agp' declared 'static' but never defined [-Werror=unused-function]
 static inline int drm_bind_agp(struct agp_bridge_data *, struct agp_memory *, unsigned);
                   ^
/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm/drm_agpsupport.h:16:19: error: 'drm_unbind_agp' declared 'static' but never defined [-Werror=unused-function]
 static inline int drm_unbind_agp(struct agp_bridge_data *, struct agp_memory *);
                   ^
cc1: all warnings being treated as errors

*** Failed target:  btc_dpm.o
*** Failed command: echo '# ' "compile T23/btc_dpm.o" && echo /u3/netbsd-builds/8/i386/tools/bin/i486--netbsdelf-gcc -msoft-float -mno-mmx -mno-sse -mno-avx -mindirect-branch=thunk -mindirect-branch-register -ffreestanding -fno-zero-initialized-in-bss -O2 -fno-omit-frame-pointer -fstack-protector -Wstack-protector --param ssp-buffer-size=1 -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wextra -Wno-unused-parameter -Wold-style-definition -Wno-sign-compare -Wno-missing-prototypes --sysroot=/u3/netbsd-builds/8/i386/destdir -Di386 -I. -I/export/netbsd-8/sys/external/bsd/acpica/dist -I/export/netbsd-8/sys/../common/lib/libx86emu -I/export/netbsd-8/sys/../common/include -I/export/netbsd-8/sys/arch -I/export/netbsd-8/sys -nostdinc -DDEBUG -D_KERNEL -D_KERNEL!
 _OPT -std=gnu99 -I/export/netbsd-8/sys/lib/libkern/../../../common/lib/libc/quad -I/export/netbsd-8/sys/lib/libkern/../../../common/lib/libc/string -I/export/netbsd-8/sys/lib/libkern/../../../common/lib/libc/arch/i386/string -D_FORTIFY_SOURCE=2 -I/export/netbsd-8/sys/external/bsd/ipf -I/export/netbsd-8/sys/external/isc/atheros_hal/dist -I/export/netbsd-8/sys/external/isc/atheros_hal/ic -I/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core -I/export/netbsd-8/sys/external/bsd/drm/dist/shared-core -I/export/netbsd-8/sys/external/bsd/common/include -I/export/netbsd-8/sys/external/bsd/drm2/include -I/export/netbsd-8/sys/external/bsd/common/include -I/export/netbsd-8/sys/external/bsd/drm2/include -I/export/netbsd-8/sys/external/bsd/drm2/include/drm -I/export/netbsd-8/sys/external/bsd/drm2/dist -I/export/netbsd-8/sys/external/bsd/drm2/dist/include -I/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm -I/export/netbsd-8/sys/external/bsd/drm2/dist/uapi -I/export/netbsd-8/sys/ext!
 ernal/bsd/common/include -D__KERNEL__ -DCONFIG_FB=0 -DCONFIG_B!
 ACKLIGHT_CLASS_DEVICE=0 -DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0 -I/export/netbsd-8/sys/../common/include -DCONFIG_AGP -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/i915 -I/export/netbsd-8/sys/external/bsd/drm2/i915drm -DCONFIG_DRM_I915_FBDEV=1 -DCONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=0 -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon -I/export/netbsd-8/sys/external/bsd/drm2/include/radeon -I/export/netbsd-8/sys/external/bsd/drm2/radeon -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau/core -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau/core/include -I/export/netbsd-8/sys/external/bsd/drm2/nouveau -DCONFIG_NOUVEAU_DEBUG=5 -DCONFIG_NOUVEAU_DEBUG_DEFAULT=3 -I/export/netbsd-8/sys/external/bsd/acpica/dist/include -c /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c -o btc_dpm.o && /u3/netbsd-builds/8/i386/tools/bin/i486--netbsdelf-gcc -msoft-float -mno-mmx -mno-sse -mno-avx -!
 mindirect-branch=thunk -mindirect-branch-register -ffreestanding -fno-zero-initialized-in-bss -O2 -fno-omit-frame-pointer -fstack-protector -Wstack-protector --param ssp-buffer-size=1 -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wextra -Wno-unused-parameter -Wold-style-definition -Wno-sign-compare -Wno-missing-prototypes --sysroot=/u3/netbsd-builds/8/i386/destdir -Di386 -I. -I/export/netbsd-8/sys/external/bsd/acpica/dist -I/export/netbsd-8/sys/../common/lib/libx86emu -I/export/netbsd-8/sys/../common/include -I/export/netbsd-8/sys/arch -I/export/netbsd-8/sys -nostdinc -DDEBUG -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/export/netbsd-8/sys/lib/libkern/../../../common/lib/libc/quad -I/export/netbsd-8/sys/lib/libkern/../../../common/lib/libc/string -I/export!
 /netbsd-8/sys/lib/libkern/../../../common/lib/libc/arch/i386/string -D
_!
 FORTIFY_SOURCE=2 -I/export/netbsd-8/sys/external/bsd/ipf -I/export/netbsd-8/sys/external/isc/atheros_hal/dist -I/export/netbsd-8/sys/external/isc/atheros_hal/ic -I/export/netbsd-8/sys/external/bsd/drm/dist/bsd-core -I/export/netbsd-8/sys/external/bsd/drm/dist/shared-core -I/export/netbsd-8/sys/external/bsd/common/include -I/export/netbsd-8/sys/external/bsd/drm2/include -I/export/netbsd-8/sys/external/bsd/common/include -I/export/netbsd-8/sys/external/bsd/drm2/include -I/export/netbsd-8/sys/external/bsd/drm2/include/drm -I/export/netbsd-8/sys/external/bsd/drm2/dist -I/export/netbsd-8/sys/external/bsd/drm2/dist/include -I/export/netbsd-8/sys/external/bsd/drm2/dist/include/drm -I/export/netbsd-8/sys/external/bsd/drm2/dist/uapi -I/export/netbsd-8/sys/external/bsd/common/include -D__KERNEL__ -DCONFIG_FB=0 -DCONFIG_BACKLIGHT_CLASS_DEVICE=0 -DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0 -I/export/netbsd-8/sys/../common/include -DCONFIG_AGP -I/export/netbsd-8/sys/external/bsd/drm2/dist/d!
 rm/i915 -I/export/netbsd-8/sys/external/bsd/drm2/i915drm -DCONFIG_DRM_I915_FBDEV=1 -DCONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=0 -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon -I/export/netbsd-8/sys/external/bsd/drm2/include/radeon -I/export/netbsd-8/sys/external/bsd/drm2/radeon -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau/core -I/export/netbsd-8/sys/external/bsd/drm2/dist/drm/nouveau/core/include -I/export/netbsd-8/sys/external/bsd/drm2/nouveau -DCONFIG_NOUVEAU_DEBUG=5 -DCONFIG_NOUVEAU_DEBUG_DEFAULT=3 -I/export/netbsd-8/sys/external/bsd/acpica/dist/include -c /export/netbsd-8/sys/external/bsd/drm2/dist/drm/radeon/btc_dpm.c -o btc_dpm.o && echo /u3/netbsd-builds/8/i386/tools/bin/nbctfconvert -g -L VERSION btc_dpm.o && /u3/netbsd-builds/8/i386/tools/bin/nbctfconvert -g -L VERSION btc_dpm.o
*** Error code 1

Stop.
nbmake: stopped in /var/obj/netbsd-builds/8/i386/sys/arch/i386/compile/T23

ERROR: Failed to make all in "/var/obj/netbsd-builds/8/i386/sys/arch/i386/compile/T23"
*** BUILD ABORTED ***



>How-To-Repeat:

	Build a kernel with

# DRI legacy drivers
savagedrm*      at drm?         # S3 Savage DRM driver

	and watch it fail.


>Fix:
	Yes, please.


>Release-Note:

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53320: Kernel with savagedrm does not build
Date: Sun, 27 May 2018 19:38:32 +0000

 Does it work better if you remove all new drm drivers from your kernel
 config?

From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org
Subject: Re: kern/53320: Kernel with savagedrm does not build
Date: Sun, 27 May 2018 22:11:31 +0200

 On Sun, 27 May 2018 19:40:01 +0000 (UTC), coypu@sdf.org wrote:
 >  Does it work better if you remove all new drm drivers from your kernel
 >  config?

 It does indeed - the kernel build completes. It was a netbsd-8 build,=20
 in case this wasn't obvious.

 How do we proceed from here?

 Cheerio,
 hauke

 --=20
 Hauke Fath                        <hauke@Espresso.Rhein-Neckar.DE>
 Ernst-Ludwig-Stra=DFe 15
 64625 Bensheim
 Germany

From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53320: Kernel with savagedrm does not build
Date: Sun, 27 May 2018 20:44:38 +0000

 I think the issue is:
 olddrm and drm2 both have similarly named headers, olddrm also
 originates in linux and they had no reason to rename everything.

 Adding flags in files.drmkms, they get added for the entire kernel
 build, not just for the specific files listed in them. so olddrm is
 built with -I/path/to/newdrm, which doesn't work because the API
 changed.

 Next issue will be that they probably define similar named functions..

From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53320: Kernel with savagedrm does not build
Date: Sun, 27 May 2018 20:49:01 +0000

 For the record, the symbol conflict is not so bad, because we can ask
 the tools to prefix all the symbols, maybe by adding it in old drm
 drmP.h, if people consider this to be acceptable.

From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53320: Kernel with savagedrm does not build
Date: Sun, 27 May 2018 20:51:40 +0000

 The best option is probably to fix all of this working as modules
 because we are about to want to do this anyway, as some people wrote
 GPLv2 drivers for ARM graphics.

State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Fri, 01 Jun 2018 18:18:58 +0000
State-Changed-Why:
this is not a supported configuration.  please choose either new OR old drm.

sorry, but the effort involved is non trivial and we want to delete old drm
anyway.. (i tried for a few hours, but gave up when i realised it was likely
days more work.)


From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org, mrg@NetBSD.org
Subject: Re: kern/53320 (Kernel with savagedrm does not build)
Date: Fri, 1 Jun 2018 20:35:50 +0200

 On Fri,  1 Jun 2018 18:18:58 +0000 (UTC), mrg@NetBSD.org wrote:
 > Synopsis: Kernel with savagedrm does not build
 >=20
 > this is not a supported configuration.  please choose either new OR old d=
 rm.

 Then it should say so, preferably in the GENERIC and ALL kernel config=20
 files, and in drm(4). At the time, I could not find anything, anywhere.

 > sorry, but the effort involved is non trivial and we want to delete old d=
 rm
 > anyway.

 What does that mean for the graphics controllers that are not supported=20
 by new drm?

 Cheerio,
 hauke

 --=20
 Hauke Fath                        <hauke@Espresso.Rhein-Neckar.DE>
 Ernst-Ludwig-Stra=DFe 15
 64625 Bensheim
 Germany

From: matthew green <mrg@eterna.com.au>
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Cc: kern-bug-people@NetBSD.org, gnats-admin@NetBSD.org,
    gnats-bugs@NetBSD.org
Subject: re: kern/53320 (Kernel with savagedrm does not build)
Date: Sat, 02 Jun 2018 17:47:51 +1000

 > > this is not a supported configuration.  please choose either new OR ol=
 d drm.
 > =

 > Then it should say so, preferably in the GENERIC and ALL kernel config
 > files, and in drm(4). At the time, I could not find anything, anywhere.

 feel free to update our docs.

 > > sorry, but the effort involved is non trivial and we want to delete ol=
 d drm
 > > anyway.
 > =

 > What does that mean for the graphics controllers that are not supported
 > by new drm?

 from what i can see in linux, savagedrm is still there so
 it should only require someone doing the port..


 .mrg.

Responsible-Changed-From-To: kern-bug-people->hauke
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Sat, 02 Jun 2018 10:59:30 +0000
Responsible-Changed-Why:
I'll take this.


State-Changed-From-To: closed->open
State-Changed-By: hauke@NetBSD.org
State-Changed-When: Sat, 02 Jun 2018 10:59:30 +0000
State-Changed-Why:
The fact that old and new drm drivers in a kernel config are mutually
exclusive needs to be documented. I will do that.


From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/53320 (Kernel with savagedrm does not build)
Date: Sat, 02 Jun 2018 17:58:47 -0400

 My two (Canadian) cents: if old and new drm are incompatible in a
 kernel config, what ramifications does this have for modules? Because
 right now, both i915drm and i915drmkms are built and installed as
 modules on amd64 and i386. Does this mean i915drm won't actually work
 as a module, either, with a stock kernel? (I'm not sure if there are
 any use cases left where the older version would be advantageous.)

 I ran into an issue with i915 support in general some months ago when
 installing 8.0_BETA on an older (Intel Core 2 era) amd64 machine. I
 never had time to fully investigate, but the stock GENERIC kernel was
 hanging on boot, and I had to (partially, it seems) disable i915 to
 get it to boot. Anyway, my point being, at the time, I looked at the
 drm(4) man page, and saw it was completely out of date. There's no
 mention whatsoever of the newer drm implementation. I'd made a note
 to offer something myself in this regard, but hadn't got around to it.
 I can also help to update the documentation if this is of use.

 Regards,

 Dave

From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@NetBSD.org
Cc: hauke@NetBSD.org, gnats-admin@NetBSD.org,
        "David H. Gutteridge" <dhgutteridge@sympatico.ca>
Subject: Re: kern/53320 (Kernel with savagedrm does not build)
Date: Sun, 3 Jun 2018 14:02:57 +0200

 On Sat,  2 Jun 2018 23:25:01 +0000 (UTC), David H. Gutteridge wrote:
 >  [...] I looked at the
 >  drm(4) man page, and saw it was completely out of date. There's no
 >  mention whatsoever of the newer drm implementation. I'd made a note
 >  to offer something myself in this regard, but hadn't got around to it.

 Part of the reason the new drm framework left no trace in drm(4) is 
 probably that its drivers attach like

 FOOdrmkms*     at pci? dev ? function ?
 FOOfb*        at FOOfbbus?

 (with *fbbus? appearing out of thin air). So there is no "new drm" bus. 
 Still, drm(4) might hint at the fact.

 Cheerio,
 hauke 

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.