]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - lib/linux_compat.c
4 #include <linux/compat.h>
6 struct p_current cur
= {
9 __maybe_unused
struct p_current
*current
= &cur
;
11 unsigned long copy_from_user(void *dest
, const void *src
,
14 memcpy((void *)dest
, (void *)src
, count
);
18 void *kmalloc(size_t size
, int flags
)
22 p
= malloc_cache_aligned(size
);
23 if (flags
& __GFP_ZERO
)
29 struct kmem_cache
*get_mem(int element_sz
)
31 struct kmem_cache
*ret
;
33 ret
= memalign(ARCH_DMA_MINALIGN
, sizeof(struct kmem_cache
));
39 void *kmem_cache_alloc(struct kmem_cache
*obj
, int flag
)
41 return malloc_cache_aligned(obj
->sz
);