Fix the definitions of get_cpu() and put_cpu().

They are supposed to disable preemption.

Reported by:	rstone
MFC after:	5 days
This commit is contained in:
Mark Johnston 2018-04-05 17:26:03 +00:00
parent b09de0b34a
commit e4ba1a50af

View File

@ -38,11 +38,11 @@ int linux_wbinvd_on_all_cpus(void);
#endif
#define get_cpu() ({ \
sched_pin(); \
critical_enter(); \
PCPU_GET(cpuid); \
})
#define put_cpu() \
sched_unpin()
critical_exit()
#endif /* _ASM_SMP_H_ */