From mboxrd@z Thu Jan 1 00:00:00 1970 From: akpm@linux-foundation.org Subject: + clocksource-start-cmt-at-clocksource-resume.patch added to -mm tree Date: Wed, 25 Nov 2009 13:39:59 -0800 Message-ID: <200911252139.nAPLdxsP021079@imap1.linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:58036 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932340AbZKYVkV (ORCPT ); Wed, 25 Nov 2009 16:40:21 -0500 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org Cc: damm@opensource.se, johnstul@us.ibm.com, lethal@linux-sh.org, tglx@linutronix.de The patch titled clocksource: start CMT at clocksource resume has been added to the -mm tree. Its filename is clocksource-start-cmt-at-clocksource-resume.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: clocksource: start CMT at clocksource resume From: Magnus Damm Add code to start the CMT timer on clocksource resume. This makes sure the timer is started during sysdev_resume(). Without this patch the clocksource may be read as suspended, this after sysdev resume but before platform device resume. Signed-off-by: Magnus Damm Cc: john stultz Cc: Paul Mundt Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- drivers/clocksource/sh_cmt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff -puN drivers/clocksource/sh_cmt.c~clocksource-start-cmt-at-clocksource-resume drivers/clocksource/sh_cmt.c --- a/drivers/clocksource/sh_cmt.c~clocksource-start-cmt-at-clocksource-resume +++ a/drivers/clocksource/sh_cmt.c @@ -432,6 +432,13 @@ static void sh_cmt_clocksource_disable(s sh_cmt_stop(cs_to_sh_cmt(cs), FLAG_CLOCKSOURCE); } +static void sh_cmt_clocksource_resume(struct clocksource *cs) +{ + struct sh_cmt_priv *p = cs_to_sh_cmt(cs); + + sh_cmt_start(p, FLAG_CLOCKSOURCE); +} + static int sh_cmt_register_clocksource(struct sh_cmt_priv *p, char *name, unsigned long rating) { @@ -442,6 +449,7 @@ static int sh_cmt_register_clocksource(s cs->read = sh_cmt_clocksource_read; cs->enable = sh_cmt_clocksource_enable; cs->disable = sh_cmt_clocksource_disable; + cs->resume = sh_cmt_clocksource_resume; cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8); cs->flags = CLOCK_SOURCE_IS_CONTINUOUS; pr_info("sh_cmt: %s used as clock source\n", cs->name); _ Patches currently in -mm which might be from damm@opensource.se are linux-next.patch clocksource-add-argument-to-resume-callback.patch clocksource-start-cmt-at-clocksource-resume.patch spi-superh-msiof-spi-master-driver.patch