There is no need to caculate the dma slab size ourselves. We can simply
lookup the size of the corresponding non dma slab.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
        if (!x)
                panic("Unable to allocate memory for dma cache\n");
 
-       if (index <= KMALLOC_SHIFT_HIGH)
-               realsize = 1 << index;
-       else {
-               if (index == 1)
-                       realsize = 96;
-               else
-                       realsize = 192;
-       }
-
+       realsize = kmalloc_caches[index].objsize;
        text = kasprintf(flags & ~SLUB_DMA, "kmalloc_dma-%d",
                        (unsigned int)realsize);
        s = create_kmalloc_cache(x, text, realsize, flags);