All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: GIC: add gic_reinit() function to help ARM resume
Date: Tue, 30 Aug 2011 23:47:18 +0800	[thread overview]
Message-ID: <20110830154717.GD19359@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <4E5CFB13.8060008@gmail.com>

On Tue, Aug 30, 2011 at 10:00:35AM -0500, Rob Herring wrote:
> Shawn,
> 
> On 08/30/2011 02:40 AM, Shawn Guo wrote:
> > If ARM core gets powered off during suspend, GIC controller has to be
> > reinitialized by resume procedure.  This patch adds a helper function
> > for resume procedure to reinitialize GIC.
> 
> Is re-initializing rather than save/restore registers the right thing to
> do here? Won't you lose things like edge or level triggered settings?
> It's always been fuzzy to what should be done with interrupt masks in
> suspend. Is every driver expected to disable and re-enable their
> interrupts or this should be maintained thru a suspend cycle?
> 
Good point.  As one of the series, I easily went for the re-initializing
approach here, plus it is pretty easy to go.  With your reminding, I
agree that for interrupt controller save/restore registers might be the
right thing to do.

> > 
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > ---
> >  arch/arm/common/gic.c               |   15 +++++++++++++--
> >  arch/arm/include/asm/hardware/gic.h |    1 +
> >  2 files changed, 14 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
> > index 666b278..bf0f6d8 100644
> > --- a/arch/arm/common/gic.c
> > +++ b/arch/arm/common/gic.c
> > @@ -255,7 +255,7 @@ void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq)
> >  	irq_set_chained_handler(irq, gic_handle_cascade_irq);
> >  }
> >  
> > -static void __init gic_dist_init(struct gic_chip_data *gic,
> > +static void gic_dist_init(struct gic_chip_data *gic,
> >  	unsigned int irq_start)
> >  {
> >  	unsigned int gic_irqs, irq_limit, i;
> > @@ -326,7 +326,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic,
> >  	writel_relaxed(1, base + GIC_DIST_CTRL);
> >  }
> >  
> > -static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
> > +static void gic_cpu_init(struct gic_chip_data *gic)
> 
> I don't think you need to change this. With hotplug, this section will
> be kept.
> 
You are right.  I missed that it's a __cpuinit.

Regards,
Shawn

  reply	other threads:[~2011-08-30 15:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30  7:40 [PATCH 0/3] make reinitialization of ARM core components possible Shawn Guo
2011-08-30  7:40 ` [PATCH 1/3] ARM: cache-l2x0: make the reinitialization possible Shawn Guo
2011-08-30 14:08   ` Barry Song
2011-08-30 14:52     ` Shawn Guo
2011-08-30 23:11       ` Barry Song
2011-08-30 23:48         ` Barry Song
2011-08-30  7:40 ` [PATCH 2/3] ARM: GIC: add gic_reinit() function to help ARM resume Shawn Guo
2011-08-30 15:00   ` Rob Herring
2011-08-30 15:47     ` Shawn Guo [this message]
2011-08-31  3:32       ` Shawn Guo
2011-08-30  7:40 ` [PATCH 3/3] ARM: smp_scu: remove __init annotation from scu_enable() Shawn Guo

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=20110830154717.GD19359@S2100-06.ap.freescale.net \
    --to=shawn.guo@freescale.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.