From: Eric Miao <eric.y.miao@gmail.com> To: Sven Neumann <s.neumann@raumfeld.com> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Mack <daniel@caiaq.de> Subject: Re: [PATCH] ARM: pxa: fix suspend on PXA3XX Date: Thu, 27 Jan 2011 22:46:54 +0800 [thread overview] Message-ID: <AANLkTimUg=y49H6THn5s7f7v418W68fhAsMLZGnDqabF@mail.gmail.com> (raw) In-Reply-To: <1296029447.2013.8.camel@sven> On Wed, Jan 26, 2011 at 4:10 PM, Sven Neumann <s.neumann@raumfeld.com> wrote: > On Wed, 2011-01-26 at 05:06 +0800, Eric Miao wrote: >> How about this instead? >> >> diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c >> index 978e1b2..1807c9a 100644 >> --- a/arch/arm/mach-pxa/pm.c >> +++ b/arch/arm/mach-pxa/pm.c >> @@ -33,7 +33,7 @@ int pxa_pm_enter(suspend_state_t state) >> #endif >> >> /* skip registers saving for standby */ >> - if (state != PM_SUSPEND_STANDBY) { >> + if (state != PM_SUSPEND_STANDBY && pxa_cpu_pm_fns->save) { >> pxa_cpu_pm_fns->save(sleep_save); >> /* before sleeping, calculate and save a checksum */ >> for (i = 0; i < pxa_cpu_pm_fns->save_count - 1; i++) >> @@ -44,7 +44,7 @@ int pxa_pm_enter(suspend_state_t state) >> pxa_cpu_pm_fns->enter(state); >> cpu_init(); >> >> - if (state != PM_SUSPEND_STANDBY) { >> + if (state != PM_SUSPEND_STANDBY && pxa_cpu_pm_fns->restore) { >> /* after sleeping, validate the checksum */ >> for (i = 0; i < pxa_cpu_pm_fns->save_count - 1; i++) >> checksum += sleep_save[i]; >> > > Not sure if that will work as well. With this change the code is > skipping more than just the calls to pxa_cpu_pm_fns->save() and > pxa_cpu_pm_fns->restore(). In particular it doesn't call > pxa_cpu_pm_fns->enter(state). > Nah, that ->enable() is called if the checksum is incorrect. Please compare with the original code? > > Thanks, > Sven > > >
WARNING: multiple messages have this Message-ID (diff)
From: eric.y.miao@gmail.com (Eric Miao) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: pxa: fix suspend on PXA3XX Date: Thu, 27 Jan 2011 22:46:54 +0800 [thread overview] Message-ID: <AANLkTimUg=y49H6THn5s7f7v418W68fhAsMLZGnDqabF@mail.gmail.com> (raw) In-Reply-To: <1296029447.2013.8.camel@sven> On Wed, Jan 26, 2011 at 4:10 PM, Sven Neumann <s.neumann@raumfeld.com> wrote: > On Wed, 2011-01-26 at 05:06 +0800, Eric Miao wrote: >> How about this instead? >> >> diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c >> index 978e1b2..1807c9a 100644 >> --- a/arch/arm/mach-pxa/pm.c >> +++ b/arch/arm/mach-pxa/pm.c >> @@ -33,7 +33,7 @@ int pxa_pm_enter(suspend_state_t state) >> ?#endif >> >> ? ? ? /* skip registers saving for standby */ >> - ? ? if (state != PM_SUSPEND_STANDBY) { >> + ? ? if (state != PM_SUSPEND_STANDBY && pxa_cpu_pm_fns->save) { >> ? ? ? ? ? ? ? pxa_cpu_pm_fns->save(sleep_save); >> ? ? ? ? ? ? ? /* before sleeping, calculate and save a checksum */ >> ? ? ? ? ? ? ? for (i = 0; i < pxa_cpu_pm_fns->save_count - 1; i++) >> @@ -44,7 +44,7 @@ int pxa_pm_enter(suspend_state_t state) >> ? ? ? pxa_cpu_pm_fns->enter(state); >> ? ? ? cpu_init(); >> >> - ? ? if (state != PM_SUSPEND_STANDBY) { >> + ? ? if (state != PM_SUSPEND_STANDBY && pxa_cpu_pm_fns->restore) { >> ? ? ? ? ? ? ? /* after sleeping, validate the checksum */ >> ? ? ? ? ? ? ? for (i = 0; i < pxa_cpu_pm_fns->save_count - 1; i++) >> ? ? ? ? ? ? ? ? ? ? ? checksum += sleep_save[i]; >> > > Not sure if that will work as well. With this change the code is > skipping more than just the calls to pxa_cpu_pm_fns->save() and > pxa_cpu_pm_fns->restore(). In particular it doesn't call > pxa_cpu_pm_fns->enter(state). > Nah, that ->enable() is called if the checksum is incorrect. Please compare with the original code? > > Thanks, > Sven > > >
next prev parent reply other threads:[~2011-01-27 14:47 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-01-24 9:29 kernel NULL pointer dereference in pxa_pm_enter (2.6.38-rc2) Sven Neumann 2011-01-24 9:29 ` Sven Neumann 2011-01-24 9:51 ` Russell King - ARM Linux 2011-01-24 9:51 ` Russell King - ARM Linux 2011-01-24 10:15 ` [PATCH] ARM: pxa: fix suspend on PXA3XX Sven Neumann 2011-01-24 10:15 ` Sven Neumann 2011-01-24 10:17 ` Russell King - ARM Linux 2011-01-24 10:17 ` Russell King - ARM Linux 2011-01-24 10:25 ` Sven Neumann 2011-01-24 10:25 ` Sven Neumann 2011-01-25 21:06 ` Eric Miao 2011-01-25 21:06 ` Eric Miao 2011-01-26 8:10 ` Sven Neumann 2011-01-26 8:10 ` Sven Neumann 2011-01-27 14:46 ` Eric Miao [this message] 2011-01-27 14:46 ` Eric Miao 2011-01-31 12:36 ` Marek Vasut 2011-01-31 12:36 ` Marek Vasut 2011-01-31 13:29 ` Sven Neumann 2011-01-31 13:29 ` Sven Neumann 2011-01-24 10:21 ` Sven Neumann 2011-01-24 10:21 ` Sven Neumann
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='AANLkTimUg=y49H6THn5s7f7v418W68fhAsMLZGnDqabF@mail.gmail.com' \ --to=eric.y.miao@gmail.com \ --cc=daniel@caiaq.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=s.neumann@raumfeld.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: 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.