Commit 2b48c95d authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/home/davem/BK/sparc-2.5

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents 9f96ca62 9e3e77d5
...@@ -1597,7 +1597,8 @@ L: ultralinux@vger.kernel.org ...@@ -1597,7 +1597,8 @@ L: ultralinux@vger.kernel.org
S: Maintained S: Maintained
SPARC (sparc32): SPARC (sparc32):
S: Unmaintained L: sparclinux@vger.kernel.org
S: Unmaintained - please send patches to mailing list
SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
P: Roger Wolff P: Roger Wolff
......
...@@ -72,7 +72,7 @@ device_scan(void) ...@@ -72,7 +72,7 @@ device_scan(void)
if (linux_num_cpus == 0) { if (linux_num_cpus == 0) {
printk("No CPU nodes found, cannot continue.\n"); printk("No CPU nodes found, cannot continue.\n");
/* Probably a sun4e, Sun is trying to trick us ;-) */ /* Probably a sun4e, Sun is trying to trick us ;-) */
halt(); prom_halt();
} }
printk("Found %d CPU prom device tree node(s).\n", linux_num_cpus); printk("Found %d CPU prom device tree node(s).\n", linux_num_cpus);
} }
......
...@@ -777,7 +777,7 @@ void ioport_init(void) ...@@ -777,7 +777,7 @@ void ioport_init(void)
default: default:
printk("ioport_init: cpu type %d is unknown.\n", printk("ioport_init: cpu type %d is unknown.\n",
sparc_cpu_model); sparc_cpu_model);
halt(); prom_halt();
}; };
} }
......
...@@ -725,3 +725,39 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) ...@@ -725,3 +725,39 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
"g1", "g2", "g3", "o0", "o1", "memory", "cc"); "g1", "g2", "g3", "o0", "o1", "memory", "cc");
return retval; return retval;
} }
extern void scheduling_functions_start_here(void);
extern void scheduling_functions_end_here(void);
unsigned long get_wchan(struct task_struct *task)
{
unsigned long pc, fp, bias = 0;
unsigned long task_base = (unsigned long) task;
unsigned long ret = 0;
struct reg_window *rw;
int count = 0;
if (!task || task == current ||
task->state == TASK_RUNNING)
goto out;
fp = task->thread_info->ksp + bias;
do {
/* Bogus frame pointer? */
if (fp < (task_base + sizeof(struct task_struct)) ||
fp >= (task_base + (2 * PAGE_SIZE)))
break;
rw = (struct reg_window *) fp;
pc = rw->ins[7];
if (pc < ((unsigned long) scheduling_functions_start_here) ||
pc >= ((unsigned long) scheduling_functions_end_here)) {
ret = pc;
goto out;
}
fp = rw->ins[6] + bias;
} while (++count < 16);
out:
return ret;
}
...@@ -352,6 +352,11 @@ config SPARC32_COMPAT ...@@ -352,6 +352,11 @@ config SPARC32_COMPAT
This allows you to run 32-bit binaries on your Ultra. This allows you to run 32-bit binaries on your Ultra.
Everybody wants this; say Y. Everybody wants this; say Y.
config COMPAT
bool
depends on SPARC32_COMPAT
default y
config BINFMT_ELF32 config BINFMT_ELF32
tristate "Kernel support for 32-bit ELF binaries" tristate "Kernel support for 32-bit ELF binaries"
depends on SPARC32_COMPAT depends on SPARC32_COMPAT
......
...@@ -86,11 +86,7 @@ typedef struct { ...@@ -86,11 +86,7 @@ typedef struct {
#include <linux/module.h> #include <linux/module.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/elfcore.h> #include <linux/elfcore.h>
#include <linux/compat.h>
struct timeval32
{
int tv_sec, tv_usec;
};
#define elf_prstatus elf_prstatus32 #define elf_prstatus elf_prstatus32
struct elf_prstatus32 struct elf_prstatus32
...@@ -103,10 +99,10 @@ struct elf_prstatus32 ...@@ -103,10 +99,10 @@ struct elf_prstatus32
pid_t pr_ppid; pid_t pr_ppid;
pid_t pr_pgrp; pid_t pr_pgrp;
pid_t pr_sid; pid_t pr_sid;
struct timeval32 pr_utime; /* User time */ struct compat_timeval pr_utime; /* User time */
struct timeval32 pr_stime; /* System time */ struct compat_timeval pr_stime; /* System time */
struct timeval32 pr_cutime; /* Cumulative user time */ struct compat_timeval pr_cutime; /* Cumulative user time */
struct timeval32 pr_cstime; /* Cumulative system time */ struct compat_timeval pr_cstime; /* Cumulative system time */
elf_gregset_t pr_reg; /* GP registers */ elf_gregset_t pr_reg; /* GP registers */
int pr_fpvalid; /* True if math co-processor being used. */ int pr_fpvalid; /* True if math co-processor being used. */
}; };
...@@ -136,9 +132,9 @@ struct elf_prpsinfo32 ...@@ -136,9 +132,9 @@ struct elf_prpsinfo32
#include <linux/time.h> #include <linux/time.h>
#define jiffies_to_timeval jiffies_to_timeval32 #define jiffies_to_timeval jiffies_to_compat_timeval
static __inline__ void static __inline__ void
jiffies_to_timeval32(unsigned long jiffies, struct timeval32 *value) jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value)
{ {
value->tv_usec = (jiffies % HZ) * (1000000L / HZ); value->tv_usec = (jiffies % HZ) * (1000000L / HZ);
value->tv_sec = jiffies / HZ; value->tv_sec = jiffies / HZ;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/compat.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/smp.h> #include <linux/smp.h>
...@@ -405,14 +406,9 @@ static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -405,14 +406,9 @@ static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
return err; return err;
} }
struct timeval32 {
int tv_sec;
int tv_usec;
};
static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg) static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg)
{ {
struct timeval32 *up = (struct timeval32 *)arg; struct compat_timeval *up = (struct compat_timeval *)arg;
struct timeval ktv; struct timeval ktv;
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
int err; int err;
...@@ -1743,8 +1739,8 @@ struct ppp_option_data32 { ...@@ -1743,8 +1739,8 @@ struct ppp_option_data32 {
#define PPPIOCSCOMPRESS32 _IOW('t', 77, struct ppp_option_data32) #define PPPIOCSCOMPRESS32 _IOW('t', 77, struct ppp_option_data32)
struct ppp_idle32 { struct ppp_idle32 {
__kernel_time_t32 xmit_idle; compat_time_t xmit_idle;
__kernel_time_t32 recv_idle; compat_time_t recv_idle;
}; };
#define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32) #define PPPIOCGIDLE32 _IOR('t', 63, struct ppp_idle32)
......
...@@ -814,3 +814,41 @@ asmlinkage int sparc_execve(struct pt_regs *regs) ...@@ -814,3 +814,41 @@ asmlinkage int sparc_execve(struct pt_regs *regs)
out: out:
return error; return error;
} }
extern void scheduling_functions_start_here(void);
extern void scheduling_functions_end_here(void);
unsigned long get_wchan(struct task_struct *task)
{
unsigned long pc, fp, bias = 0;
unsigned long thread_info_base;
struct reg_window *rw;
unsigned long ret = 0;
int count = 0;
if (!task || task == current ||
task->state == TASK_RUNNING)
goto out;
thread_info_base = (unsigned long) task->thread_info;
bias = STACK_BIAS;
fp = task->thread_info->ksp + bias;
do {
/* Bogus frame pointer? */
if (fp < (thread_info_base + sizeof(struct thread_info)) ||
fp >= (thread_info_base + THREAD_SIZE))
break;
rw = (struct reg_window *) fp;
pc = rw->ins[7];
if (pc < ((unsigned long) scheduling_functions_start_here) ||
pc >= ((unsigned long) scheduling_functions_end_here)) {
ret = pc;
goto out;
}
fp = rw->ins[6] + bias;
} while (++count < 16);
out:
return ret;
}
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/binfmts.h> #include <linux/binfmts.h>
#include <linux/compat.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/bitops.h> #include <asm/bitops.h>
...@@ -181,7 +182,7 @@ asmlinkage void do_rt_sigsuspend32(u32 uset, size_t sigsetsize, struct pt_regs * ...@@ -181,7 +182,7 @@ asmlinkage void do_rt_sigsuspend32(u32 uset, size_t sigsetsize, struct pt_regs *
sigset_t32 set32; sigset_t32 set32;
/* XXX: Don't preclude handling different sized sigset_t's. */ /* XXX: Don't preclude handling different sized sigset_t's. */
if (((__kernel_size_t32)sigsetsize) != sizeof(sigset_t)) { if (((compat_size_t)sigsetsize) != sizeof(sigset_t)) {
regs->tstate |= TSTATE_ICARRY; regs->tstate |= TSTATE_ICARRY;
regs->u_regs[UREG_I0] = EINVAL; regs->u_regs[UREG_I0] = EINVAL;
return; return;
......
...@@ -175,7 +175,7 @@ do_sys_recv: /* sys_recv(int, void *, size_t, unsigned int) */ ...@@ -175,7 +175,7 @@ do_sys_recv: /* sys_recv(int, void *, size_t, unsigned int) */
lduwa [%o1 + 0x4] %asi, %o1 lduwa [%o1 + 0x4] %asi, %o1
nop nop
nop nop
do_sys_sendto: /* sys32_sendto(int, u32, __kernel_size_t32, unsigned int, u32, int) */ do_sys_sendto: /* sys32_sendto(int, u32, compat_size_t, unsigned int, u32, int) */
ldswa [%o1 + 0x0] %asi, %o0 ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys32_sendto), %g1 sethi %hi(sys32_sendto), %g1
lduwa [%o1 + 0x8] %asi, %o2 lduwa [%o1 + 0x8] %asi, %o2
...@@ -184,7 +184,7 @@ do_sys_sendto: /* sys32_sendto(int, u32, __kernel_size_t32, unsigned int, u32, i ...@@ -184,7 +184,7 @@ do_sys_sendto: /* sys32_sendto(int, u32, __kernel_size_t32, unsigned int, u32, i
ldswa [%o1 + 0x14] %asi, %o5 ldswa [%o1 + 0x14] %asi, %o5
jmpl %g1 + %lo(sys32_sendto), %g0 jmpl %g1 + %lo(sys32_sendto), %g0
lduwa [%o1 + 0x4] %asi, %o1 lduwa [%o1 + 0x4] %asi, %o1
do_sys_recvfrom: /* sys32_recvfrom(int, u32, __kernel_size_t32, unsigned int, u32, u32) */ do_sys_recvfrom: /* sys32_recvfrom(int, u32, compat_size_t, unsigned int, u32, u32) */
ldswa [%o1 + 0x0] %asi, %o0 ldswa [%o1 + 0x0] %asi, %o0
sethi %hi(sys32_recvfrom), %g1 sethi %hi(sys32_recvfrom), %g1
lduwa [%o1 + 0x8] %asi, %o2 lduwa [%o1 + 0x8] %asi, %o2
......
This diff is collapsed.
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/compat.h>
#include <linux/mman.h> #include <linux/mman.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/swap.h> #include <linux/swap.h>
...@@ -528,11 +529,6 @@ asmlinkage int sunos_pathconf(u32 u_path, int name) ...@@ -528,11 +529,6 @@ asmlinkage int sunos_pathconf(u32 u_path, int name)
extern asmlinkage int extern asmlinkage int
sys32_select(int n, u32 inp, u32 outp, u32 exp, u32 tvp); sys32_select(int n, u32 inp, u32 outp, u32 exp, u32 tvp);
struct timeval32
{
int tv_sec, tv_usec;
};
asmlinkage int sunos_select(int width, u32 inp, u32 outp, u32 exp, u32 tvp_x) asmlinkage int sunos_select(int width, u32 inp, u32 outp, u32 exp, u32 tvp_x)
{ {
int ret; int ret;
...@@ -540,7 +536,7 @@ asmlinkage int sunos_select(int width, u32 inp, u32 outp, u32 exp, u32 tvp_x) ...@@ -540,7 +536,7 @@ asmlinkage int sunos_select(int width, u32 inp, u32 outp, u32 exp, u32 tvp_x)
/* SunOS binaries expect that select won't change the tvp contents */ /* SunOS binaries expect that select won't change the tvp contents */
ret = sys32_select (width, inp, outp, exp, tvp_x); ret = sys32_select (width, inp, outp, exp, tvp_x);
if (ret == -EINTR && tvp_x) { if (ret == -EINTR && tvp_x) {
struct timeval32 *tvp = (struct timeval32 *)A(tvp_x); struct compat_timeval *tvp = (struct compat_timeval *)A(tvp_x);
time_t sec, usec; time_t sec, usec;
__get_user(sec, &tvp->tv_sec); __get_user(sec, &tvp->tv_sec);
...@@ -948,9 +944,9 @@ struct msqid_ds32 ...@@ -948,9 +944,9 @@ struct msqid_ds32
struct ipc_perm32 msg_perm; struct ipc_perm32 msg_perm;
u32 msg_first; u32 msg_first;
u32 msg_last; u32 msg_last;
__kernel_time_t32 msg_stime; compat_time_t msg_stime;
__kernel_time_t32 msg_rtime; compat_time_t msg_rtime;
__kernel_time_t32 msg_ctime; compat_time_t msg_ctime;
u32 wwait; u32 wwait;
u32 rwait; u32 rwait;
unsigned short msg_cbytes; unsigned short msg_cbytes;
...@@ -1085,9 +1081,9 @@ asmlinkage int sunos_msgsys(int op, u32 arg1, u32 arg2, u32 arg3, u32 arg4) ...@@ -1085,9 +1081,9 @@ asmlinkage int sunos_msgsys(int op, u32 arg1, u32 arg2, u32 arg3, u32 arg4)
struct shmid_ds32 { struct shmid_ds32 {
struct ipc_perm32 shm_perm; struct ipc_perm32 shm_perm;
int shm_segsz; int shm_segsz;
__kernel_time_t32 shm_atime; compat_time_t shm_atime;
__kernel_time_t32 shm_dtime; compat_time_t shm_dtime;
__kernel_time_t32 shm_ctime; compat_time_t shm_ctime;
__kernel_ipc_pid_t32 shm_cpid; __kernel_ipc_pid_t32 shm_cpid;
__kernel_ipc_pid_t32 shm_lpid; __kernel_ipc_pid_t32 shm_lpid;
unsigned short shm_nattch; unsigned short shm_nattch;
......
...@@ -25,7 +25,7 @@ sys_call_table32: ...@@ -25,7 +25,7 @@ sys_call_table32:
/*15*/ .word sys32_chmod, sys32_lchown16, sparc_brk, sys_perfctr, sys32_lseek /*15*/ .word sys32_chmod, sys32_lchown16, sparc_brk, sys_perfctr, sys32_lseek
/*20*/ .word sys_getpid, sys_capget, sys_capset, sys32_setuid16, sys32_getuid16 /*20*/ .word sys_getpid, sys_capget, sys_capset, sys32_setuid16, sys32_getuid16
/*25*/ .word sys_time, sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause /*25*/ .word sys_time, sys_ptrace, sys_alarm, sys32_sigaltstack, sys32_pause
/*30*/ .word sys32_utime, sys_lchown, sys_fchown, sys_access, sys_nice /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice
.word sys_chown, sys_sync, sys_kill, sys32_newstat, sys32_sendfile .word sys_chown, sys_sync, sys_kill, sys32_newstat, sys32_sendfile
/*40*/ .word sys32_newlstat, sys_dup, sys_pipe, sys32_times, sys_getuid /*40*/ .word sys32_newlstat, sys_dup, sys_pipe, sys32_times, sys_getuid
.word sys_umount, sys32_setgid16, sys32_getgid16, sys_signal, sys32_geteuid16 .word sys_umount, sys32_setgid16, sys32_getgid16, sys_signal, sys32_geteuid16
...@@ -35,8 +35,8 @@ sys_call_table32: ...@@ -35,8 +35,8 @@ sys_call_table32:
.word sys_msync, sys_vfork, sys32_pread64, sys32_pwrite64, sys_geteuid .word sys_msync, sys_vfork, sys32_pread64, sys32_pwrite64, sys_geteuid
/*70*/ .word sys_getegid, sys32_mmap, sys_setreuid, sys_munmap, sys_mprotect /*70*/ .word sys_getegid, sys32_mmap, sys_setreuid, sys_munmap, sys_mprotect
.word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys32_getgroups16 .word sys_madvise, sys_vhangup, sys32_truncate64, sys_mincore, sys32_getgroups16
/*80*/ .word sys32_setgroups16, sys_getpgrp, sys_setgroups, sys32_setitimer, sys32_ftruncate64 /*80*/ .word sys32_setgroups16, sys_getpgrp, sys_setgroups, compat_sys_setitimer, sys32_ftruncate64
.word sys_swapon, sys32_getitimer, sys_setuid, sys_sethostname, sys_setgid .word sys_swapon, compat_sys_getitimer, sys_setuid, sys_sethostname, sys_setgid
/*90*/ .word sys_dup2, sys_setfsuid, sys32_fcntl, sys32_select, sys_setfsgid /*90*/ .word sys_dup2, sys_setfsuid, sys32_fcntl, sys32_select, sys_setfsgid
.word sys_fsync, sys_setpriority32, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall .word sys_fsync, sys_setpriority32, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall
/*100*/ .word sys_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending /*100*/ .word sys_getpriority, sys32_rt_sigreturn, sys32_rt_sigaction, sys32_rt_sigprocmask, sys32_rt_sigpending
...@@ -68,7 +68,7 @@ sys_call_table32: ...@@ -68,7 +68,7 @@ sys_call_table32:
/*230*/ .word sys32_select, sys_time, sys_nis_syscall, sys_stime, sys_alloc_hugepages /*230*/ .word sys32_select, sys_time, sys_nis_syscall, sys_stime, sys_alloc_hugepages
.word sys_free_hugepages, sys_llseek, sys_mlock, sys_munlock, sys_mlockall .word sys_free_hugepages, sys_llseek, sys_mlock, sys_munlock, sys_mlockall
/*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler /*240*/ .word sys_munlockall, sys_sched_setparam, sys_sched_getparam, sys_sched_setscheduler, sys_sched_getscheduler
.word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys32_sched_rr_get_interval, sys32_nanosleep .word sys_sched_yield, sys_sched_get_priority_max, sys_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
/*250*/ .word sys32_mremap, sys32_sysctl, sys_getsid, sys_fdatasync, sys32_nfsservctl /*250*/ .word sys32_mremap, sys32_sysctl, sys_getsid, sys_fdatasync, sys32_nfsservctl
.word sys_aplib .word sys_aplib
...@@ -166,8 +166,8 @@ sunos_sys_table: ...@@ -166,8 +166,8 @@ sunos_sys_table:
.word sys_mprotect, sys_madvise, sys_vhangup .word sys_mprotect, sys_madvise, sys_vhangup
.word sunos_nosys, sys_mincore, sys32_getgroups16 .word sunos_nosys, sys_mincore, sys32_getgroups16
.word sys32_setgroups16, sys_getpgrp, sunos_setpgrp .word sys32_setgroups16, sys_getpgrp, sunos_setpgrp
.word sys32_setitimer, sunos_nosys, sys_swapon .word compat_sys_setitimer, sunos_nosys, sys_swapon
.word sys32_getitimer, sys_gethostname, sys_sethostname .word compat_sys_getitimer, sys_gethostname, sys_sethostname
.word sunos_getdtablesize, sys_dup2, sunos_nop .word sunos_getdtablesize, sys_dup2, sunos_nop
.word sys32_fcntl, sunos_select, sunos_nop .word sys32_fcntl, sunos_select, sunos_nop
.word sys_fsync, sys_setpriority32, sunos_socket .word sys_fsync, sys_setpriority32, sunos_socket
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/file.h> #include <linux/file.h>
#include <linux/timex.h> #include <linux/timex.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/compat.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/string.h> #include <asm/string.h>
...@@ -597,12 +598,8 @@ asmlinkage int solaris_setrlimit64(unsigned int resource, struct rlimit *rlim) ...@@ -597,12 +598,8 @@ asmlinkage int solaris_setrlimit64(unsigned int resource, struct rlimit *rlim)
return ret; return ret;
} }
struct timeval32 {
int tv_sec, tv_usec;
};
struct sol_ntptimeval { struct sol_ntptimeval {
struct timeval32 time; struct compat_timeval time;
s32 maxerror; s32 maxerror;
s32 esterror; s32 esterror;
}; };
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/socket.h> #include <linux/socket.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/net.h> #include <linux/net.h>
#include <linux/compat.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/string.h> #include <asm/string.h>
...@@ -378,7 +379,7 @@ asmlinkage int solaris_sendmsg(int fd, struct sol_nmsghdr *user_msg, unsigned us ...@@ -378,7 +379,7 @@ asmlinkage int solaris_sendmsg(int fd, struct sol_nmsghdr *user_msg, unsigned us
if(kern_msg.msg_controllen) { if(kern_msg.msg_controllen) {
struct sol_cmsghdr *ucmsg = (struct sol_cmsghdr *)kern_msg.msg_control; struct sol_cmsghdr *ucmsg = (struct sol_cmsghdr *)kern_msg.msg_control;
unsigned long *kcmsg; unsigned long *kcmsg;
__kernel_size_t32 cmlen; compat_size_t cmlen;
if(kern_msg.msg_controllen > sizeof(ctl) && if(kern_msg.msg_controllen > sizeof(ctl) &&
kern_msg.msg_controllen <= 256) { kern_msg.msg_controllen <= 256) {
...@@ -392,7 +393,7 @@ asmlinkage int solaris_sendmsg(int fd, struct sol_nmsghdr *user_msg, unsigned us ...@@ -392,7 +393,7 @@ asmlinkage int solaris_sendmsg(int fd, struct sol_nmsghdr *user_msg, unsigned us
*kcmsg++ = (unsigned long)cmlen; *kcmsg++ = (unsigned long)cmlen;
err = -EFAULT; err = -EFAULT;
if(copy_from_user(kcmsg, &ucmsg->cmsg_level, if(copy_from_user(kcmsg, &ucmsg->cmsg_level,
kern_msg.msg_controllen - sizeof(__kernel_size_t32))) kern_msg.msg_controllen - sizeof(compat_size_t)))
goto out_freectl; goto out_freectl;
kern_msg.msg_control = ctl_buf; kern_msg.msg_control = ctl_buf;
} }
......
...@@ -344,9 +344,11 @@ static ssize_t disk_stat_read(struct gendisk * disk, ...@@ -344,9 +344,11 @@ static ssize_t disk_stat_read(struct gendisk * disk,
"%8u %8u %8llu %8u " "%8u %8u %8llu %8u "
"%8u %8u %8u" "%8u %8u %8u"
"\n", "\n",
disk->reads, disk->read_merges, (u64)disk->read_sectors, disk->reads, disk->read_merges,
(unsigned long long)disk->read_sectors,
jiffies_to_msec(disk->read_ticks), jiffies_to_msec(disk->read_ticks),
disk->writes, disk->write_merges, (u64)disk->write_sectors, disk->writes, disk->write_merges,
(unsigned long long)disk->write_sectors,
jiffies_to_msec(disk->write_ticks), jiffies_to_msec(disk->write_ticks),
disk->in_flight, jiffies_to_msec(disk->io_ticks), disk->in_flight, jiffies_to_msec(disk->io_ticks),
jiffies_to_msec(disk->time_in_queue)); jiffies_to_msec(disk->time_in_queue));
......
...@@ -170,7 +170,8 @@ void nbd_send_req(struct nbd_device *lo, struct request *req) ...@@ -170,7 +170,8 @@ void nbd_send_req(struct nbd_device *lo, struct request *req)
down(&lo->tx_lock); down(&lo->tx_lock);
if (!sock || !lo->sock) { if (!sock || !lo->sock) {
FAIL("Attempted sendmsg to closed socket\n"); printk(KERN_ERR "NBD: Attempted sendmsg to closed socket\n");
goto error_out;
} }
result = nbd_xmit(1, sock, (char *) &request, sizeof(request), nbd_cmd(req) == NBD_CMD_WRITE ? MSG_MORE : 0); result = nbd_xmit(1, sock, (char *) &request, sizeof(request), nbd_cmd(req) == NBD_CMD_WRITE ? MSG_MORE : 0);
......
...@@ -214,7 +214,7 @@ static int raid0_run (mddev_t *mddev) ...@@ -214,7 +214,7 @@ static int raid0_run (mddev_t *mddev)
printk("raid0 : nb_zone is %d.\n", nb_zone); printk("raid0 : nb_zone is %d.\n", nb_zone);
conf->nr_zones = nb_zone; conf->nr_zones = nb_zone;
printk("raid0 : Allocating %d bytes for hash.\n", printk("raid0 : Allocating %Zd bytes for hash.\n",
nb_zone*sizeof(struct raid0_hash)); nb_zone*sizeof(struct raid0_hash));
conf->hash_table = vmalloc (sizeof (struct raid0_hash)*nb_zone); conf->hash_table = vmalloc (sizeof (struct raid0_hash)*nb_zone);
if (!conf->hash_table) if (!conf->hash_table)
......
...@@ -391,9 +391,6 @@ affs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_resul ...@@ -391,9 +391,6 @@ affs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh_resul
affs_unlock_ext(inode); affs_unlock_ext(inode);
return 0; return 0;
err_small:
affs_error(inode->i_sb,"get_block","Block < 0");
return -EIO;
err_big: err_big:
affs_error(inode->i_sb,"get_block","strange block request %d", block); affs_error(inode->i_sb,"get_block","strange block request %d", block);
return -EIO; return -EIO;
......
...@@ -2294,7 +2294,7 @@ int nobh_prepare_write(struct page *page, unsigned from, unsigned to, ...@@ -2294,7 +2294,7 @@ int nobh_prepare_write(struct page *page, unsigned from, unsigned to,
bh->b_page = page; bh->b_page = page;
bh->b_blocknr = map_bh.b_blocknr; bh->b_blocknr = map_bh.b_blocknr;
bh->b_size = blocksize; bh->b_size = blocksize;
bh->b_data = (char *)block_start; bh->b_data = (char *)(long)block_start;
bh->b_bdev = map_bh.b_bdev; bh->b_bdev = map_bh.b_bdev;
bh->b_private = NULL; bh->b_private = NULL;
read_bh[nr_reads++] = bh; read_bh[nr_reads++] = bh;
......
...@@ -139,34 +139,7 @@ extern __inline__ void start_thread(struct pt_regs * regs, unsigned long pc, ...@@ -139,34 +139,7 @@ extern __inline__ void start_thread(struct pt_regs * regs, unsigned long pc,
#define release_thread(tsk) do { } while(0) #define release_thread(tsk) do { } while(0)
extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
#define get_wchan(__TSK) \ extern unsigned long get_wchan(struct task_struct *);
({ extern void scheduling_functions_start_here(void); \
extern void scheduling_functions_end_here(void); \
unsigned long pc, fp, bias = 0; \
unsigned long task_base = (unsigned long) (__TSK); \
unsigned long __ret = 0; \
struct reg_window *rw; \
int count = 0; \
if (!(__TSK) || (__TSK) == current || \
(__TSK)->state == TASK_RUNNING) \
goto __out; \
fp = (__TSK)->thread_info->ksp + bias; \
do { \
/* Bogus frame pointer? */ \
if (fp < (task_base + sizeof(struct task_struct)) || \
fp >= (task_base + (2 * PAGE_SIZE))) \
break; \
rw = (struct reg_window *) fp; \
pc = rw->ins[7]; \
if (pc < ((unsigned long) scheduling_functions_start_here) || \
pc >= ((unsigned long) scheduling_functions_end_here)) { \
__ret = pc; \
goto __out; \
} \
fp = rw->ins[6] + bias; \
} while (++count < 16); \
__out: __ret; \
})
#define KSTK_EIP(tsk) ((tsk)->thread.kregs->pc) #define KSTK_EIP(tsk) ((tsk)->thread.kregs->pc)
#define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP]) #define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP])
......
...@@ -53,9 +53,6 @@ extern unsigned long empty_bad_page; ...@@ -53,9 +53,6 @@ extern unsigned long empty_bad_page;
extern unsigned long empty_bad_page_table; extern unsigned long empty_bad_page_table;
extern unsigned long empty_zero_page; extern unsigned long empty_zero_page;
extern struct linux_romvec *romvec;
#define halt() romvec->pv_halt()
extern void sun_do_break(void); extern void sun_do_break(void);
extern int serial_console; extern int serial_console;
extern int stop_a_enabled; extern int stop_a_enabled;
......
#ifndef _ASM_SPARC64_COMPAT_H
#define _ASM_SPARC64_COMPAT_H
/*
* Architecture specific compatibility types
*/
#include <linux/types.h>
typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
struct compat_timespec {
compat_time_t tv_sec;
s32 tv_nsec;
};
struct compat_timeval {
compat_time_t tv_sec;
s32 tv_usec;
};
#endif /* _ASM_SPARC64_COMPAT_H */
...@@ -48,10 +48,7 @@ typedef struct { ...@@ -48,10 +48,7 @@ typedef struct {
} __kernel_fsid_t; } __kernel_fsid_t;
/* Now 32bit compatibility types */ /* Now 32bit compatibility types */
typedef unsigned int __kernel_size_t32;
typedef int __kernel_ssize_t32;
typedef int __kernel_ptrdiff_t32; typedef int __kernel_ptrdiff_t32;
typedef int __kernel_time_t32;
typedef int __kernel_clock_t32; typedef int __kernel_clock_t32;
typedef int __kernel_pid_t32; typedef int __kernel_pid_t32;
typedef unsigned short __kernel_ipc_pid_t32; typedef unsigned short __kernel_ipc_pid_t32;
......
...@@ -187,36 +187,7 @@ do { \ ...@@ -187,36 +187,7 @@ do { \
extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
#define get_wchan(__TSK) \ extern unsigned long get_wchan(struct task_struct *task);
({ extern void scheduling_functions_start_here(void); \
extern void scheduling_functions_end_here(void); \
unsigned long pc, fp, bias = 0; \
unsigned long thread_info_base; \
struct reg_window *rw; \
unsigned long __ret = 0; \
int count = 0; \
if (!(__TSK) || (__TSK) == current || \
(__TSK)->state == TASK_RUNNING) \
goto __out; \
thread_info_base = (unsigned long) ((__TSK)->thread_info); \
bias = STACK_BIAS; \
fp = (__TSK)->thread_info->ksp + bias; \
do { \
/* Bogus frame pointer? */ \
if (fp < (thread_info_base + sizeof(struct thread_info)) || \
fp >= (thread_info_base + THREAD_SIZE)) \
break; \
rw = (struct reg_window *) fp; \
pc = rw->ins[7]; \
if (pc < ((unsigned long) scheduling_functions_start_here) || \
pc >= ((unsigned long) scheduling_functions_end_here)) { \
__ret = pc; \
goto __out; \
} \
fp = rw->ins[6] + bias; \
} while (++count < 16); \
__out: __ret; \
})
#define KSTK_EIP(tsk) ((tsk)->thread_info->kregs->tpc) #define KSTK_EIP(tsk) ((tsk)->thread_info->kregs->tpc)
#define KSTK_ESP(tsk) ((tsk)->thread_info->kregs->u_regs[UREG_FP]) #define KSTK_ESP(tsk) ((tsk)->thread_info->kregs->u_regs[UREG_FP])
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <linux/personality.h> #include <linux/personality.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/compat.h>
#endif #endif
#endif #endif
...@@ -250,7 +251,7 @@ typedef struct sigaltstack { ...@@ -250,7 +251,7 @@ typedef struct sigaltstack {
typedef struct sigaltstack32 { typedef struct sigaltstack32 {
u32 ss_sp; u32 ss_sp;
int ss_flags; int ss_flags;
__kernel_size_t32 ss_size; compat_size_t ss_size;
} stack_t32; } stack_t32;
#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER #define HAVE_ARCH_GET_SIGNAL_TO_DELIVER
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#define _SPARC64_STAT_H #define _SPARC64_STAT_H
#include <linux/types.h> #include <linux/types.h>
#include <linux/compat.h>
#include <linux/time.h> #include <linux/time.h>
struct stat32 { struct stat32 {
...@@ -14,11 +15,11 @@ struct stat32 { ...@@ -14,11 +15,11 @@ struct stat32 {
__kernel_gid_t32 st_gid; __kernel_gid_t32 st_gid;
__kernel_dev_t32 st_rdev; __kernel_dev_t32 st_rdev;
__kernel_off_t32 st_size; __kernel_off_t32 st_size;
__kernel_time_t32 st_atime; compat_time_t st_atime;
unsigned int __unused1; unsigned int __unused1;
__kernel_time_t32 st_mtime; compat_time_t st_mtime;
unsigned int __unused2; unsigned int __unused2;
__kernel_time_t32 st_ctime; compat_time_t st_ctime;
unsigned int __unused3; unsigned int __unused3;
__kernel_off_t32 st_blksize; __kernel_off_t32 st_blksize;
__kernel_off_t32 st_blocks; __kernel_off_t32 st_blocks;
......
...@@ -398,7 +398,7 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) ...@@ -398,7 +398,7 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp)
err_short_len: err_short_len:
#ifdef RPC_PARANOIA #ifdef RPC_PARANOIA
printk("svc: short len %d, dropping request\n", argv->iov_len); printk("svc: short len %Zd, dropping request\n", argv->iov_len);
#endif #endif
goto dropit; /* drop request */ goto dropit; /* drop request */
......
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