We already have 32/64-bit variants for the LL/SC instructions in asm/bitops.h so make use of them and remove the local variants from pgtable.h Cc: David Daney <david.daney@xxxxxxxxxx> Signed-off-by: Markos Chandras <markos.chandras@xxxxxxxxxx> --- arch/mips/include/asm/pgtable.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index ae8569475264..e02777e8563e 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h @@ -10,6 +10,7 @@ #include <linux/mm_types.h> #include <linux/mmzone.h> +#include <asm/bitops.h> #ifdef CONFIG_32BIT #include <asm/pgtable-32.h> #endif @@ -187,23 +188,16 @@ static inline void set_pte(pte_t *ptep, pte_t pteval) * For SMP, multiple CPUs can race, so we need to do * this atomically. */ -#ifdef CONFIG_64BIT -#define LL_INSN "lld" -#define SC_INSN "scd" -#else /* CONFIG_32BIT */ -#define LL_INSN "ll" -#define SC_INSN "sc" -#endif unsigned long page_global = _PAGE_GLOBAL; unsigned long tmp; __asm__ __volatile__ ( " .set push\n" " .set noreorder\n" - "1: " LL_INSN " %[tmp], %[buddy]\n" + "1: " __LL "%[tmp], %[buddy]\n" " bnez %[tmp], 2f\n" " or %[tmp], %[tmp], %[global]\n" - " " SC_INSN " %[tmp], %[buddy]\n" + " " __SC "%[tmp], %[buddy]\n" " beqz %[tmp], 1b\n" " nop\n" "2:\n" -- 2.5.0