Commit 10fb0484 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/sparc-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents c57cd56b 964918f1
......@@ -147,7 +147,6 @@ static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file)
* memory and creates the pointer tables from them, and puts their
* addresses on the "stack", returning the new stack pointer value.
*/
#define A(__x) ((unsigned long)(__x))
static u32 *create_aout32_tables(char * p, struct linux_binprm * bprm)
{
......@@ -171,7 +170,7 @@ static u32 *create_aout32_tables(char * p, struct linux_binprm * bprm)
current->mm->arg_start = (unsigned long) p;
while (argc-->0) {
char c;
put_user(((u32)A(p)),argv++);
put_user(((u32)(unsigned long)(p)),argv++);
do {
get_user(c,p++);
} while (c);
......@@ -180,7 +179,7 @@ static u32 *create_aout32_tables(char * p, struct linux_binprm * bprm)
current->mm->arg_end = current->mm->env_start = (unsigned long) p;
while (envc-->0) {
char c;
put_user(((u32)A(p)),envp++);
put_user(((u32)(unsigned long)(p)),envp++);
do {
get_user(c,p++);
} while (c);
......
......@@ -1697,12 +1697,12 @@ linux_sparc_syscall32:
add %sp, PTREGS_OFF, %o0
srl %i0, 0, %o0
#endif
mov %i4, %o4 ! IEU1
srl %i4, 0, %o4 ! IEU1
lduw [%l7 + %l4], %l7 ! Load
srl %i1, 0, %o1 ! IEU0 Group
ldx [%curptr + TI_FLAGS], %l0 ! Load
mov %i5, %o5 ! IEU1
srl %i5, 0, %o5 ! IEU1
srl %i2, 0, %o2 ! IEU0 Group
andcc %l0, _TIF_SYSCALL_TRACE, %g0 ! IEU0 Group
bne,pn %icc, linux_syscall_trace32 ! CTI
......
......@@ -579,26 +579,26 @@ void fault_in_user_windows(void)
do_exit(SIGILL);
}
asmlinkage int sparc_do_fork(unsigned long clone_flags,
unsigned long stack_start,
struct pt_regs *regs,
unsigned long stack_size)
asmlinkage long sparc_do_fork(unsigned long clone_flags,
unsigned long stack_start,
struct pt_regs *regs,
unsigned long stack_size)
{
unsigned long parent_tid_ptr, child_tid_ptr;
int __user *parent_tid_ptr, *child_tid_ptr;
clone_flags &= ~CLONE_IDLETASK;
parent_tid_ptr = regs->u_regs[UREG_I2];
child_tid_ptr = regs->u_regs[UREG_I4];
if (test_thread_flag(TIF_32BIT)) {
parent_tid_ptr &= 0xffffffff;
child_tid_ptr &= 0xffffffff;
parent_tid_ptr = compat_ptr(regs->u_regs[UREG_I2]);
child_tid_ptr = compat_ptr(regs->u_regs[UREG_I4]);
} else {
parent_tid_ptr = (int __user *) regs->u_regs[UREG_I2];
child_tid_ptr = (int __user *) regs->u_regs[UREG_I4];
}
return do_fork(clone_flags, stack_start,
regs, stack_size,
(int __user *) parent_tid_ptr,
(int __user *) child_tid_ptr);
parent_tid_ptr, child_tid_ptr);
}
/* Copy a Sparc thread. The fork() return value conventions
......
......@@ -1349,7 +1349,7 @@ asmlinkage int do_sys32_sigstack(u32 u_ssptr, u32 u_ossptr, unsigned long sp)
return ret;
}
asmlinkage int do_sys32_sigaltstack(u32 ussa, u32 uossa, unsigned long sp)
asmlinkage long do_sys32_sigaltstack(u32 ussa, u32 uossa, unsigned long sp)
{
stack_t uss, uoss;
u32 u_ss_sp = 0;
......
......@@ -26,15 +26,6 @@
#include <linux/compat.h>
#include <asm/kbio.h>
/* Use this to get at 32-bit user passed pointers. */
#define A(__x) \
({ unsigned long __ret; \
__asm__ ("srl %0, 0, %0" \
: "=r" (__ret) \
: "0" (__x)); \
__ret; \
})
#define SUNOS_NR_OPEN 256
struct rtentry32 {
......@@ -108,7 +99,7 @@ asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg)
int ntty = N_TTY;
int tmp;
p = (int __user *)A(arg);
p = (int __user *) (unsigned long) arg;
ret = -EFAULT;
if(get_user(tmp, p))
goto out;
......@@ -241,7 +232,7 @@ asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg)
int oldval, newval, __user *ptr;
cmd = TIOCSPGRP;
ptr = (int __user *) A(arg);
ptr = (int __user *) (unsigned long) arg;
ret = -EFAULT;
if(get_user(oldval, ptr))
goto out;
......@@ -260,7 +251,7 @@ asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg)
int oldval, newval, __user *ptr;
cmd = TIOCGPGRP;
ptr = (int __user *) A(arg);
ptr = (int __user *) (unsigned long) arg;
ret = -EFAULT;
if(get_user(oldval, ptr))
goto out;
......
......@@ -13,85 +13,135 @@
.text
.align 32
.globl sys32_mmap
sys32_mmap:
srl %o4, 0, %o4
sethi %hi(sys_mmap), %g1
jmpl %g1 + %lo(sys_mmap), %g0
srl %o5, 0, %o5
#define SIGN1(STUB,SYSCALL,REG1) \
.align 32; \
.globl STUB; \
STUB: sethi %hi(SYSCALL), %g1; \
jmpl %g1 + %lo(SYSCALL), %g0; \
sra REG1, 0, REG1
.align 32
.globl sys32_lseek
.globl sys32_chmod, sys32_mknod
sys32_lseek:
sra %o1, 0, %o1
sethi %hi(sys_lseek), %g1
jmpl %g1 + %lo(sys_lseek), %g0
nop
sys32_chmod:
sethi %hi(0xffff), %g2
sethi %hi(sys_chmod), %g1
orcc %g2, %lo(0xffff), %g2
jmpl %g1 + %lo(sys_chmod), %g0
and %o1, %g2, %o1
sys32_mknod:
sethi %hi(0xffff), %g2
sethi %hi(sys_mknod), %g1
orcc %g2, %lo(0xffff), %g2
jmpl %g1 + %lo(sys_mknod), %g0
and %o2, %g2, %o2
#define SIGN2(STUB,SYSCALL,REG1,REG2) \
.align 32; \
.globl STUB; \
STUB: sethi %hi(SYSCALL), %g1; \
sra REG1, 0, REG1; \
jmpl %g1 + %lo(SYSCALL), %g0; \
sra REG2, 0, REG2
.align 32
.globl sys32_sendto, sys32_recvfrom
sys32_sendto:
sethi %hi(sys_sendto), %g1
jmpl %g1 + %lo(sys_sendto), %g0
srl %o4, 0, %o4
sys32_recvfrom:
srl %o4, 0, %o4
sethi %hi(sys_recvfrom), %g1
jmpl %g1 + %lo(sys_recvfrom), %g0
srl %o5, 0, %o5
#define SIGN3(STUB,SYSCALL,REG1,REG2,REG3) \
.align 32; \
.globl STUB; \
STUB: sra REG1, 0, REG1; \
sethi %hi(SYSCALL), %g1; \
sra REG2, 0, REG2; \
jmpl %g1 + %lo(SYSCALL), %g0; \
sra REG3, 0, REG3
.globl sys32_bdflush
sys32_bdflush:
sethi %hi(sys_bdflush), %g1
jmpl %g1 + %lo(sys_bdflush), %g0
sra %o1, 0, %o1
#define SIGN4(STUB,SYSCALL,REG1,REG2,REG3,REG4) \
.align 32; \
.globl STUB; \
STUB: sra REG1, 0, REG1; \
sethi %hi(SYSCALL), %g1; \
sra REG2, 0, REG2; \
sra REG3, 0, REG3; \
jmpl %g1 + %lo(SYSCALL), %g0; \
sra REG4, 0, REG4
SIGN1(sys32_exit, sparc_exit, %o0)
SIGN1(sys32_exit_group, sys_exit_group, %o0)
SIGN1(sys32_wait4, compat_sys_wait4, %o2)
SIGN1(sys32_creat, sys_creat, %o1)
SIGN1(sys32_mknod, sys_mknod, %o1)
SIGN1(sys32_perfctr, sys_perfctr, %o0)
SIGN1(sys32_umount, sys_umount, %o1)
SIGN1(sys32_signal, sys_signal, %o0)
SIGN1(sys32_access, sys_access, %o1)
SIGN1(sys32_msync, sys_msync, %o2)
SIGN2(sys32_reboot, sys_reboot, %o0, %o1)
SIGN1(sys32_setitimer, compat_sys_setitimer, %o0)
SIGN1(sys32_getitimer, compat_sys_getitimer, %o0)
SIGN1(sys32_sethostname, sys_sethostname, %o1)
SIGN1(sys32_swapon, sys_swapon, %o1)
SIGN1(sys32_sigaction, compat_sys_sigaction, %o0)
SIGN1(sys32_rt_sigaction, compat_sys_rt_sigaction, %o0)
SIGN1(sys32_sigprocmask, compat_sys_sigprocmask, %o0)
SIGN1(sys32_rt_sigprocmask, compat_sys_rt_sigprocmask, %o0)
SIGN2(sys32_rt_sigqueueinfo, compat_sys_rt_sigqueueinfo, %o0, %o1)
SIGN1(sys32_getrusage, compat_sys_getrusage, %o0)
SIGN1(sys32_setxattr, sys_setxattr, %o4)
SIGN1(sys32_lsetxattr, sys_lsetxattr, %o4)
SIGN1(sys32_fsetxattr, sys_fsetxattr, %o4)
SIGN1(sys32_fgetxattr, sys_fgetxattr, %o0)
SIGN1(sys32_flistxattr, sys_flistxattr, %o0)
SIGN1(sys32_fremovexattr, sys_fremovexattr, %o0)
SIGN2(sys32_tkill, sys_tkill, %o0, %o1)
SIGN1(sys32_epoll_create, sys_epoll_create, %o0)
SIGN3(sys32_epoll_ctl, sys_epoll_ctl, %o0, %o1, %o2)
SIGN3(sys32_epoll_wait, sys_epoll_wait, %o0, %o2, %o3)
SIGN1(sys32_readahead, compat_sys_readahead, %o0)
SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4)
SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5)
SIGN2(sys32_bdflush, sys_bdflush, %o0, %o1)
SIGN1(sys32_mlockall, sys_mlockall, %o0)
SIGN1(sys32_nfsservctl, compat_sys_nfsservctl, %o0)
SIGN1(sys32_clock_settime, compat_clock_settime, %o1)
SIGN1(sys32_clock_nanosleep, compat_clock_nanosleep, %o1)
SIGN1(sys32_timer_settime, compat_timer_settime, %o1)
SIGN1(sys32_io_submit, compat_sys_io_submit, %o1)
SIGN1(sys32_mq_open, compat_sys_mq_open, %o1)
SIGN1(sys32_select, compat_sys_select, %o0)
SIGN1(sys32_mkdir, sys_mkdir, %o1)
SIGN2(sys32_futex, compat_sys_futex, %o1, %o2)
SIGN1(sys32_sysfs, compat_sys_sysfs, %o0)
SIGN3(sys32_ipc, compat_sys_ipc, %o1, %o2, %o3)
SIGN2(sys32_sendfile, compat_sys_sendfile, %o0, %o1)
SIGN2(sys32_sendfile64, compat_sys_sendfile64, %o0, %o1)
SIGN1(sys32_prctl, sys_prctl, %o0)
SIGN1(sys32_sched_rr_get_interval, compat_sys_sched_rr_get_interval, %o0)
SIGN2(sys32_waitpid, sys_waitpid, %o0, %o2)
SIGN1(sys32_getgroups, sys_getgroups, %o0)
SIGN1(sys32_getpgid, sys_getpgid, %o0)
SIGN2(sys32_getpriority, sys_getpriority, %o0, %o1)
SIGN1(sys32_getsid, sys_getsid, %o0)
SIGN2(sys32_kill, sys_kill, %o0, %o1)
SIGN1(sys32_nice, sys_nice, %o0)
SIGN1(sys32_lseek, sys_lseek, %o1)
SIGN2(sys32_open, sparc32_open, %o1, %o2)
SIGN1(sys32_readlink, sys_readlink, %o2)
SIGN1(sys32_sched_get_priority_max, sys_sched_get_priority_max, %o0)
SIGN1(sys32_sched_get_priority_min, sys_sched_get_priority_min, %o0)
SIGN1(sys32_sched_getparam, sys_sched_getparam, %o0)
SIGN1(sys32_sched_getscheduler, sys_sched_getscheduler, %o0)
SIGN1(sys32_sched_setparam, sys_sched_setparam, %o0)
SIGN2(sys32_sched_setscheduler, sys_sched_setscheduler, %o0, %o1)
SIGN1(sys32_getdomainname, sys_getdomainname, %o1)
SIGN1(sys32_setdomainname, sys_setdomainname, %o1)
SIGN1(sys32_setgroups, sys_setgroups, %o0)
SIGN2(sys32_setpgid, sys_setpgid, %o0, %o1)
SIGN3(sys32_setpriority, sys_setpriority, %o0, %o1, %o2)
SIGN1(sys32_ssetmask, sys_ssetmask, %o0)
SIGN2(sys32_syslog, sys_syslog, %o0, %o1)
SIGN1(sys32_umask, sys_umask, %o0)
SIGN3(sys32_tgkill, sys_tgkill, %o0, %o1, %o2)
SIGN1(sys32_sendto, sys_sendto, %o0)
SIGN1(sys32_recvfrom, sys_recvfrom, %o0)
SIGN3(sys32_socket, sys_socket, %o0, %o1, %o2)
SIGN2(sys32_connect, sys_connect, %o0, %o2)
SIGN2(sys32_bind, sys_bind, %o0, %o2)
SIGN2(sys32_listen, sys_listen, %o0, %o1)
SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0)
SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0)
SIGN2(sys32_shutdown, sys_shutdown, %o0, %o1)
SIGN3(sys32_socketpair, sys_socketpair, %o0, %o1, %o2)
SIGN1(sys32_getpeername, sys_getpeername, %o0)
SIGN1(sys32_getsockname, sys_getsockname, %o0)
.align 32
.globl sys32_mmap2
sys32_mmap2:
srl %o4, 0, %o4
sethi %hi(sys_mmap), %g1
srl %o5, 0, %o5
jmpl %g1 + %lo(sys_mmap), %g0
sllx %o5, 12, %o5
.globl sys32_mq_timedsend
sys32_mq_timedsend:
sethi %hi(compat_sys_mq_timedsend), %g1
jmpl %g1 + %lo(compat_sys_mq_timedsend), %g0
srl %o4, 0, %o4
.globl sys32_mq_timedreceive
sys32_mq_timedreceive:
sethi %hi(compat_sys_mq_timedreceive), %g1
jmpl %g1 + %lo(compat_sys_mq_timedreceive), %g0
srl %o4, 0, %o4
.globl sys32_select
sys32_select:
sethi %hi(compat_sys_select), %g1
jmpl %g1 + %lo(compat_sys_select), %g0
srl %o4, 0, %o4
.globl sys32_futex
sys32_futex:
sethi %hi(compat_sys_futex), %g1
jmpl %g1 + %lo(compat_sys_futex), %g0
srl %o4, 0, %o4
.align 32
.globl sys32_socketcall
sys32_socketcall: /* %o0=call, %o1=args */
......@@ -199,23 +249,23 @@ do_sys_recv: /* sys_recv(int, void *, size_t, unsigned int) */
lduwa [%o1 + 0x4] %asi, %o1
nop
nop
do_sys_sendto: /* sys32_sendto(int, u32, compat_size_t, unsigned int, u32, int) */
do_sys_sendto: /* sys_sendto(int, u32, compat_size_t, unsigned int, u32, int) */
ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys32_sendto), %g1
sethi %hi(sys_sendto), %g1
lduwa [%o1 + 0x8] %asi, %o2
lduwa [%o1 + 0xc] %asi, %o3
lduwa [%o1 + 0x10] %asi, %o4
ldswa [%o1 + 0x14] %asi, %o5
jmpl %g1 + %lo(sys32_sendto), %g0
jmpl %g1 + %lo(sys_sendto), %g0
lduwa [%o1 + 0x4] %asi, %o1
do_sys_recvfrom: /* sys32_recvfrom(int, u32, compat_size_t, unsigned int, u32, u32) */
do_sys_recvfrom: /* sys_recvfrom(int, u32, compat_size_t, unsigned int, u32, u32) */
ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys32_recvfrom), %g1
sethi %hi(sys_recvfrom), %g1
lduwa [%o1 + 0x8] %asi, %o2
lduwa [%o1 + 0xc] %asi, %o3
lduwa [%o1 + 0x10] %asi, %o4
lduwa [%o1 + 0x14] %asi, %o5
jmpl %g1 + %lo(sys32_recvfrom), %g0
jmpl %g1 + %lo(sys_recvfrom), %g0
lduwa [%o1 + 0x4] %asi, %o1
do_sys_shutdown: /* sys_shutdown(int, int) */
ldswa [%o1 + 0x0] %asi, %o0
......
......@@ -179,7 +179,7 @@ asmlinkage unsigned long sparc_brk(unsigned long brk)
* sys_pipe() is the normal C calling standard for creating
* a pipe. It's not the way unix traditionally does this, though.
*/
asmlinkage int sparc_pipe(struct pt_regs *regs)
asmlinkage long sparc_pipe(struct pt_regs *regs)
{
int fd[2];
int error;
......@@ -199,22 +199,22 @@ asmlinkage int sparc_pipe(struct pt_regs *regs)
* This is really horribly ugly.
*/
asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long third, void *ptr, long fifth)
asmlinkage long sys_ipc(unsigned int call, int first, int second, unsigned long third, void __user *ptr, long fifth)
{
int err;
/* No need for backward compatibility. We can start fresh... */
if (call <= SEMCTL)
if (call <= SEMCTL) {
switch (call) {
case SEMOP:
err = sys_semtimedop (first, (struct sembuf __user *)ptr, second, NULL);
err = sys_semtimedop(first, ptr, second, NULL);
goto out;
case SEMTIMEDOP:
err = sys_semtimedop (first, (struct sembuf __user *)ptr, second, (const struct timespec __user *) fifth);
err = sys_semtimedop(first, ptr, second,
(const struct timespec __user *) fifth);
goto out;
case SEMGET:
err = sys_semget (first, second, (int)third);
err = sys_semget(first, second, (int)third);
goto out;
case SEMCTL: {
union semun fourth;
......@@ -222,79 +222,87 @@ asmlinkage int sys_ipc (unsigned call, int first, int second, unsigned long thir
if (!ptr)
goto out;
err = -EFAULT;
if (get_user(fourth.__pad, (void __user * __user *)ptr))
if (get_user(fourth.__pad,
(void __user * __user *) ptr))
goto out;
err = sys_semctl (first, second | IPC_64, (int)third, fourth);
err = sys_semctl(first, second | IPC_64,
(int)third, fourth);
goto out;
}
}
default:
err = -ENOSYS;
goto out;
}
if (call <= MSGCTL)
};
}
if (call <= MSGCTL) {
switch (call) {
case MSGSND:
err = sys_msgsnd (first, (struct msgbuf __user *) ptr,
second, (int)third);
err = sys_msgsnd(first, ptr, second, (int)third);
goto out;
case MSGRCV:
err = sys_msgrcv (first, (struct msgbuf __user *) ptr, second, fifth, (int)third);
err = sys_msgrcv(first, ptr, second, fifth,
(int)third);
goto out;
case MSGGET:
err = sys_msgget ((key_t) first, second);
err = sys_msgget((key_t) first, second);
goto out;
case MSGCTL:
err = sys_msgctl (first, second | IPC_64, (struct msqid_ds __user *) ptr);
err = sys_msgctl(first, second | IPC_64, ptr);
goto out;
default:
err = -ENOSYS;
goto out;
}
if (call <= SHMCTL)
};
}
if (call <= SHMCTL) {
switch (call) {
case SHMAT: {
ulong raddr;
err = do_shmat (first, (char __user *) ptr, second, &raddr);
err = do_shmat(first, ptr, second, &raddr);
if (!err) {
if (put_user(raddr, (ulong __user *) third))
if (put_user(raddr,
(ulong __user *) third))
err = -EFAULT;
}
goto out;
}
case SHMDT:
err = sys_shmdt ((char __user *)ptr);
err = sys_shmdt(ptr);
goto out;
case SHMGET:
err = sys_shmget (first, second, (int)third);
err = sys_shmget(first, second, (int)third);
goto out;
case SHMCTL:
err = sys_shmctl (first, second | IPC_64, (struct shmid_ds __user *) ptr);
err = sys_shmctl(first, second | IPC_64, ptr);
goto out;
default:
err = -ENOSYS;
goto out;
}
else
};
} else {
err = -ENOSYS;
}
out:
return err;
}
asmlinkage int sparc64_newuname(struct new_utsname __user *name)
asmlinkage long sparc64_newuname(struct new_utsname __user *name)
{
int ret = sys_newuname(name);
if (current->personality == PER_LINUX32 && !ret) {
ret = copy_to_user(name->machine, "sparc\0\0", 8) ? -EFAULT : 0;
ret = (copy_to_user(name->machine, "sparc\0\0", 8)
? -EFAULT : 0);
}
return ret;
}
asmlinkage int sparc64_personality(unsigned long personality)
asmlinkage long sparc64_personality(unsigned long personality)
{
int ret;
if (current->personality == PER_LINUX32 && personality == PER_LINUX)
if (current->personality == PER_LINUX32 &&
personality == PER_LINUX)
personality = PER_LINUX32;
ret = sys_personality(personality);
if (ret == PER_LINUX32)
......@@ -408,8 +416,7 @@ asmlinkage unsigned long sys64_mremap(unsigned long addr,
}
/* we come to here via sys_nis_syscall so it can setup the regs argument */
asmlinkage unsigned long
c_sys_nis_syscall (struct pt_regs *regs)
asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs)
{
static int count;
......@@ -427,8 +434,7 @@ c_sys_nis_syscall (struct pt_regs *regs)
/* #define DEBUG_SPARC_BREAKPOINT */
asmlinkage void
sparc_breakpoint (struct pt_regs *regs)
asmlinkage void sparc_breakpoint(struct pt_regs *regs)
{
siginfo_t info;
......@@ -452,7 +458,7 @@ sparc_breakpoint (struct pt_regs *regs)
extern void check_pending(int signum);
asmlinkage int sys_getdomainname(char __user *name, int len)
asmlinkage long sys_getdomainname(char __user *name, int len)
{
int nlen;
int err = -EFAULT;
......@@ -473,7 +479,7 @@ asmlinkage int sys_getdomainname(char __user *name, int len)
return err;
}
asmlinkage int solaris_syscall(struct pt_regs *regs)
asmlinkage long solaris_syscall(struct pt_regs *regs)
{
static int count;
......@@ -493,7 +499,7 @@ asmlinkage int solaris_syscall(struct pt_regs *regs)
}
#ifndef CONFIG_SUNOS_EMUL
asmlinkage int sunos_syscall(struct pt_regs *regs)
asmlinkage long sunos_syscall(struct pt_regs *regs)
{
static int count;
......@@ -511,11 +517,11 @@ asmlinkage int sunos_syscall(struct pt_regs *regs)
}
#endif
asmlinkage int sys_utrap_install(utrap_entry_t type,
utrap_handler_t new_p,
utrap_handler_t new_d,
utrap_handler_t __user *old_p,
utrap_handler_t __user *old_d)
asmlinkage long sys_utrap_install(utrap_entry_t type,
utrap_handler_t new_p,
utrap_handler_t new_d,
utrap_handler_t __user *old_p,
utrap_handler_t __user *old_d)
{
if (type < UT_INSTRUCTION_EXCEPTION || type > UT_TRAP_INSTRUCTION_31)
return -EINVAL;
......@@ -582,12 +588,11 @@ long sparc_memory_ordering(unsigned long model, struct pt_regs *regs)
return 0;
}
asmlinkage long
sys_rt_sigaction(int sig,
const struct sigaction __user *act,
struct sigaction __user *oact,
void __user *restorer,
size_t sigsetsize)
asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
struct sigaction __user *oact,
void __user *restorer,
size_t sigsetsize)
{
struct k_sigaction new_ka, old_ka;
int ret;
......@@ -615,8 +620,7 @@ sys_rt_sigaction(int sig,
/* Invoked by rtrap code to update performance counters in
* user space.
*/
asmlinkage void
update_perfctrs(void)
asmlinkage void update_perfctrs(void)
{
unsigned long pic, tmp;
......@@ -628,8 +632,7 @@ update_perfctrs(void)
reset_pic();
}
asmlinkage int
sys_perfctr(int opcode, unsigned long arg0, unsigned long arg1, unsigned long arg2)
asmlinkage long sys_perfctr(int opcode, unsigned long arg0, unsigned long arg1, unsigned long arg2)
{
int err = 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -830,17 +830,9 @@ typedef struct fore200e_bus {
#if defined(CONFIG_ATM_FORE200E_SBA)
# if defined(CONFIG_ATM_FORE200E_PCA)
# if (PCI_DMA_BIDIRECTIONAL == SBUS_DMA_BIDIRECTIONAL) && \
(PCI_DMA_TODEVICE == SBUS_DMA_TODEVICE) && \
(PCI_DMA_FROMDEVICE == SBUS_DMA_FROMDEVICE)
# define FORE200E_DMA_BIDIRECTIONAL PCI_DMA_BIDIRECTIONAL
# define FORE200E_DMA_TODEVICE PCI_DMA_TODEVICE
# define FORE200E_DMA_FROMDEVICE PCI_DMA_FROMDEVICE
# else
/* in that case, we'll need to add an extra indirection, e.g.
fore200e->bus->dma_direction[ fore200e_dma_direction ] */
# error PCI and SBUS DMA direction flags have different values!
# endif
# define FORE200E_DMA_BIDIRECTIONAL PCI_DMA_BIDIRECTIONAL
# define FORE200E_DMA_TODEVICE PCI_DMA_TODEVICE
# define FORE200E_DMA_FROMDEVICE PCI_DMA_FROMDEVICE
# else
# define FORE200E_DMA_BIDIRECTIONAL SBUS_DMA_BIDIRECTIONAL
# define FORE200E_DMA_TODEVICE SBUS_DMA_TODEVICE
......
......@@ -59,8 +59,6 @@
#define dma_unmap_single(d,h,s,dir) sbus_unmap_single(d,h,s,dir)
#define dma_map_sg(d,s,n,dir) sbus_map_sg(d,s,n,dir)
#define dma_unmap_sg(d,s,n,dir) sbus_unmap_sg(d,s,n,dir)
#define scsi_to_fc_dma_dir(dir) scsi_to_sbus_dma_dir(dir)
#define FC_DMA_BIDIRECTIONAL SBUS_DMA_BIDIRECTIONAL
#else
#define dma_alloc_consistent(d,s,p) pci_alloc_consistent(d,s,p)
#define dma_free_consistent(d,s,v,h) pci_free_consistent(d,s,v,h)
......@@ -68,8 +66,6 @@
#define dma_unmap_single(d,h,s,dir) pci_unmap_single(d,h,s,dir)
#define dma_map_sg(d,s,n,dir) pci_map_sg(d,s,n,dir)
#define dma_unmap_sg(d,s,n,dir) pci_unmap_sg(d,s,n,dir)
#define scsi_to_fc_dma_dir(dir) scsi_to_pci_dma_dir(dir)
#define FC_DMA_BIDIRECTIONAL PCI_DMA_BIDIRECTIONAL
#endif
#define FCP_CMND(SCpnt) ((fcp_cmnd *)&(SCpnt->SCp))
......@@ -167,7 +163,7 @@ static void fcp_login_done(fc_channel *fc, int i, int status)
fcmd = l->fcmds + i;
plogi = l->logi + 3 * i;
dma_unmap_single (fc->dev, fcmd->cmd, 3 * sizeof(logi),
FC_DMA_BIDIRECTIONAL);
DMA_BIDIRECTIONAL);
plogi->code = LS_PLOGI;
memcpy (&plogi->nport_wwn, &fc->wwn_nport, sizeof(fc_wwn));
memcpy (&plogi->node_wwn, &fc->wwn_node, sizeof(fc_wwn));
......@@ -188,7 +184,7 @@ static void fcp_login_done(fc_channel *fc, int i, int status)
}
#endif
fcmd->cmd = dma_map_single (fc->dev, plogi, 3 * sizeof(logi),
FC_DMA_BIDIRECTIONAL);
DMA_BIDIRECTIONAL);
fcmd->rsp = fcmd->cmd + 2 * sizeof(logi);
if (fc->hw_enque (fc, fcmd))
printk ("FC: Cannot enque PLOGI packet on %s\n", fc->name);
......@@ -212,7 +208,7 @@ static void fcp_login_done(fc_channel *fc, int i, int status)
case FC_STATUS_OK:
plogi = l->logi + 3 * i;
dma_unmap_single (fc->dev, l->fcmds[i].cmd, 3 * sizeof(logi),
FC_DMA_BIDIRECTIONAL);
DMA_BIDIRECTIONAL);
if (!fc->wwn_dest.lo && !fc->wwn_dest.hi) {
memcpy (&fc->wwn_dest, &plogi[1].node_wwn, sizeof(fc_wwn));
FCD(("Dest WWN %08x%08x\n", *(u32 *)&fc->wwn_dest, fc->wwn_dest.lo))
......@@ -231,7 +227,7 @@ static void fcp_login_done(fc_channel *fc, int i, int status)
case FC_STATUS_ERR_OFFLINE:
fc->state = FC_STATE_OFFLINE;
dma_unmap_single (fc->dev, l->fcmds[i].cmd, 3 * sizeof(logi),
FC_DMA_BIDIRECTIONAL);
DMA_BIDIRECTIONAL);
printk ("%s: FC is offline\n", fc->name);
if (atomic_dec_and_test (&l->todo))
up(&l->sem);
......@@ -256,7 +252,7 @@ static void fcp_report_map_done(fc_channel *fc, int i, int status)
switch (status) {
case FC_STATUS_OK: /* Ok, let's have a fun on a loop */
dma_unmap_single (fc->dev, l->fcmds[i].cmd, 3 * sizeof(logi),
FC_DMA_BIDIRECTIONAL);
DMA_BIDIRECTIONAL);
p = (fc_al_posmap *)(l->logi + 3 * i);
#ifdef FCDEBUG
{
......@@ -306,7 +302,7 @@ static void fcp_report_map_done(fc_channel *fc, int i, int status)
FCD(("SID %d DID %d\n", fc->sid, fc->did))
fcmd = l->fcmds + i;
dma_unmap_single(fc->dev, fcmd->cmd, 3 * sizeof(logi),
FC_DMA_BIDIRECTIONAL);
DMA_BIDIRECTIONAL);
fch = &fcmd->fch;
memset(l->logi + 3 * i, 0, 3 * sizeof(logi));
FILL_FCHDR_RCTL_DID(fch, R_CTL_ELS_REQ, FS_FABRIC_F_PORT);
......@@ -317,7 +313,7 @@ static void fcp_report_map_done(fc_channel *fc, int i, int status)
fch->param = 0;
l->logi [3 * i].code = LS_FLOGI;
fcmd->cmd = dma_map_single (fc->dev, l->logi + 3 * i, 3 * sizeof(logi),
FC_DMA_BIDIRECTIONAL);
DMA_BIDIRECTIONAL);
fcmd->rsp = fcmd->cmd + sizeof(logi);
fcmd->cmdlen = sizeof(logi);
fcmd->rsplen = sizeof(logi);
......@@ -434,11 +430,12 @@ static inline void fcp_scsi_receive(fc_channel *fc, int token, int status, fc_hd
if (fcmd->data) {
if (SCpnt->use_sg)
dma_unmap_sg(fc->dev, (struct scatterlist *)SCpnt->buffer, SCpnt->use_sg,
scsi_to_fc_dma_dir(SCpnt->sc_data_direction));
dma_unmap_sg(fc->dev, (struct scatterlist *)SCpnt->buffer,
SCpnt->use_sg,
SCpnt->sc_data_direction);
else
dma_unmap_single(fc->dev, fcmd->data, SCpnt->request_bufflen,
scsi_to_fc_dma_dir(SCpnt->sc_data_direction));
SCpnt->sc_data_direction);
}
break;
default:
......@@ -579,7 +576,7 @@ int fcp_initialize(fc_channel *fcchain, int count)
fc->ls = (void *)l;
/* Assumes sizeof(fc_al_posmap) < 3 * sizeof(logi), which is true */
fcmd->cmd = dma_map_single (fc->dev, l->logi + 3 * i, 3 * sizeof(logi),
FC_DMA_BIDIRECTIONAL);
DMA_BIDIRECTIONAL);
fcmd->proto = PROTO_REPORT_AL_MAP;
fcmd->token = i;
fcmd->fc = fc;
......@@ -598,7 +595,7 @@ int fcp_initialize(fc_channel *fcchain, int count)
} else {
fc->state = FC_STATE_OFFLINE;
enable_irq(fc->irq);
dma_unmap_single (fc->dev, l->fcmds[i].cmd, 3 * sizeof(logi), FC_DMA_BIDIRECTIONAL);
dma_unmap_single (fc->dev, l->fcmds[i].cmd, 3 * sizeof(logi), DMA_BIDIRECTIONAL);
if (atomic_dec_and_test (&l->todo))
goto all_done;
}
......@@ -615,7 +612,7 @@ int fcp_initialize(fc_channel *fcchain, int count)
FCD(("SID %d DID %d\n", fc->sid, fc->did))
fcmd = l->fcmds + i;
dma_unmap_single(fc->dev, fcmd->cmd, 3 * sizeof(logi), FC_DMA_BIDIRECTIONAL);
dma_unmap_single(fc->dev, fcmd->cmd, 3 * sizeof(logi), DMA_BIDIRECTIONAL);
fch = &fcmd->fch;
FILL_FCHDR_RCTL_DID(fch, R_CTL_ELS_REQ, FS_FABRIC_F_PORT);
FILL_FCHDR_SID(fch, 0);
......@@ -624,7 +621,7 @@ int fcp_initialize(fc_channel *fcchain, int count)
FILL_FCHDR_OXRX(fch, 0xffff, 0xffff);
fch->param = 0;
l->logi [3 * i].code = LS_FLOGI;
fcmd->cmd = dma_map_single (fc->dev, l->logi + 3 * i, 3 * sizeof(logi), FC_DMA_BIDIRECTIONAL);
fcmd->cmd = dma_map_single (fc->dev, l->logi + 3 * i, 3 * sizeof(logi), DMA_BIDIRECTIONAL);
fcmd->rsp = fcmd->cmd + sizeof(logi);
fcmd->cmdlen = sizeof(logi);
fcmd->rsplen = sizeof(logi);
......@@ -652,7 +649,7 @@ int fcp_initialize(fc_channel *fcchain, int count)
switch (fc->state) {
case FC_STATE_ONLINE: break;
case FC_STATE_OFFLINE: break;
default: dma_unmap_single (fc->dev, l->fcmds[i].cmd, 3 * sizeof(logi), FC_DMA_BIDIRECTIONAL);
default: dma_unmap_single (fc->dev, l->fcmds[i].cmd, 3 * sizeof(logi), DMA_BIDIRECTIONAL);
break;
}
}
......@@ -821,14 +818,14 @@ static int fcp_scsi_queue_it(fc_channel *fc, Scsi_Cmnd *SCpnt, fcp_cmnd *fcmd, i
cmd->fcp_data_len = SCpnt->request_bufflen;
fcmd->data = dma_map_single (fc->dev, (char *)SCpnt->request_buffer,
SCpnt->request_bufflen,
scsi_to_fc_dma_dir(SCpnt->sc_data_direction));
SCpnt->sc_data_direction);
} else {
struct scatterlist *sg = (struct scatterlist *)SCpnt->buffer;
int nents;
FCD(("XXX: Use_sg %d %d\n", SCpnt->use_sg, sg->length))
nents = dma_map_sg (fc->dev, sg, SCpnt->use_sg,
scsi_to_fc_dma_dir(SCpnt->sc_data_direction));
SCpnt->sc_data_direction);
if (nents > 1) printk ("%s: SG for nents %d (use_sg %d) not handled yet\n", fc->name, nents, SCpnt->use_sg);
fcmd->data = sg_dma_address(sg);
cmd->fcp_data_len = sg_dma_len(sg);
......@@ -1065,7 +1062,7 @@ static int fc_do_els(fc_channel *fc, unsigned int alpa, void *data, int len)
FILL_FCHDR_SEQ_DF_SEQ(fch, 0, 0, 0);
FILL_FCHDR_OXRX(fch, 0xffff, 0xffff);
fch->param = 0;
fcmd->cmd = dma_map_single (fc->dev, data, 2 * len, FC_DMA_BIDIRECTIONAL);
fcmd->cmd = dma_map_single (fc->dev, data, 2 * len, DMA_BIDIRECTIONAL);
fcmd->rsp = fcmd->cmd + len;
fcmd->cmdlen = len;
fcmd->rsplen = len;
......@@ -1100,7 +1097,7 @@ static int fc_do_els(fc_channel *fc, unsigned int alpa, void *data, int len)
clear_bit(fcmd->token, fc->scsi_bitmap);
fc->scsi_free++;
dma_unmap_single (fc->dev, fcmd->cmd, 2 * len, FC_DMA_BIDIRECTIONAL);
dma_unmap_single (fc->dev, fcmd->cmd, 2 * len, DMA_BIDIRECTIONAL);
return l.status;
}
......
This diff is collapsed.
......@@ -10,9 +10,20 @@
#include <linux/config.h>
/* #include "scsi.h" */
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_request.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
/* For dvma controller register definitions. */
#include <asm/dma.h>
#define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir))
/* The ESP SCSI controllers have their register sets in three
* "classes":
*
......@@ -181,9 +192,9 @@ struct esp {
int bursts; /* Burst sizes our DVMA supports */
/* Our command queues, only one cmd lives in the current_SC queue. */
Scsi_Cmnd *issue_SC; /* Commands to be issued */
Scsi_Cmnd *current_SC; /* Who is currently working the bus */
Scsi_Cmnd *disconnected_SC;/* Commands disconnected from the bus */
struct scsi_cmnd *issue_SC; /* Commands to be issued */
struct scsi_cmnd *current_SC; /* Who is currently working the bus */
struct scsi_cmnd *disconnected_SC;/* Commands disconnected from the bus */
/* Message goo */
u8 cur_msgout[16];
......
......@@ -26,8 +26,6 @@
#include <asm/byteorder.h>
#include "scsi.h"
#include "hosts.h"
#include "qlogicpti.h"
#include <asm/sbus.h>
......@@ -809,7 +807,7 @@ static int __init qpti_map_queues(struct qlogicpti *qpti)
}
/* Detect all PTI Qlogic ISP's in the machine. */
static int __init qlogicpti_detect(Scsi_Host_Template *tpnt)
static int __init qlogicpti_detect(struct scsi_host_template *tpnt)
{
struct qlogicpti *qpti;
struct Scsi_Host *qpti_host;
......@@ -878,7 +876,7 @@ static int __init qlogicpti_detect(Scsi_Host_Template *tpnt)
qpti_get_bursts(qpti);
qpti_get_clock(qpti);
/* Clear out Scsi_Cmnd array. */
/* Clear out scsi_cmnd array. */
memset(qpti->cmd_slots, 0, sizeof(qpti->cmd_slots));
if (qpti_map_queues(qpti) < 0)
......@@ -997,7 +995,7 @@ static inline void marker_frob(struct Command_Entry *cmd)
marker->rsvd = 0;
}
static inline void cmd_frob(struct Command_Entry *cmd, Scsi_Cmnd *Cmnd,
static inline void cmd_frob(struct Command_Entry *cmd, struct scsi_cmnd *Cmnd,
struct qlogicpti *qpti)
{
memset(cmd, 0, sizeof(struct Command_Entry));
......@@ -1027,7 +1025,7 @@ static inline void cmd_frob(struct Command_Entry *cmd, Scsi_Cmnd *Cmnd,
}
/* Do it to it baby. */
static inline int load_cmd(Scsi_Cmnd *Cmnd, struct Command_Entry *cmd,
static inline int load_cmd(struct scsi_cmnd *Cmnd, struct Command_Entry *cmd,
struct qlogicpti *qpti, u_int in_ptr, u_int out_ptr)
{
struct dataseg *ds;
......@@ -1038,7 +1036,7 @@ static inline int load_cmd(Scsi_Cmnd *Cmnd, struct Command_Entry *cmd,
int sg_count;
sg = (struct scatterlist *) Cmnd->buffer;
sg_count = sbus_map_sg(qpti->sdev, sg, Cmnd->use_sg, scsi_to_sbus_dma_dir(Cmnd->sc_data_direction));
sg_count = sbus_map_sg(qpti->sdev, sg, Cmnd->use_sg, Cmnd->sc_data_direction);
ds = cmd->dataseg;
cmd->segment_cnt = sg_count;
......@@ -1081,7 +1079,7 @@ static inline int load_cmd(Scsi_Cmnd *Cmnd, struct Command_Entry *cmd,
sbus_map_single(qpti->sdev,
Cmnd->request_buffer,
Cmnd->request_bufflen,
scsi_to_sbus_dma_dir(Cmnd->sc_data_direction));
Cmnd->sc_data_direction);
cmd->dataseg[0].d_base = (u32) ((unsigned long)Cmnd->SCp.ptr);
cmd->dataseg[0].d_count = Cmnd->request_bufflen;
......@@ -1115,11 +1113,11 @@ static inline void update_can_queue(struct Scsi_Host *host, u_int in_ptr, u_int
/*
* Until we scan the entire bus with inquiries, go throught this fella...
*/
static void ourdone(Scsi_Cmnd *Cmnd)
static void ourdone(struct scsi_cmnd *Cmnd)
{
struct qlogicpti *qpti = (struct qlogicpti *) Cmnd->device->host->hostdata;
int tgt = Cmnd->device->id;
void (*done) (Scsi_Cmnd *);
void (*done) (struct scsi_cmnd *);
/* This grot added by DaveM, blame him for ugliness.
* The issue is that in the 2.3.x driver we use the
......@@ -1127,7 +1125,7 @@ static void ourdone(Scsi_Cmnd *Cmnd)
* completion linked list at interrupt service time,
* so we have to store the done function pointer elsewhere.
*/
done = (void (*)(Scsi_Cmnd *))
done = (void (*)(struct scsi_cmnd *))
(((unsigned long) Cmnd->SCp.Message)
#ifdef __sparc_v9__
| ((unsigned long) Cmnd->SCp.Status << 32UL)
......@@ -1164,10 +1162,10 @@ static void ourdone(Scsi_Cmnd *Cmnd)
done(Cmnd);
}
static int qlogicpti_queuecommand(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *));
static int qlogicpti_queuecommand(struct scsi_cmnd *Cmnd, void (*done)(struct scsi_cmnd *));
static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
void (*done)(Scsi_Cmnd *))
static int qlogicpti_queuecommand_slow(struct scsi_cmnd *Cmnd,
void (*done)(struct scsi_cmnd *))
{
struct qlogicpti *qpti = (struct qlogicpti *) Cmnd->device->host->hostdata;
......@@ -1238,7 +1236,7 @@ static int qlogicpti_queuecommand_slow(Scsi_Cmnd *Cmnd,
*
* "This code must fly." -davem
*/
static int qlogicpti_queuecommand(Scsi_Cmnd *Cmnd, void (*done)(Scsi_Cmnd *))
static int qlogicpti_queuecommand(struct scsi_cmnd *Cmnd, void (*done)(struct scsi_cmnd *))
{
struct Scsi_Host *host = Cmnd->device->host;
struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
......@@ -1351,9 +1349,9 @@ static int qlogicpti_return_status(struct Status_Entry *sts, int id)
return (sts->scsi_status & STATUS_MASK) | (host_status << 16);
}
static Scsi_Cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
{
Scsi_Cmnd *Cmnd, *done_queue = NULL;
struct scsi_cmnd *Cmnd, *done_queue = NULL;
struct Status_Entry *sts;
u_int in_ptr, out_ptr;
......@@ -1412,12 +1410,12 @@ static Scsi_Cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
sbus_unmap_sg(qpti->sdev,
(struct scatterlist *)Cmnd->buffer,
Cmnd->use_sg,
scsi_to_sbus_dma_dir(Cmnd->sc_data_direction));
Cmnd->sc_data_direction);
} else {
sbus_unmap_single(qpti->sdev,
(__u32)((unsigned long)Cmnd->SCp.ptr),
Cmnd->request_bufflen,
scsi_to_sbus_dma_dir(Cmnd->sc_data_direction));
Cmnd->sc_data_direction);
}
qpti->cmd_count[Cmnd->device->id]--;
sbus_writew(out_ptr, qpti->qregs + MBOX5);
......@@ -1433,16 +1431,16 @@ static irqreturn_t qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
{
struct qlogicpti *qpti = dev_id;
unsigned long flags;
Scsi_Cmnd *dq;
struct scsi_cmnd *dq;
spin_lock_irqsave(qpti->qhost->host_lock, flags);
dq = qlogicpti_intr_handler(qpti);
if (dq != NULL) {
do {
Scsi_Cmnd *next;
struct scsi_cmnd *next;
next = (Scsi_Cmnd *) dq->host_scribble;
next = (struct scsi_cmnd *) dq->host_scribble;
dq->scsi_done(dq);
dq = next;
} while (dq != NULL);
......@@ -1452,7 +1450,7 @@ static irqreturn_t qpti_intr(int irq, void *dev_id, struct pt_regs *regs)
return IRQ_HANDLED;
}
static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
static int qlogicpti_abort(struct scsi_cmnd *Cmnd)
{
u_short param[6];
struct Scsi_Host *host = Cmnd->device->host;
......@@ -1489,7 +1487,7 @@ static int qlogicpti_abort(Scsi_Cmnd *Cmnd)
return return_status;
}
static int qlogicpti_reset(Scsi_Cmnd *Cmnd)
static int qlogicpti_reset(struct scsi_cmnd *Cmnd)
{
u_short param[6];
struct Scsi_Host *host = Cmnd->device->host;
......@@ -1513,7 +1511,7 @@ static int qlogicpti_reset(Scsi_Cmnd *Cmnd)
return return_status;
}
static Scsi_Host_Template driver_template = {
static struct scsi_host_template driver_template = {
.detect = qlogicpti_detect,
.release = qlogicpti_release,
.info = qlogicpti_info,
......
......@@ -8,6 +8,17 @@
#include <linux/config.h>
/* #include "scsi.h" */
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_request.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi.h>
#include <scsi/scsi_host.h>
#define scsi_to_sbus_dma_dir(scsi_dir) ((int)(scsi_dir))
/* Qlogic/SBUS controller registers. */
#define SBUS_CFG1 0x006UL
#define SBUS_CTRL 0x008UL
......@@ -352,7 +363,7 @@ struct qlogicpti {
* Ex000 sparc64 machines with >4GB of ram we just keep track of the
* scsi command pointers here. This is essentially what Matt Jacob does. -DaveM
*/
Scsi_Cmnd *cmd_slots[QLOGICPTI_REQ_QUEUE_LEN + 1];
struct scsi_cmnd *cmd_slots[QLOGICPTI_REQ_QUEUE_LEN + 1];
/* The rest of the elements are unimportant for performance. */
struct qlogicpti *next;
......
......@@ -744,9 +744,9 @@ extern int copy_mount_options (const void __user *, unsigned long *);
#define SMBFS_NAME "smbfs"
#define NCPFS_NAME "ncpfs"
asmlinkage int compat_sys_mount(char __user * dev_name, char __user * dir_name,
char __user * type, unsigned long flags,
void __user * data)
asmlinkage long compat_sys_mount(char __user * dev_name, char __user * dir_name,
char __user * type, unsigned long flags,
void __user * data)
{
unsigned long type_page;
unsigned long data_page;
......
......@@ -7,6 +7,7 @@
#ifndef _SPARC_SBUS_H
#define _SPARC_SBUS_H
#include <linux/dma-mapping.h>
#include <linux/ioport.h>
#include <asm/oplib.h>
......@@ -106,10 +107,10 @@ extern void sbus_set_sbus64(struct sbus_dev *, int);
extern void *sbus_alloc_consistent(struct sbus_dev *, long, u32 *dma_addrp);
extern void sbus_free_consistent(struct sbus_dev *, long, void *, u32);
#define SBUS_DMA_BIDIRECTIONAL 0
#define SBUS_DMA_TODEVICE 1
#define SBUS_DMA_FROMDEVICE 2
#define SBUS_DMA_NONE 3
#define SBUS_DMA_BIDIRECTIONAL DMA_BIDIRECTIONAL
#define SBUS_DMA_TODEVICE DMA_TO_DEVICE
#define SBUS_DMA_FROMDEVICE DMA_FROM_DEVICE
#define SBUS_DMA_NONE DMA_NONE
/* All the rest use streaming mode mappings. */
extern dma_addr_t sbus_map_single(struct sbus_dev *, void *, size_t, int);
......
......@@ -7,6 +7,7 @@
#ifndef _SPARC64_SBUS_H
#define _SPARC64_SBUS_H
#include <linux/dma-mapping.h>
#include <linux/ioport.h>
#include <asm/oplib.h>
......@@ -99,10 +100,10 @@ extern void sbus_set_sbus64(struct sbus_dev *, int);
extern void *sbus_alloc_consistent(struct sbus_dev *, size_t, dma_addr_t *dma_addrp);
extern void sbus_free_consistent(struct sbus_dev *, size_t, void *, dma_addr_t);
#define SBUS_DMA_BIDIRECTIONAL 0
#define SBUS_DMA_TODEVICE 1
#define SBUS_DMA_FROMDEVICE 2
#define SBUS_DMA_NONE 3
#define SBUS_DMA_BIDIRECTIONAL DMA_BIDIRECTIONAL
#define SBUS_DMA_TODEVICE DMA_TO_DEVICE
#define SBUS_DMA_FROMDEVICE DMA_FROM_DEVICE
#define SBUS_DMA_NONE DMA_NONE
/* All the rest use streaming mode mappings. */
extern dma_addr_t sbus_map_single(struct sbus_dev *, void *, size_t, int);
......
......@@ -446,7 +446,6 @@ static __inline__ _syscall1(int,dup,int,fd)
static __inline__ _syscall3(int,execve,__const__ char *,file,char **,argv,char **,envp)
static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode)
static __inline__ _syscall1(int,close,int,fd)
static __inline__ _syscall1(int,_exit,int,exitcode)
static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
#include <linux/linkage.h>
......
......@@ -399,8 +399,8 @@ asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid,
return ret;
}
asmlinkage int compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len,
compat_ulong_t __user *user_mask_ptr)
asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len,
compat_ulong_t __user *user_mask_ptr)
{
unsigned long kernel_mask;
mm_segment_t old_fs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment