mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: John Rigg <lk@sound-man.co.uk>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: 2.6.14-rc3-rt10 crashes on boot
Date: Fri, 7 Oct 2005 15:42:48 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0510071538380.8980@localhost.localdomain> (raw)
In-Reply-To: <E1ENxei-0001C9-F7@localhost.localdomain>


John, Please don't strip the CC list.  Ingo may want to see what's
happening, and besides, it's not proper netiquette for LKML.

On Fri, 7 Oct 2005, John Rigg wrote:

> On Friday, October 7 Steve Rostedt wrote:
>
> >Add this patch and it will add the option for you in x86_64 (I forgot that
> >you were using that).  I even set it to be default on. I didn't add a test
> >in do_IRQ, but I believe that the tests in latency.c should be good
> >enough.
>
> Hi Steve,
>
> Thanks for the patch. I applied it to 2.6.14-rc3-rt12, looked in
> arch/x86_64/Kconfig.debug just to be sure it applied OK to -rt12,
> then ran make. It failed to compile, with the following message:
>
>   CC      kernel/rt.o
>   CC      kernel/latency.o
> kernel/latency.c: In function '__print_worst_stack':
> kernel/latency.c:336: warning: format '%d' expects type 'int', but argument 5 has type 'long unsigned int'
> kernel/latency.c:384:3: error: #error Poke the author of above asm code line !
> kernel/latency.c: In function 'debug_stackoverflow':
> kernel/latency.c:386: error: 'STACK_WARN' undeclared (first use in this function)
> kernel/latency.c:386: error: (Each undeclared identifier is reported only once
> kernel/latency.c:386: error: for each function it appears in.)
> make[1]: *** [kernel/latency.o] Error 1
> make: *** [kernel] Error 2
>
> I wonder if DEBUG_STACKOVERFLOW was left out of x86_64 for this reason.
>

Here's an addon patch to my last one.  I don't know x86_64 very well, but
I believe the the asm is pretty much the same, so this patch removes the
check for __i386__ and also defines STACK_WARN.

I'm leaving for the weekend, so you are now on your own. Unless you get
help from others. ;-)

-- Steve

Index: linux-rt-quilt/include/asm-x86_64/page.h
===================================================================
--- linux-rt-quilt.orig/include/asm-x86_64/page.h	2005-10-06 08:04:00.000000000 -0400
+++ linux-rt-quilt/include/asm-x86_64/page.h	2005-10-07 15:34:20.000000000 -0400
@@ -21,6 +21,8 @@
 #endif
 #define CURRENT_MASK (~(THREAD_SIZE-1))

+#define STACK_WARN             (THREAD_SIZE/8)
+
 #define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
 #define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)

Index: linux-rt-quilt/kernel/latency.c
===================================================================
--- linux-rt-quilt.orig/kernel/latency.c	2005-10-06 08:04:56.000000000 -0400
+++ linux-rt-quilt/kernel/latency.c	2005-10-07 15:31:20.000000000 -0400
@@ -377,7 +377,8 @@
 	atomic_inc(&tr->disabled);

 	/* Debugging check for stack overflow: is there less than 1KB free? */
-#ifdef __i386__
+#if 1 // def __i386__
+	/* Hopefully this works on x86_64!  */
 	__asm__ __volatile__("andl %%esp,%0" :
 				"=r" (stack_left) : "0" (THREAD_SIZE - 1));
 #else

       reply	other threads:[~2005-10-07 19:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1ENxei-0001C9-F7@localhost.localdomain>
2005-10-07 19:42 ` Steven Rostedt [this message]
2005-10-11 10:55   ` Ingo Molnar
     [not found] <E1EOe3U-00018A-Fy@localhost.localdomain>
2005-10-11 11:17 ` Ingo Molnar
2005-10-09 16:30 John Rigg
  -- strict thread matches above, loose matches on Subject: below --
2005-10-09 16:28 John Rigg
2005-10-07 19:16 John Rigg
2005-10-07 15:11 John Rigg
2005-10-07 15:48 ` Steven Rostedt
2005-10-07  0:37 John Rigg
2005-10-07  6:36 ` Steven Rostedt
2005-10-07 11:43   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0510071538380.8980@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@sound-man.co.uk \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®