Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96143
b: refs/heads/master
c: 2688905
h: refs/heads/master
i:
  96141: 5e0e254
  96139: 9cb3bf1
  96135: 357a0ca
  96127: be75440
v: v3
  • Loading branch information
Martin Schwidefsky committed May 7, 2008
1 parent 5959cef commit 67ddf56
Show file tree
Hide file tree
Showing 42 changed files with 222 additions and 224 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b2cc917a02936c3ea7d8da46801c7b7b6233093
refs/heads/master: 2688905e6a9b3647bf7b452cb0ff2bdb166bd8fe
6 changes: 4 additions & 2 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2112,10 +2112,12 @@ L: netdev@vger.kernel.org
S: Maintained

INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/ixgb/ixgbe)
P: Jeff Kirsher
M: jeffrey.t.kirsher@intel.com
P: Auke Kok
M: auke-jan.h.kok@intel.com
P: Jesse Brandeburg
M: jesse.brandeburg@intel.com
P: Jeff Kirsher
M: jeffrey.t.kirsher@intel.com
P: Bruce Allan
M: bruce.w.allan@intel.com
P: John Ronciak
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/cris/kernel/sys_cris.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@ asmlinkage int sys_pipe(unsigned long __user * fildes)
error = do_pipe(fd);
unlock_kernel();
if (!error) {
if (copy_to_user(fildes, fd, 2*sizeof(int))) {
sys_close(fd[0]);
sys_close(fd[1]);
if (copy_to_user(fildes, fd, 2*sizeof(int)))
error = -EFAULT;
}
}
return error;
}
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/m32r/kernel/sys_m32r.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,8 @@ sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2,

error = do_pipe(fd);
if (!error) {
if (copy_to_user((void __user *)r0, fd, 2*sizeof(int))) {
sys_close(fd[0]);
sys_close(fd[1]);
if (copy_to_user((void __user *)r0, fd, 2*sizeof(int)))
error = -EFAULT;
}
}
return error;
}
Expand Down
29 changes: 14 additions & 15 deletions trunk/arch/s390/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,6 @@ sysc_do_restart:
st %r2,SP_R2(%r15) # store return value (change R2 on stack)

sysc_return:
tm SP_PSW+1(%r15),0x01 # returning to user ?
bno BASED(sysc_restore)
tm __TI_flags+3(%r9),_TIF_WORK_SVC
bnz BASED(sysc_work) # there is work to do (signals etc.)
sysc_restore:
Expand Down Expand Up @@ -312,6 +310,8 @@ sysc_work_loop:
# One of the work bits is on. Find out which one.
#
sysc_work:
tm SP_PSW+1(%r15),0x01 # returning to user ?
bno BASED(sysc_restore)
tm __TI_flags+3(%r9),_TIF_MCCK_PENDING
bo BASED(sysc_mcck_pending)
tm __TI_flags+3(%r9),_TIF_NEED_RESCHED
Expand Down Expand Up @@ -602,12 +602,6 @@ io_no_vtime:
la %r2,SP_PTREGS(%r15) # address of register-save area
basr %r14,%r1 # branch to standard irq handler
io_return:
tm SP_PSW+1(%r15),0x01 # returning to user ?
#ifdef CONFIG_PREEMPT
bno BASED(io_preempt) # no -> check for preemptive scheduling
#else
bno BASED(io_restore) # no-> skip resched & signal
#endif
tm __TI_flags+3(%r9),_TIF_WORK_INT
bnz BASED(io_work) # there is work to do (signals etc.)
io_restore:
Expand All @@ -629,10 +623,18 @@ io_restore_trace_psw:
.long 0, io_restore_trace + 0x80000000
#endif

#ifdef CONFIG_PREEMPT
io_preempt:
#
# switch to kernel stack, then check the TIF bits
#
io_work:
tm SP_PSW+1(%r15),0x01 # returning to user ?
#ifndef CONFIG_PREEMPT
bno BASED(io_restore) # no-> skip resched & signal
#else
bnz BASED(io_work_user) # no -> check for preemptive scheduling
# check for preemptive scheduling
icm %r0,15,__TI_precount(%r9)
bnz BASED(io_restore)
bnz BASED(io_restore) # preemption disabled
l %r1,SP_R15(%r15)
s %r1,BASED(.Lc_spsize)
mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15)
Expand All @@ -646,10 +648,7 @@ io_resume_loop:
br %r1 # call schedule
#endif

#
# switch to kernel stack, then check the TIF bits
#
io_work:
io_work_user:
l %r1,__LC_KERNEL_STACK
s %r1,BASED(.Lc_spsize)
mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15)
Expand Down
29 changes: 14 additions & 15 deletions trunk/arch/s390/kernel/entry64.S
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ sysc_noemu:
stg %r2,SP_R2(%r15) # store return value (change R2 on stack)

sysc_return:
tm SP_PSW+1(%r15),0x01 # returning to user ?
jno sysc_restore
tm __TI_flags+7(%r9),_TIF_WORK_SVC
jnz sysc_work # there is work to do (signals etc.)
sysc_restore:
Expand Down Expand Up @@ -304,6 +302,8 @@ sysc_work_loop:
# One of the work bits is on. Find out which one.
#
sysc_work:
tm SP_PSW+1(%r15),0x01 # returning to user ?
jno sysc_restore
tm __TI_flags+7(%r9),_TIF_MCCK_PENDING
jo sysc_mcck_pending
tm __TI_flags+7(%r9),_TIF_NEED_RESCHED
Expand Down Expand Up @@ -585,12 +585,6 @@ io_no_vtime:
la %r2,SP_PTREGS(%r15) # address of register-save area
brasl %r14,do_IRQ # call standard irq handler
io_return:
tm SP_PSW+1(%r15),0x01 # returning to user ?
#ifdef CONFIG_PREEMPT
jno io_preempt # no -> check for preemptive scheduling
#else
jno io_restore # no-> skip resched & signal
#endif
tm __TI_flags+7(%r9),_TIF_WORK_INT
jnz io_work # there is work to do (signals etc.)
io_restore:
Expand All @@ -612,10 +606,18 @@ io_restore_trace_psw:
.quad 0, io_restore_trace
#endif

#ifdef CONFIG_PREEMPT
io_preempt:
#
# switch to kernel stack, then check TIF bits
#
io_work:
tm SP_PSW+1(%r15),0x01 # returning to user ?
#ifndef CONFIG_PREEMPT
jno io_restore # no-> skip resched & signal
#else
jnz io_work_user # yes -> do resched & signal
# check for preemptive scheduling
icm %r0,15,__TI_precount(%r9)
jnz io_restore
jnz io_restore # preemption is disabled
# switch to kernel stack
lg %r1,SP_R15(%r15)
aghi %r1,-SP_SIZE
Expand All @@ -629,10 +631,7 @@ io_resume_loop:
jg preempt_schedule_irq
#endif

#
# switch to kernel stack, then check TIF bits
#
io_work:
io_work_user:
lg %r1,__LC_KERNEL_STACK
aghi %r1,-SP_SIZE
mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15)
Expand Down
20 changes: 4 additions & 16 deletions trunk/arch/sparc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,26 +419,14 @@ asmlinkage int sparc_do_fork(unsigned long clone_flags,
unsigned long stack_size)
{
unsigned long parent_tid_ptr, child_tid_ptr;
unsigned long orig_i1 = regs->u_regs[UREG_I1];
long ret;

parent_tid_ptr = regs->u_regs[UREG_I2];
child_tid_ptr = regs->u_regs[UREG_I4];

ret = do_fork(clone_flags, stack_start,
regs, stack_size,
(int __user *) parent_tid_ptr,
(int __user *) child_tid_ptr);

/* If we get an error and potentially restart the system
* call, we're screwed because copy_thread() clobbered
* the parent's %o1. So detect that case and restore it
* here.
*/
if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
regs->u_regs[UREG_I1] = orig_i1;

return ret;
return do_fork(clone_flags, stack_start,
regs, stack_size,
(int __user *) parent_tid_ptr,
(int __user *) child_tid_ptr);
}

/* Copy a Sparc thread. The fork() return value conventions
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/sparc/kernel/sys_sparc.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ int sparc_mmap_check(unsigned long addr, unsigned long len, unsigned long flags)
{
if (ARCH_SUN4C_SUN4 &&
(len > 0x20000000 ||
(addr < 0xe0000000 && addr + len > 0x20000000)))
((flags & MAP_FIXED) &&
addr < 0xe0000000 && addr + len > 0x20000000)))
return -EINVAL;

/* See asm-sparc/uaccess.h */
Expand Down
18 changes: 3 additions & 15 deletions trunk/arch/sparc64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,6 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags,
unsigned long stack_size)
{
int __user *parent_tid_ptr, *child_tid_ptr;
unsigned long orig_i1 = regs->u_regs[UREG_I1];
long ret;

#ifdef CONFIG_COMPAT
if (test_thread_flag(TIF_32BIT)) {
Expand All @@ -517,19 +515,9 @@ asmlinkage long sparc_do_fork(unsigned long clone_flags,
child_tid_ptr = (int __user *) regs->u_regs[UREG_I4];
}

ret = do_fork(clone_flags, stack_start,
regs, stack_size,
parent_tid_ptr, child_tid_ptr);

/* If we get an error and potentially restart the system
* call, we're screwed because copy_thread() clobbered
* the parent's %o1. So detect that case and restore it
* here.
*/
if ((unsigned long)ret >= -ERESTART_RESTARTBLOCK)
regs->u_regs[UREG_I1] = orig_i1;

return ret;
return do_fork(clone_flags, stack_start,
regs, stack_size,
parent_tid_ptr, child_tid_ptr);
}

/* Copy a Sparc thread. The fork() return value conventions
Expand Down
27 changes: 22 additions & 5 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,14 +865,21 @@ void smp_call_function_client(int irq, struct pt_regs *regs)
void *info = call_data->info;

clear_softint(1 << irq);

irq_enter();

if (!call_data->wait) {
/* let initiator proceed after getting data */
atomic_inc(&call_data->finished);
}

func(info);

irq_exit();

if (call_data->wait) {
/* let initiator proceed only after completion */
func(info);
atomic_inc(&call_data->finished);
} else {
/* let initiator proceed after getting data */
atomic_inc(&call_data->finished);
func(info);
}
}

Expand Down Expand Up @@ -1034,14 +1041,18 @@ void smp_receive_signal(int cpu)

void smp_receive_signal_client(int irq, struct pt_regs *regs)
{
irq_enter();
clear_softint(1 << irq);
irq_exit();
}

void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
{
struct mm_struct *mm;
unsigned long flags;

irq_enter();

clear_softint(1 << irq);

/* See if we need to allocate a new TLB context because
Expand All @@ -1061,6 +1072,8 @@ void smp_new_mmu_context_version_client(int irq, struct pt_regs *regs)
load_secondary_context(mm);
__flush_tlb_mm(CTX_HWBITS(mm->context),
SECONDARY_CONTEXT);

irq_exit();
}

void smp_new_mmu_context_version(void)
Expand Down Expand Up @@ -1226,6 +1239,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
{
clear_softint(1 << irq);

irq_enter();

preempt_disable();

__asm__ __volatile__("flushw");
Expand All @@ -1238,6 +1253,8 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
prom_world(0);

preempt_enable();

irq_exit();
}

/* /proc/profile writes can call this, don't __init it please. */
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sparc64/kernel/sys_sparc.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,13 @@ int sparc64_mmap_check(unsigned long addr, unsigned long len,
if (len >= STACK_TOP32)
return -EINVAL;

if (addr > STACK_TOP32 - len)
if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len)
return -EINVAL;
} else {
if (len >= VA_EXCLUDE_START)
return -EINVAL;

if (invalid_64bit_range(addr, len))
if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len))
return -EINVAL;
}

Expand Down
31 changes: 31 additions & 0 deletions trunk/arch/sparc64/kernel/sys_sparc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ asmlinkage long sys32_getegid16(void)

/* 32-bit timeval and related flotsam. */

static long get_tv32(struct timeval *o, struct compat_timeval __user *i)
{
return (!access_ok(VERIFY_READ, i, sizeof(*i)) ||
(__get_user(o->tv_sec, &i->tv_sec) |
__get_user(o->tv_usec, &i->tv_usec)));
}

static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
{
return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
Expand Down Expand Up @@ -750,6 +757,30 @@ asmlinkage long sys32_settimeofday(struct compat_timeval __user *tv,
return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
}

asmlinkage long sys32_utimes(char __user *filename,
struct compat_timeval __user *tvs)
{
struct timespec tv[2];

if (tvs) {
struct timeval ktvs[2];
if (get_tv32(&ktvs[0], tvs) ||
get_tv32(&ktvs[1], 1+tvs))
return -EFAULT;

if (ktvs[0].tv_usec < 0 || ktvs[0].tv_usec >= 1000000 ||
ktvs[1].tv_usec < 0 || ktvs[1].tv_usec >= 1000000)
return -EINVAL;

tv[0].tv_sec = ktvs[0].tv_sec;
tv[0].tv_nsec = 1000 * ktvs[0].tv_usec;
tv[1].tv_sec = ktvs[1].tv_sec;
tv[1].tv_nsec = 1000 * ktvs[1].tv_usec;
}

return do_utimes(AT_FDCWD, filename, tvs ? tv : NULL, 0);
}

/* These are here just in case some old sparc32 binary calls it. */
asmlinkage long sys32_pause(void)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc64/kernel/systbls.S
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sys_call_table32:
/*120*/ .word compat_sys_readv, compat_sys_writev, sys32_settimeofday, sys32_fchown16, sys_fchmod
.word sys_nis_syscall, sys32_setreuid16, sys32_setregid16, sys_rename, sys_truncate
/*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64
.word sys_nis_syscall, sys32_mkdir, sys_rmdir, sys32_utimes, compat_sys_stat64
/*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit
.word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write
/*150*/ .word sys_nis_syscall, sys_inotify_init, sys_inotify_add_watch, sys_poll, sys_getdents64
Expand Down
Loading

0 comments on commit 67ddf56

Please sign in to comment.