diff mbox

cron job: media_tree daily build: ERRORS

Message ID 201301081343.43562.hverkuil@xs4all.nl (mailing list archive)
State New, archived
Headers show

Commit Message

Hans Verkuil Jan. 8, 2013, 12:43 p.m. UTC
On Tue 8 January 2013 12:01:51 Gianluca Gennari wrote:
> Il 08/01/2013 10:58, Hans Verkuil ha scritto:
> > On Mon 7 January 2013 22:38:23 Hans Verkuil wrote:
> >> This message is generated daily by a cron job that builds media_tree for
> >> the kernels and architectures in the list below.
> >>
> >> Results of the daily build of media_tree:
> >>
> >> date:        Mon Jan  7 19:00:18 CET 2013
> >> git hash:    73ec66c000e9816806c7380ca3420f4e0638c40e
> >> gcc version:      i686-linux-gcc (GCC) 4.7.1
> >> host hardware:    x86_64
> >> host os:          3.4.07-marune
> >>
> >> linux-git-arm-eabi-davinci: WARNINGS
> >> linux-git-arm-eabi-exynos: WARNINGS
> >> linux-git-arm-eabi-omap: ERRORS
> >> linux-git-i686: OK
> >> linux-git-m32r: OK
> >> linux-git-mips: WARNINGS
> >> linux-git-powerpc64: OK
> >> linux-git-sh: OK
> >> linux-git-x86_64: OK
> >> linux-2.6.31.12-i686: WARNINGS
> >> linux-2.6.32.6-i686: WARNINGS
> >> linux-2.6.33-i686: WARNINGS
> >> linux-2.6.34-i686: WARNINGS
> >> linux-2.6.35.3-i686: WARNINGS
> >> linux-2.6.36-i686: WARNINGS
> >> linux-2.6.37-i686: WARNINGS
> >> linux-2.6.38.2-i686: WARNINGS
> >> linux-2.6.39.1-i686: WARNINGS
> >> linux-3.0-i686: WARNINGS
> >> linux-3.1-i686: WARNINGS
> >> linux-3.2.1-i686: WARNINGS
> >> linux-3.3-i686: WARNINGS
> >> linux-3.4-i686: WARNINGS
> >> linux-3.5-i686: WARNINGS
> >> linux-3.6-i686: WARNINGS
> >> linux-3.7-i686: WARNINGS
> >> linux-3.8-rc1-i686: WARNINGS
> >> linux-2.6.31.12-x86_64: WARNINGS
> >> linux-2.6.32.6-x86_64: WARNINGS
> >> linux-2.6.33-x86_64: WARNINGS
> >> linux-2.6.34-x86_64: WARNINGS
> >> linux-2.6.35.3-x86_64: WARNINGS
> >> linux-2.6.36-x86_64: WARNINGS
> >> linux-2.6.37-x86_64: WARNINGS
> >> linux-2.6.38.2-x86_64: WARNINGS
> >> linux-2.6.39.1-x86_64: WARNINGS
> >> linux-3.0-x86_64: WARNINGS
> >> linux-3.1-x86_64: WARNINGS
> >> linux-3.2.1-x86_64: WARNINGS
> >> linux-3.3-x86_64: WARNINGS
> >> linux-3.4-x86_64: WARNINGS
> >> linux-3.5-x86_64: WARNINGS
> >> linux-3.6-x86_64: WARNINGS
> >> linux-3.7-x86_64: WARNINGS
> >> linux-3.8-rc1-x86_64: WARNINGS
> >> apps: WARNINGS
> >> spec-git: OK
> >> sparse: ERRORS
> >>
> >> Detailed results are available here:
> >>
> >> http://www.xs4all.nl/~hverkuil/logs/Monday.log
> > 
> > There were a lot of new 'redefined' warnings that I have fixed.
> > 
> > In addition, it turned out that any driver using vb2 wasn't compiled for
> > kernels <3.2 due to the fact that DMA_SHARED_BUFFER wasn't set. That's fixed
> > as well, so drivers like em28xx and vivi will now compile on those older
> > kernels. This also was the reason I never saw that the usb_translate_error
> > function needed to be added to compat.h: it's used in em28xx but that driver
> > was never compiled on kernels without usb_translate_error.
> > 
> > Hopefully everything works now.
> > 
> > Regards,
> > 
> > 	Hans
> 
> Hi Hans,
> on kernel 2.6.32 (Ubuntu 10.04) the media_build tree compiles fine, with
> just a few remaining warnings.
> 
> In particular, there are several new warnings related to DMA_SHARED_BUFFER:
> 
> WARNING: "dma_buf_vunmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
> WARNING: "dma_buf_vmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
> WARNING: "dma_buf_fd" [media_build/v4l/videobuf2-core.ko] undefined!
> WARNING: "dma_buf_put" [media_build/v4l/videobuf2-core.ko] undefined!
> WARNING: "dma_buf_get" [media_build/v4l/videobuf2-core.ko] undefined!

Gianluca,

Can you patch media_build with the patch below and try again? If it doesn't
work, then replace '#ifdef CONFIG_DMA_SHARED_BUFFER' by '#if 0' in the patch
below and try that instead.

Let me know what works.

Thanks,

	Hans


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Mauro Carvalho Chehab Jan. 8, 2013, 1:05 p.m. UTC | #1
Em Tue, 8 Jan 2013 13:43:43 +0100
Hans Verkuil <hverkuil@xs4all.nl> escreveu:

> On Tue 8 January 2013 12:01:51 Gianluca Gennari wrote:
> > Il 08/01/2013 10:58, Hans Verkuil ha scritto:
> > > On Mon 7 January 2013 22:38:23 Hans Verkuil wrote:
> > >> This message is generated daily by a cron job that builds media_tree for
> > >> the kernels and architectures in the list below.
> > >>
> > >> Results of the daily build of media_tree:
> > >>
> > >> date:        Mon Jan  7 19:00:18 CET 2013
> > >> git hash:    73ec66c000e9816806c7380ca3420f4e0638c40e
> > >> gcc version:      i686-linux-gcc (GCC) 4.7.1
> > >> host hardware:    x86_64
> > >> host os:          3.4.07-marune
> > >>
> > >> linux-git-arm-eabi-davinci: WARNINGS
> > >> linux-git-arm-eabi-exynos: WARNINGS
> > >> linux-git-arm-eabi-omap: ERRORS
> > >> linux-git-i686: OK
> > >> linux-git-m32r: OK
> > >> linux-git-mips: WARNINGS
> > >> linux-git-powerpc64: OK
> > >> linux-git-sh: OK
> > >> linux-git-x86_64: OK
> > >> linux-2.6.31.12-i686: WARNINGS
> > >> linux-2.6.32.6-i686: WARNINGS
> > >> linux-2.6.33-i686: WARNINGS
> > >> linux-2.6.34-i686: WARNINGS
> > >> linux-2.6.35.3-i686: WARNINGS
> > >> linux-2.6.36-i686: WARNINGS
> > >> linux-2.6.37-i686: WARNINGS
> > >> linux-2.6.38.2-i686: WARNINGS
> > >> linux-2.6.39.1-i686: WARNINGS
> > >> linux-3.0-i686: WARNINGS
> > >> linux-3.1-i686: WARNINGS
> > >> linux-3.2.1-i686: WARNINGS
> > >> linux-3.3-i686: WARNINGS
> > >> linux-3.4-i686: WARNINGS
> > >> linux-3.5-i686: WARNINGS
> > >> linux-3.6-i686: WARNINGS
> > >> linux-3.7-i686: WARNINGS
> > >> linux-3.8-rc1-i686: WARNINGS
> > >> linux-2.6.31.12-x86_64: WARNINGS
> > >> linux-2.6.32.6-x86_64: WARNINGS
> > >> linux-2.6.33-x86_64: WARNINGS
> > >> linux-2.6.34-x86_64: WARNINGS
> > >> linux-2.6.35.3-x86_64: WARNINGS
> > >> linux-2.6.36-x86_64: WARNINGS
> > >> linux-2.6.37-x86_64: WARNINGS
> > >> linux-2.6.38.2-x86_64: WARNINGS
> > >> linux-2.6.39.1-x86_64: WARNINGS
> > >> linux-3.0-x86_64: WARNINGS
> > >> linux-3.1-x86_64: WARNINGS
> > >> linux-3.2.1-x86_64: WARNINGS
> > >> linux-3.3-x86_64: WARNINGS
> > >> linux-3.4-x86_64: WARNINGS
> > >> linux-3.5-x86_64: WARNINGS
> > >> linux-3.6-x86_64: WARNINGS
> > >> linux-3.7-x86_64: WARNINGS
> > >> linux-3.8-rc1-x86_64: WARNINGS
> > >> apps: WARNINGS
> > >> spec-git: OK
> > >> sparse: ERRORS
> > >>
> > >> Detailed results are available here:
> > >>
> > >> http://www.xs4all.nl/~hverkuil/logs/Monday.log
> > > 
> > > There were a lot of new 'redefined' warnings that I have fixed.
> > > 
> > > In addition, it turned out that any driver using vb2 wasn't compiled for
> > > kernels <3.2 due to the fact that DMA_SHARED_BUFFER wasn't set. That's fixed
> > > as well, so drivers like em28xx and vivi will now compile on those older
> > > kernels. This also was the reason I never saw that the usb_translate_error
> > > function needed to be added to compat.h: it's used in em28xx but that driver
> > > was never compiled on kernels without usb_translate_error.
> > > 
> > > Hopefully everything works now.
> > > 
> > > Regards,
> > > 
> > > 	Hans
> > 
> > Hi Hans,
> > on kernel 2.6.32 (Ubuntu 10.04) the media_build tree compiles fine, with
> > just a few remaining warnings.
> > 
> > In particular, there are several new warnings related to DMA_SHARED_BUFFER:
> > 
> > WARNING: "dma_buf_vunmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
> > WARNING: "dma_buf_vmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
> > WARNING: "dma_buf_fd" [media_build/v4l/videobuf2-core.ko] undefined!
> > WARNING: "dma_buf_put" [media_build/v4l/videobuf2-core.ko] undefined!
> > WARNING: "dma_buf_get" [media_build/v4l/videobuf2-core.ko] undefined!
> 
> Gianluca,
> 
> Can you patch media_build with the patch below and try again? If it doesn't
> work, then replace '#ifdef CONFIG_DMA_SHARED_BUFFER' by '#if 0' in the patch
> below and try that instead.
> 
> Let me know what works.

You don't need to write a patch that replaces CONFIG_DMA_SHARED_BUFFER by 0.
you can patch, instead, v4l/scripts/make_kconfig.pl, like those:


# Kernel < 2.6.22 is missing the HAS_IOMEM option
if (!defined $kernopts{HAS_IOMEM} && cmp_ver($kernver, '2.6.22') < 0) {
    $kernopts{HAS_IOMEM} = 2;
}

# Kernel < 2.6.22 is missing the HAS_DMA option
if (!defined $kernopts{HAS_DMA} && cmp_ver($kernver, '2.6.22') < 0) {
    $kernopts{HAS_DMA} = 2;
}

# Kernel < 2.6.23 is missing the VIRT_TO_BUS option
if (!defined $kernopts{VIRT_TO_BUS} && cmp_ver($kernver, '2.6.23') < 0) {
	# VIRT_TO_BUS -> !PPC64
	$kernopts{VIRT_TO_BUS} = 2 - $kernopts{PPC64};
}

# Kernel < 2.6.37 is missing the BKL option
if (!defined $kernopts{BKL} && cmp_ver($kernver, '2.6.37') < 0) {
    $kernopts{BKL} = 2;
}
Gianluca Gennari Jan. 8, 2013, 1:21 p.m. UTC | #2
Il 08/01/2013 13:43, Hans Verkuil ha scritto:
> On Tue 8 January 2013 12:01:51 Gianluca Gennari wrote:
>> Il 08/01/2013 10:58, Hans Verkuil ha scritto:
>>> On Mon 7 January 2013 22:38:23 Hans Verkuil wrote:
>>>> This message is generated daily by a cron job that builds media_tree for
>>>> the kernels and architectures in the list below.
>>>>
>>>> Results of the daily build of media_tree:
>>>>
>>>> date:        Mon Jan  7 19:00:18 CET 2013
>>>> git hash:    73ec66c000e9816806c7380ca3420f4e0638c40e
>>>> gcc version:      i686-linux-gcc (GCC) 4.7.1
>>>> host hardware:    x86_64
>>>> host os:          3.4.07-marune
>>>>
>>>> linux-git-arm-eabi-davinci: WARNINGS
>>>> linux-git-arm-eabi-exynos: WARNINGS
>>>> linux-git-arm-eabi-omap: ERRORS
>>>> linux-git-i686: OK
>>>> linux-git-m32r: OK
>>>> linux-git-mips: WARNINGS
>>>> linux-git-powerpc64: OK
>>>> linux-git-sh: OK
>>>> linux-git-x86_64: OK
>>>> linux-2.6.31.12-i686: WARNINGS
>>>> linux-2.6.32.6-i686: WARNINGS
>>>> linux-2.6.33-i686: WARNINGS
>>>> linux-2.6.34-i686: WARNINGS
>>>> linux-2.6.35.3-i686: WARNINGS
>>>> linux-2.6.36-i686: WARNINGS
>>>> linux-2.6.37-i686: WARNINGS
>>>> linux-2.6.38.2-i686: WARNINGS
>>>> linux-2.6.39.1-i686: WARNINGS
>>>> linux-3.0-i686: WARNINGS
>>>> linux-3.1-i686: WARNINGS
>>>> linux-3.2.1-i686: WARNINGS
>>>> linux-3.3-i686: WARNINGS
>>>> linux-3.4-i686: WARNINGS
>>>> linux-3.5-i686: WARNINGS
>>>> linux-3.6-i686: WARNINGS
>>>> linux-3.7-i686: WARNINGS
>>>> linux-3.8-rc1-i686: WARNINGS
>>>> linux-2.6.31.12-x86_64: WARNINGS
>>>> linux-2.6.32.6-x86_64: WARNINGS
>>>> linux-2.6.33-x86_64: WARNINGS
>>>> linux-2.6.34-x86_64: WARNINGS
>>>> linux-2.6.35.3-x86_64: WARNINGS
>>>> linux-2.6.36-x86_64: WARNINGS
>>>> linux-2.6.37-x86_64: WARNINGS
>>>> linux-2.6.38.2-x86_64: WARNINGS
>>>> linux-2.6.39.1-x86_64: WARNINGS
>>>> linux-3.0-x86_64: WARNINGS
>>>> linux-3.1-x86_64: WARNINGS
>>>> linux-3.2.1-x86_64: WARNINGS
>>>> linux-3.3-x86_64: WARNINGS
>>>> linux-3.4-x86_64: WARNINGS
>>>> linux-3.5-x86_64: WARNINGS
>>>> linux-3.6-x86_64: WARNINGS
>>>> linux-3.7-x86_64: WARNINGS
>>>> linux-3.8-rc1-x86_64: WARNINGS
>>>> apps: WARNINGS
>>>> spec-git: OK
>>>> sparse: ERRORS
>>>>
>>>> Detailed results are available here:
>>>>
>>>> http://www.xs4all.nl/~hverkuil/logs/Monday.log
>>>
>>> There were a lot of new 'redefined' warnings that I have fixed.
>>>
>>> In addition, it turned out that any driver using vb2 wasn't compiled for
>>> kernels <3.2 due to the fact that DMA_SHARED_BUFFER wasn't set. That's fixed
>>> as well, so drivers like em28xx and vivi will now compile on those older
>>> kernels. This also was the reason I never saw that the usb_translate_error
>>> function needed to be added to compat.h: it's used in em28xx but that driver
>>> was never compiled on kernels without usb_translate_error.
>>>
>>> Hopefully everything works now.
>>>
>>> Regards,
>>>
>>> 	Hans
>>
>> Hi Hans,
>> on kernel 2.6.32 (Ubuntu 10.04) the media_build tree compiles fine, with
>> just a few remaining warnings.
>>
>> In particular, there are several new warnings related to DMA_SHARED_BUFFER:
>>
>> WARNING: "dma_buf_vunmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
>> WARNING: "dma_buf_vmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
>> WARNING: "dma_buf_fd" [media_build/v4l/videobuf2-core.ko] undefined!
>> WARNING: "dma_buf_put" [media_build/v4l/videobuf2-core.ko] undefined!
>> WARNING: "dma_buf_get" [media_build/v4l/videobuf2-core.ko] undefined!
> 
> Gianluca,
> 
> Can you patch media_build with the patch below and try again? If it doesn't
> work, then replace '#ifdef CONFIG_DMA_SHARED_BUFFER' by '#if 0' in the patch
> below and try that instead.
> 
> Let me know what works.
> 
> Thanks,
> 
> 	Hans
> 

Hi Hans,
your patch works perfectly fine in both ways.

BTW, those are the few extra warnings remaining:

2 random warnings:

media_build/v4l/anysee.c: In function 'anysee_frontend_attach':
media_build/v4l/anysee.c:641: warning: 'ret' may be used uninitialized
in this function

media_build/v4l/ngene-cards.c:813: warning: initialization discards
qualifiers from pointer target type

and a redefinition of the "err" macro:

media_build/v4l/mxl111sf.c:58:1: warning: "err" redefined
In file included from include/linux/usb/input.h:12,
                 from media_build/v4l/dvb_usb.h:25,
                 from media_build/v4l/mxl111sf.h:18,
                 from media_build/v4l/mxl111sf.c:14:
include/linux/usb.h:1593:1: warning: this is the location of the
previous definition

media_build/v4l/mxl111sf-tuner.c:34:1: warning: "err" redefined
In file included from include/linux/usb/input.h:12,
                 from media_build/v4l/dvb_usb.h:25,
                 from media_build/v4l/mxl111sf.h:18,
                 from media_build/v4l/mxl111sf-tuner.h:26,
                 from media_build/v4l/mxl111sf-tuner.c:21:
include/linux/usb.h:1593:1: warning: this is the location of the
previous definition

Thanks and regards,
Gianluca

> 
> diff --git a/backports/backports.txt b/backports/backports.txt
> index f2d08b9..73ecbf6 100644
> --- a/backports/backports.txt
> +++ b/backports/backports.txt
> @@ -26,6 +26,7 @@ add pr_fmt.patch
>  
>  [3.1.255]
>  add v3.1_no_export_h.patch
> +add v3.1_no_dma_buf_h.patch
>  add v3.1_no_pm_qos.patch
>  
>  [3.0.255]
> diff --git a/backports/v3.1_no_dma_buf_h.patch b/backports/v3.1_no_dma_buf_h.patch
> new file mode 100644
> index 0000000..5a7a7fb
> --- /dev/null
> +++ b/backports/v3.1_no_dma_buf_h.patch
> @@ -0,0 +1,116 @@
> +diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> +index bd2e52c..eb48f38 100644
> +--- a/include/linux/dma-buf.h
> ++++ b/include/linux/dma-buf.h
> +@@ -156,6 +156,7 @@ static inline void get_dma_buf(struct dma_buf *dmabuf)
> + 	get_file(dmabuf->file);
> + }
> + 
> ++#ifdef CONFIG_DMA_SHARED_BUFFER
> + struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
> + 							struct device *dev);
> + void dma_buf_detach(struct dma_buf *dmabuf,
> +@@ -183,5 +184,103 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
> + 		 unsigned long);
> + void *dma_buf_vmap(struct dma_buf *);
> + void dma_buf_vunmap(struct dma_buf *, void *vaddr);
> ++#else
> ++
> ++static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
> ++							struct device *dev)
> ++{
> ++	return ERR_PTR(-ENODEV);
> ++}
> ++
> ++static inline void dma_buf_detach(struct dma_buf *dmabuf,
> ++				  struct dma_buf_attachment *dmabuf_attach)
> ++{
> ++	return;
> ++}
> ++
> ++static inline struct dma_buf *dma_buf_export(void *priv,
> ++					     const struct dma_buf_ops *ops,
> ++					     size_t size, int flags)
> ++{
> ++	return ERR_PTR(-ENODEV);
> ++}
> ++
> ++static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags)
> ++{
> ++	return -ENODEV;
> ++}
> ++
> ++static inline struct dma_buf *dma_buf_get(int fd)
> ++{
> ++	return ERR_PTR(-ENODEV);
> ++}
> ++
> ++static inline void dma_buf_put(struct dma_buf *dmabuf)
> ++{
> ++	return;
> ++}
> ++
> ++static inline struct sg_table *dma_buf_map_attachment(
> ++	struct dma_buf_attachment *attach, enum dma_data_direction write)
> ++{
> ++	return ERR_PTR(-ENODEV);
> ++}
> ++
> ++static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
> ++			struct sg_table *sg, enum dma_data_direction dir)
> ++{
> ++	return;
> ++}
> ++
> ++static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
> ++					   size_t start, size_t len,
> ++					   enum dma_data_direction dir)
> ++{
> ++	return -ENODEV;
> ++}
> ++
> ++static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf,
> ++					  size_t start, size_t len,
> ++					  enum dma_data_direction dir)
> ++{
> ++}
> ++
> ++static inline void *dma_buf_kmap_atomic(struct dma_buf *dmabuf,
> ++					unsigned long pnum)
> ++{
> ++	return NULL;
> ++}
> ++
> ++static inline void dma_buf_kunmap_atomic(struct dma_buf *dmabuf,
> ++					 unsigned long pnum, void *vaddr)
> ++{
> ++}
> ++
> ++static inline void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long pnum)
> ++{
> ++	return NULL;
> ++}
> ++
> ++static inline void dma_buf_kunmap(struct dma_buf *dmabuf,
> ++				  unsigned long pnum, void *vaddr)
> ++{
> ++}
> ++
> ++static inline int dma_buf_mmap(struct dma_buf *dmabuf,
> ++			       struct vm_area_struct *vma,
> ++			       unsigned long pgoff)
> ++{
> ++	return -ENODEV;
> ++}
> ++
> ++static inline void *dma_buf_vmap(struct dma_buf *dmabuf)
> ++{
> ++	return NULL;
> ++}
> ++
> ++static inline void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
> ++{
> ++}
> ++#endif /* CONFIG_DMA_SHARED_BUFFER */
> + 
> + #endif /* __DMA_BUF_H__ */
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hans Verkuil Jan. 8, 2013, 1:49 p.m. UTC | #3
On Tue 8 January 2013 14:05:10 Mauro Carvalho Chehab wrote:
> Em Tue, 8 Jan 2013 13:43:43 +0100
> Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> 
> > On Tue 8 January 2013 12:01:51 Gianluca Gennari wrote:
> > > Il 08/01/2013 10:58, Hans Verkuil ha scritto:
> > > > On Mon 7 January 2013 22:38:23 Hans Verkuil wrote:
> > > >> This message is generated daily by a cron job that builds media_tree for
> > > >> the kernels and architectures in the list below.
> > > >>
> > > >> Results of the daily build of media_tree:
> > > >>
> > > >> date:        Mon Jan  7 19:00:18 CET 2013
> > > >> git hash:    73ec66c000e9816806c7380ca3420f4e0638c40e
> > > >> gcc version:      i686-linux-gcc (GCC) 4.7.1
> > > >> host hardware:    x86_64
> > > >> host os:          3.4.07-marune
> > > >>
> > > >> linux-git-arm-eabi-davinci: WARNINGS
> > > >> linux-git-arm-eabi-exynos: WARNINGS
> > > >> linux-git-arm-eabi-omap: ERRORS
> > > >> linux-git-i686: OK
> > > >> linux-git-m32r: OK
> > > >> linux-git-mips: WARNINGS
> > > >> linux-git-powerpc64: OK
> > > >> linux-git-sh: OK
> > > >> linux-git-x86_64: OK
> > > >> linux-2.6.31.12-i686: WARNINGS
> > > >> linux-2.6.32.6-i686: WARNINGS
> > > >> linux-2.6.33-i686: WARNINGS
> > > >> linux-2.6.34-i686: WARNINGS
> > > >> linux-2.6.35.3-i686: WARNINGS
> > > >> linux-2.6.36-i686: WARNINGS
> > > >> linux-2.6.37-i686: WARNINGS
> > > >> linux-2.6.38.2-i686: WARNINGS
> > > >> linux-2.6.39.1-i686: WARNINGS
> > > >> linux-3.0-i686: WARNINGS
> > > >> linux-3.1-i686: WARNINGS
> > > >> linux-3.2.1-i686: WARNINGS
> > > >> linux-3.3-i686: WARNINGS
> > > >> linux-3.4-i686: WARNINGS
> > > >> linux-3.5-i686: WARNINGS
> > > >> linux-3.6-i686: WARNINGS
> > > >> linux-3.7-i686: WARNINGS
> > > >> linux-3.8-rc1-i686: WARNINGS
> > > >> linux-2.6.31.12-x86_64: WARNINGS
> > > >> linux-2.6.32.6-x86_64: WARNINGS
> > > >> linux-2.6.33-x86_64: WARNINGS
> > > >> linux-2.6.34-x86_64: WARNINGS
> > > >> linux-2.6.35.3-x86_64: WARNINGS
> > > >> linux-2.6.36-x86_64: WARNINGS
> > > >> linux-2.6.37-x86_64: WARNINGS
> > > >> linux-2.6.38.2-x86_64: WARNINGS
> > > >> linux-2.6.39.1-x86_64: WARNINGS
> > > >> linux-3.0-x86_64: WARNINGS
> > > >> linux-3.1-x86_64: WARNINGS
> > > >> linux-3.2.1-x86_64: WARNINGS
> > > >> linux-3.3-x86_64: WARNINGS
> > > >> linux-3.4-x86_64: WARNINGS
> > > >> linux-3.5-x86_64: WARNINGS
> > > >> linux-3.6-x86_64: WARNINGS
> > > >> linux-3.7-x86_64: WARNINGS
> > > >> linux-3.8-rc1-x86_64: WARNINGS
> > > >> apps: WARNINGS
> > > >> spec-git: OK
> > > >> sparse: ERRORS
> > > >>
> > > >> Detailed results are available here:
> > > >>
> > > >> http://www.xs4all.nl/~hverkuil/logs/Monday.log
> > > > 
> > > > There were a lot of new 'redefined' warnings that I have fixed.
> > > > 
> > > > In addition, it turned out that any driver using vb2 wasn't compiled for
> > > > kernels <3.2 due to the fact that DMA_SHARED_BUFFER wasn't set. That's fixed
> > > > as well, so drivers like em28xx and vivi will now compile on those older
> > > > kernels. This also was the reason I never saw that the usb_translate_error
> > > > function needed to be added to compat.h: it's used in em28xx but that driver
> > > > was never compiled on kernels without usb_translate_error.
> > > > 
> > > > Hopefully everything works now.
> > > > 
> > > > Regards,
> > > > 
> > > > 	Hans
> > > 
> > > Hi Hans,
> > > on kernel 2.6.32 (Ubuntu 10.04) the media_build tree compiles fine, with
> > > just a few remaining warnings.
> > > 
> > > In particular, there are several new warnings related to DMA_SHARED_BUFFER:
> > > 
> > > WARNING: "dma_buf_vunmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
> > > WARNING: "dma_buf_vmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
> > > WARNING: "dma_buf_fd" [media_build/v4l/videobuf2-core.ko] undefined!
> > > WARNING: "dma_buf_put" [media_build/v4l/videobuf2-core.ko] undefined!
> > > WARNING: "dma_buf_get" [media_build/v4l/videobuf2-core.ko] undefined!
> > 
> > Gianluca,
> > 
> > Can you patch media_build with the patch below and try again? If it doesn't
> > work, then replace '#ifdef CONFIG_DMA_SHARED_BUFFER' by '#if 0' in the patch
> > below and try that instead.
> > 
> > Let me know what works.
> 
> You don't need to write a patch that replaces CONFIG_DMA_SHARED_BUFFER by 0.
> you can patch, instead, v4l/scripts/make_kconfig.pl, like those:
> 
> 
> # Kernel < 2.6.22 is missing the HAS_IOMEM option
> if (!defined $kernopts{HAS_IOMEM} && cmp_ver($kernver, '2.6.22') < 0) {
>     $kernopts{HAS_IOMEM} = 2;
> }
> 
> # Kernel < 2.6.22 is missing the HAS_DMA option
> if (!defined $kernopts{HAS_DMA} && cmp_ver($kernver, '2.6.22') < 0) {
>     $kernopts{HAS_DMA} = 2;
> }
> 
> # Kernel < 2.6.23 is missing the VIRT_TO_BUS option
> if (!defined $kernopts{VIRT_TO_BUS} && cmp_ver($kernver, '2.6.23') < 0) {
> 	# VIRT_TO_BUS -> !PPC64
> 	$kernopts{VIRT_TO_BUS} = 2 - $kernopts{PPC64};
> }
> 
> # Kernel < 2.6.37 is missing the BKL option
> if (!defined $kernopts{BKL} && cmp_ver($kernver, '2.6.37') < 0) {
>     $kernopts{BKL} = 2;
> }
> 
> 

I did that already, but I wasn't certain if adding it explicitly here would
also add it to v4l/.config. Anyway, I've committed this change.

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mauro Carvalho Chehab Jan. 8, 2013, 3:16 p.m. UTC | #4
Em Tue, 8 Jan 2013 14:49:54 +0100
Hans Verkuil <hverkuil@xs4all.nl> escreveu:

> On Tue 8 January 2013 14:05:10 Mauro Carvalho Chehab wrote:
> > Em Tue, 8 Jan 2013 13:43:43 +0100
> > Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> > 
> > > On Tue 8 January 2013 12:01:51 Gianluca Gennari wrote:
> > > > Il 08/01/2013 10:58, Hans Verkuil ha scritto:
> > > > > On Mon 7 January 2013 22:38:23 Hans Verkuil wrote:
> > > > >> This message is generated daily by a cron job that builds media_tree for
> > > > >> the kernels and architectures in the list below.
> > > > >>
> > > > >> Results of the daily build of media_tree:
> > > > >>
> > > > >> date:        Mon Jan  7 19:00:18 CET 2013
> > > > >> git hash:    73ec66c000e9816806c7380ca3420f4e0638c40e
> > > > >> gcc version:      i686-linux-gcc (GCC) 4.7.1
> > > > >> host hardware:    x86_64
> > > > >> host os:          3.4.07-marune
> > > > >>
> > > > >> linux-git-arm-eabi-davinci: WARNINGS
> > > > >> linux-git-arm-eabi-exynos: WARNINGS
> > > > >> linux-git-arm-eabi-omap: ERRORS
> > > > >> linux-git-i686: OK
> > > > >> linux-git-m32r: OK
> > > > >> linux-git-mips: WARNINGS
> > > > >> linux-git-powerpc64: OK
> > > > >> linux-git-sh: OK
> > > > >> linux-git-x86_64: OK
> > > > >> linux-2.6.31.12-i686: WARNINGS
> > > > >> linux-2.6.32.6-i686: WARNINGS
> > > > >> linux-2.6.33-i686: WARNINGS
> > > > >> linux-2.6.34-i686: WARNINGS
> > > > >> linux-2.6.35.3-i686: WARNINGS
> > > > >> linux-2.6.36-i686: WARNINGS
> > > > >> linux-2.6.37-i686: WARNINGS
> > > > >> linux-2.6.38.2-i686: WARNINGS
> > > > >> linux-2.6.39.1-i686: WARNINGS
> > > > >> linux-3.0-i686: WARNINGS
> > > > >> linux-3.1-i686: WARNINGS
> > > > >> linux-3.2.1-i686: WARNINGS
> > > > >> linux-3.3-i686: WARNINGS
> > > > >> linux-3.4-i686: WARNINGS
> > > > >> linux-3.5-i686: WARNINGS
> > > > >> linux-3.6-i686: WARNINGS
> > > > >> linux-3.7-i686: WARNINGS
> > > > >> linux-3.8-rc1-i686: WARNINGS
> > > > >> linux-2.6.31.12-x86_64: WARNINGS
> > > > >> linux-2.6.32.6-x86_64: WARNINGS
> > > > >> linux-2.6.33-x86_64: WARNINGS
> > > > >> linux-2.6.34-x86_64: WARNINGS
> > > > >> linux-2.6.35.3-x86_64: WARNINGS
> > > > >> linux-2.6.36-x86_64: WARNINGS
> > > > >> linux-2.6.37-x86_64: WARNINGS
> > > > >> linux-2.6.38.2-x86_64: WARNINGS
> > > > >> linux-2.6.39.1-x86_64: WARNINGS
> > > > >> linux-3.0-x86_64: WARNINGS
> > > > >> linux-3.1-x86_64: WARNINGS
> > > > >> linux-3.2.1-x86_64: WARNINGS
> > > > >> linux-3.3-x86_64: WARNINGS
> > > > >> linux-3.4-x86_64: WARNINGS
> > > > >> linux-3.5-x86_64: WARNINGS
> > > > >> linux-3.6-x86_64: WARNINGS
> > > > >> linux-3.7-x86_64: WARNINGS
> > > > >> linux-3.8-rc1-x86_64: WARNINGS
> > > > >> apps: WARNINGS
> > > > >> spec-git: OK
> > > > >> sparse: ERRORS
> > > > >>
> > > > >> Detailed results are available here:
> > > > >>
> > > > >> http://www.xs4all.nl/~hverkuil/logs/Monday.log
> > > > > 
> > > > > There were a lot of new 'redefined' warnings that I have fixed.
> > > > > 
> > > > > In addition, it turned out that any driver using vb2 wasn't compiled for
> > > > > kernels <3.2 due to the fact that DMA_SHARED_BUFFER wasn't set. That's fixed
> > > > > as well, so drivers like em28xx and vivi will now compile on those older
> > > > > kernels. This also was the reason I never saw that the usb_translate_error
> > > > > function needed to be added to compat.h: it's used in em28xx but that driver
> > > > > was never compiled on kernels without usb_translate_error.
> > > > > 
> > > > > Hopefully everything works now.
> > > > > 
> > > > > Regards,
> > > > > 
> > > > > 	Hans
> > > > 
> > > > Hi Hans,
> > > > on kernel 2.6.32 (Ubuntu 10.04) the media_build tree compiles fine, with
> > > > just a few remaining warnings.
> > > > 
> > > > In particular, there are several new warnings related to DMA_SHARED_BUFFER:
> > > > 
> > > > WARNING: "dma_buf_vunmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
> > > > WARNING: "dma_buf_vmap" [media_build/v4l/videobuf2-vmalloc.ko] undefined!
> > > > WARNING: "dma_buf_fd" [media_build/v4l/videobuf2-core.ko] undefined!
> > > > WARNING: "dma_buf_put" [media_build/v4l/videobuf2-core.ko] undefined!
> > > > WARNING: "dma_buf_get" [media_build/v4l/videobuf2-core.ko] undefined!
> > > 
> > > Gianluca,
> > > 
> > > Can you patch media_build with the patch below and try again? If it doesn't
> > > work, then replace '#ifdef CONFIG_DMA_SHARED_BUFFER' by '#if 0' in the patch
> > > below and try that instead.
> > > 
> > > Let me know what works.
> > 
> > You don't need to write a patch that replaces CONFIG_DMA_SHARED_BUFFER by 0.
> > you can patch, instead, v4l/scripts/make_kconfig.pl, like those:
> > 
> > 
> > # Kernel < 2.6.22 is missing the HAS_IOMEM option
> > if (!defined $kernopts{HAS_IOMEM} && cmp_ver($kernver, '2.6.22') < 0) {
> >     $kernopts{HAS_IOMEM} = 2;
> > }
> > 
> > # Kernel < 2.6.22 is missing the HAS_DMA option
> > if (!defined $kernopts{HAS_DMA} && cmp_ver($kernver, '2.6.22') < 0) {
> >     $kernopts{HAS_DMA} = 2;
> > }
> > 
> > # Kernel < 2.6.23 is missing the VIRT_TO_BUS option
> > if (!defined $kernopts{VIRT_TO_BUS} && cmp_ver($kernver, '2.6.23') < 0) {
> > 	# VIRT_TO_BUS -> !PPC64
> > 	$kernopts{VIRT_TO_BUS} = 2 - $kernopts{PPC64};
> > }
> > 
> > # Kernel < 2.6.37 is missing the BKL option
> > if (!defined $kernopts{BKL} && cmp_ver($kernver, '2.6.37') < 0) {
> >     $kernopts{BKL} = 2;
> > }
> > 
> > 
> 
> I did that already, but I wasn't certain if adding it explicitly here would
> also add it to v4l/.config. Anyway, I've committed this change.

Yes, but, as far as I know, a "make allmodconfig" is needed to rewrite the
existing .config, as I don't think that are there any dependency makefile
rules to rewrite it when the script is changed.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/backports/backports.txt b/backports/backports.txt
index f2d08b9..73ecbf6 100644
--- a/backports/backports.txt
+++ b/backports/backports.txt
@@ -26,6 +26,7 @@  add pr_fmt.patch
 
 [3.1.255]
 add v3.1_no_export_h.patch
+add v3.1_no_dma_buf_h.patch
 add v3.1_no_pm_qos.patch
 
 [3.0.255]
diff --git a/backports/v3.1_no_dma_buf_h.patch b/backports/v3.1_no_dma_buf_h.patch
new file mode 100644
index 0000000..5a7a7fb
--- /dev/null
+++ b/backports/v3.1_no_dma_buf_h.patch
@@ -0,0 +1,116 @@ 
+diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
+index bd2e52c..eb48f38 100644
+--- a/include/linux/dma-buf.h
++++ b/include/linux/dma-buf.h
+@@ -156,6 +156,7 @@ static inline void get_dma_buf(struct dma_buf *dmabuf)
+ 	get_file(dmabuf->file);
+ }
+ 
++#ifdef CONFIG_DMA_SHARED_BUFFER
+ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
+ 							struct device *dev);
+ void dma_buf_detach(struct dma_buf *dmabuf,
+@@ -183,5 +184,103 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
+ 		 unsigned long);
+ void *dma_buf_vmap(struct dma_buf *);
+ void dma_buf_vunmap(struct dma_buf *, void *vaddr);
++#else
++
++static inline struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
++							struct device *dev)
++{
++	return ERR_PTR(-ENODEV);
++}
++
++static inline void dma_buf_detach(struct dma_buf *dmabuf,
++				  struct dma_buf_attachment *dmabuf_attach)
++{
++	return;
++}
++
++static inline struct dma_buf *dma_buf_export(void *priv,
++					     const struct dma_buf_ops *ops,
++					     size_t size, int flags)
++{
++	return ERR_PTR(-ENODEV);
++}
++
++static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags)
++{
++	return -ENODEV;
++}
++
++static inline struct dma_buf *dma_buf_get(int fd)
++{
++	return ERR_PTR(-ENODEV);
++}
++
++static inline void dma_buf_put(struct dma_buf *dmabuf)
++{
++	return;
++}
++
++static inline struct sg_table *dma_buf_map_attachment(
++	struct dma_buf_attachment *attach, enum dma_data_direction write)
++{
++	return ERR_PTR(-ENODEV);
++}
++
++static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
++			struct sg_table *sg, enum dma_data_direction dir)
++{
++	return;
++}
++
++static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
++					   size_t start, size_t len,
++					   enum dma_data_direction dir)
++{
++	return -ENODEV;
++}
++
++static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf,
++					  size_t start, size_t len,
++					  enum dma_data_direction dir)
++{
++}
++
++static inline void *dma_buf_kmap_atomic(struct dma_buf *dmabuf,
++					unsigned long pnum)
++{
++	return NULL;
++}
++
++static inline void dma_buf_kunmap_atomic(struct dma_buf *dmabuf,
++					 unsigned long pnum, void *vaddr)
++{
++}
++
++static inline void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long pnum)
++{
++	return NULL;
++}
++
++static inline void dma_buf_kunmap(struct dma_buf *dmabuf,
++				  unsigned long pnum, void *vaddr)
++{
++}
++
++static inline int dma_buf_mmap(struct dma_buf *dmabuf,
++			       struct vm_area_struct *vma,
++			       unsigned long pgoff)
++{
++	return -ENODEV;
++}
++
++static inline void *dma_buf_vmap(struct dma_buf *dmabuf)
++{
++	return NULL;
++}
++
++static inline void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
++{
++}
++#endif /* CONFIG_DMA_SHARED_BUFFER */
+ 
+ #endif /* __DMA_BUF_H__ */