19 Jun, 2009

1 commit

  • 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
     

03 Apr, 2009

1 commit


17 Dec, 2008

1 commit


09 Oct, 2008

1 commit


05 Aug, 2008

1 commit


19 Jul, 2008

1 commit

  • Jack Ren and Eric Miao tracked down the following long standing
    problem in the NOHZ code:

    scheduler switch to idle task
    enable interrupts

    Window starts here

    ----> interrupt happens (does not set NEED_RESCHED)
    irq_exit() stops the tick

    ----> interrupt happens (does set NEED_RESCHED)

    return from schedule()

    cpu_idle(): preempt_disable();

    Window ends here

    The interrupts can happen at any point inside the race window. The
    first interrupt stops the tick, the second one causes the scheduler to
    rerun and switch away from idle again and we end up with the tick
    disabled.

    The fact that it needs two interrupts where the first one does not set
    NEED_RESCHED and the second one does made the bug obscure and extremly
    hard to reproduce and analyse. Kudos to Jack and Eric.

    Solution: Limit the NOHZ functionality to the idle loop to make sure
    that we can not run into such a situation ever again.

    cpu_idle()
    {
    preempt_disable();

    while(1) {
    tick_nohz_stop_sched_tick(1); ,
    Debugged-by: eric miao
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

20 Apr, 2008

2 commits


27 Feb, 2008

1 commit

  • Iff the parent has TIF_DEBUG set, _and_ clone_flags includes
    CLONE_PTRACE we should set the TIF_DEBUG flag for the child and
    increment the ocd refcount. Otherwise, the TIF_DEBUG flag must be
    unset.

    Currently, the child inherits TIF_DEBUG from the parent before
    copy_thread is called, so TIF_DEBUG may be already be set before we
    determine whether the child is supposed to inherit debugging
    capabilities from the parent or not. This means that ocd_enable()
    won't increment the refcount, because TIF_DEBUG is already set, and
    that TIF_DEBUG will be set for processes that aren't being debugged.

    This leads to a refcounting asymmetry, which may show up as

    ------------[ cut here ]------------
    Badness at arch/avr32/kernel/ocd.c:73
    PC is at ocd_disable+0x34/0x60
    LR is at put_lock_stats+0xa/0x20

    as reported by David Brownell. Happens when strace'ing a process that
    forks a new child process, e.g. "strace mount -tjffs2 mtd1 /mnt", and
    subsequently killing the child process (e.g. "umount /mnt".)

    Signed-off-by: Haavard Skinnemoen

    Haavard Skinnemoen
     

15 Feb, 2008

1 commit


25 Jan, 2008

1 commit

  • Keep track of processes being debugged (including the kernel itself)
    and turn the OCD system on and off as appropriate. Since enabling
    debugging turns off some optimizations in the CPU core, this fixes the
    issue that enabling KProbes support or simply running a program under
    gdbserver will reduce system performance significantly until the next
    reboot.

    The CPU performance will still be reduced for all processes while a
    process is being debugged, but this is a lot better than reducing the
    performance forever.

    Signed-off-by: Haavard Skinnemoen

    Haavard Skinnemoen
     

07 Dec, 2007

2 commits

  • Generate a new set of OCD register definitions in asm/ocd.h and rename
    __mfdr() and __mtdr() to ocd_read() and ocd_write() respectively.

    The bitfield definitions are a lot more complete now, and they are
    entirely based on bit numbers, not masks. This is because OCD
    registers are frequently accessed from assembly code, where bit
    numbers are a lot more useful (can be fed directly to sbr, bfins,
    etc.)

    Bitfields that consist of more than one bit have two definitions:
    _START, which indicates the number of the first bit, and _SIZE, which
    indicates the number of bits. These directly correspond to the
    parameters taken by the bfextu, bfexts and bfins instructions.

    Signed-off-by: Haavard Skinnemoen

    Haavard Skinnemoen
     
  • The 'H' bit is bit 29, while the 'R' bit doesn't exist. Luckily, we
    don't actually use any of the bits in question.

    Also update show_regs() to show the Debug Mask and Debug state bits.

    Signed-off-by: Haavard Skinnemoen

    Haavard Skinnemoen
     

10 May, 2007

1 commit

  • Recently a few direct accesses to the thread_info in the task structure snuck
    back, so this wraps them with the appropriate wrapper.

    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roman Zippel
     

27 Apr, 2007

2 commits

  • * Use generic BUG() handling
    * Remove some useless debug statements
    * Use a common function _exception() to send signals or oops when
    an exception can't be handled. This makes sure init doesn't
    enter an infinite exception loop as well. Borrowed from powerpc.
    * Add some basic exception tracing support to the page fault code.
    * Rework dump_stack(), show_regs() and friends and move everything
    into process.c
    * Print information about configuration options and chip type when
    oopsing

    Signed-off-by: Haavard Skinnemoen

    Haavard Skinnemoen
     
  • This patch puts the CPU in sleep 0 when doing nothing, idle. This will
    turn of the CPU clock and thus save power. The CPU is waken again when
    an interrupt occurs.

    Signed-off-by: Hans-Christian Egtvedt
    Signed-off-by: Haavard Skinnemoen

    Hans-Christian Egtvedt
     

08 Dec, 2006

1 commit


26 Sep, 2006

1 commit

  • This adds support for the Atmel AVR32 architecture as well as the AT32AP7000
    CPU and the AT32STK1000 development board.

    AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for
    cost-sensitive embedded applications, with particular emphasis on low power
    consumption and high code density. The AVR32 architecture is not binary
    compatible with earlier 8-bit AVR architectures.

    The AVR32 architecture, including the instruction set, is described by the
    AVR32 Architecture Manual, available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf

    The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It
    features a 7-stage pipeline, 16KB instruction and data caches and a full
    Memory Management Unit. It also comes with a large set of integrated
    peripherals, many of which are shared with the AT91 ARM-based controllers from
    Atmel.

    Full data sheet is available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf

    while the CPU core implementation including caches and MMU is documented by
    the AVR32 AP Technical Reference, available from

    http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf

    Information about the AT32STK1000 development board can be found at

    http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918

    including a BSP CD image with an earlier version of this patch, development
    tools (binaries and source/patches) and a root filesystem image suitable for
    booting from SD card.

    Alternatively, there's a preliminary "getting started" guide available at
    http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links
    to the sources and patches you will need in order to set up a cross-compiling
    environment for avr32-linux.

    This patch, as well as the other patches included with the BSP and the
    toolchain patches, is actively supported by Atmel Corporation.

    [dmccr@us.ibm.com: Fix more pxx_page macro locations]
    [bunk@stusta.de: fix `make defconfig']
    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Adrian Bunk
    Signed-off-by: Dave McCracken
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen