#include <common.h>
+#include <memalign.h>
#include <linux/compat.h>
struct p_current cur = {
{
void *p;
- p = memalign(ARCH_DMA_MINALIGN, size);
- if (flags & __GFP_ZERO)
+ p = malloc_cache_aligned(size);
+ if (p && flags & __GFP_ZERO)
memset(p, 0, size);
return p;
void *kmem_cache_alloc(struct kmem_cache *obj, int flag)
{
- return memalign(ARCH_DMA_MINALIGN, obj->sz);
+ return malloc_cache_aligned(obj->sz);
}