lkml.org 
[lkml]   [2015]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] PM-Trace: add pm-trace support for suspending phase
Date
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.


\
 
 \ /
  Last update: 2015-02-18 08:01    [W:0.037 / U:6.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site