replace x86_read/write_per_cpu with a common function.