[zaptel-commits] sruffell: branch 1.4 r4677 - /branches/1.4/kernel/voicebus.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Thu Aug 13 15:19:02 CDT 2009


Author: sruffell
Date: Thu Aug 13 15:18:58 2009
New Revision: 4677

URL: http://svn.asterisk.org/svn-view/zaptel?view=rev&rev=4677
Log:
voicebus: Define CONFIG_STORE_USER on 2.6.22 when CONFIG_SLUB is defined.

This is to work around a known issue with linux 2.6.22. For more information
see http://thread.gmane.org/gmane.linux.kernel/618031

Modified:
    branches/1.4/kernel/voicebus.c

Modified: branches/1.4/kernel/voicebus.c
URL: http://svn.asterisk.org/svn-view/zaptel/branches/1.4/kernel/voicebus.c?view=diff&rev=4677&r1=4676&r2=4677
==============================================================================
--- branches/1.4/kernel/voicebus.c (original)
+++ branches/1.4/kernel/voicebus.c Thu Aug 13 15:18:58 2009
@@ -1322,6 +1322,7 @@
 {
 	int retval = 0;
 	struct voicebus *vb;
+	unsigned long cache_flags;
 
 	assert(NULL != pdev);
 	assert(NULL != board_name);
@@ -1379,15 +1380,21 @@
 	vb->handle_receive = handle_receive;
 	vb->handle_transmit = handle_transmit;
 	vb->context = context;
+
+#if defined(CONFIG_SLUB) && (LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 22))
+	cache_flags = SLAB_HWCACHE_ALIGN | SLAB_STORE_USER | SLAB_DEBUG_FREE;
+#else
+	cache_flags = SLAB_HWCACHE_ALIGN;
+#endif
 	
 	/* \todo This cache should be shared by all instances supported by
 	 * this driver. */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
 	vb->buffer_cache = kmem_cache_create(board_name, vb->framesize, 0, 
-				SLAB_HWCACHE_ALIGN, NULL, NULL);
+				cache_flags, NULL, NULL);
 #else
 	vb->buffer_cache = kmem_cache_create(board_name, vb->framesize, 0, 
-				SLAB_HWCACHE_ALIGN, NULL);
+				cache_flags, NULL);
 #endif
 	if (NULL == vb->buffer_cache) {
 		VB_PRINTK(vb, ERR, "Failed to allocate buffer cache.\n");




More information about the zaptel-commits mailing list