syscall.c (6f4c930e02355664d89c976eccea5d999a90de16) syscall.c (e84957e6ae043bb83ad6ae7e949a1ce97b6bbfef)
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1996, 1997, 2000, 2001, 05 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.

--- 23 unchanged lines hidden (view full) ---

32#include <asm/asm-eva.h>
33#include <asm/branch.h>
34#include <asm/cachectl.h>
35#include <asm/cacheflush.h>
36#include <asm/asm-offsets.h>
37#include <asm/signal.h>
38#include <asm/sim.h>
39#include <asm/shmparam.h>
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1996, 1997, 2000, 2001, 05 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.

--- 23 unchanged lines hidden (view full) ---

32#include <asm/asm-eva.h>
33#include <asm/branch.h>
34#include <asm/cachectl.h>
35#include <asm/cacheflush.h>
36#include <asm/asm-offsets.h>
37#include <asm/signal.h>
38#include <asm/sim.h>
39#include <asm/shmparam.h>
40#include <asm/sync.h>
40#include <asm/sysmips.h>
41#include <asm/switch_to.h>
42
43/*
44 * For historic reasons the pipe(2) syscall on MIPS has an unusual calling
45 * convention. It returns results in registers $v0 / $v1 which means there
46 * is no need for it to do verify the validity of a userspace pointer
47 * argument. Historically that used to be expensive in Linux. These days

--- 80 unchanged lines hidden (view full) ---

128 : [old] "=&r" (old),
129 [err] "=&r" (err),
130 [tmp] "=&r" (tmp)
131 : [addr] "r" (addr),
132 [new] "r" (new),
133 [efault] "i" (-EFAULT)
134 : "memory");
135 } else if (cpu_has_llsc) {
41#include <asm/sysmips.h>
42#include <asm/switch_to.h>
43
44/*
45 * For historic reasons the pipe(2) syscall on MIPS has an unusual calling
46 * convention. It returns results in registers $v0 / $v1 which means there
47 * is no need for it to do verify the validity of a userspace pointer
48 * argument. Historically that used to be expensive in Linux. These days

--- 80 unchanged lines hidden (view full) ---

129 : [old] "=&r" (old),
130 [err] "=&r" (err),
131 [tmp] "=&r" (tmp)
132 : [addr] "r" (addr),
133 [new] "r" (new),
134 [efault] "i" (-EFAULT)
135 : "memory");
136 } else if (cpu_has_llsc) {
136 loongson_llsc_mb();
137 __asm__ __volatile__ (
138 " .set push \n"
139 " .set "MIPS_ISA_ARCH_LEVEL" \n"
140 " li %[err], 0 \n"
141 "1: \n"
137 __asm__ __volatile__ (
138 " .set push \n"
139 " .set "MIPS_ISA_ARCH_LEVEL" \n"
140 " li %[err], 0 \n"
141 "1: \n"
142 " " __SYNC(full, loongson3_war) " \n"
142 user_ll("%[old]", "(%[addr])")
143 " move %[tmp], %[new] \n"
144 "2: \n"
145 user_sc("%[tmp]", "(%[addr])")
146 " beqz %[tmp], 1b \n"
147 "3: \n"
148 " .insn \n"
149 " .section .fixup,\"ax\" \n"

--- 101 unchanged lines hidden ---
143 user_ll("%[old]", "(%[addr])")
144 " move %[tmp], %[new] \n"
145 "2: \n"
146 user_sc("%[tmp]", "(%[addr])")
147 " beqz %[tmp], 1b \n"
148 "3: \n"
149 " .insn \n"
150 " .section .fixup,\"ax\" \n"

--- 101 unchanged lines hidden ---