begin fixing -Werror build: Provide missing declarations from older drm provide more definitions used by code no idea what might_lock is, but it might be some error-checking lockdep thing. Author: coypu <coypu@sdf.org> Committer: Taylor R Campbell <riastradh@NetBSD.org>diff -r1.14 -r1.15 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
(riastradh)
--- src/sys/external/bsd/drm2/dist/include/drm/Attic/drmP.h 2018/08/27 04:58:37 1.14
+++ src/sys/external/bsd/drm2/dist/include/drm/Attic/drmP.h 2018/08/27 06:17:30 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: drmP.h,v 1.14 2018/08/27 04:58:37 riastradh Exp $ */ | 1 | /* $NetBSD: drmP.h,v 1.15 2018/08/27 06:17:30 riastradh Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Internal Header for the Direct Rendering Manager | 4 | * Internal Header for the Direct Rendering Manager | |
5 | * | 5 | * | |
6 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. | 6 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. | |
7 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | 7 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | |
8 | * Copyright (c) 2009-2010, Code Aurora Forum. | 8 | * Copyright (c) 2009-2010, Code Aurora Forum. | |
9 | * All rights reserved. | 9 | * All rights reserved. | |
10 | * | 10 | * | |
11 | * Author: Rickard E. (Rik) Faith <faith@valinux.com> | 11 | * Author: Rickard E. (Rik) Faith <faith@valinux.com> | |
12 | * Author: Gareth Hughes <gareth@valinux.com> | 12 | * Author: Gareth Hughes <gareth@valinux.com> | |
13 | * | 13 | * | |
14 | * Permission is hereby granted, free of charge, to any person obtaining a | 14 | * Permission is hereby granted, free of charge, to any person obtaining a | |
@@ -86,26 +86,27 @@ | @@ -86,26 +86,27 @@ | |||
86 | #endif | 86 | #endif | |
87 | #include <drm/drm_sarea.h> | 87 | #include <drm/drm_sarea.h> | |
88 | #include <drm/drm_vma_manager.h> | 88 | #include <drm/drm_vma_manager.h> | |
89 | 89 | |||
90 | struct module; | 90 | struct module; | |
91 | 91 | |||
92 | struct drm_file; | 92 | struct drm_file; | |
93 | struct drm_device; | 93 | struct drm_device; | |
94 | struct drm_agp_head; | 94 | struct drm_agp_head; | |
95 | struct drm_local_map; | 95 | struct drm_local_map; | |
96 | struct drm_device_dma; | 96 | struct drm_device_dma; | |
97 | struct drm_dma_handle; | 97 | struct drm_dma_handle; | |
98 | struct drm_gem_object; | 98 | struct drm_gem_object; | |
99 | struct drm_bus_irq_cookie; | |||
99 | 100 | |||
100 | struct device_node; | 101 | struct device_node; | |
101 | struct videomode; | 102 | struct videomode; | |
102 | struct reservation_object; | 103 | struct reservation_object; | |
103 | struct dma_buf_attachment; | 104 | struct dma_buf_attachment; | |
104 | 105 | |||
105 | /* | 106 | /* | |
106 | * 4 debug categories are defined: | 107 | * 4 debug categories are defined: | |
107 | * | 108 | * | |
108 | * CORE: Used in the generic drm code: drm_ioctl.c, drm_mm.c, drm_memory.c, ... | 109 | * CORE: Used in the generic drm code: drm_ioctl.c, drm_mm.c, drm_memory.c, ... | |
109 | * This is the category used by the DRM_DEBUG() macro. | 110 | * This is the category used by the DRM_DEBUG() macro. | |
110 | * | 111 | * | |
111 | * DRIVER: Used in the vendor specific part of the driver: i915, radeon, ... | 112 | * DRIVER: Used in the vendor specific part of the driver: i915, radeon, ... |
--- src/sys/external/bsd/drm2/include/linux/dma-mapping.h 2014/08/06 13:50:53 1.3
+++ src/sys/external/bsd/drm2/include/linux/dma-mapping.h 2018/08/27 06:17:30 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: dma-mapping.h,v 1.3 2014/08/06 13:50:53 riastradh Exp $ */ | 1 | /* $NetBSD: dma-mapping.h,v 1.4 2018/08/27 06:17:30 riastradh Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Taylor R. Campbell. | 8 | * by Taylor R. Campbell. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -24,23 +24,25 @@ | @@ -24,23 +24,25 @@ | |||
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #ifndef _LINUX_DMA_MAPPING_H_ | 32 | #ifndef _LINUX_DMA_MAPPING_H_ | |
33 | #define _LINUX_DMA_MAPPING_H_ | 33 | #define _LINUX_DMA_MAPPING_H_ | |
34 | 34 | |||
35 | #include <sys/bus.h> | 35 | #include <sys/bus.h> | |
36 | 36 | |||
37 | #include <linux/bug.h> | |||
38 | ||||
37 | typedef bus_addr_t dma_addr_t; | 39 | typedef bus_addr_t dma_addr_t; | |
38 | 40 | |||
39 | static inline uintmax_t | 41 | static inline uintmax_t | |
40 | DMA_BIT_MASK(unsigned nbits) | 42 | DMA_BIT_MASK(unsigned nbits) | |
41 | { | 43 | { | |
42 | 44 | |||
43 | return ~(~(uintmax_t)0 << nbits); | 45 | return ~(~(uintmax_t)0 << nbits); | |
44 | } | 46 | } | |
45 | 47 | |||
46 | #endif /* _LINUX_DMA_MAPPING_H_ */ | 48 | #endif /* _LINUX_DMA_MAPPING_H_ */ |
--- src/sys/external/bsd/drm2/include/linux/mutex.h 2018/08/27 06:06:41 1.8
+++ src/sys/external/bsd/drm2/include/linux/mutex.h 2018/08/27 06:17:30 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mutex.h,v 1.8 2018/08/27 06:06:41 riastradh Exp $ */ | 1 | /* $NetBSD: mutex.h,v 1.9 2018/08/27 06:17:30 riastradh Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Taylor R. Campbell. | 8 | * by Taylor R. Campbell. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -27,28 +27,29 @@ | @@ -27,28 +27,29 @@ | |||
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #ifndef _LINUX_MUTEX_H_ | 32 | #ifndef _LINUX_MUTEX_H_ | |
33 | #define _LINUX_MUTEX_H_ | 33 | #define _LINUX_MUTEX_H_ | |
34 | 34 | |||
35 | #include <sys/mutex.h> | 35 | #include <sys/mutex.h> | |
36 | 36 | |||
37 | #include <lib/libkern/libkern.h> /* KASSERT */ | 37 | #include <lib/libkern/libkern.h> /* KASSERT */ | |
38 | #include <linux/list.h> | 38 | #include <linux/list.h> | |
39 | 39 | |||
40 | #define __acquires(lock) /* XXX lockdep stuff */ | 40 | #define __acquires(lock) /* XXX lockdep stuff */ | |
41 | #define __releases(lock) /* XXX lockdep stuff */ | 41 | #define __releases(lock) /* XXX lockdep stuff */ | |
42 | #define might_lock(lock) do {} while(0) /* XXX lockdep stuff */ | |||
42 | 43 | |||
43 | struct mutex { | 44 | struct mutex { | |
44 | kmutex_t mtx_lock; | 45 | kmutex_t mtx_lock; | |
45 | }; | 46 | }; | |
46 | 47 | |||
47 | struct lock_class_key { | 48 | struct lock_class_key { | |
48 | }; | 49 | }; | |
49 | 50 | |||
50 | /* Name collision. Pooh. */ | 51 | /* Name collision. Pooh. */ | |
51 | static inline void | 52 | static inline void | |
52 | linux_mutex_init(struct mutex *mutex) | 53 | linux_mutex_init(struct mutex *mutex) | |
53 | { | 54 | { | |
54 | mutex_init(&mutex->mtx_lock, MUTEX_DEFAULT, IPL_NONE); | 55 | mutex_init(&mutex->mtx_lock, MUTEX_DEFAULT, IPL_NONE); |
--- src/sys/external/bsd/drm2/include/linux/sched.h 2018/08/27 06:07:32 1.6
+++ src/sys/external/bsd/drm2/include/linux/sched.h 2018/08/27 06:17:30 1.7
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sched.h,v 1.6 2018/08/27 06:07:32 riastradh Exp $ */ | 1 | /* $NetBSD: sched.h,v 1.7 2018/08/27 06:17:30 riastradh Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Taylor R. Campbell. | 8 | * by Taylor R. Campbell. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -27,26 +27,27 @@ | @@ -27,26 +27,27 @@ | |||
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #ifndef _LINUX_SCHED_H_ | 32 | #ifndef _LINUX_SCHED_H_ | |
33 | #define _LINUX_SCHED_H_ | 33 | #define _LINUX_SCHED_H_ | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/kernel.h> | 36 | #include <sys/kernel.h> | |
37 | #include <sys/proc.h> | 37 | #include <sys/proc.h> | |
38 | 38 | |||
39 | #include <asm/param.h> | 39 | #include <asm/param.h> | |
40 | #include <asm/barrier.h> | |||
40 | #include <linux/errno.h> | 41 | #include <linux/errno.h> | |
41 | 42 | |||
42 | #define TASK_COMM_LEN MAXCOMLEN | 43 | #define TASK_COMM_LEN MAXCOMLEN | |
43 | 44 | |||
44 | #define current curproc | 45 | #define current curproc | |
45 | 46 | |||
46 | static inline pid_t | 47 | static inline pid_t | |
47 | task_pid_nr(struct proc *p) | 48 | task_pid_nr(struct proc *p) | |
48 | { | 49 | { | |
49 | return p->p_pid; | 50 | return p->p_pid; | |
50 | } | 51 | } | |
51 | 52 | |||
52 | static inline long | 53 | static inline long |
--- src/sys/external/bsd/drm2/include/linux/spinlock.h 2016/04/13 08:43:56 1.7
+++ src/sys/external/bsd/drm2/include/linux/spinlock.h 2018/08/27 06:17:30 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: spinlock.h,v 1.7 2016/04/13 08:43:56 riastradh Exp $ */ | 1 | /* $NetBSD: spinlock.h,v 1.8 2018/08/27 06:17:30 riastradh Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Taylor R. Campbell. | 8 | * by Taylor R. Campbell. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -26,26 +26,28 @@ | @@ -26,26 +26,28 @@ | |||
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #ifndef _LINUX_SPINLOCK_H_ | 32 | #ifndef _LINUX_SPINLOCK_H_ | |
33 | #define _LINUX_SPINLOCK_H_ | 33 | #define _LINUX_SPINLOCK_H_ | |
34 | 34 | |||
35 | #include <sys/cdefs.h> | 35 | #include <sys/cdefs.h> | |
36 | #include <sys/mutex.h> | 36 | #include <sys/mutex.h> | |
37 | 37 | |||
38 | #include <machine/limits.h> | 38 | #include <machine/limits.h> | |
39 | #include <linux/irqflags.h> | |||
40 | #include <linux/preempt.h> | |||
39 | 41 | |||
40 | #define __acquires(lock) /* XXX lockdep stuff */ | 42 | #define __acquires(lock) /* XXX lockdep stuff */ | |
41 | #define __releases(lock) /* XXX lockdep stuff */ | 43 | #define __releases(lock) /* XXX lockdep stuff */ | |
42 | 44 | |||
43 | typedef struct spinlock { | 45 | typedef struct spinlock { | |
44 | kmutex_t sl_lock; | 46 | kmutex_t sl_lock; | |
45 | } spinlock_t; | 47 | } spinlock_t; | |
46 | 48 | |||
47 | static inline int | 49 | static inline int | |
48 | spin_is_locked(spinlock_t *spinlock) | 50 | spin_is_locked(spinlock_t *spinlock) | |
49 | { | 51 | { | |
50 | return mutex_owned(&spinlock->sl_lock); | 52 | return mutex_owned(&spinlock->sl_lock); | |
51 | } | 53 | } |