Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1798562imm; Thu, 2 Aug 2018 00:55:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc9XNUfSCmqFX0Dtz1/LqdSXPP8CR/rzooxlDBixTrjmtarxYf84xRI77LA/o7GRq+9cSl4 X-Received: by 2002:a62:c00c:: with SMTP id x12-v6mr1795331pff.216.1533196510544; Thu, 02 Aug 2018 00:55:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533196510; cv=none; d=google.com; s=arc-20160816; b=lbJNdYJcjEActrLHt3YPU5vIYVR2iHO73o2XIqW5AiyEK3Qw6VqQxFEkXcg9gQFKYA +b2ehxRv+tsTTWmJOjPxX3IiqR4ASfHrCSb8HnHWafsZSMpP1LeFE5qsSCxnTgMKeuoV pSh9SrQEaTUTEJNMZhOlUdO8QZO/6Z+fgGRkIce1fU/z2gTEEuTKtesl7QwGvc9w4ZZg BUk51pzsfzuPNRYfZoOpbU8/3GjGjim1euD/VWR4LEqbx4FhFBoM4rf4v56Cg25FHUDz IhRmH9kbaP7pO/Cxs9QDPphUZQ+wR5zl5+mOOaHnmG1ZHtfIeSz9Z6VosBE/QTYfh45t aMxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:arc-authentication-results; bh=sGXXcFJYrJVdnmg1rmy/BYZNn+o0Fw7jmjCouQU/IuU=; b=dgBZixonTk44fpOA2ieE4J0CzDjYVo/iw+so7prdRwAQPwHUDQqS4zC4h3HDeQFwKT 16KjjJP3q9F/O+M6+geqFPrAB9CYpeEsgDh3p8lgsvSxm1cgLRnrZfieQ3hNVMPyM6jI vkIMuzVpgkUZ5vNJjgXFfUpPgbCX/w7FK5xDeQfTnx8+rR9x7WqHzXOBa660A14qF1N/ B4ZM9+gjd6ChSNCpC5PjiJgeMf3GpYTpjtiezTQ6HHsYV8FPujPvs3L3TyXwqdfFFsuD cRcwoMPPHaQeBqy/IGJ/1lLdSvzgVizfHiWOPvLvRz7PGFyA2eUrlQjNLMYtv4nLuJiI BKmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u34-v6si1485925pgl.331.2018.08.02.00.54.56; Thu, 02 Aug 2018 00:55:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729769AbeHBJn7 (ORCPT + 99 others); Thu, 2 Aug 2018 05:43:59 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:28596 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727051AbeHBJn7 (ORCPT ); Thu, 2 Aug 2018 05:43:59 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 41h2Vx1qbYz9ttSM; Thu, 2 Aug 2018 09:54:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id Ub2B-z4om8Tt; Thu, 2 Aug 2018 09:54:01 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 41h2Vx1DFPz9ttRp; Thu, 2 Aug 2018 09:54:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 52E578B842; Thu, 2 Aug 2018 09:54:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id qOPTiUdfY4hc; Thu, 2 Aug 2018 09:54:02 +0200 (CEST) Received: from po14934vm.idsi0.si.c-s.fr (unknown [192.168.232.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 23A598B755; Thu, 2 Aug 2018 09:54:02 +0200 (CEST) Received: by po14934vm.idsi0.si.c-s.fr (Postfix, from userid 0) id E9B816C0CC; Thu, 2 Aug 2018 07:54:01 +0000 (UTC) Message-Id: <019a806ec215dc5afb078cee0972c968a3993a73.1533151550.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v5 3/3] powerpc/time: no steal_time when CONFIG_PPC_SPLPAR is not selected To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 2 Aug 2018 07:54:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_PPC_SPLPAR is not selected, steal_time will always be NUL, so accounting it is pointless Signed-off-by: Christophe Leroy --- v5: moved the change to the original localtion v4: removed the check in vtime_account_system(), the compiler removes the code regardless. v3: new arch/powerpc/kernel/time.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 3b03731221c1..b0f5cc491f8b 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -412,8 +412,10 @@ void vtime_flush(struct task_struct *tsk) if (acct->gtime) account_guest_time(tsk, cputime_to_nsecs(acct->gtime)); - if (acct->steal_time) + if (IS_ENABLED(CONFIG_PPC_SPLPAR) && acct->steal_time) { account_steal_time(cputime_to_nsecs(acct->steal_time)); + acct->steal_time = 0; + } if (acct->idle_time) account_idle_time(cputime_to_nsecs(acct->idle_time)); @@ -433,7 +435,6 @@ void vtime_flush(struct task_struct *tsk) acct->utime = 0; acct->gtime = 0; - acct->steal_time = 0; acct->idle_time = 0; acct->stime = 0; acct->hardirq_time = 0; -- 2.13.3