Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2884659pxy; Tue, 3 Aug 2021 18:43:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkPtF65qaXSvSW9o872X1Xd9jybA2ipivYahns60KOly4eG8ejQl3gLf0nRcB6q4ryhhCS X-Received: by 2002:a92:c549:: with SMTP id a9mr422290ilj.248.1628041402064; Tue, 03 Aug 2021 18:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628041402; cv=none; d=google.com; s=arc-20160816; b=0PlOjVKd/tMTresPgNzYtQDs3eftichRHKJQEtOvEppAnbwWNO5aD0TH51AveEJOf2 yrsKx4LpallLKpAAnlSmcKiNdBKD3wkA16PZJjhxIKVwGv7apBNQ21EZJNwwJjAeiimb UM1SLxPsBGPwS+sHi91MsfQg6zVX4Z15mdSTUCViC/B205t7vK3DjAG3hpvakfIDrAdm bbTcIFPcxtrTe6xZjWg9ZoRUZcVaYg8bdubjxwzPxSTIdoEmc4+IlwhB7AMX35t8bXNe 7SIJcVh15Olnc+A2WcYNrr9lTrWgcN+SGwYJUmnQW6gn2RmJrG/zAzVmKmkT8fo1Yolp hvHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=ZBaaN+tHPwpLYY+UfYI00dZzEufAibCKvfz+hWbOPT8=; b=qL41tQ+5aR8F8Ivz+hYdcwwsd8rBlqY/iHmYQCUhrRA192YIkMJ3U4QW/3m5ZpOJ9u 8F8v3EtohrpM3bqECsOLsH8HHWyxfeUlE2kQd1sGD5PuFeyzuvcFNFKiDKbIMruFflpk 6g8P0fsMWcInZAxx2nX4akalnokYhL5ovnEGoDj91R9E10taDdVq35PPF3mgU1ageSo1 b5LKM7A1WqExakD56qbO8gMrV42dLKZvRFykV7FM7I792ONSPsP32M4jWTEPO/TP8Aqr 6UanZK5dnc6HkOW9JcCEw3SPPiaA8cg/Ozlgh38wJNJsv+Hfnx377D5KrIb209zd/4NS FnAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=SecjGxb4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si729592ilo.41.2021.08.03.18.43.10; Tue, 03 Aug 2021 18:43:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=SecjGxb4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231594AbhHDAyX (ORCPT + 99 others); Tue, 3 Aug 2021 20:54:23 -0400 Received: from ozlabs.org ([203.11.71.1]:40325 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231519AbhHDAyW (ORCPT ); Tue, 3 Aug 2021 20:54:22 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4GfYCg5V6nz9s5R; Wed, 4 Aug 2021 10:54:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1628038448; bh=ZBaaN+tHPwpLYY+UfYI00dZzEufAibCKvfz+hWbOPT8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SecjGxb4zhSK/gvdLmqKFw1IObeowXLCrXHbse9GzKj3Ujnp4pPaxQiQ2do9cGDFJ q79FFv5+8WEH1jFVUanj6Mob5W/7BhNZc5XS0lyBzoO06GntTYDE2+6U0gHXZNhN2s NNb1h4//1FAyuf7c+bgmtyT1nXF2KgY12kaetCTEzyo0wcT31T7RIXHaeMKBeH3GDA 843YqXp8YhqEwVmxGj4YaBk9loKPGf7K2923QVx50MYuGyv4qJ4JmTTdinaNYvGLX8 LTV0n3kjj3VKiJ3FUIqVDa3QhsRvl198z3za6WSj9CYzbtvGTEdHInVdKYawEWQuDj Adlu0iS1k34gA== From: Michael Ellerman To: Nathan Chancellor Cc: Benjamin Herrenschmidt , Paul Mackerras , Nick Desaulniers , "Gautham R. Shenoy" , linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: Re: [PATCH] cpuidle: pseries: Mark pseries_idle_proble() as __init In-Reply-To: <20210803211547.1093820-1-nathan@kernel.org> References: <20210803211547.1093820-1-nathan@kernel.org> Date: Wed, 04 Aug 2021 10:54:04 +1000 Message-ID: <87lf5ini6r.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nathan Chancellor writes: > After commit 7cbd631d4dec ("cpuidle: pseries: Fixup CEDE0 latency only > for POWER10 onwards"), pseries_idle_probe() is no longer inlined when > compiling with clang, which causes a modpost warning: > > WARNING: modpost: vmlinux.o(.text+0xc86a54): Section mismatch in > reference from the function pseries_idle_probe() to the function > .init.text:fixup_cede0_latency() > The function pseries_idle_probe() references > the function __init fixup_cede0_latency(). > This is often because pseries_idle_probe lacks a __init > annotation or the annotation of fixup_cede0_latency is wrong. > > pseries_idle_probe() is a non-init function, which calls > fixup_cede0_latency(), which is an init function, explaining the > mismatch. pseries_idle_probe() is only called from > pseries_processor_idle_init(), which is an init function, so mark > pseries_idle_probe() as __init so there is no more warning. > > Fixes: 054e44ba99ae ("cpuidle: pseries: Add function to parse extended CEDE records") > Signed-off-by: Nathan Chancellor > --- > drivers/cpuidle/cpuidle-pseries.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I don't see this in my builds for some reason, but I guess toolchain or config differences probably explain it. Regardless, the patch is correct so I'll pick it up, thanks. cheers > diff --git a/drivers/cpuidle/cpuidle-pseries.c b/drivers/cpuidle/cpuidle-pseries.c > index bba449b77641..7e7ab5597d7a 100644 > --- a/drivers/cpuidle/cpuidle-pseries.c > +++ b/drivers/cpuidle/cpuidle-pseries.c > @@ -403,7 +403,7 @@ static void __init fixup_cede0_latency(void) > * pseries_idle_probe() > * Choose state table for shared versus dedicated partition > */ > -static int pseries_idle_probe(void) > +static int __init pseries_idle_probe(void) > { > > if (cpuidle_disable != IDLE_NO_OVERRIDE) > > base-commit: a6cae77f1bc89368a4e2822afcddc45c3062d499 > -- > 2.33.0.rc0