public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv3 11/12] ARM: migrate to common PSCI client code
Date: Wed, 27 May 2015 18:17:47 +0100	[thread overview]
Message-ID: <20150527171747.GB23176@leverpostej> (raw)
In-Reply-To: <CAL_JsqJG=k=z5+p55YVzmdFBjcGSX2t3ct337kYRd6c5HG5H3g@mail.gmail.com>

On Wed, May 27, 2015 at 05:46:47PM +0100, Rob Herring wrote:
> On Tue, May 26, 2015 at 8:52 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> > Now that the common PSCI client code has been factored out to
> > drivers/firmware, and made safe for 32-bit use, move the 32-bit ARM code
> > over to it. This results in a moderate reduction of duplicated lines,
> > and will prevent further duplication as the PSCI client code is updated
> > for PSCI 1.0 and beyond.
> >
> > The two legacy platform users of the PSCI invocation code are updated to
> > account for interface changes. In both cases the power state parameter
> > is changed to an opaque u32 token in preparation for PSCI 1.0 power
> > state changes.
> 
> [...]
> 
> > diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> > index 231fba0..6050a14 100644
> > --- a/arch/arm/mach-highbank/highbank.c
> > +++ b/arch/arm/mach-highbank/highbank.c
> > @@ -28,8 +28,8 @@
> >  #include <linux/reboot.h>
> >  #include <linux/amba/bus.h>
> >  #include <linux/platform_device.h>
> > +#include <linux/psci.h>
> >
> > -#include <asm/psci.h>
> >  #include <asm/hardware/cache-l2x0.h>
> >  #include <asm/mach/arch.h>
> >  #include <asm/mach/map.h>
> > diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
> > index 7f2bd85..014e96d 100644
> > --- a/arch/arm/mach-highbank/pm.c
> > +++ b/arch/arm/mach-highbank/pm.c
> > @@ -16,18 +16,14 @@
> >
> >  #include <linux/cpu_pm.h>
> >  #include <linux/init.h>
> > +#include <linux/psci.h>
> >  #include <linux/suspend.h>
> >
> >  #include <asm/suspend.h>
> > -#include <asm/psci.h>
> >
> >  static int highbank_suspend_finish(unsigned long val)
> >  {
> > -       const struct psci_power_state ps = {
> > -               .type = PSCI_POWER_STATE_TYPE_POWER_DOWN,
> > -               .affinity_level = 1,
> > -       };
> > -
> > +       u32 ps = 0x01010000; /* Aff1 power down */
> 
> Why not just pass directly instead of sticking in a variable first.

No particular reason. I'll fold it in.
 
> >         return psci_ops.cpu_suspend(ps, __pa(cpu_resume));
> >  }
> >
> > diff --git a/drivers/cpuidle/cpuidle-calxeda.c b/drivers/cpuidle/cpuidle-calxeda.c
> > index 9445e6c..d010da8f 100644
> > --- a/drivers/cpuidle/cpuidle-calxeda.c
> > +++ b/drivers/cpuidle/cpuidle-calxeda.c
> > @@ -25,15 +25,14 @@
> >  #include <linux/init.h>
> >  #include <linux/mm.h>
> >  #include <linux/platform_device.h>
> > +#include <linux/psci.h>
> > +
> >  #include <asm/cpuidle.h>
> >  #include <asm/suspend.h>
> > -#include <asm/psci.h>
> >
> >  static int calxeda_idle_finish(unsigned long val)
> >  {
> > -       const struct psci_power_state ps = {
> > -               .type = PSCI_POWER_STATE_TYPE_POWER_DOWN,
> > -       };
> > +       u32 ps = 0x00010000; /* Aff0 power down */
> 
> ditto.

Likewise.

Thanks,
Mark.

> 
> >         return psci_ops.cpu_suspend(ps, __pa(cpu_resume));
> >  }
> >
> > --
> > 1.9.1
> >
> 

  reply	other threads:[~2015-05-27 17:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 13:52 [PATCHv3 00/12] arm/arm64: Unify PSCI client support Mark Rutland
2015-05-26 13:52 ` [PATCHv3 01/12] arm/arm64: kvm: add missing PSCI include Mark Rutland
2015-05-26 13:52 ` [PATCHv3 02/12] arm64: smp_plat: add get_logical_index Mark Rutland
2015-05-26 13:52 ` [PATCHv3 03/12] arm64: smp: consistently use error codes Mark Rutland
2015-05-26 13:52 ` [PATCHv3 04/12] arm64: psci: remove unnecessary id indirection Mark Rutland
2015-05-26 13:52 ` [PATCHv3 05/12] arm64: psci: support unsigned return values Mark Rutland
2015-05-26 13:52 ` [PATCHv3 06/12] arm64: psci: account for Trusted OS instances Mark Rutland
2015-05-26 13:52 ` [PATCHv3 07/12] arm64: psci: kill psci_power_state Mark Rutland
2015-05-26 13:52 ` [PATCHv3 08/12] arm64: psci: remove ACPI coupling Mark Rutland
2015-05-26 20:18   ` Al Stone
2015-05-26 13:52 ` [PATCHv3 09/12] arm64: psci: factor invocation code to drivers Mark Rutland
2015-05-26 13:52 ` [PATCHv3 10/12] drivers: psci: support native SMC{32,64} calls Mark Rutland
2015-05-26 13:52 ` [PATCHv3 11/12] ARM: migrate to common PSCI client code Mark Rutland
2015-05-27 12:01   ` Ashwin Chaugule
2015-05-27 12:41     ` Mark Rutland
2015-05-27 16:46   ` Rob Herring
2015-05-27 17:17     ` Mark Rutland [this message]
2015-06-03 15:19       ` Mark Rutland
2015-06-03 15:16   ` Mark Rutland
2015-06-04  9:45     ` Catalin Marinas
2015-06-05 10:04       ` Mark Rutland
2015-06-05 10:35         ` Catalin Marinas
2015-06-04  9:49     ` Russell King - ARM Linux
2015-05-26 13:52 ` [PATCHv3 12/12] MAINTAINERS: add PSCI entry Mark Rutland
2015-05-27  8:08 ` [PATCHv3 00/12] arm/arm64: Unify PSCI client support Hanjun Guo
2015-05-27 12:23   ` Mark Rutland

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=20150527171747.GB23176@leverpostej \
    --to=mark.rutland@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox