All of lore.kernel.org
 help / color / mirror / Atom feed
From: kgene.kim@samsung.com (Kukjin Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/5] ARM: pm: add generic CPU suspend/resume support
Date: Mon, 14 Feb 2011 09:27:51 +0900	[thread overview]
Message-ID: <000001cbcbde$0e69bce0$2b3d36a0$%kim@samsung.com> (raw)
In-Reply-To: <20110211115853.GC23404@n2100.arm.linux.org.uk>

Russell King - ARM Linux wrote:
> 
> On Wed, Feb 09, 2011 at 07:15:25PM -0800, Colin Cross wrote:
> > The diagnostic register also needs to be saved to keep the errata bits
> > set in __v7_setup.
> 
> Saving I've no problem with.  Restoring gets hairy with kernels running
> in non-secure mode, as we can't just write the register - we don't know
> whether we are running in secure or non-secure mode.  A write to the
> register in NS mode will crash.
> 
> Santosh: is the diagnostic register on OMAP4 re-initialized by the secure
> code on OMAP?
> 
> > > +       stmia   r0, {r4 - r11}
> > > +       ldmfd   sp!, {r4 - r11, pc}
> > > +ENDPROC(cpu_v7_do_suspend)
> > > +
> > > +ENTRY(cpu_v7_do_resume)
> > > +       mov     ip, #0
> > > +       mcr     p15, 0, ip, c8, c7, 0   @ invalidate TLBs
> > > +       mcr     p15, 0, ip, c7, c5, 0   @ invalidate I cache
> >
> > Does this need the same ALT_SMP/ALT_UP combo as v7_flush_icache_all?
> 
> That depends whether you the CPU which is resuming is part of a coherent
> SMP system at that point.  This instruction will invalidate the I-cache
> for the local CPU only, whereas the c7, c1 variant will invalidate the
> instruction caches of all CPUs within the inner sharable domain.
> 
> Has anything changed in the other CPUs as a result of this CPU resuming
> at this point?  I don't think so, so I think we just need to ensure that
> the local CPU instruction cache is invalidated at this point.
> 
> > Tegra2 suspend and cpuidle works on top of this patch and the patch
> > that adds SMP support to sleep_save_sp.  Tegra seems to need to
> > invalidate the entire l1 data cache before enabling it,
> 
> As it's undefined what state the data cache is in on resume, I'm surprised
> the s5pv210 code doesn't also need a D-cache invalidate too.  Maybe Samsung
> folk can answer that.
> 

Now, it works fine with omission D-cache invalidate on S5PV210. Basically, Samsung S5P SoCs have some kind of hardware initialization code. So I'm not sure it has something for it, will/need to check it to hardware guys soon :) Then let you know about that ;)

As a note, I will test your updated generic CPU suspend/resume support on Samsung SoCs also, if any available branch which has p2v patches for it, please let me know. Anyway sorry for late testing on board.

Have a nice weekend.
Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

  parent reply	other threads:[~2011-02-14  0:27 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06 19:11 [RFC] Generic CPU save/restore PM support Russell King - ARM Linux
2011-02-06 19:12 ` [PATCH 1/5] ARM: move cache/processor/fault glue to separate include files Russell King - ARM Linux
2011-02-06 19:12 ` [PATCH 2/5] ARM: pm: add generic CPU suspend/resume support Russell King - ARM Linux
2011-02-07 12:01   ` [PATCH v2 " Russell King - ARM Linux
2011-02-07 12:10     ` [PATCH v3 " Russell King - ARM Linux
2011-02-07 13:21       ` saeed bishara
2011-02-07 13:34         ` Russell King - ARM Linux
2011-02-07 14:04           ` saeed bishara
2011-02-07 14:17             ` Russell King - ARM Linux
2011-02-07 14:27               ` saeed bishara
2011-02-07 14:33                 ` Russell King - ARM Linux
2011-02-07 14:58                   ` saeed bishara
2011-02-07 15:02                     ` Russell King - ARM Linux
2011-02-08 10:21                       ` Lorenzo Pieralisi
2011-02-08 11:23                         ` Russell King - ARM Linux
2011-02-08 12:33                           ` Russell King - ARM Linux
2011-02-08 14:25                             ` Lorenzo Pieralisi
2011-02-08  8:08               ` Colin Cross
2011-02-10  3:15               ` Colin Cross
2011-02-11 11:58                 ` Russell King - ARM Linux
2011-02-11 12:07                   ` Santosh Shilimkar
2011-02-12 14:50                     ` Russell King - ARM Linux
2011-02-12 15:09                       ` Santosh Shilimkar
2011-02-28 18:17                         ` Santosh Shilimkar
2011-02-28 18:17                           ` Santosh Shilimkar
2011-02-28 18:21                         ` Jean Pihet
2011-02-14  0:27                   ` Kukjin Kim [this message]
2011-02-06 19:13 ` [PATCH 3/5] ARM: pm: convert PXA to generic " Russell King - ARM Linux
2011-02-06 19:13 ` [PATCH 4/5] ARM: pm: convert sa11x0 " Russell King - ARM Linux
2011-02-07 18:11   ` Russell King - ARM Linux
2011-02-06 19:13 ` [PATCH 5/5] ARM: pm: convert samsung platforms " Russell King - ARM Linux
2011-02-07  5:42 ` [RFC] Generic CPU save/restore PM support Kukjin Kim
2011-02-07 10:44   ` Russell King - ARM Linux
     [not found] <mailman.11856.1297088273.1534.linux-arm-kernel@lists.infradead.org>
2011-02-07 15:41 ` [PATCH v3 2/5] ARM: pm: add generic CPU suspend/resume support Frank Hofmann

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='000001cbcbde$0e69bce0$2b3d36a0$%kim@samsung.com' \
    --to=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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: link
Be 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.