[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2560707.D2ZlsDH2Ex@vostro.rjw.lan>
Date: Wed, 18 Feb 2015 08:13:49 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: "Fu, Zhonghui" <zhonghui.fu@...ux.intel.com>
Cc: tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
x86@...nel.org, pavel@....cz, len.brown@...el.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v2] PM-Trace: add pm-trace support for suspending phase
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@...ux.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists