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 <[email protected]> --- arch/x86/kernel/paravirt.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: linux-2.6-x86/arch/x86/kernel/paravirt.c =================================================================== --- linux-2.6-x86.orig/arch/x86/kernel/paravirt.c 2007-12-20 19:08:11.000000000 -0800 +++ linux-2.6-x86/arch/x86/kernel/paravirt.c 2007-12-20 19:08:18.000000000 -0800 @@ -238,18 +238,18 @@ 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 @@ 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 = { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 15/15] replace x86_read/write_per_cpu with a common function.
- From: "H. Peter Anvin" <[email protected]>
- Re: [PATCH 15/15] replace x86_read/write_per_cpu with a common function.
- References:
- [PATCH 0/15] adjust pvops to accomodate its x86_64 variant
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 01/15] change paravirt_32.c name
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 02/15] adjust PVOP_CALL/VCALL macros for x86_64
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 03/15] cleanup write_tsc
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 04/15] provide paravirtualized hook for rdtscp
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 05/15] change assembly definition of paravirt_patch_site
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 06/15] adjust assembly macros to x86_64 as well.
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 07/15] change irq functions to accomodate x86_64
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 08/15] add macro for privileged x86_64 operation
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 09/15] adds paravirt hook for swapgs
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 10/15] replace privileged instructions with paravirt macros
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 11/15] cleanup CLI_STRING, STI_STRING and friends
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 12/15] add CLBR_ defines for x86_64.
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 13/15] move patching code to arch-specific file.
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 14/15] x86_64 patching functions
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 0/15] adjust pvops to accomodate its x86_64 variant
- Prev by Date: [PATCH 14/15] x86_64 patching functions
- Next by Date: Re: [PATCH] sky2: Use deferrable timer for watchdog
- Previous by thread: [PATCH 14/15] x86_64 patching functions
- Next by thread: Re: [PATCH 15/15] replace x86_read/write_per_cpu with a common function.
- Index(es):