/* Guarantee that the kmalloc'd memory is cacheline aligned.  */
void* xpc_kmalloc_cacheline_aligned(size_t size, gfp_t flags, void **base)
/* Guarantee that the kmalloc'd memory is cacheline aligned.  */
void* xpc_kmalloc_cacheline_aligned(size_t size, gfp_t flags, void **base)
{
	*base = kmalloc(size, flags);
	if (*base == NULL)
		return NULL;
	if ((u64)*base == L1_CACHE_ALIGN((u64)*base))
		return *base;
	kfree(*base);
	*base = kmalloc(size + L1_CACHE_BYTES, flags);
	if (*base == NULL)
		return NULL;
	return (void *)L1_CACHE_ALIGN((u64)*base);
}