/* When you use this code to patch more than one byte of an instruction you need to make sure that other CPUs cannot execute this code in parallel. Also no thread must be currently preempted in the middle of these instructions. And on the local CPU you need to be protected again NMI or MCE handlers seeing an inconsistent instruction while you patch.  */
static void *__init_or_module text_poke_early(void *addr, const void *opcode, size_t len)
/* When you use this code to patch more than one byte of an instruction you need to make sure that other CPUs cannot execute this code in parallel. Also no thread must be currently preempted in the middle of these instructions. And on the local CPU you need to be protected again NMI or MCE handlers seeing an inconsistent instruction while you patch.  */
static void *__init_or_module text_poke_early(void *addr, const void *opcode, size_t len)
{
	unsigned long flags;
	local_irq_save(flags);
	memcpy(addr, opcode, len);
	sync_core();
	local_irq_restore(flags);
	return addr;
}