Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1179748
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jisheng Zhang <jszhang@marvell.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/4] arm: psci: add cpuidle_ops support |
| Date | Wed, 08 Jul 2015 14:50:03 +0200 |
| Message-ID | <pJWXx-2KA-15@gated-at.bofh.it> (permalink) |
| References | <pJUCl-1ra-3@gated-at.bofh.it> <pJUCm-1ra-31@gated-at.bofh.it> <pJUVI-1xX-31@gated-at.bofh.it> <pJVRN-27G-21@gated-at.bofh.it> |
| X-Original-To | Russell King - ARM Linux <linux@arm.linux.org.uk> |
| X-Mailer | Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="US-ASCII" |
| Content-Transfer-Encoding | 7bit |
| X-Proofpoint-Virus-Version | vendor=fsecure engine=2.50.10432:,, definitions=2015-07-08_05:,, signatures=0 |
| X-Proofpoint-Spam-Details | rule=outbound_notspam policy=outbound score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.9 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1506180000 definitions=main-1507080202 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 92 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <mark.rutland@arm.com>, <Lorenzo.Pieralisi@arm.com>, <Catalin.Marinas@arm.com>, <daniel.lezcano@linaro.org>, <will.deacon@arm.com>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> |
| X-Original-Date | Wed, 8 Jul 2015 20:42:18 +0800 |
| X-Original-Message-ID | <20150708204218.50c3cfc3@xhacker> |
| X-Original-References | <1436350417-6712-1-git-send-email-jszhang@marvell.com> <1436350417-6712-5-git-send-email-jszhang@marvell.com> <20150708103429.GL7557@n2100.arm.linux.org.uk> <20150708193842.1ca1c55a@xhacker> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1179748 |
Show key headers only | View raw
Dear Russell,
On Wed, 8 Jul 2015 19:38:42 +0800
Jisheng Zhang <jszhang@marvell.com> wrote:
> Dear Russell,
>
> On Wed, 8 Jul 2015 11:34:29 +0100
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
>
> > 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.
After more consideration, I have one concern.
Currently, cpuidle_ops is defined as the following,
> struct cpuidle_ops {
> int (*suspend)(int cpu, unsigned long arg);
the cpu may not be necessary, because to-be-suspended cpu is always the calling
cpu itself.
> int (*init)(struct device_node *, int cpu);
the device_node here may not be necessary either, because we can get the node
via. of_get_cpu_node.
So if we refine cpuidle_ops defintion, the code would be as simple as
static struct cpuidle_ops psci_cpuidle_ops __initdata = {
.suspend = cpu_psci_cpu_suspend,
.init = cpu_psci_cpu_init_idle,
};
CPUIDLE_METHOD_OF_DECLARE(psci_idle, "psci", &psci_cpuidle_ops);
I'm not sure a new psci_cpuidle.c only with above 5 lines is acceptable or not.
Thanks,
Jisheng
> >
> > I think such an approach will reduce your patch series to two patches,
> > one moving the ARM64 code, and one adding the cpuidle code.
> >
>
> Good idea! Will refine the patches as you suggested.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH 4/4] arm: psci: add cpuidle_ops support Jisheng Zhang <jszhang@marvell.com> - 2015-07-08 14:50 +0200
csiph-web