From: Michael Spang <spang@chromium.org> To: Kukjin Kim <kgene.kim@samsung.com>, Ben Dooks <ben-linux@fluff.org> Cc: Russell King <linux@arm.linux.org.uk>, Abhilash Kesavan <a.kesavan@samsung.com>, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Spang <spang@chromium.org> Subject: [PATCH] serial: samsung: Use printk instead of printascii for S3C_PMDBG Date: Wed, 27 Mar 2013 19:39:58 -0400 [thread overview] Message-ID: <1364427598-17899-1-git-send-email-spang@chromium.org> (raw) Users should use no_console_suspend if they want output during suspend, rather than relying on DEBUG_LL. Using DEBUG_LL has two disadvantages: 1. It doesn't respect power management. When the UART is suspended the clock is stopped, and trying to use DEBUG_LL will just hang. This means if the user selects CONFIG_SAMSUNG_PM_DEBUG but does NOT disable console suspend, the system will hang during suspend. 2. It skips syslog and other console devices such as pstore. Signed-off-by: Michael Spang <spang@chromium.org> --- arch/arm/plat-samsung/include/plat/pm.h | 14 -------------- arch/arm/plat-samsung/pm.c | 13 ------------- 2 files changed, 27 deletions(-) diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index f6fcade..6d6e2a8 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h @@ -116,21 +116,7 @@ extern int s3c_irqext_wake(struct irq_data *data, unsigned int state); /* PM debug functions */ -#ifdef CONFIG_SAMSUNG_PM_DEBUG -/** - * s3c_pm_dbg() - low level debug function for use in suspend/resume. - * @msg: The message to print. - * - * This function is used mainly to debug the resume process before the system - * can rely on printk/console output. It uses the low-level debugging output - * routine printascii() to do its work. - */ -extern void s3c_pm_dbg(const char *msg, ...); - -#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt) -#else #define S3C_PMDBG(fmt...) printk(KERN_DEBUG fmt) -#endif #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK /** diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 002b147..7459fc6 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -43,19 +43,6 @@ unsigned long s3c_pm_flags; */ #ifdef CONFIG_SAMSUNG_PM_DEBUG -extern void printascii(const char *); - -void s3c_pm_dbg(const char *fmt, ...) -{ - va_list va; - char buff[256]; - - va_start(va, fmt); - vsnprintf(buff, sizeof(buff), fmt, va); - va_end(va); - - printascii(buff); -} static inline void s3c_pm_debug_init(void) { -- 1.8.1.3
WARNING: multiple messages have this Message-ID (diff)
From: spang@chromium.org (Michael Spang) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] serial: samsung: Use printk instead of printascii for S3C_PMDBG Date: Wed, 27 Mar 2013 19:39:58 -0400 [thread overview] Message-ID: <1364427598-17899-1-git-send-email-spang@chromium.org> (raw) Users should use no_console_suspend if they want output during suspend, rather than relying on DEBUG_LL. Using DEBUG_LL has two disadvantages: 1. It doesn't respect power management. When the UART is suspended the clock is stopped, and trying to use DEBUG_LL will just hang. This means if the user selects CONFIG_SAMSUNG_PM_DEBUG but does NOT disable console suspend, the system will hang during suspend. 2. It skips syslog and other console devices such as pstore. Signed-off-by: Michael Spang <spang@chromium.org> --- arch/arm/plat-samsung/include/plat/pm.h | 14 -------------- arch/arm/plat-samsung/pm.c | 13 ------------- 2 files changed, 27 deletions(-) diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index f6fcade..6d6e2a8 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h @@ -116,21 +116,7 @@ extern int s3c_irqext_wake(struct irq_data *data, unsigned int state); /* PM debug functions */ -#ifdef CONFIG_SAMSUNG_PM_DEBUG -/** - * s3c_pm_dbg() - low level debug function for use in suspend/resume. - * @msg: The message to print. - * - * This function is used mainly to debug the resume process before the system - * can rely on printk/console output. It uses the low-level debugging output - * routine printascii() to do its work. - */ -extern void s3c_pm_dbg(const char *msg, ...); - -#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt) -#else #define S3C_PMDBG(fmt...) printk(KERN_DEBUG fmt) -#endif #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK /** diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c index 002b147..7459fc6 100644 --- a/arch/arm/plat-samsung/pm.c +++ b/arch/arm/plat-samsung/pm.c @@ -43,19 +43,6 @@ unsigned long s3c_pm_flags; */ #ifdef CONFIG_SAMSUNG_PM_DEBUG -extern void printascii(const char *); - -void s3c_pm_dbg(const char *fmt, ...) -{ - va_list va; - char buff[256]; - - va_start(va, fmt); - vsnprintf(buff, sizeof(buff), fmt, va); - va_end(va); - - printascii(buff); -} static inline void s3c_pm_debug_init(void) { -- 1.8.1.3
next reply other threads:[~2013-03-27 23:40 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-03-27 23:39 Michael Spang [this message] 2013-03-27 23:39 ` [PATCH] serial: samsung: Use printk instead of printascii for S3C_PMDBG Michael Spang
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=1364427598-17899-1-git-send-email-spang@chromium.org \ --to=spang@chromium.org \ --cc=a.kesavan@samsung.com \ --cc=ben-linux@fluff.org \ --cc=kgene.kim@samsung.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.