mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 17:00:01 +00:00
replace x86_read/write_per_cpu with a common function.
x86_read_per_cpu() and its writeish sister are not present in x86_64. So in this patch, we replace them with __get_cpu_var(), which is present in both Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
53fd13cff0
commit
bfd074e05b
@ -238,18 +238,18 @@ static DEFINE_PER_CPU(enum paravirt_lazy_mode, paravirt_lazy_mode) = PARAVIRT_LA
|
||||
|
||||
static inline void enter_lazy(enum paravirt_lazy_mode mode)
|
||||
{
|
||||
BUG_ON(x86_read_percpu(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE);
|
||||
BUG_ON(__get_cpu_var(paravirt_lazy_mode) != PARAVIRT_LAZY_NONE);
|
||||
BUG_ON(preemptible());
|
||||
|
||||
x86_write_percpu(paravirt_lazy_mode, mode);
|
||||
__get_cpu_var(paravirt_lazy_mode) = mode;
|
||||
}
|
||||
|
||||
void paravirt_leave_lazy(enum paravirt_lazy_mode mode)
|
||||
{
|
||||
BUG_ON(x86_read_percpu(paravirt_lazy_mode) != mode);
|
||||
BUG_ON(__get_cpu_var(paravirt_lazy_mode) != mode);
|
||||
BUG_ON(preemptible());
|
||||
|
||||
x86_write_percpu(paravirt_lazy_mode, PARAVIRT_LAZY_NONE);
|
||||
__get_cpu_var(paravirt_lazy_mode) = PARAVIRT_LAZY_NONE;
|
||||
}
|
||||
|
||||
void paravirt_enter_lazy_mmu(void)
|
||||
@ -274,7 +274,7 @@ void paravirt_leave_lazy_cpu(void)
|
||||
|
||||
enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
|
||||
{
|
||||
return x86_read_percpu(paravirt_lazy_mode);
|
||||
return __get_cpu_var(paravirt_lazy_mode);
|
||||
}
|
||||
|
||||
struct pv_info pv_info = {
|
||||
|
Loading…
Reference in New Issue
Block a user