sparc: Use kmemdup rather than duplicating its implementation