Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4161632rdh; Tue, 28 Nov 2023 13:39:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFW6Mtg5O3YLoPRppdBkP8PSlpfIP3qcvNT0vox7y2t5MnCKLT1+oPm1EokHgMdkixf3iNy X-Received: by 2002:a17:90b:4a8a:b0:285:9935:eacf with SMTP id lp10-20020a17090b4a8a00b002859935eacfmr17163448pjb.38.1701207587961; Tue, 28 Nov 2023 13:39:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701207587; cv=none; d=google.com; s=arc-20160816; b=LmRZzIHyNuU4azAe2Io/W6qc74cGHx8L/+OQza4W5VU4f22vepe/q4P+GxF41E67CQ 0MF/NzKkq5pZMf3rS8t/cKgGwonq9ZV3gMfM4C868brSV+gOqXWcD+GjWvyYCdLMwbkf wmQvRAy/BoVzTnm2wpUPLfeGoA/1vGL+3a7MGeGPBSPwjPZw27PuCa1VbHY9eVJ8Ry3i nvO4pTYJb7yrveSxm02Z1N68qj8o+D9VDZu82XIKpBOaj6zwVEKt1GDywF6Miare4fa9 sOkZ6yI5ylQfqhold68VttIiTfrmsJ8K3ASLVeTyT73oZ/WoU0orrssZLRnyMECic5tx AfSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=83TYRC/3AhgSaCrxgVuDx5MIRVZV28ddnqfRvu2FI0U=; fh=gOsf/C9oGsx8mW0RFdSWIOnFVVE9a2kx3u0KdziicVw=; b=Cy5dpHUxjOuJA+BknaHQ/FNYCYMq+eZ2tzhGjl5HLu/kcJDb7A9UIP9/5RB5iqGfQx uSkCXQLW8/bdPacR1hvzy6i86n3rIS5JP1aVtdoV6kl7vhFajxnYuF3Xme3vwT4l1VFO B9B6wSV6yA94VaIDhr8EiBxxsihUt6N2vOh+FuCxP07edopnZOnUD0D/iT+9vv4vtzwc Rjnomo/XKNz1iiWNfpJOHcRAFMw4MGuwUrEpuE9lAIkPsjG+TM+FZeSPJMytaqG41y8Y BFS37YNLqQQuacM5bqVHr1R+sWuywqe7P3FT9aQqyVixrB6hrk2gKh0T+pdNUJ1lgvf2 0GMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CDzFZWXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id ds2-20020a17090b08c200b00285a3fa637csi8539142pjb.3.2023.11.28.13.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 13:39:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CDzFZWXS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B0F6080BC52B; Tue, 28 Nov 2023 13:39:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344955AbjK1Vjh (ORCPT + 99 others); Tue, 28 Nov 2023 16:39:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjK1Vjf (ORCPT ); Tue, 28 Nov 2023 16:39:35 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A687594 for ; Tue, 28 Nov 2023 13:39:42 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBAECC433C7; Tue, 28 Nov 2023 21:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701207582; bh=Bd7jZSwUsBMVnbLjx0m4br3VZc9EAqszuySIYe5cwEs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CDzFZWXSsGgRJbKrFbqp868TFqsDpcYx6gffaKcL9iAhxCjt4ok79HpjoUYXTjpDU dhwghCrhahqNnFeAxCIs5w+b0ryqX1xYOOy5GVKg8TLGxoyyFBSPEoGS7pGVQgEm5E HkiMV0alG0UQOznZU3dWb/yOYApJZddPHHgZ1UtNNshJXWSXT8Y1Ft7gw8kOA8FhKM NgCfdpThgyKHMNi0P3wq9L7mJBkzTrDOLfuxCH/jx3pCYlDuaiuE1lzJ/jTM2LJ1QJ BGahbNID6a725cOK4N2XZSzxp1aR16mdwkqwDtu5WL4e/XgIezo2JrOrAeMuPQj+YZ uNecGeen9fyuQ== Date: Tue, 28 Nov 2023 22:39:39 +0100 From: Frederic Weisbecker To: Peng Liu Cc: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, liupeng17@lenovo.com Subject: Re: [PATCH v2 2/2] tick/nohz: Remove duplicate between tick_nohz_lowres_handler() and tick_nohz_highres_handler() Message-ID: References: <20231127083118.145704-1-pngliu@hotmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 28 Nov 2023 13:39:46 -0800 (PST) Le Tue, Nov 28, 2023 at 05:24:13PM +0800, Peng Liu a ?crit : > From: Peng Liu > > tick_nohz_lowres_handler() does the same work as tick_nohz_highres_handler() > plus the clockevent device reprogramming, so should reuse the latter. > > Signed-off-by: Peng Liu > --- > Changes in v2: > - Fix build warning: Function parameter or member 'mode' not described in 'tick_setup_sched_timer' > - Fix build error: use of undeclared identifier 'tick_nohz_highres_handler' > - Fix build error: use of undeclared identifier 'sched_skew_tick' > --- > kernel/time/tick-sched.c | 28 ++++++---------------------- > 1 file changed, 6 insertions(+), 22 deletions(-) > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c > index 96fcf5cb1b49..c2142b38c31d 100644 > --- a/kernel/time/tick-sched.c > +++ b/kernel/time/tick-sched.c > @@ -1383,36 +1383,25 @@ void tick_nohz_idle_exit(void) > local_irq_enable(); > } > > +static enum hrtimer_restart tick_nohz_highres_handler(struct hrtimer *timer); Then please move the entire function in this case. You'll need to move it to a place where it is available both for CONFIG_NO_HZ_COMMON and CONFIG_HIGH_RES_TIMERS. Below tick_sched_handle() for example. Thanks!