linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] arm: psci: add cpuidle_ops support
Date: Wed, 8 Jul 2015 11:34:29 +0100	[thread overview]
Message-ID: <20150708103429.GL7557@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1436350417-6712-5-git-send-email-jszhang@marvell.com>

On Wed, Jul 08, 2015 at 06:13:37PM +0800, Jisheng Zhang wrote:
> This patch implements cpuidle_ops using psci. After this patch, we can use
> cpuidle-arm.c with psci backend for both arm and arm64.

I really don't see the point of most of the patches in this series.

To summarise, what you're doing is:

1. Renaming arch/arm/kernel/psci_smp.c to arch/arm/kernel/psci.c
2. Adding a #ifdef CONFIG_SMP around _all_ the code in psci.c
3. Adding cpuidle code with an #ifdef CONFIG_CPU_IDLE around all the
   CPU idle code.

So, we end up with a file which contains:

/*
 header
 */
#include statements

/*
 some commentry relevant to SMP code
 */
#ifdef CONFIG_CPU_IDLE
... cpu idle code ...
#endif
#ifdef CONFIG_SMP
... smp code ...
#endif

which (a) is a mess, and (b) is unnecessary.  The only relevant bits which
are shared are the #include statements.

Please try this alternative approach:

1. Leave psci_smp.c alone.
2. Add arch/arm/kernel/psci_cpuidle.c containing the #include statements
   you need, and the CPU idle code.

I think such an approach will reduce your patch series to two patches,
one moving the ARM64 code, and one adding the cpuidle code.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-07-08 10:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 10:13 [PATCH 0/4] arm: psci: implement cpuidle_ops Jisheng Zhang
2015-07-08 10:13 ` [PATCH 1/4] arm: psci: rename psci_smp.c to psci.c Jisheng Zhang
2015-07-08 10:13 ` [PATCH 2/4] arm: psci: enable PSCI on UP systems Jisheng Zhang
2015-07-08 10:13 ` [PATCH 3/4] firmware: psci: move cpu_suspend handling to generic code Jisheng Zhang
2015-07-08 10:13 ` [PATCH 4/4] arm: psci: add cpuidle_ops support Jisheng Zhang
2015-07-08 10:34   ` Russell King - ARM Linux [this message]
2015-07-08 11:38     ` Jisheng Zhang
2015-07-08 12:42       ` Jisheng Zhang

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=20150708103429.GL7557@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).