All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][_COMPAT_H] git://linuxtv.org/media_build.git Legacy issues
@ 2011-01-17 22:59 Malcolm Priestley
  2011-01-18  2:22 ` Andy Walls
  0 siblings, 1 reply; 3+ messages in thread
From: Malcolm Priestley @ 2011-01-17 22:59 UTC (permalink / raw)
  To: linux-media

Clean up legacy issues for error free build on Kernel 2.6.37.

Today while testing on Kernel 2.6.35 latest tarball throws error with 
alloc_ordered_workqueue undefined on Kernels less than 2.6.37. defined back to 
create_singlethread_workqueue.

Please test on other kernel versions.

Tested-on 2.6.35/37 by: Malcolm Priestley <tvboxspy@gmail.com>


diff --git a/v4l/compat.h b/v4l/compat.h
index 9e622ce..df98698 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -749,6 +749,8 @@ static inline void *vzalloc(unsigned long size)
 
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
+
 #if NEED_FLUSH_WORK_SYNC
 #define flush_work_sync(dev)
 #endif
@@ -760,6 +762,14 @@ static inline void *vzalloc(unsigned long size)
 }
 #endif
 
+#define alloc_ordered_workqueue(a,b) create_singlethread_workqueue(a)
+
+#else
+#ifdef CONFIG_PM
+#include <linux/pm_runtime.h>
+#endif
+#endif
+
 #ifndef KEY_10CHANNELSUP
 #define KEY_10CHANNELSUP        0x1b8   /* 10 channels up (10+) */
 #define KEY_10CHANNELSDOWN      0x1b9   /* 10 channels down (10-) */


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][_COMPAT_H] git://linuxtv.org/media_build.git Legacy issues
  2011-01-17 22:59 [PATCH][_COMPAT_H] git://linuxtv.org/media_build.git Legacy issues Malcolm Priestley
@ 2011-01-18  2:22 ` Andy Walls
  2011-01-18 20:49   ` Malcolm Priestley
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Walls @ 2011-01-18  2:22 UTC (permalink / raw)
  To: Malcolm Priestley; +Cc: linux-media, ivtv-devel

On Mon, 2011-01-17 at 22:59 +0000, Malcolm Priestley wrote:
> Clean up legacy issues for error free build on Kernel 2.6.37.
> 
> Today while testing on Kernel 2.6.35 latest tarball throws error with 
> alloc_ordered_workqueue undefined on Kernels less than 2.6.37. defined back to 
> create_singlethread_workqueue.
> 
> Please test on other kernel versions.
>
> Tested-on 2.6.35/37 by: Malcolm Priestley <tvboxspy@gmail.com>
> 
> 
> diff --git a/v4l/compat.h b/v4l/compat.h
> index 9e622ce..df98698 100644
> --- a/v4l/compat.h
> +++ b/v4l/compat.h
> @@ -749,6 +749,8 @@ static inline void *vzalloc(unsigned long size)
>  
>  #endif
>  
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
> +
>  #if NEED_FLUSH_WORK_SYNC
>  #define flush_work_sync(dev)
>  #endif
> @@ -760,6 +762,14 @@ static inline void *vzalloc(unsigned long size)
>  }
>  #endif
>  
> +#define alloc_ordered_workqueue(a,b) create_singlethread_workqueue(a)

That will get cx18 to compile.  However, I can tell you without testing,
the latest cx18 driver could badly affect system event processing
performance on older kernels.

This is because another change happened at the same time as the change
to call alloc_ordered_workqueue().  A kernel version before that, CMWQ
was added to the kernel, so there was no longer a need for the
cx18_out_work workqueue.  So now the cx18_out_work workqueue has been
removed from the cx18 driver.

In the older kernels without CMWQ and without the cx18_out_work
workqueue, outgoing cx18 buffer work will get queued to the [keventd/M]
kernel threads.  Unrelated system work being processed by [keventd/M]
threads will regularly find itself *waiting for the CX23418 hardware* to
respond to firmware commands.

It would be better to not allow the newest cx18 driver version to
compile on older kernels.

Regards,
Andy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][_COMPAT_H] git://linuxtv.org/media_build.git Legacy issues
  2011-01-18  2:22 ` Andy Walls
@ 2011-01-18 20:49   ` Malcolm Priestley
  0 siblings, 0 replies; 3+ messages in thread
From: Malcolm Priestley @ 2011-01-18 20:49 UTC (permalink / raw)
  To: Andy Walls; +Cc: linux-media, ivtv-devel

On Mon, 2011-01-17 at 21:22 -0500, Andy Walls wrote: 
> On Mon, 2011-01-17 at 22:59 +0000, Malcolm Priestley wrote:
> > Clean up legacy issues for error free build on Kernel 2.6.37.
> > 
> > Today while testing on Kernel 2.6.35 latest tarball throws error with 
> > alloc_ordered_workqueue undefined on Kernels less than 2.6.37. defined back to 
> > create_singlethread_workqueue.
> > 
> > Please test on other kernel versions.
> >
> > Tested-on 2.6.35/37 by: Malcolm Priestley <tvboxspy@gmail.com>
> > 

> >  
> > +#define alloc_ordered_workqueue(a,b) create_singlethread_workqueue(a)
> 
> That will get cx18 to compile.  However, I can tell you without testing,
> the latest cx18 driver could badly affect system event processing
> performance on older kernels.
> 
> This is because another change happened at the same time as the change
> to call alloc_ordered_workqueue().  A kernel version before that, CMWQ
> was added to the kernel, so there was no longer a need for the
> cx18_out_work workqueue.  So now the cx18_out_work workqueue has been
> removed from the cx18 driver.
> 
> In the older kernels without CMWQ and without the cx18_out_work
> workqueue, outgoing cx18 buffer work will get queued to the [keventd/M]
> kernel threads.  Unrelated system work being processed by [keventd/M]
> threads will regularly find itself *waiting for the CX23418 hardware* to
> respond to firmware commands.
> 
> It would be better to not allow the newest cx18 driver version to
> compile on older kernels.

Yes, after review, it would be wise to disable the cx18 driver.

However, there are more problems with the media_build today on all
kernels.

For now the patch is withdrawn. 

Regards

malcolm


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-18 20:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-17 22:59 [PATCH][_COMPAT_H] git://linuxtv.org/media_build.git Legacy issues Malcolm Priestley
2011-01-18  2:22 ` Andy Walls
2011-01-18 20:49   ` Malcolm Priestley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.