13 Jan, 2012

1 commit

  • Use the more commonly used __noreturn instead of ATTRIB_NORETURN.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joe Perches
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Acked-by: Geert Uytterhoeven
    Acked-by: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

18 Aug, 2010

1 commit

  • Make do_execve() take a const filename pointer so that kernel_execve() compiles
    correctly on ARM:

    arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type

    This also requires the argv and envp arguments to be consted twice, once for
    the pointer array and once for the strings the array points to. This is
    because do_execve() passes a pointer to the filename (now const) to
    copy_strings_kernel(). A simpler alternative would be to cast the filename
    pointer in do_execve() when it's passed to copy_strings_kernel().

    do_execve() may not change any of the strings it is passed as part of the argv
    or envp lists as they are some of them in .rodata, so marking these strings as
    const should be fine.

    Further kernel_execve() and sys_execve() need to be changed to match.

    This has been test built on x86_64, frv, arm and mips.

    Signed-off-by: David Howells
    Tested-by: Ralf Baechle
    Acked-by: Russell King
    Signed-off-by: Linus Torvalds

    David Howells
     

14 Aug, 2010

1 commit

  • Mark arguments to certain system calls as being const where they should be but
    aren't. The list includes:

    (*) The filename arguments of various stat syscalls, execve(), various utimes
    syscalls and some mount syscalls.

    (*) The filename arguments of some syscall helpers relating to the above.

    (*) The buffer argument of various write syscalls.

    Signed-off-by: David Howells
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    David Howells
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

23 Mar, 2010

1 commit


02 Feb, 2010

1 commit


30 Jan, 2010

1 commit

  • 'flush_old_exec()' is the point of no return when doing an execve(), and
    it is pretty badly misnamed. It doesn't just flush the old executable
    environment, it also starts up the new one.

    Which is very inconvenient for things like setting up the new
    personality, because we want the new personality to affect the starting
    of the new environment, but at the same time we do _not_ want the new
    personality to take effect if flushing the old one fails.

    As a result, the x86-64 '32-bit' personality is actually done using this
    insane "I'm going to change the ABI, but I haven't done it yet" bit
    (TIF_ABI_PENDING), with SET_PERSONALITY() not actually setting the
    personality, but just the "pending" bit, so that "flush_thread()" can do
    the actual personality magic.

    This patch in no way changes any of that insanity, but it does split the
    'flush_old_exec()' function up into a preparatory part that can fail
    (still called flush_old_exec()), and a new part that will actually set
    up the new exec environment (setup_new_exec()). All callers are changed
    to trivially comply with the new world order.

    Signed-off-by: H. Peter Anvin
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

20 Jan, 2010

1 commit

  • This provides a machine_ops-based reboot interface loosely cloned from
    x86, and converts the native sh32 and sh64 cases over to it.

    Necessary both for tying in SMP support and also enabling platforms like
    SDK7786 to add support for their microcontroller-based power managers.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

19 Jan, 2010

1 commit


15 Dec, 2009

1 commit


27 Oct, 2009

1 commit


04 Aug, 2009

1 commit


19 Jun, 2009

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (56 commits)
    sh: Fix declaration of __kernel_sigreturn and __kernel_rt_sigreturn
    sh: Enable soc-camera in ap325rxa/migor/se7724 defconfigs.
    sh: remove stray markers.
    sh: defconfig updates.
    sh: pci: Initial PCI-Express support for SH7786 Urquell board.
    sh: Generic HAVE_PERF_COUNTER support.
    SH: convert migor to soc-camera as platform-device
    SH: convert ap325rxa to soc-camera as platform-device
    soc-camera: unify i2c camera device platform data
    sh: add platform data for r8a66597-hcd in setup-sh7723
    sh: add platform data for r8a66597-hcd in setup-sh7366
    sh: x3proto: add platform data for r8a66597-hcd
    sh: highlander: add platform data for r8a66597-hcd
    sh: sh7785lcr: add platform data for r8a66597-hcd
    sh: turn off irqs when disabling CMT/TMU timers
    sh: use kzalloc() for cpg clocks
    sh: unbreak WARN_ON()
    sh: Use generic atomic64_t implementation.
    sh: Revised clock function in highlander
    sh: Update r7780mp defconfig
    ...

    Linus Torvalds
     
  • avr32, mn10300, parisc, s390, sh, xtensa:

    They never set PT_DTRACE, but clear it after do_execve().

    Signed-off-by: Oleg Nesterov
    Cc: David Howells
    Acked-by: Kyle McMartin
    Cc: Grant Grundler
    Cc: Matthew Wilcox
    Acked-by: Martin Schwidefsky
    Cc: Heiko Carstens
    Acked-by: Paul Mundt
    Acked-by: Chris Zankel
    Acked-by: Roland McGrath
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

18 Jun, 2009

1 commit

  • arch/sh has a couple of stray markers without any users introduced
    in commit 3d58695edbfac785161bf282dc11fd42a483d6c9. Remove them in
    preparation of removing the markers in favour of the TRACE_EVENT
    macro (and also because we don't keep dead code around).

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Paul Mundt

    Christoph Hellwig
     

03 Apr, 2009

1 commit


21 Jan, 2009

1 commit


22 Dec, 2008

3 commits


21 Sep, 2008

1 commit

  • This implements a few trace points across events that are deemed
    interesting. This implements a number of trace points:

    - The page fault handler / TLB miss
    - IPC calls
    - Kernel thread creation

    The original LTTng patch had the slow-path instrumented, which
    fails to account for the vast majority of events. In general
    placing this in the fast-path is not a huge performance hit, as
    we don't take page faults for kernel addresses.

    The other bits of interest are some of the other trap handlers, as
    well as the syscall entry/exit (which is better off being handled
    through the tracehook API). Most of the other trap handlers are corner
    cases where alternate means of notification exist, so there is little
    value in placing extra trace points in these locations.

    Based on top of the points provided both by the LTTng instrumentation
    patch as well as the patch shipping in the ST-Linux tree, albeit in a
    stripped down form.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

08 Sep, 2008

1 commit


28 Jul, 2008

1 commit

  • This patch contains the following cleanups:
    - make the following needlessly global code static:
    - cf-enabler.c: cf_init()
    - cpu/clock.c: __clk_enable()
    - cpu/clock.c: __clk_disable()
    - process_32.c: default_idle()
    - time_32.c: struct clocksource_sh
    - timers/timer-tmu.c: struct tmu_timer_ops
    - remove the following unused functions (no CONFIG_BLK_DEV_FD on sh):
    - process_{32,64}.c: disable_hlt()
    - process_{32,64}.c: enable_hlt()

    Signed-off-by: Adrian Bunk
    Signed-off-by: Paul Mundt

    Adrian Bunk
     

16 Apr, 2008

1 commit

  • This patch fixes some compile errors due to missing save_fpu()
    prototypes on sh64 caused by
    commit 9bbafce2eec190ef7e44b0eb1095ba17ce6ad3af
    (sh: Fix occasional FPU register corruption under preempt).

    Signed-off-by: Adrian Bunk
    Signed-off-by: Paul Mundt

    Adrian Bunk
     

14 Feb, 2008

1 commit


28 Jan, 2008

7 commits