Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13958382pxu; Mon, 4 Jan 2021 09:00:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcINn6+At800/5yUV5FR756hAVWPzHgZsx8LhSwUmDrrdh9Sl1Y2HOT5ObOcseDyQIXt9B X-Received: by 2002:a17:906:e212:: with SMTP id gf18mr68542114ejb.551.1609779641162; Mon, 04 Jan 2021 09:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609779641; cv=none; d=google.com; s=arc-20160816; b=AI6bLtzYYjT1qVXOlvrARdpsRoJ5qMlRbTDyAuRIKu7Xbq1CASbnfRPwGMBRLSuBYx SX+czmTLtO3sfx6ZjQfmgDq2nvybVBARsp/KQMEW9yOwdEcU2qC7IeTunUnLOu+Lusni KiXw15uRU/ctGg/RpPW4ODWu0xFc3gzRUyD2Mt0tyseJ5ZGHUoRunteoTg/ZZXsvBMya 9lqwzTlkdu28WG1K8Sa5pvVAlP/9TulMQ9+nTITwkInrvHlBSuFlINxlXF24pUgWhRc9 2RDTz/RCzQdbTQTZaSSctjsRUtXgYMPs3JOO5oKLsn+noKlpZM5GJBg+1bm+/CDbtATx vguw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OnQsVPetiN2+NNn9Gu0lMRXVffn0bk2dXIIHaBVxcn0=; b=f8yf6Jj9efycfG2eYFeOBgTVk9c5Yvk8TXhrQRiG3XherfcxRAd+TbCvjpIxMslE2p 8S+QvFQcdCzryh1McRWNU4krFOF9cx6pYxcff0TRWfrhFsLYFBi/rX034G2Q5UIqUq6L 7iylrxXOdIKy1aNgjXagd0WGmRuSh1QKhETn99Rhy2qYqVNln2hLpoCDhcjCLxlPNazt AGIhZbslSfWEmSG0YnZ4jRRO0cAdvj7i8FJYtUrUyfFHNIxqdhTmNrbH6xAgxYM8JvMz zV8KGHtUT8v3AQPkSMFMKGaYQCq8qijdJ5fZdPJMCz8rZvxxBssWHidXlD79W8Yh0YGQ CXtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JJRabLpX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd1si31295608edb.168.2021.01.04.09.00.17; Mon, 04 Jan 2021 09:00:41 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=JJRabLpX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728487AbhADQJY (ORCPT + 99 others); Mon, 4 Jan 2021 11:09:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:38782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728591AbhADQB3 (ORCPT ); Mon, 4 Jan 2021 11:01:29 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EC6C721D93; Mon, 4 Jan 2021 16:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609776049; bh=lnVSXdFmehZrpQWUW6F5loKkRCcy5WSEoMPQzN5Nx7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JJRabLpXPqyxbGnQApTwrAebzRobBwKD/QwPCxyVspoTvjHQamH57yN69bjKD5vhQ BSRLQuT/f/teruEAnwIZZ/y8sqZPyf8ZfLcJuM0DkveJlfymBcmTBa56oNE56DMjZH EswUWD8KU7EimqZU+wGyBBL4vFyZSAPPo7CNa330= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Gleixner , Frederic Weisbecker , Sasha Levin Subject: [PATCH 5.4 45/47] tick/sched: Remove bogus boot "safety" check Date: Mon, 4 Jan 2021 16:57:44 +0100 Message-Id: <20210104155707.907106131@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210104155705.740576914@linuxfoundation.org> References: <20210104155705.740576914@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner [ Upstream commit ba8ea8e7dd6e1662e34e730eadfc52aa6816f9dd ] can_stop_idle_tick() checks whether the do_timer() duty has been taken over by a CPU on boot. That's silly because the boot CPU always takes over with the initial clockevent device. But even if no CPU would have installed a clockevent and taken over the duty then the question whether the tick on the current CPU can be stopped or not is moot. In that case the current CPU would have no clockevent either, so there would be nothing to keep ticking. Remove it. Signed-off-by: Thomas Gleixner Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20201206212002.725238293@linutronix.de Signed-off-by: Sasha Levin --- kernel/time/tick-sched.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 5c9fcc72460df..4419486d7413c 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -916,13 +916,6 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) */ if (tick_do_timer_cpu == cpu) return false; - /* - * Boot safety: make sure the timekeeping duty has been - * assigned before entering dyntick-idle mode, - * tick_do_timer_cpu is TICK_DO_TIMER_BOOT - */ - if (unlikely(tick_do_timer_cpu == TICK_DO_TIMER_BOOT)) - return false; /* Should not happen for nohz-full */ if (WARN_ON_ONCE(tick_do_timer_cpu == TICK_DO_TIMER_NONE)) -- 2.27.0