25 May, 2011

1 commit

  • Most arches define CONFIG_DEBUG_STACK_USAGE exactly the same way. Move it
    to lib/Kconfig.debug so each arch doesn't have to define it. This
    obviously makes the option generic, but that's fine because the config is
    already used in generic code.

    It's not obvious to me that sysrq-P actually does anything caution by
    keeping the most inclusive wording.

    Signed-off-by: Stephen Boyd
    Cc: Chris Metcalf
    Acked-by: David S. Miller
    Acked-by: Richard Weinberger
    Acked-by: Mike Frysinger
    Cc: Russell King
    Cc: Hirokazu Takata
    Acked-by: Ralf Baechle
    Cc: Paul Mackerras
    Acked-by: Benjamin Herrenschmidt
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

31 Mar, 2011

1 commit


15 Dec, 2009

1 commit

  • Now when the sh-sci driver can do early serial output,
    get rid of the old duplicated code. This patch is V2 and
    removes support for "earlyprintk=serial" together with
    the following kconfig options:
    CONFIG_EARLY_SCIF_CONSOLE
    CONFIG_EARLY_SCIF_CONSOLE_PORT
    CONFIG_EARLY_PRINTK

    With this patch applied "earlyprintk=" support is always
    built-in the SuperH kernel. For this to work the serial
    driver must have early platform support and in the case
    of sh-sci the serial console needs to be enabled:
    CONFIG_SERIAL_SH_SCI_CONSOLE=y

    So after enabling the SuperH SCI console kconfig option
    you also need to point out port using the kernel command
    line: "earlyprintk=sh-sci.N[,baudrate][,keep]"

    Remember that clocks may be disabled by the boot loader
    so you may have to do some board specific static clock
    setup before earlyprintk will work on your platform.

    Signed-off-by: Magnus Damm
    Signed-off-by: Paul Mundt

    Magnus Damm
     

21 Aug, 2009

1 commit


14 Aug, 2009

1 commit

  • This is a first cut at a generic DWARF unwinder for the kernel. It's
    still lacking DWARF64 support and the DWARF expression support hasn't
    been tested very well but it is generating proper stacktraces on SH for
    WARN_ON() and NULL dereferences.

    Signed-off-by: Matt Fleming
    Signed-off-by: Paul Mundt

    Matt Fleming
     

04 Aug, 2009

1 commit


29 Jul, 2009

1 commit

  • This cleans up the irqflags tracing code quite a bit and ties it
    in to various missing callsites that caused an imbalance when
    CONFIG_PROVE_LOCKING was enabled.

    Previously this was catching on:

    987 #ifdef CONFIG_PROVE_LOCKING
    988 DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
    989 DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
    990 #endif
    991 retval = -EAGAIN;

    with hardirqs being doubly enabled, and subsequently bailing out
    with the following call trace:

    Call trace:
    [] __lock_acquire+0x616/0x6a6
    [] do_fork+0xf8/0x2b0
    [] trace_hardirqs_on_caller+0xd4/0x114
    [] _spin_unlock_irq+0x20/0x64
    [] __lock_acquire+0x616/0x6a6
    [] kernel_thread+0x48/0x70
    [] ____call_usermodehelper+0x0/0x110
    [] ____call_usermodehelper+0x0/0x110
    [] kernel_thread_helper+0x0/0x14
    [] __call_usermodehelper+0x38/0x70
    [] worker_thread+0x150/0x274
    [] lock_release+0x0/0x198
    [] __call_usermodehelper+0x0/0x70
    [] autoremove_wake_function+0x0/0x30
    [] kthread+0x3e/0x70
    [] worker_thread+0x0/0x274
    [] kernel_thread_helper+0x8/0x14
    [] kthread+0x0/0x70
    [] kernel_thread_helper+0x0/0x14

    Reported-by: Nobuhiro Iwamatsu
    Signed-off-by: Stuart Menefy
    Signed-off-by: Matt Fleming
    Signed-off-by: Paul Mundt

    Stuart Menefy
     

11 Jul, 2009

3 commits

  • STACK_DEBUG ties in to mcount in order to do function-granular stack
    overflow checks as opposed to lazily checking from IRQ context. As the
    default is nohz, the frequency of overflow checking is too irregular to
    catch much useful information, and so the mcount approach employed by
    sparc64 is adopted instead.

    This kills off the old check entirely from the do_IRQ() path and now
    adopts CONFIG_MCOUNT instead.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This adds a general CONFIG_MCOUNT in order to permit mcount generation
    without ftrace support. This is primarily for allowing platforms to
    enable aggressive stack overflow checking without having to enable ftrace
    support. Based on the sparc64 implementation.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Enable kernel stack checking code in both the dynamic ftrace and mcount
    code paths. Check the stack to see if it's overflowing and make sure
    that the stack pointer contains an address that's either in init_stack
    or after the bss.

    Signed-off-by: Matt Fleming
    Signed-off-by: Paul Mundt

    Matt Fleming
     

25 Jun, 2009

1 commit


16 Jun, 2009

1 commit


08 May, 2009

3 commits


07 May, 2009

1 commit


22 Dec, 2008

5 commits


20 Sep, 2008

1 commit

  • This combination triggers a divide by zero in kernel/fork.c when
    calculating the initial max_threads value:

    max_threads = mempages / (8 * THREAD_SIZE / PAGE_SIZE);

    Simply disable 4K stacks on 64kB PAGE_SIZE to work around this,
    as it's not a terribly useful combination to begin with.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

04 Aug, 2008

1 commit


28 Jul, 2008

1 commit


02 Jun, 2008

1 commit


08 May, 2008

1 commit


19 Apr, 2008

1 commit


14 Feb, 2008

3 commits


28 Jan, 2008

7 commits


07 Nov, 2007

2 commits


02 Nov, 2007

1 commit

  • While using separate IRQ stacks can cut down on stack consumption,
    many users can also use 4k stacks directly without the additional
    need of separate stacks for soft and hardirqs.

    With this split, we support the same rationale for 4KSTACKS as
    m68knommu, with the IRQSTACKS abstraction as per ppc64.

    Signed-off-by: Paul Mundt

    Paul Mundt