Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3102908rwl; Tue, 27 Dec 2022 04:31:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXtARgM+cZ5KeOyCmd0uggYtFch/d1ZIXB/fW1WH/QQF3XfW6QJzMVlcC4MAtW01N0SiMBqJ X-Received: by 2002:a17:907:6f09:b0:7c1:277:cb00 with SMTP id sy9-20020a1709076f0900b007c10277cb00mr18718254ejc.23.1672144274003; Tue, 27 Dec 2022 04:31:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672144273; cv=none; d=google.com; s=arc-20160816; b=UaJlTqmkyWKyYFPOSKyYFMT/v+RoMq6sKak45TQWDpIe24FmTxV054+nOaqQaG5m+c v3O41jwWLAHQNPVvn2M6vDkB6G6qawZvCrRS+FfxIpJGsisGxiR/ebA43lI4qjyxta8e hQKwLbE3wEy2tRf5ej6oiyFSXItP6aOK3WqjBnpQa6f7Q0uLfaeiHv4bR4nnc+9UQnG4 9LMzqsSHTyJG3NLR6lSO64GI4+XyKhuXwoW02UJeUGrTNuZQuZCWCydMtm1HtP3Wdl5n 0bhgoaS0KnwXZ13p0sk5TJ7i90gKLsQeQJvVjCUGtmMYEng8+n9OGfq6R2FgTI/WNmJJ roUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=Oge8BJUdIiR8BP1GUdyWN8bXPtoIk/0R250b97qS1F4=; b=PSVx0GTOUxi4l3y2wqk5qRTW/EXmfDYsjmGoktNDJsB1RPuYTRjyobX0RiaheTBJTt CpsrBfNugH+tlnnXwm7jTj2jra+6k+0hcucA5amJNa9e2rJSRgjl3AxDzgPmZRl31bje 2Rv2gMnJfV78FPcUwIP95uM0L21Qa2dwRF6qtgX8emX71DbLNCPrQucZsqmQPYOCzdVq /NZa/GVtdBANS/751wsorlszcxOQy70B6EKjyMEEj+pmEgqOGW863HoX8rQSULXvDyWq ssPbI2U+XiLyLOrlY3q0n4u7NLeZVWRcABWui3Ma6ogbG7dutEPHu7VhS3+tseM3K17a Xb9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NhtCsqJE; dkim=neutral (no key) header.i=@linutronix.de header.b=9g4gbHJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he7-20020a1709073d8700b007da4fe085d4si12141135ejc.694.2022.12.27.04.30.55; Tue, 27 Dec 2022 04:31:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NhtCsqJE; dkim=neutral (no key) header.i=@linutronix.de header.b=9g4gbHJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231765AbiL0MPC (ORCPT + 66 others); Tue, 27 Dec 2022 07:15:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232099AbiL0MOh (ORCPT ); Tue, 27 Dec 2022 07:14:37 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 195A4BCE; Tue, 27 Dec 2022 04:13:50 -0800 (PST) Date: Tue, 27 Dec 2022 12:13:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1672143228; 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=Oge8BJUdIiR8BP1GUdyWN8bXPtoIk/0R250b97qS1F4=; b=NhtCsqJEvC22vJr6hO6dsxKp1d6McUdSfCRCUhacaErQrGfN3Ak8JHF5QGYcBEeM3NnwFJ ApK6SJhhwcCDeRRYdmGQkG9Q6z/Z6DfIMBU7eBRKRLNtD+jVNEDzfALsHCC//8LMt35s/k 0mDbuMKI3H366ONDkEBzdemeOsHTbLuA3rKdmYQ7E1pe6onw/wA+BXdJkW+4pYNvp1hf90 KAcP+JHDCHgIo0oi5ZeGJJ2IvGAgXr49v8hUmTmxueLd6nxTEvCabxI0cqboJS8c3Qf6Lz HgmtrbOQAbf7sZWgU4Qxp6EtrrgF+MfL/sAu/VaHsqnPvoVZDeDcL7HWpgGkOA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1672143228; 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=Oge8BJUdIiR8BP1GUdyWN8bXPtoIk/0R250b97qS1F4=; b=9g4gbHJfFxeydysTiPp9iXcU/GvO35iQdSKqTeArghjAoNfU8HKg+UTDMK28FGDhNjC1Ut hiVgYqFEbXC1VyAA== From: "tip-bot2 for Nicholas Piggin" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] cputime: remove cputime_to_nsecs fallback Cc: Nicholas Piggin , "Peter Zijlstra (Intel)" , Alexander Gordeev , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221220070705.2958959-1-npiggin@gmail.com> References: <20221220070705.2958959-1-npiggin@gmail.com> MIME-Version: 1.0 Message-ID: <167214322823.4906.12017382437888947820.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 The following commit has been merged into the sched/core branch of tip: Commit-ID: c89970202a1153b2fc230e89f90c180bd5bcbcef Gitweb: https://git.kernel.org/tip/c89970202a1153b2fc230e89f90c180bd5bcbcef Author: Nicholas Piggin AuthorDate: Tue, 20 Dec 2022 17:07:05 +10:00 Committer: Peter Zijlstra CommitterDate: Tue, 27 Dec 2022 12:52:17 +01:00 cputime: remove cputime_to_nsecs fallback The archs that use cputime_to_nsecs() internally provide their own definition and don't need the fallback. cputime_to_usecs() unused except in this fallback, and is not defined anywhere. This removes the final remnant of the cputime_t code from the kernel. Signed-off-by: Nicholas Piggin Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexander Gordeev Link: https://lore.kernel.org/r/20221220070705.2958959-1-npiggin@gmail.com --- arch/s390/kernel/idle.c | 2 +- arch/s390/kernel/vtime.c | 2 +- include/linux/sched/cputime.h | 9 --------- kernel/sched/cputime.c | 4 ++++ 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c index 4bf1ee2..a6bbcea 100644 --- a/arch/s390/kernel/idle.c +++ b/arch/s390/kernel/idle.c @@ -12,9 +12,9 @@ #include #include #include -#include #include #include +#include #include #include #include "entry.h" diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 9436f30..e0a88dc 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c @@ -7,13 +7,13 @@ */ #include -#include #include #include #include #include #include #include +#include #include #include #include diff --git a/include/linux/sched/cputime.h b/include/linux/sched/cputime.h index ce3c582..5f8fd5b 100644 --- a/include/linux/sched/cputime.h +++ b/include/linux/sched/cputime.h @@ -8,15 +8,6 @@ * cputime accounting APIs: */ -#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE -#include - -#ifndef cputime_to_nsecs -# define cputime_to_nsecs(__ct) \ - (cputime_to_usecs(__ct) * NSEC_PER_USEC) -#endif -#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */ - #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN extern bool task_cputime(struct task_struct *t, u64 *utime, u64 *stime); diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c index 95fc778..af7952f 100644 --- a/kernel/sched/cputime.c +++ b/kernel/sched/cputime.c @@ -3,6 +3,10 @@ * Simple CPU accounting cgroup controller */ +#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE + #include +#endif + #ifdef CONFIG_IRQ_TIME_ACCOUNTING /*