13 Sep, 2008

1 commit


11 Sep, 2008

1 commit


29 Aug, 2008

1 commit


28 Aug, 2008

1 commit


25 Aug, 2008

1 commit


13 Aug, 2008

2 commits


08 Aug, 2008

1 commit


07 Aug, 2008

1 commit


01 Aug, 2008

1 commit


31 Jul, 2008

3 commits

  • We already have code that does this, but it is only currently attached
    to sysrq-'y'.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Record one more level of stack frame program counter.

    Particularly when lockdep and all sorts of spinlock debugging is
    enabled, figuring out the caller of spin_lock() is difficult when the
    cpu is stuck on the lock.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Correct sparc64's implementation of FUTEX_OP_ANDN to do a
    bitwise negate of the oparg parameter before applying the
    AND operation. All other archs that support FUTEX_OP_ANDN
    either negate oparg explicitly (frv, ia64, mips, sh, x86),
    or do so indirectly by using an and-not instruction (powerpc).
    Since sparc64 has and-not, I chose to use that solution.

    I've not found any use of FUTEX_OP_ANDN in glibc so the
    impact of this bug is probably minor. But other user-space
    components may try to use it so it should still get fixed.

    Signed-off-by: Mikael Pettersson
    Signed-off-by: David S. Miller

    Mikael Pettersson
     

30 Jul, 2008

2 commits


28 Jul, 2008

10 commits


26 Jul, 2008

3 commits


25 Jul, 2008

2 commits

  • This patch introduces the new syscall pipe2 which is like pipe but it also
    takes an additional parameter which takes a flag value. This patch implements
    the handling of O_CLOEXEC for the flag. I did not add support for the new
    syscall for the architectures which have a special sys_pipe implementation. I
    think the maintainers of those archs have the chance to go with the unified
    implementation but that's up to them.

    The implementation introduces do_pipe_flags. I did that instead of changing
    all callers of do_pipe because some of the callers are written in assembler.
    I would probably screw up changing the assembly code. To avoid breaking code
    do_pipe is now a small wrapper around do_pipe_flags. Once all callers are
    changed over to do_pipe_flags the old do_pipe function can be removed.

    The following test must be adjusted for architectures other than x86 and
    x86-64 and in case the syscall numbers changed.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #include
    #include
    #include
    #include

    #ifndef __NR_pipe2
    # ifdef __x86_64__
    # define __NR_pipe2 293
    # elif defined __i386__
    # define __NR_pipe2 331
    # else
    # error "need __NR_pipe2"
    # endif
    #endif

    int
    main (void)
    {
    int fd[2];
    if (syscall (__NR_pipe2, fd, 0) != 0)
    {
    puts ("pipe2(0) failed");
    return 1;
    }
    for (int i = 0; i < 2; ++i)
    {
    int coe = fcntl (fd[i], F_GETFD);
    if (coe == -1)
    {
    puts ("fcntl failed");
    return 1;
    }
    if (coe & FD_CLOEXEC)
    {
    printf ("pipe2(0) set close-on-exit for fd[%d]\n", i);
    return 1;
    }
    }
    close (fd[0]);
    close (fd[1]);

    if (syscall (__NR_pipe2, fd, O_CLOEXEC) != 0)
    {
    puts ("pipe2(O_CLOEXEC) failed");
    return 1;
    }
    for (int i = 0; i < 2; ++i)
    {
    int coe = fcntl (fd[i], F_GETFD);
    if (coe == -1)
    {
    puts ("fcntl failed");
    return 1;
    }
    if ((coe & FD_CLOEXEC) == 0)
    {
    printf ("pipe2(O_CLOEXEC) does not set close-on-exit for fd[%d]\n", i);
    return 1;
    }
    }
    close (fd[0]);
    close (fd[1]);

    puts ("OK");

    return 0;
    }
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Signed-off-by: Ulrich Drepper
    Acked-by: Davide Libenzi
    Cc: Michael Kerrisk
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     
  • free_area_init_node() gets passed in the node id as well as the node
    descriptor. This is redundant as the function can trivially get the node
    descriptor itself by means of NODE_DATA() and the node's id.

    I checked all the users and NODE_DATA() seems to be usable everywhere
    from where this function is called.

    Signed-off-by: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

23 Jul, 2008

1 commit


19 Jul, 2008

1 commit


18 Jul, 2008

6 commits

  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Fix allnoconfig build error.

    Signed-off-by: Robert Reif
    Signed-off-by: David S. Miller

    Robert Reif
     
  • This changes arch/sparc/kernel/apc.c to use unlocked_ioctl

    Signed-off-by: Stoyan Gaydarov
    Signed-off-by: David S. Miller

    Stoyan Gaydarov
     
  • sparc64 exports openprom.h to userspace so let sparc follow
    the example.
    As openprom.h pulled in another not-for-export vaddrs.h header
    file it required a few changes to fix the build.

    The definition af VMALLOC_* were moved to pgtable as this is
    where sparc64 has them.

    Signed-off-by: Sam Ravnborg

    Sam Ravnborg
     
  • This patch contains the following possible cleanups:
    - make the following needlessly global code static:
    - fault.c: force_user_fault()
    - init.c: calc_max_low_pfn()
    - init.c: pgt_cache_water[]
    - init.c: map_high_region()
    - srmmu.c: hwbug_bitmask
    - srmmu.c: srmmu_swapper_pg_dir
    - srmmu.c: srmmu_context_table
    - srmmu.c: is_hypersparc
    - srmmu.c: srmmu_cache_pagetables
    - srmmu.c: srmmu_nocache_size
    - srmmu.c: srmmu_nocache_end
    - srmmu.c: srmmu_get_nocache()
    - srmmu.c: srmmu_free_nocache()
    - srmmu.c: srmmu_early_allocate_ptable_skeleton()
    - srmmu.c: srmmu_nocache_calcsize()
    - srmmu.c: srmmu_nocache_init()
    - srmmu.c: srmmu_alloc_thread_info()
    - srmmu.c: early_pgtable_allocfail()
    - srmmu.c: srmmu_early_allocate_ptable_skeleton()
    - srmmu.c: srmmu_allocate_ptable_skeleton()
    - srmmu.c: srmmu_inherit_prom_mappings()
    - sunami.S: tsunami_copy_1page
    - remove the following unused code:
    - init.c: struct sparc_aliases

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     
  • This patch contains the following possible cleanups:
    - make the following needlessly global code static:
    - apc.c: apc_swift_idle()
    - ebus.c: ebus_blacklist_irq()
    - ebus.c: fill_ebus_child()
    - ebus.c: fill_ebus_device()
    - entry.S: syscall_is_too_hard
    - etra: tsetup_sun4c_stackchk
    - head.S: cputyp
    - head.S: prom_vector_p
    - idprom.c: Sun_Machines[]
    - ioport.c: _sparc_find_resource()
    - ioport.c: create_proc_read_entry()
    - irq.c: struct sparc_irq[]
    - rtrap.S: sun4c_rett_stackchk
    - setup.c: prom_sync_me()
    - setup.c: boot_flags
    - sun4c_irq.c: sun4c_sbint_to_irq()
    - sun4d_irq.c: sbus_tid[]
    - sun4d_irq.c: struct sbus_actions
    - sun4d_irq.c: sun4d_sbint_to_irq()
    - sun4m_irq.c: sun4m_sbint_to_irq()
    - sun4m_irq.c: sun4m_get_irqmask()
    - sun4m_irq.c: sun4m_timers
    - sun4m_smp.c: smp4m_cross_call()
    - sun4m_smp.c: smp4m_blackbox_id()
    - sun4m_smp.c: smp4m_blackbox_current()
    - time.c: sp_clock_typ
    - time.c: sbus_time_init()
    - traps.c: instruction_dump()
    - wof.S: spwin_sun4c_stackchk
    - wuf.S: sun4c_fwin_stackchk
    - #if 0 the following unused code:
    - process.c: sparc_backtrace_lock
    - process.c: __show_backtrace()
    - process.c: show_backtrace()
    - process.c: smp_show_backtrace_all_cpus()
    - remove the following unused code:
    - entry.S: __handle_exception
    - smp.c: smp_num_cpus
    - smp.c: smp_activated
    - smp.c: __cpu_number_map[]
    - smp.c: __cpu_logical_map[]
    - smp.c: bitops_spinlock
    - traps.c: trap_curbuf
    - traps.c: trapbuf[]
    - traps.c: linux_smp_still_initting
    - traps.c: thiscpus_tbr
    - traps.c: thiscpus_mid

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     

15 Jul, 2008

1 commit


03 Jul, 2008

1 commit