From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86053C433E0 for ; Wed, 3 Mar 2021 14:21:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 33C3464E90 for ; Wed, 3 Mar 2021 14:21:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241786AbhCCOOB (ORCPT ); Wed, 3 Mar 2021 09:14:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1842934AbhCCKWm (ORCPT ); Wed, 3 Mar 2021 05:22:42 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21BDBC08EC29; Wed, 3 Mar 2021 01:49:38 -0800 (PST) Date: Wed, 03 Mar 2021 09:49:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1614764975; 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=PlyLcs93rZ8ecJWon5r+ERENd4253orZt7gs0sUfCXE=; b=bwvXW7RGJvyxraJtKNcRCvVzcJC08MhTm+nCb3Bcx4Bke6EagBDAXK+jzsEsbAPPKJErut rFIr59WnUz+I65As529HSOn9AkQWd+MWSBVYVGM5J+PQ/Ki+z1V2Wyv6YLVLkm/XBWg0T6 GbKm2C0lHmVmtT1vrNt1HSxDZ50tWeRVCuP5hndT/u8H1OpDRhGtYnIF/P5zmQV+BWhKXN +ulckQrijaKybA1mJ94U+SCItKMlvU3L3/gDZ3nAnFTRbhmH9jouRXlPyYVBZYP61xBwKd M+Wf7BhgtsPj1PeevE2xP1KjF4o0bLHi7pK3iq4FCjv3Ic42XODVeEkFmJpX4A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1614764975; 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=PlyLcs93rZ8ecJWon5r+ERENd4253orZt7gs0sUfCXE=; b=woEofQqx/Qz2toJswJLd34E4X3OuYOHjk8QM54PlbqNNdCsERkEgsTsZwTHPsTQA7+1sPz Ro3q3T33mVACgqBg== From: "tip-bot2 for Vincent Donnefort" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] cpu/hotplug: Allowing to reset fail injection Cc: Vincent Donnefort , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210216103506.416286-2-vincent.donnefort@arm.com> References: <20210216103506.416286-2-vincent.donnefort@arm.com> MIME-Version: 1.0 Message-ID: <161476497509.20312.11412561789577463928.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 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: 6d06c515e9151dc858e391bd6bebce0b684eec4f Gitweb: https://git.kernel.org/tip/6d06c515e9151dc858e391bd6bebce0b684eec4f Author: Vincent Donnefort AuthorDate: Tue, 16 Feb 2021 10:35:04 Committer: Peter Zijlstra CommitterDate: Wed, 03 Mar 2021 10:33:00 +01:00 cpu/hotplug: Allowing to reset fail injection Currently, the only way of resetting the fail injection is to trigger a hotplug, hotunplug or both. This is rather annoying for testing and, as the default value for this file is -1, it seems pretty natural to let a user write it. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210216103506.416286-2-vincent.donnefort@arm.com --- kernel/cpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/cpu.c b/kernel/cpu.c index 1b6302e..9121edf 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2207,6 +2207,11 @@ static ssize_t write_cpuhp_fail(struct device *dev, if (ret) return ret; + if (fail == CPUHP_INVALID) { + st->fail = fail; + return count; + } + if (fail < CPUHP_OFFLINE || fail > CPUHP_ONLINE) return -EINVAL;