From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751982AbbGBFBj (ORCPT ); Thu, 2 Jul 2015 01:01:39 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:28626 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751563AbbGBE7d (ORCPT ); Thu, 2 Jul 2015 00:59:33 -0400 Date: Thu, 2 Jul 2015 12:58:49 +0800 From: Jisheng Zhang To: Krzysztof Kozlowski , , , CC: , Subject: Re: [PATCH v2] arm64: cpuidle: add __init section marker to arm_cpuidle_init Message-ID: <20150702125849.67160aa9@xhacker> In-Reply-To: References: <1435803288-1478-1-git-send-email-jszhang@marvell.com> 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-02_06:,, 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-1507020086 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Krzysztof, On Thu, 2 Jul 2015 12:59:44 +0900 Krzysztof Kozlowski wrote: > 2015-07-02 11:14 GMT+09:00 Jisheng Zhang : > > It is not needed after booting, this patch moves the arm_cpuidle_init() > > function to the __init section. > > > > Signed-off-by: Jisheng Zhang > > --- > > arch/arm64/include/asm/cpuidle.h | 2 +- > > arch/arm64/kernel/cpuidle.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm64/include/asm/cpuidle.h b/arch/arm64/include/asm/cpuidle.h > > index 0f74f05..5748d3b 100644 > > --- a/arch/arm64/include/asm/cpuidle.h > > +++ b/arch/arm64/include/asm/cpuidle.h > > @@ -4,7 +4,7 @@ > > #include > > > > #ifdef CONFIG_CPU_IDLE > > -extern int arm_cpuidle_init(unsigned int cpu); > > +extern int __init arm_cpuidle_init(unsigned int cpu); > > No, not here but... > > > extern int arm_cpuidle_suspend(int index); > > #else > > static inline int arm_cpuidle_init(unsigned int cpu) > > ... here so the stub for !CONFIG_CPU_IDLE would be marked as well. when !CONFIG_CPU_IDLE, arm_cpuidle_init() is inlined, and just return -EOPNOTSUPP; Per my understanding, it will be optimized out by compiler. I'm not sure whether there is any benefit to mark inlined function as __init. But Per my check, all other inlined functions in linux kernel have no __init. What do you think? Thanks, Jisheng