3 #include <linux/compat.h>
5 struct p_current cur = {
8 __maybe_unused struct p_current *current = &cur;
10 unsigned long copy_from_user(void *dest, const void *src,
13 memcpy((void *)dest, (void *)src, count);
17 void *kmalloc(size_t size, int flags)
19 return memalign(ARCH_DMA_MINALIGN, size);
22 void *kzalloc(size_t size, int flags)
24 void *ptr = kmalloc(size, flags);
29 void *vzalloc(unsigned long size)
31 return kzalloc(size, 0);
34 struct kmem_cache *get_mem(int element_sz)
36 struct kmem_cache *ret;
38 ret = memalign(ARCH_DMA_MINALIGN, sizeof(struct kmem_cache));
44 void *kmem_cache_alloc(struct kmem_cache *obj, int flag)
46 return memalign(ARCH_DMA_MINALIGN, obj->sz);