From patchwork Mon Feb 19 08:45:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 202968 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1156302dyc; Mon, 19 Feb 2024 00:47:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVauAeyc0EbzWHVnJuFMI0qL2MuovVOrCxO6eZN9nyw1bBjTd6cku3q09q7gYmR6M0Wt2z0eZ4o9/Pw9uDfTVBM1MJSDA== X-Google-Smtp-Source: AGHT+IGrvoQBl5cLqNmTCiythJ/c1WOjjvdoiMAHPdN90Mjlp5fzf/Dtcj2rG+E9X9w5E1lyJOzt X-Received: by 2002:a62:cdc4:0:b0:6e4:f40:b4e2 with SMTP id o187-20020a62cdc4000000b006e40f40b4e2mr2913070pfg.14.1708332465832; Mon, 19 Feb 2024 00:47:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708332465; cv=pass; d=google.com; s=arc-20160816; b=G+RK69+IxOxw0obDCmccIJwmuLb0wmF/DGzVaNtsRuPOpE9LuAe2sNeDU6OKobpeaJ tFnZHgvJ+BHZJtGXFEjZswh5QvvZLCVkEifdtw15Qold2M0Q48AacfYGXTbf1p/Bt4Mu Ni4eVWZ1BCZPc+834g5ulh2OJKjNZzp2PhrLLLWjaFLrqdaLa4yIBkZI5zt8zmxPwqmh 3hSLL3yQh1Q8wxFysx5CpHxAMeLOWeu3MTOaTEPb0h2Yl7wnqaEN3IYslUXZso6gP/1w 9lie/JMBZHH4zVAZW7eN8bdKOAtWj5npMG9YDC9Mcol9f0T2hjDcBUEEP8s5nvAT5pfz Fbpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=k6yI2YSGAYOxFHAzOKGinUcGOxbUq72scA4KZncoj0o=; fh=9TzET5t9qt7/NzJ5Qjz3uc/2R2GVPigMRGq+4RapPhI=; b=I84W9Cfl86iY3QsoYACiFh7Sas5wz+jIpBK/K4+gfYdGN76Vk4zUUBfj59/xZ5Jhb/ 3qHBAy6Y/rj+44570ZPDDhpAiXD1asDB2LPTY0PP4RsXzt7dZQumyao00izfRmdYyU9H hyuA5k5Ty/xvGzyvnghCizkwpQV6B6I9w5buFW1ZinrYkMFpYW5nJwCVc0Q+Sov7Z0Fl f9R3Y6mKF6+Ez4BRg9a6VCzk1WfELBXSDm2RgYZDJzClvobdM+6tNERVJn0cSXZBNS1N j+bz2qQHndlxxeIPkkrO0Gegr1J1sKe5CTGiN/5puNnFXr0LqW6MYrpHfHgpKiUM/nzZ dxGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YrFiDScf; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-70953-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70953-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y19-20020a056a00181300b006e11b26cdb3si3439173pfa.37.2024.02.19.00.47.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 00:47:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70953-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=YrFiDScf; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-70953-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70953-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 72035B21F64 for ; Mon, 19 Feb 2024 08:46:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DD4C24214; Mon, 19 Feb 2024 08:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YrFiDScf"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EpcCMYNY" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6888721362; Mon, 19 Feb 2024 08:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708332338; cv=none; b=dZAhp7XsSO7v7NKSMap4w+E+aQt5FEalFYTYY+rNpCBpUC9bj6FuQ7F22KfYPD3xKTnNBkKiH2e3+gdqxSlvbxvXBo+pd3MYQNbxsDNn3eywgxDnWbJTP9KbCkKNggb5MJ01mqsRzMAxvGMKwoqnNSxHl+MKXJ5vB1y2MpR2mKE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708332338; c=relaxed/simple; bh=dRQEo0B/yKjlnjrGLXR1sOoC2GhyL+3WER4H84ry1lo=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=HiXjE/eypwUJRmGIJG9TPun3YqLgORtgu9dRzEgle2R4ICVa7LmAUlqDVFMRenJ5VQ0UMz0NX2QAMiEOIyoie3eucTr4dtWnvJRoIqPr3KlJSXfO+FzeeKSc4hEsMKAf/BIDce4FCLBoH6CvHnHggEo6hTJqNqAp2C8TxXLEhQ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YrFiDScf; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=EpcCMYNY; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 19 Feb 2024 08:45:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708332334; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k6yI2YSGAYOxFHAzOKGinUcGOxbUq72scA4KZncoj0o=; b=YrFiDScfngNNT0bHjJxirzfz8w/Vve+Mj9H4U1DiUraZ4BXN00Dh8v9MaxJ7anUQzI0A8l VABHflRbVK2vnturNc0LnWzbsYXvRJZe1Cjv9y6mQHnPLel+dfsiaHdG2CxlfSrnkbR1F0 +ue4cAXNJWGhq70UusbeHg1qf1LwWkoGNUP2acsaKfSibGcjzxyATNXxnr7rgYoMyHGxgW G4zLMM6fB8LS3gUAjhX9QD1y1JIrUer/T+l/LVOB+PG0Lo7WXnL/s+fXhtgYdRWLF/doGQ e5nxyY1+GtwU3ROjkzeacKMNsGeiA/HKl+PYceEEHeqo9yqDD0mbZ1Nk60Zhfw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708332334; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k6yI2YSGAYOxFHAzOKGinUcGOxbUq72scA4KZncoj0o=; b=EpcCMYNYjYQJqghWBMW6nXrnMheU23xF0eeF/dNyPSlpRD/nj46kOYAF30Zr8Bl49Rp0mD 58vhRa8p6+lIrqDQ== From: "tip-bot2 for Anna-Maria Behnsen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] tick/sched: Add function description for tick_nohz_next_event() Cc: "Anna-Maria Behnsen" , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240123164702.55612-4-anna-maria@linutronix.de> References: <20240123164702.55612-4-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170833233361.398.7577148614843351327.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788900814156744929 X-GMAIL-MSGID: 1791316423998602000 The following commit has been merged into the timers/core branch of tip: Commit-ID: f365d05506150398fe6b035918d6fd8b62f35b9f Gitweb: https://git.kernel.org/tip/f365d05506150398fe6b035918d6fd8b62f35b9f Author: Anna-Maria Behnsen AuthorDate: Tue, 23 Jan 2024 17:46:57 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 19 Feb 2024 09:38:00 +01:00 tick/sched: Add function description for tick_nohz_next_event() The return value of tick_nohz_next_event() is not obvious at the first glance. Add a kernel-doc compatible function description which also covers return values. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240123164702.55612-4-anna-maria@linutronix.de --- kernel/time/tick-sched.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 01fb50c..7c9efe3 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -799,6 +799,16 @@ static inline bool local_timer_softirq_pending(void) return local_softirq_pending() & BIT(TIMER_SOFTIRQ); } +/** + * tick_nohz_next_event() - return the clock monotonic based next event + * @ts: pointer to tick_sched struct + * @cpu: CPU number + * + * Return: + * *%0 - When the next event is a maximum of TICK_NSEC in the future + * and the tick is not stopped yet + * *%next_event - Next event based on clock monotonic + */ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu) { u64 basemono, next_tick, delta, expires;