From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933479AbcHJUxm (ORCPT ); Wed, 10 Aug 2016 16:53:42 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:60552 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932807AbcHJUxi (ORCPT ); Wed, 10 Aug 2016 16:53:38 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Jisheng Zhang , linux@armlinux.org.uk, daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: cpuidle: declare cpuidle_ops __read_mostly Date: Wed, 10 Aug 2016 12:49:14 +0200 Message-ID: <2742913.yoAdrazplg@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-31-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160810175403.53e218cf@xhacker> References: <1470818997-808-1-git-send-email-jszhang@marvell.com> <20160810175403.53e218cf@xhacker> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:5mf4nA12CvDGkk0o1oroeKwrMzhHqjHnTClb16BFi13QGwvqv89 XJTokJaT+8O+e5OP6qn+bQc+sWYvHdu/4270niBy9vBpD5oKwSVYQGSVSztJC86CfFkU3Rk V0+WqWzq/9FFSmmk61zTnOUQz2vEs4nJFBj6FI9ZIcx7jcnCF0C+xXV5RCqtD6x3DJrnxRW dGKKD7wquJPPwczs4r+oQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:yQZAtDBNiyI=:BeHDKA1CAd+Ba5eZj4IOKi QxHcwDnGEyZp5wvdhfbapEoXg+Mj1BXunXjcZmE3vMcO9ppDYGkRL5E3Mf7RiFfKrzup1A47O mJjgmvRZ2P8LKELF3d3x2ea84KUdUylR6lMOgv8iJagXUbGNTspnFLViddV/wWRi1H4NaAaVQ GGBeg+syYJINg5MIue+OORXpVVnPDJZ7Vq5N8zl5aOKhAKRqN6ZGPVL61x8KtW0mnQeK2IQzQ lc9IsB/he38Nz9c3Y+pXCzuZgO3sN0w3fJzjbqZzWAENgfYul4PJBV7TDuVB/oNttzWNYOPGw xXVlMGxhNH4iYORExGqSLi3Fa3XelZSYW0HiQ3HvLSBSsN0ITL5g6Pd3HUsmgaWP/1hQVS9aA I8L2Vpf+yAr6xTYeCtLINQ2BU05iZ/RmLM5yU7m+1zOl3hG1yXjBYa9uadNnD8CLKo4VDN4Cd xOiF+q4qvxYbikHY36G7wEbxx+aWgnqPo0wZPc+mDChIR5yQs/0Uc0huoPAngSlQg1wSlhPk2 3TpMfFSTVxIrmLUrHzcO+dAjZBA/gjLm3RctnUSwdNTTTtsmc3n254qqoxHf+Cdayc5W7hEAD 2Xka1j5ypXWn06mdG1Pb4llcETKtDvj/cU16jL6OeQg/IFi14ZBFAYvS7K1JUqTNskg4oH99s lwq+w+XOCKo2sreiO69ZUP4ok/ZUfkwbPuxbkKV0cXM8O7X0Wzk/b0hPIIdUvyJWnqe2qjA7I 7h1WP0/zJ9HaMwLL Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, August 10, 2016 5:54:03 PM CEST Jisheng Zhang wrote: > On Wed, 10 Aug 2016 16:49:57 +0800 Jisheng Zhang wrote: > > > cpuidle_ops is initialized once by arm_cpuidle_read_ops() during > > initialization, and thereafter is mostly read in arm_cpuidle_suspend() > > > > The fact that it is mostly read and not written to makes it candidates > > for __read_mostly declarations. > > > > Signed-off-by: Jisheng Zhang > > --- > > arch/arm/kernel/cpuidle.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c > > index 7dccc96..762e0929 100644 > > --- a/arch/arm/kernel/cpuidle.c > > +++ b/arch/arm/kernel/cpuidle.c > > @@ -19,7 +19,7 @@ extern struct of_cpuidle_method __cpuidle_method_of_table[]; > > static const struct of_cpuidle_method __cpuidle_method_of_table_sentinel > > __used __section(__cpuidle_method_of_table_end); > > > > -static struct cpuidle_ops cpuidle_ops[NR_CPUS]; > > +static struct cpuidle_ops cpuidle_ops[NR_CPUS] __read_mostly; > > > oops, I just found that "arm: apply more __ro_after_init" from Kees > marked cpuidle_ops as __ro_after_init, that also meet my need, so > let's drop my patch. > > Ok, just saw this reply and that matches up with what I just wrote as well. Thanks, Arnd