I cannot promise that I haven’t severely broken the GPU modules in any way, but after quite a bit of work and abandoning kernel 4.4 Civil Infrastructure Platform, well, here we are at 6.1 LTS.
Here’s the errors I have at the moment:
CALL scripts/checksyscalls.sh
CC drivers/video/tegra/nvmap/nvmap_dev.o
CC drivers/gpu/nvgpu/gk20a/gk20a.o
CC drivers/video/tegra/nvmap/nvmap_heap.o
CC drivers/video/tegra/camera/camera.o
CC drivers/video/tegra/camera/camera_clk.o
drivers/video/tegra/nvmap/nvmap_heap.c: In function ‘nvmap_alloc_mem’:
drivers/video/tegra/nvmap/nvmap_heap.c:103:17: error: ‘DMA_ATTR_ALLOC_EXACT_SIZE’ undeclared (first use in this function)
103 | attr |= DMA_ATTR_ALLOC_EXACT_SIZE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:103:17: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/tegra/nvmap/nvmap_dev.c:115:27: error: initialization of ‘vm_fault_t (*)(struct vm_fault *)’ {aka ‘unsigned int (*)(struct vm_fault *)’} from incompatible pointer type ‘int (*)(struct vm_area_struct *, struct vm_fault *)’ [-Werror=incompatible-pointer-types]
115 | .fault = nvmap_vma_fault,
| ^~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_dev.c:115:27: note: (near initialization for ‘nvmap_vma_ops.fault’)
In file included from ./arch/arm/include/asm/thread_info.h:14,
from ./include/linux/thread_info.h:60,
from ./include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from ./include/linux/preempt.h:78,
from ./include/linux/spinlock.h:56,
from ./include/linux/wait.h:9,
from ./include/linux/wait_bit.h:8,
from ./include/linux/fs.h:6,
from ./include/linux/backing-dev.h:13,
from drivers/video/tegra/nvmap/nvmap_dev.c:23:
drivers/video/tegra/nvmap/nvmap_dev.c: In function ‘nvmap_flush_heap_block’:
./arch/arm/include/asm/page.h:12:33: error: passing argument 1 of ‘free_vm_area’ makes pointer from integer without a cast [-Werror=int-conversion]
12 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int
drivers/video/tegra/nvmap/nvmap_dev.c:205:29: note: in expansion of macro ‘PAGE_SIZE’
205 | area = free_vm_area(PAGE_SIZE);
| ^~~~~~~~~
In file included from ./include/asm-generic/io.h:994,
from ./arch/arm/include/asm/io.h:416,
from ./include/linux/io.h:13,
from ./include/linux/irq.h:20,
from ./include/asm-generic/hardirq.h:17,
from ./arch/arm/include/asm/hardirq.h:10,
from ./include/linux/hardirq.h:11,
from ./include/linux/highmem.h:12,
from ./include/linux/bvec.h:10,
from ./include/linux/blk_types.h:10,
from ./include/linux/writeback.h:13,
from ./include/linux/backing-dev.h:16:
./include/linux/vmalloc.h:215:37: note: expected ‘struct vm_struct *’ but argument is of type ‘long unsigned int’
215 | void free_vm_area(struct vm_struct *area);
| ~~~~~~~~~~~~~~~~~~^~~~
drivers/video/tegra/nvmap/nvmap_dev.c:205:14: error: void value not ignored as it ought to be
205 | area = free_vm_area(PAGE_SIZE);
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘nvhost_channel_suspend’:
drivers/gpu/nvgpu/gk20a/gk20a.c:74:13: error: implicit declaration of function ‘channel_cdma_op’ [-Werror=implicit-function-declaration]
74 | if (channel_cdma_op().stop && ch->dev)
| ^~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:74:30: error: request for member ‘stop’ in something not a structure or union
74 | if (channel_cdma_op().stop && ch->dev)
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c:74:41: error: invalid use of undefined type ‘struct nvhost_channel’
74 | if (channel_cdma_op().stop && ch->dev)
| ^~
drivers/gpu/nvgpu/gk20a/gk20a.c:75:34: error: request for member ‘stop’ in something not a structure or union
75 | channel_cdma_op().stop(&ch->cdma);
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c:75:43: error: invalid use of undefined type ‘struct nvhost_channel’
75 | channel_cdma_op().stop(&ch->cdma);
| ^~
drivers/gpu/nvgpu/gk20a/gk20a.c:80:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
80 | int nvhost_module_disable_clk(struct device *dev)
| ^~~
In file included from ./include/linux/linkage.h:7,
from ./arch/arm/include/asm/bug.h:5,
from ./include/linux/ktime.h:26,
from ./include/trace/events/gk20a.h:22,
from drivers/gpu/nvgpu/gk20a/gk20a.c:22:
drivers/gpu/nvgpu/gk20a/gk20a.c:102:15: error: non-static declaration of ‘nvhost_module_disable_clk’ follows static declaration
102 | EXPORT_SYMBOL(nvhost_module_disable_clk);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/export.h:87:28: note: in definition of macro ‘___EXPORT_SYMBOL’
87 | extern typeof(sym) sym; \
| ^~~
./include/linux/export.h:147:41: note: in expansion of macro ‘__EXPORT_SYMBOL’
147 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
./include/linux/export.h:150:41: note: in expansion of macro ‘_EXPORT_SYMBOL’
150 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:102:1: note: in expansion of macro ‘EXPORT_SYMBOL’
102 | EXPORT_SYMBOL(nvhost_module_disable_clk);
| ^~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:80:5: note: previous definition of ‘nvhost_module_disable_clk’ with type ‘int(struct device *)’
80 | int nvhost_module_disable_clk(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/export.h:57:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
57 | static const struct kernel_symbol __ksymtab_##sym \
| ^~~~~~
./include/linux/export.h:96:9: note: in expansion of macro ‘__KSYMTAB_ENTRY’
96 | __KSYMTAB_ENTRY(sym, sec)
| ^~~~~~~~~~~~~~~
./include/linux/export.h:140:41: note: in expansion of macro ‘___EXPORT_SYMBOL’
140 | #define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
| ^~~~~~~~~~~~~~~~
./include/linux/export.h:147:41: note: in expansion of macro ‘__EXPORT_SYMBOL’
147 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
./include/linux/export.h:150:41: note: in expansion of macro ‘_EXPORT_SYMBOL’
150 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:102:1: note: in expansion of macro ‘EXPORT_SYMBOL’
102 | EXPORT_SYMBOL(nvhost_module_disable_clk);
| ^~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:117:12: error: invalid storage class for function ‘gk20a_pm_finalize_poweron’
117 | static int gk20a_pm_finalize_poweron(struct device *dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:118:12: error: invalid storage class for function ‘gk20a_pm_prepare_poweroff’
118 | static int gk20a_pm_prepare_poweroff(struct device *dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:120:20: error: invalid storage class for function ‘set_gk20a’
120 | static inline void set_gk20a(struct platform_device *dev, struct gk20a *gk20a)
| ^~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:185:20: error: invalid storage class for function ‘sim_writel’
185 | static inline void sim_writel(struct gk20a *g, u32 r, u32 v)
| ^~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:190:19: error: invalid storage class for function ‘sim_readl’
190 | static inline u32 sim_readl(struct gk20a *g, u32 r)
| ^~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:195:13: error: invalid storage class for function ‘kunmap_and_free_iopage’
195 | static void kunmap_and_free_iopage(void **kvaddr, struct page **page)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:207:13: error: invalid storage class for function ‘gk20a_free_sim_support’
207 | static void gk20a_free_sim_support(struct gk20a *g)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:220:13: error: invalid storage class for function ‘gk20a_remove_sim_support’
220 | static void gk20a_remove_sim_support(struct sim_gk20a *s)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:228:12: error: invalid storage class for function ‘alloc_and_kmap_iopage’
228 | static int alloc_and_kmap_iopage(struct device *d,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:257:22: error: invalid storage class for function ‘gk20a_ioremap_resource’
257 | static void __iomem *gk20a_ioremap_resource(struct platform_device *dev, int i,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:269:12: error: invalid storage class for function ‘gk20a_init_sim_support’
269 | static int gk20a_init_sim_support(struct platform_device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:346:19: error: invalid storage class for function ‘sim_msg_header_size’
346 | static inline u32 sim_msg_header_size(void)
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:351:20: error: invalid storage class for function ‘sim_msg_bfr’
351 | static inline u32 *sim_msg_bfr(struct gk20a *g, u32 byte_offset)
| ^~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:356:20: error: invalid storage class for function ‘sim_msg_hdr’
356 | static inline u32 *sim_msg_hdr(struct gk20a *g, u32 byte_offset)
| ^~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:361:20: error: invalid storage class for function ‘sim_msg_param’
361 | static inline u32 *sim_msg_param(struct gk20a *g, u32 byte_offset)
| ^~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:367:20: error: invalid storage class for function ‘sim_write_hdr’
367 | static inline void sim_write_hdr(struct gk20a *g, u32 func, u32 size)
| ^~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:377:19: error: invalid storage class for function ‘sim_escape_read_hdr_size’
377 | static inline u32 sim_escape_read_hdr_size(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:382:13: error: invalid storage class for function ‘sim_send_ring_bfr’
382 | static u32 *sim_send_ring_bfr(struct gk20a *g, u32 byte_offset)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:387:12: error: invalid storage class for function ‘rpc_send_message’
387 | static int rpc_send_message(struct gk20a *g)
| ^~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:417:20: error: invalid storage class for function ‘sim_recv_ring_bfr’
417 | static inline u32 *sim_recv_ring_bfr(struct gk20a *g, u32 byte_offset)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:422:12: error: invalid storage class for function ‘rpc_recv_poll’
422 | static int rpc_recv_poll(struct gk20a *g)
| ^~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:470:12: error: invalid storage class for function ‘issue_rpc_and_wait’
470 | static int issue_rpc_and_wait(struct gk20a *g)
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:518:20: error: invalid storage class for function ‘gk20a_intr_isr_stall’
518 | static irqreturn_t gk20a_intr_isr_stall(int irq, void *dev_id)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:540:20: error: invalid storage class for function ‘gk20a_intr_isr_nonstall’
540 | static irqreturn_t gk20a_intr_isr_nonstall(int irq, void *dev_id)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:562:13: error: invalid storage class for function ‘gk20a_pbus_isr’
562 | static void gk20a_pbus_isr(struct gk20a *g)
| ^~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:589:20: error: invalid storage class for function ‘gk20a_intr_thread_stall’
589 | static irqreturn_t gk20a_intr_thread_stall(int irq, void *dev_id)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:622:20: error: invalid storage class for function ‘gk20a_intr_thread_nonstall’
622 | static irqreturn_t gk20a_intr_thread_nonstall(int irq, void *dev_id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:647:13: error: invalid storage class for function ‘gk20a_remove_support’
647 | static void gk20a_remove_support(struct platform_device *dev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:686:12: error: invalid storage class for function ‘gk20a_init_support’
686 | static int gk20a_init_support(struct platform_device *dev)
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:731:12: error: invalid storage class for function ‘gk20a_init_client’
731 | static int gk20a_init_client(struct platform_device *dev)
| ^~~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:105:17: error: ‘DMA_MEMORY_NOMAP’ undeclared (first use in this function)
105 | DMA_MEMORY_NOMAP |= attr);
| ^~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:104:15: error: too few arguments to function ‘dma_alloc_attrs’
104 | (void)dma_alloc_attrs(dev, len, &pa,
| ^~~~~~~~~~~~~~~
In file included from ./include/linux/dma-buf.h:21,
from ./include/linux/nvmap.h:28,
from drivers/video/tegra/nvmap/nvmap_heap.c:36:
./include/linux/dma-mapping.h:127:7: note: declared here
127 | void *dma_alloc_attrs(struct device *dev, size_t size, dma_addr_t *dma_handle,
| ^~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_dev.c:221:17: error: implicit declaration of function ‘unmap_kernel_range’ [-Werror=implicit-function-declaration]
221 | unmap_kernel_range(kaddr, PAGE_SIZE);
| ^~~~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_dev.c: In function ‘nvmap_open’:
drivers/video/tegra/nvmap/nvmap_dev.c:457:24: error: ‘struct address_space’ has no member named ‘backing_dev_info’
457 | filp->f_mapping->backing_dev_info = &nvmap_bdi;
| ^~
drivers/video/tegra/nvmap/nvmap_dev.c: In function ‘nvmap_ioctl’:
drivers/video/tegra/nvmap/nvmap_dev.c:517:68: error: macro "access_ok" passed 3 arguments, but takes just 2
517 | err = !access_ok(VERIFY_WRITE, uarg, _IOC_SIZE(cmd));
| ^
In file included from ./arch/arm/include/asm/uaccess.h:234,
from ./include/linux/uaccess.h:11,
from ./include/linux/sched/task.h:11,
from ./include/linux/sched/signal.h:9,
from ./include/linux/rcuwait.h:6,
from ./include/linux/percpu-rwsem.h:7,
from ./include/linux/fs.h:33:
./include/asm-generic/access_ok.h:45: note: macro "access_ok" defined here
45 | #define access_ok(addr, size) likely(__access_ok(addr, size))
|
drivers/video/tegra/nvmap/nvmap_dev.c:517:24: error: ‘access_ok’ undeclared (first use in this function)
517 | err = !access_ok(VERIFY_WRITE, uarg, _IOC_SIZE(cmd));
| ^~~~~~~~~
drivers/video/tegra/nvmap/nvmap_dev.c:517:24: note: each undeclared identifier is reported only once for each function it appears in
drivers/video/tegra/nvmap/nvmap_dev.c:519:67: error: macro "access_ok" passed 3 arguments, but takes just 2
519 | err = !access_ok(VERIFY_READ, uarg, _IOC_SIZE(cmd));
| ^
./include/asm-generic/access_ok.h:45: note: macro "access_ok" defined here
45 | #define access_ok(addr, size) likely(__access_ok(addr, size))
|
drivers/video/tegra/nvmap/nvmap_heap.c: In function ‘nvmap_free_mem’:
drivers/video/tegra/nvmap/nvmap_heap.c:119:17: error: ‘DEFINE_DMA_ATTRS’ undeclared (first use in this function)
119 | attr |= DEFINE_DMA_ATTRS;
| ^~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:121:23: error: redeclaration of ‘attr’ with no linkage
121 | unsigned long attr;
| ^~~~
drivers/video/tegra/nvmap/nvmap_heap.c:118:23: note: previous declaration of ‘attr’ with type ‘long unsigned int’
118 | unsigned long attr;
| ^~~~
drivers/video/tegra/nvmap/nvmap_heap.c:121:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
121 | unsigned long attr;
| ^~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘gk20a_init_client’:
drivers/gpu/nvgpu/gk20a/gk20a.c:739:9: error: implicit declaration of function ‘gk20a_pm_finalize_poweron’ [-Werror=implicit-function-declaration]
739 | gk20a_pm_finalize_poweron(&dev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘nvhost_channel_suspend’:
drivers/gpu/nvgpu/gk20a/gk20a.c:751:13: error: invalid storage class for function ‘gk20a_deinit_client’
751 | static void gk20a_deinit_client(struct platform_device *dev)
| ^~~~~~~~~~~~~~~~~~~
drivers/video/tegra/camera/camera.c: In function ‘tegra_camera_unregister’:
drivers/video/tegra/camera/camera.c:405:13: error: void value not ignored as it ought to be
405 | ret = misc_deregister(&camera->misc_dev);
| ^
make[5]: *** [scripts/Makefile.build:250: drivers/video/tegra/camera/camera.o] Error 1
make[5]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:250: drivers/video/tegra/nvmap/nvmap_dev.o] Error 1
make[5]: *** Waiting for unfinished jobs....
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘gk20a_deinit_client’:
drivers/gpu/nvgpu/gk20a/gk20a.c:755:9: error: implicit declaration of function ‘gk20a_pm_prepare_poweroff’ [-Werror=implicit-function-declaration]
755 | gk20a_pm_prepare_poweroff(&dev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘nvhost_channel_suspend’:
drivers/video/tegra/nvmap/nvmap_heap.c:122:17: error: ‘DMA_ATTR_ALLOC_EXACT_SIZE’ undeclared (first use in this function)
122 | attr |= DMA_ATTR_ALLOC_EXACT_SIZE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:782:12: error: invalid storage class for function ‘gk20a_pm_prepare_poweroff’
782 | static int gk20a_pm_prepare_poweroff(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:820:13: error: invalid storage class for function ‘gk20a_detect_chip’
820 | static void gk20a_detect_chip(struct gk20a *g)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:838:12: error: invalid storage class for function ‘gk20a_pm_finalize_poweron’
838 | static int gk20a_pm_finalize_poweron(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:126:61: error: ‘attrs’ undeclared (first use in this function); did you mean ‘attr’?
126 | (void *)(uintptr_t)base, (dma_addr_t)base, &attrs);
| ^~~~~
| attr
drivers/gpu/nvgpu/gk20a/gk20a.c:1021:26: error: initializer element is not constant
1021 | .get_max_state = tegra_gpu_get_max_state,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1021:26: note: (near initialization for ‘tegra_gpu_cooling_ops.get_max_state’)
drivers/gpu/nvgpu/gk20a/gk20a.c:1022:26: error: initializer element is not constant
1022 | .get_cur_state = tegra_gpu_get_cur_state,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1022:26: note: (near initialization for ‘tegra_gpu_cooling_ops.get_cur_state’)
drivers/gpu/nvgpu/gk20a/gk20a.c:1023:26: error: initializer element is not constant
1023 | .set_cur_state = tegra_gpu_set_cur_state,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1023:26: note: (near initialization for ‘tegra_gpu_cooling_ops.set_cur_state’)
drivers/gpu/nvgpu/gk20a/gk20a.c:1026:12: error: invalid storage class for function ‘gk20a_create_device’
1026 | static int gk20a_create_device(
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1064:13: error: invalid storage class for function ‘gk20a_user_deinit’
1064 | static void gk20a_user_deinit(struct platform_device *dev)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1100:12: error: invalid storage class for function ‘gk20a_user_init’
1100 | static int gk20a_user_init(struct platform_device *dev)
| ^~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1175:12: error: invalid storage class for function ‘gk20a_pm_enable_clk’
1175 | static int gk20a_pm_enable_clk(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1193:12: error: invalid storage class for function ‘gk20a_pm_disable_clk’
1193 | static int gk20a_pm_disable_clk(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1208:13: error: invalid storage class for function ‘gk20a_pm_shutdown’
1208 | static void gk20a_pm_shutdown(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1223:12: error: invalid storage class for function ‘gk20a_pm_railgate’
1223 | static int gk20a_pm_railgate(struct generic_pm_domain *domain)
| ^~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1235:12: error: invalid storage class for function ‘gk20a_pm_unrailgate’
1235 | static int gk20a_pm_unrailgate(struct generic_pm_domain *domain)
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1250:12: error: invalid storage class for function ‘gk20a_pm_suspend’
1250 | static int gk20a_pm_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1268:12: error: invalid storage class for function ‘gk20a_pm_resume’
1268 | static int gk20a_pm_resume(struct device *dev)
| ^~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1273:12: error: invalid storage class for function ‘gk20a_pm_initialise_domain’
1273 | static int gk20a_pm_initialise_domain(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘gk20a_pm_initialise_domain’:
drivers/gpu/nvgpu/gk20a/gk20a.c:1291:24: error: ‘struct gpd_dev_ops’ has no member named ‘save_state’
1291 | domain->dev_ops.save_state = gk20a_pm_prepare_poweroff;
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c:1292:24: error: ‘struct gpd_dev_ops’ has no member named ‘restore_state’
1292 | domain->dev_ops.restore_state = gk20a_pm_finalize_poweron;
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c:1293:24: error: ‘struct gpd_dev_ops’ has no member named ‘suspend’
1293 | domain->dev_ops.suspend = gk20a_pm_suspend;
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c:1294:24: error: ‘struct gpd_dev_ops’ has no member named ‘resume’
1294 | domain->dev_ops.resume = gk20a_pm_resume;
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘nvhost_channel_suspend’:
drivers/gpu/nvgpu/gk20a/gk20a.c:1305:12: error: invalid storage class for function ‘gk20a_pm_init’
1305 | static int gk20a_pm_init(struct platform_device *dev)
| ^~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1354:12: error: invalid storage class for function ‘gk20a_probe’
1354 | static int gk20a_probe(struct platform_device *dev)
| ^~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘gk20a_probe’:
drivers/gpu/nvgpu/gk20a/gk20a.c:1494:34: error: passing argument 4 of ‘debugfs_create_bool’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1494 | &gk20a->mm.ltc_enabled_debug);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| u32 * {aka unsigned int *}
In file included from drivers/gpu/nvgpu/gk20a/gk20a.c:41:
./include/linux/debugfs.h:140:32: note: expected ‘bool *’ {aka ‘_Bool *’} but argument is of type ‘u32 *’ {aka ‘unsigned int *’}
140 | bool *value);
| ~~~~~~^~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1491:36: error: void value not ignored as it ought to be
1491 | gk20a->debugfs_ltc_enabled =
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c:1496:48: error: void value not ignored as it ought to be
1496 | gk20a->debugfs_gr_idle_timeout_default =
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c:1500:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
1500 | bool timeouts_enabled_bool = gk20a->timeouts_enabled != 0;
| ^~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1501:41: error: void value not ignored as it ought to be
1501 | gk20a->debugfs_timeouts_enabled =
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c: In function ‘nvhost_channel_suspend’:
drivers/gpu/nvgpu/gk20a/gk20a.c:1515:19: error: invalid storage class for function ‘gk20a_remove’
1515 | static int __exit gk20a_remove(struct platform_device *dev)
| ^~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1550:18: error: initializer element is not constant
1550 | .probe = gk20a_probe,
| ^~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1550:18: note: (near initialization for ‘gk20a_driver.probe’)
In file included from ./include/linux/device.h:15,
from ./include/linux/miscdevice.h:7,
from drivers/video/tegra/camera/camera_priv_defs.h:20,
from drivers/video/tegra/camera/camera_clk.h:19,
from drivers/video/tegra/camera/camera_clk.c:18:
drivers/video/tegra/camera/camera_clk.c: In function ‘tegra_camera_clk_set_rate’:
drivers/gpu/nvgpu/gk20a/gk20a.c:1552:21: error: initializer element is not constant
1552 | .shutdown = gk20a_pm_shutdown,
| ^~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1552:21: note: (near initialization for ‘gk20a_driver.shutdown’)
drivers/video/tegra/camera/camera_clk.c:165:30: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint’ {aka ‘unsigned int’} [-Wformat=]
165 | dev_dbg(camera->dev, "%s: clk_id=%d, parent_rate=%lu, clk_rate=%lu\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:129:41: note: in definition of macro ‘dev_printk’
129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~
./include/linux/dev_printk.h:163:45: note: in expansion of macro ‘dev_fmt’
163 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
| ^~~~~~~
drivers/video/tegra/camera/camera_clk.c:165:9: note: in expansion of macro ‘dev_dbg’
165 | dev_dbg(camera->dev, "%s: clk_id=%d, parent_rate=%lu, clk_rate=%lu\n",
| ^~~~~~~
drivers/video/tegra/camera/camera_clk.c:165:74: note: format string is defined here
165 | dev_dbg(camera->dev, "%s: clk_id=%d, parent_rate=%lu, clk_rate=%lu\n",
| ~~^
| |
| long unsigned int
| %u
drivers/gpu/nvgpu/gk20a/gk20a.c:1560:23: error: initializer element is not constant
1560 | .pm = &gk20a_pm_ops,
| ^
drivers/gpu/nvgpu/gk20a/gk20a.c:1560:23: note: (near initialization for ‘gk20a_driver.driver.pm’)
drivers/gpu/nvgpu/gk20a/gk20a.c:1565:19: error: invalid storage class for function ‘gk20a_init’
1565 | static int __init gk20a_init(void)
| ^~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1570:20: error: invalid storage class for function ‘gk20a_exit’
1570 | static void __exit gk20a_exit(void)
| ^~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1765:1: error: invalid storage class for function ‘do_request_firmware’
1765 | do_request_firmware(struct device *dev, const char *prefix, const char *fw_name)
| ^~~~~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c: In function ‘nvmap_heap_create’:
drivers/video/tegra/nvmap/nvmap_heap.c:249:9: error: implicit declaration of function ‘DEFINE_DMA_ATTRS’ [-Werror=implicit-function-declaration]
249 | DEFINE_DMA_ATTRS(attrs);
| ^~~~~~~~~~~~~~~~
In file included from ./include/linux/printk.h:6,
from ./include/asm-generic/bug.h:22,
from ./arch/arm/include/asm/bug.h:60:
drivers/gpu/nvgpu/gk20a/gk20a.c:1822:13: error: initializer element is not constant
1822 | module_init(gk20a_init);
| ^~~~~~~~~~
./include/linux/init.h:250:55: note: in definition of macro ‘____define_initcall’
250 | __attribute__((__section__(__sec))) = fn;
| ^~
./include/linux/init.h:260:9: note: in expansion of macro ‘__unique_initcall’
260 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~~~~~
./include/linux/init.h:262:35: note: in expansion of macro ‘___define_initcall’
262 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
./include/linux/init.h:291:41: note: in expansion of macro ‘__define_initcall’
291 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
./include/linux/init.h:296:24: note: in expansion of macro ‘device_initcall’
296 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
./include/linux/module.h:87:25: note: in expansion of macro ‘__initcall’
87 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1822:1: note: in expansion of macro ‘module_init’
1822 | module_init(gk20a_init);
| ^~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1823:13: error: initializer element is not constant
1823 | module_exit(gk20a_exit);
| ^~~~~~~~~~
./include/linux/init.h:299:57: note: in definition of macro ‘__exitcall’
299 | static exitcall_t __exitcall_##fn __exit_call = fn
| ^~
drivers/gpu/nvgpu/gk20a/gk20a.c:1823:1: note: in expansion of macro ‘module_exit’
1823 | module_exit(gk20a_exit);
| ^~~~~~~~~~~
./include/linux/init.h:299:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
299 | static exitcall_t __exitcall_##fn __exit_call = fn
| ^~~~~~
./include/linux/module.h:99:25: note: in expansion of macro ‘__exitcall’
99 | #define module_exit(x) __exitcall(x);
| ^~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1823:1: note: in expansion of macro ‘module_exit’
1823 | module_exit(gk20a_exit);
| ^~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1823:1: error: expected declaration or statement at end of input
drivers/video/tegra/camera/camera_clk.c:195:33: error: implicit declaration of function ‘IO_ADDRESS’ [-Werror=implicit-function-declaration]
195 | IO_ADDRESS(TEGRA_APB_MISC_BASE);
| ^~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:249:26: error: ‘attrs’ undeclared (first use in this function)
249 | DEFINE_DMA_ATTRS(attrs);
| ^~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:259:45: error: storage size of ‘stats’ isn’t known
259 | struct dma_contiguous_stats stats;
| ^~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c: At top level:
drivers/gpu/nvgpu/gk20a/gk20a.c:1794:1: error: ‘gk20a_request_firmware’ defined but not used [-Werror=unused-function]
1794 | gk20a_request_firmware(struct gk20a *g, const char *fw_name)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1744:5: error: ‘gk20a_init_gpu_characteristics’ defined but not used [-Werror=unused-function]
1744 | int gk20a_init_gpu_characteristics(struct gk20a *g)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1729:5: error: ‘gk20a_do_unidle’ defined but not used [-Werror=unused-function]
1729 | int gk20a_do_unidle(void)
| ^~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1657:5: error: ‘gk20a_do_idle’ defined but not used [-Werror=unused-function]
1657 | int gk20a_do_idle(void)
| ^~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1645:6: error: ‘gk20a_reset’ defined but not used [-Werror=unused-function]
1645 | void gk20a_reset(struct gk20a *g, u32 units)
| ^~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1604:6: error: ‘gk20a_idle’ defined but not used [-Werror=unused-function]
1604 | void gk20a_idle(struct platform_device *pdev)
| ^~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1585:5: error: ‘gk20a_busy’ defined but not used [-Werror=unused-function]
1585 | int gk20a_busy(struct platform_device *pdev)
| ^~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1580:6: error: ‘gk20a_busy_noresume’ defined but not used [-Werror=unused-function]
1580 | void gk20a_busy_noresume(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1575:6: error: ‘is_gk20a_module’ defined but not used [-Werror=unused-function]
1575 | bool is_gk20a_module(struct platform_device *dev)
| ^~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:1158:23: error: ‘gk20a_get_channel_from_file’ defined but not used [-Werror=unused-function]
1158 | struct channel_gk20a *gk20a_get_channel_from_file(int fd)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:772:6: error: ‘gk20a_put_client’ defined but not used [-Werror=unused-function]
772 | void gk20a_put_client(struct gk20a *g)
| ^~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:759:5: error: ‘gk20a_get_client’ defined but not used [-Werror=unused-function]
759 | int gk20a_get_client(struct gk20a *g)
| ^~~~~~~~~~~~~~~~
drivers/gpu/nvgpu/gk20a/gk20a.c:497:5: error: ‘gk20a_sim_esc_read’ defined but not used [-Werror=unused-function]
497 | int gk20a_sim_esc_read(struct gk20a *g, char *path, u32 index, u32 count, u32 *data)
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
drivers/video/tegra/camera/camera_clk.c:195:44: error: ‘TEGRA_APB_MISC_BASE’ undeclared (first use in this function)
195 | IO_ADDRESS(TEGRA_APB_MISC_BASE);
| ^~~~~~~~~~~~~~~~~~~
drivers/video/tegra/camera/camera_clk.c:195:44: note: each undeclared identifier is reported only once for each function it appears in
make[4]: *** [scripts/Makefile.build:250: drivers/gpu/nvgpu/gk20a/gk20a.o] Error 1
make[3]: *** [scripts/Makefile.build:500: drivers/gpu/nvgpu/gk20a] Error 2
make[2]: *** [scripts/Makefile.build:500: drivers/gpu] Error 2
make[2]: *** Waiting for unfinished jobs....
drivers/video/tegra/nvmap/nvmap_heap.c:261:17: error: implicit declaration of function ‘dma_get_contiguous_stats’ [-Werror=implicit-function-declaration]
261 | dma_get_contiguous_stats(co->cma_dev, &stats);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:259:45: error: unused variable ‘stats’ [-Werror=unused-variable]
259 | struct dma_contiguous_stats stats;
| ^~~~~
drivers/video/tegra/camera/camera_clk.c:211:25: error: implicit declaration of function ‘tegra_clk_cfg_ex’ [-Werror=implicit-function-declaration]
211 | tegra_clk_cfg_ex(clk, TEGRA_CLK_VI_INP_SEL, 2);
| ^~~~~~~~~~~~~~~~
CC [M] drivers/power/supply/smb347-charger.o
CC [M] drivers/power/supply/acer_a500_battery.o
drivers/video/tegra/nvmap/nvmap_heap.c:283:33: error: ‘DMA_MEMORY_NOMAP’ undeclared (first use in this function)
283 | DMA_MEMORY_NOMAP);
| ^~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:282:23: error: too many arguments to function ‘dma_declare_coherent_memory’
282 | err = dma_declare_coherent_memory(h->dma_dev, 0, base, len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/video/tegra/nvmap/nvmap_heap.c:38:
./include/linux/dma-map-ops.h:178:5: note: declared here
178 | int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/tegra/nvmap/nvmap_heap.c:306:9: error: ‘buf’ undeclared (first use in this function)
306 | buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC;
| ^~~
drivers/video/tegra/nvmap/nvmap_heap.c:306:21: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
306 | buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC;
| ^
drivers/video/tegra/nvmap/nvmap_heap.c:306:21: error: statement with no effect [-Werror=unused-value]
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:250: drivers/video/tegra/nvmap/nvmap_heap.o] Error 1
make[4]: *** [scripts/Makefile.build:500: drivers/video/tegra/nvmap] Error 2
make[4]: *** Waiting for unfinished jobs....
drivers/video/tegra/camera/camera_clk.c:211:47: error: ‘TEGRA_CLK_VI_INP_SEL’ undeclared (first use in this function)
211 | tegra_clk_cfg_ex(clk, TEGRA_CLK_VI_INP_SEL, 2);
| ^~~~~~~~~~~~~~~~~~~~
drivers/video/tegra/camera/camera_clk.c:227:30: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint’ {aka ‘unsigned int’} [-Wformat=]
227 | dev_dbg(camera->dev, "%s: get_rate=%lu",
| ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:129:41: note: in definition of macro ‘dev_printk’
129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~
./include/linux/dev_printk.h:163:45: note: in expansion of macro ‘dev_fmt’
163 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
| ^~~~~~~
drivers/video/tegra/camera/camera_clk.c:227:9: note: in expansion of macro ‘dev_dbg’
227 | dev_dbg(camera->dev, "%s: get_rate=%lu",
| ^~~~~~~
drivers/video/tegra/camera/camera_clk.c:227:46: note: format string is defined here
227 | dev_dbg(camera->dev, "%s: get_rate=%lu",
| ~~^
| |
| long unsigned int
| %u
cc1: some warnings being treated as errors
Are a result of massive changes made in the kernel overtime, as expected.