public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Pavel Machek <pavel@suse.cz>,
	Marcin Slusarz <marcin.slusarz@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	Nigel Cunningham <nigel@nigel.suspend2.net>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: ftraced and suspend to ram
Date: Fri, 22 Aug 2008 23:11:54 +0200	[thread overview]
Message-ID: <200808222311.55236.rjw@sisk.pl> (raw)
In-Reply-To: <alpine.DEB.1.10.0808221651350.15941@gandalf.stny.rr.com>

On Friday, 22 of August 2008, Steven Rostedt wrote:
> 
> On Fri, 22 Aug 2008, Rafael J. Wysocki wrote:
> > > > tracing. Certainly all the assembly functions.
> > > 
> > > I'm looking into that now too. Are the functions in arch/x86/power/cpu*.c 
> > > the suspend to ram code?
> > 
> > They contain code executed during suspend to RAM, but such code is also:
> > - in all files under arch/x86/kernel/acpi/
> > - in main.c, console.c under kernel/power
> > - in all files under drivers/acpi/sleep
> > - in drivers/acpi/hardware/hwsleep.c
> > 
> > Generally, ACPI is heavily involved and I'm not the right person to ask which
> > of the ACPI functions should get the 'notrace' thing.  Also, I'm not sure about
> > the device drivers' ->suspend() and ->resume() callbacks, especially for
> > sysdevs and ->suspend_late(), ->resume_early() for platform devices and PCI.
> > 
> > Well, how exactly suspend to RAM is broken by ftrace?
> > 
> 
> I know that the smp_processor_id may be defined in the %fs register, but 
> if ftrace is called before the %fs is set up, it may crash because it 
> uses smp_processor_id.

The wake-up code is the most interesting for you, then.  It's located in
arch/x86/kernel/acpi/ , but on x86-64 it also uses trampoline code in
trampoline_64.S (this is assembly, though).

On x86-64, wakeup_long64 in wakeup_64.S is where we get from the real-mode
wake-up code, but under arch/x86/kernel/acpi/realmode there are some C files
containing functions executed in real mode.  Everything in there and everything
referred to from there should be 'notrace' IMO.

Thanks,
Rafael


  reply	other threads:[~2008-08-22 21:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 15:49 ftraced and suspend to ram Steven Rostedt
2008-08-21 18:15 ` Rafael J. Wysocki
2008-08-21 18:26   ` Steven Rostedt
2008-08-21 18:37     ` Rafael J. Wysocki
2008-08-21 19:59       ` Rafael J. Wysocki
2008-08-22  4:46         ` Ingo Molnar
2008-08-22  7:23           ` Pavel Machek
2008-08-22 10:35             ` Marcin Slusarz
2008-08-22 10:46               ` Pavel Machek
2008-08-22 20:33                 ` Steven Rostedt
2008-08-22 20:52                   ` Rafael J. Wysocki
2008-08-22 20:55                     ` Steven Rostedt
2008-08-22 21:11                       ` Rafael J. Wysocki [this message]
2008-08-27 13:14                       ` [PATCH] ftrace: disable tracing for " Steven Rostedt
2008-08-27 13:26                         ` Rafael J. Wysocki
2008-08-28 12:39                           ` [PATCH] ftrace: disable tracing for hibernation Rafael J. Wysocki
2008-08-28 12:42                             ` Ingo Molnar
2008-08-28 12:44                             ` Steven Rostedt
2008-08-29 23:53                             ` Pavel Machek
2008-08-27 21:27                         ` [PATCH] ftrace: disable tracing for suspend to ram Marcin Slusarz
2008-08-28  7:28                         ` Pavel Machek
2008-08-29 13:43                           ` Steven Rostedt
2008-08-22 16:39               ` ftraced and " Rafael J. Wysocki
2008-08-22 20:54                 ` Marcin Slusarz
2008-08-22 21:17                   ` Rafael J. Wysocki
2008-08-23  4:18                 ` Russ Dill
2008-08-22 10:22           ` Rafael J. Wysocki

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=200808222311.55236.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=mingo@elte.hu \
    --cc=nigel@nigel.suspend2.net \
    --cc=pavel@suse.cz \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.org \
    /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