From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: "Fu, Zhonghui" <zhonghui.fu@linux.intel.com>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, pavel@ucw.cz, len.brown@intel.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v2] PM-Trace: add pm-trace support for suspending phase
Date: Wed, 18 Feb 2015 08:13:49 +0100 [thread overview]
Message-ID: <2560707.D2ZlsDH2Ex@vostro.rjw.lan> (raw)
In-Reply-To: <54E00347.1070307@linux.intel.com>
On Sunday, February 15, 2015 10:24:07 AM Fu, Zhonghui wrote:
> Occasionally, the system can't come back up after suspend/resume
> due to problems of device suspending phase. This patch make
> PM_TRACE infrastructure cover device suspending phase of
> suspend/resume process, and the information in RTC can tell
> developers which device suspending function make system hang.
>
> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> ---
> Changes in v2:
> - Add -M option so that the rename and changes can be reviewed much easier.
>
> arch/x86/include/asm/pm-trace.h | 36 ++++++++++++++++++++++++++
> arch/x86/include/asm/resume-trace.h | 21 ---------------
> drivers/base/power/main.c | 20 +++++++++++---
> drivers/base/power/trace.c | 6 ++--
> include/linux/{resume-trace.h => pm-trace.h} | 9 +++---
> kernel/power/main.c | 2 +-
> 6 files changed, 61 insertions(+), 33 deletions(-)
> create mode 100644 arch/x86/include/asm/pm-trace.h
> delete mode 100644 arch/x86/include/asm/resume-trace.h
> rename include/linux/{resume-trace.h => pm-trace.h} (75%)
>
> diff --git a/arch/x86/include/asm/pm-trace.h b/arch/x86/include/asm/pm-trace.h
> new file mode 100644
> index 0000000..09bd918
> --- /dev/null
> +++ b/arch/x86/include/asm/pm-trace.h
> @@ -0,0 +1,36 @@
> +#ifndef _ASM_X86_PM_TRACE_H
> +#define _ASM_X86_PM_TRACE_H
> +
> +#include <asm/asm.h>
> +
> +#define TRACE_RESUME(user) \
> +do { \
> + if (pm_trace_enabled) { \
> + const void *tracedata; \
> + asm volatile(_ASM_MOV " $1f,%0\n" \
> + ".section .tracedata,\"a\"\n" \
> + "1:\t.word %c1\n\t" \
> + _ASM_PTR " %c2\n" \
> + ".previous" \
> + :"=r" (tracedata) \
> + : "i" (__LINE__), "i" (__FILE__)); \
> + generate_pm_trace(tracedata, user); \
> + } \
> +} while (0)
> +
> +#define TRACE_SUSPEND(user) \
> +do { \
> + if (pm_trace_enabled) { \
> + const void *tracedata; \
> + asm volatile(_ASM_MOV " $1f,%0\n" \
> + ".section .tracedata,\"a\"\n" \
> + "1:\t.word %c1\n\t" \
> + _ASM_PTR " %c2\n" \
> + ".previous" \
> + :"=r" (tracedata) \
> + : "i" (__LINE__), "i" (__FILE__)); \
> + generate_pm_trace(tracedata, user); \
> + } \
> +} while (0)
Are those macros identical or am I missing anything?
If they are identical, why do we need two identical macros?
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
prev parent reply other threads:[~2015-02-18 6:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-15 2:24 [PATCH v2] PM-Trace: add pm-trace support for suspending phase Fu, Zhonghui
2015-02-18 7:13 ` Rafael J. Wysocki [this message]
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=2560707.D2ZlsDH2Ex@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=zhonghui.fu@linux.intel.com \
/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