Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4046660rwl; Tue, 28 Mar 2023 01:37:15 -0700 (PDT) X-Google-Smtp-Source: AKy350aA3hS5+9KPHgEo3ELTVb4XbH024/Ztc9abdf7AoUzqH/eN0CxPNpQ5/ic6sRFHkcS9R6t8 X-Received: by 2002:aa7:9521:0:b0:62a:1267:2036 with SMTP id c1-20020aa79521000000b0062a12672036mr15093379pfp.34.1679992635275; Tue, 28 Mar 2023 01:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679992635; cv=none; d=google.com; s=arc-20160816; b=mxHbO7LHysnbHhsiZ74mfokXrMgQ+l2hLfkdQCJ6REfsQtOidmshhW0UbsaeF0S56j 6wItXe5Z6QV7XK8RayAeyxB8GEeumjGl5D1F/BcxpENYTrVZVBiGR4kmfqLsnllz2OB4 Cy2wSrVsf7niq+ivgaYXRq50WjCVpiyqw9BJ0DyFw2WmGiyEVzRu1aPYDUploSCKz5Kq PWomx+Znwyq5ADehqlhq4b5bREjMBRbocy+hGo92yLpM2YQ23537oeHAKJadBZE4YtKc uAIPytp4/hdlQz7RptmK/eAgTfkr/0QY8dL4ySLWLlL0giYChLyJ7BWNTb1y5jOyc+1a tYIg== 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=Fqdx7ou+Hs1BavNnec0YpUem7ASgByo9kJ9hlLvNmaE=; b=Vzx2rZYVLDLP7emtYOAHiZgn1ivIqi8vaF1QYndqBxFZA3X9Tf63+GYyQxzWExYgzI 7HFd/nXPI5m4inXe1VajAqTQQOLyShtgz9MZrm6RxBRG2cNPhIWtvMmhAFsb3dKnMRvy DpiRfX5N3CJ7i8xM9lzyZo+FGLyV9YXcsXF0pGEkJqZa6iTULuORpUypcW54iI+nenML xFxq1knkdFjys4Ut1YjfAPv4CSbtLd256lfyNSLhEbbh8uFdqalac2mSapVrE20D8pQ5 /RLXq/YgJzioFrY7F5c2AL8Gti6L29f7zDLkL8X7S5jntukAyQCIAivIyVhCQKwsATvn 87Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=j+I9Q0L+; dkim=neutral (no key) header.i=@linutronix.de header.b=8n61ATQ7; 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 bk13-20020a056a02028d00b00512fab8c401si13314697pgb.427.2023.03.28.01.37.02; Tue, 28 Mar 2023 01:37:15 -0700 (PDT) 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=j+I9Q0L+; dkim=neutral (no key) header.i=@linutronix.de header.b=8n61ATQ7; 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 S232513AbjC1IfY (ORCPT + 99 others); Tue, 28 Mar 2023 04:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232371AbjC1Iew (ORCPT ); Tue, 28 Mar 2023 04:34:52 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 197ED49EA; Tue, 28 Mar 2023 01:34:51 -0700 (PDT) Date: Tue, 28 Mar 2023 08:34:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1679992487; 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=Fqdx7ou+Hs1BavNnec0YpUem7ASgByo9kJ9hlLvNmaE=; b=j+I9Q0L+E0H9pZyLZlbbm5EDdguLC2hKg0W6UrV2LMq1gNOjTZgXjJRblYxspHNd3iA7SC gcIIU0C2QpgfEnOxjcC9m6oCFBL8j/TAwaccBW6rZdDCcuK1nzoNV/tzqW0mGrs36VSWIa hw6DZvuznb/TnxKfa/Z6gT/uBgMezzC6E/zgdz2R2KKDhg+3LLqs0PohyBFCuTnWslyB6O hG+rariN6/zLXacVucvlKi1mQ6mvAVNH+xQ+WMaUl5J67vA04YQiRqbf+AOKj1zW8lZdma SRCcIntGd/e3lykkVhAewLoCCawVqTP2RZYL5t3+WmAQNR5w8HbJj12AirUm0g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1679992487; 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=Fqdx7ou+Hs1BavNnec0YpUem7ASgByo9kJ9hlLvNmaE=; b=8n61ATQ7hj18ftaWbbe3UHYstEQL1CasZe5Q1thu0yteS9KcRQ9efVf/H+fhB9Da0UdLab A6BPwlJd7YBTLpAg== From: "tip-bot2 for Paul E. McKenney" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: smp/core] kernel/smp: Make csdlock_debug= resettable Cc: Jes Sorensen , "Paul E. McKenney" , "Peter Zijlstra (Intel)" , Juergen Gross , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230321005516.50558-4-paulmck@kernel.org> References: <20230321005516.50558-4-paulmck@kernel.org> MIME-Version: 1.0 Message-ID: <167999248681.5837.4240401894848544789.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=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 smp/core branch of tip: Commit-ID: 203e435844734cfa503cd1755f35db2514db5cca Gitweb: https://git.kernel.org/tip/203e435844734cfa503cd1755f35db2514db5cca Author: Paul E. McKenney AuthorDate: Mon, 20 Mar 2023 17:55:16 -07:00 Committer: Peter Zijlstra CommitterDate: Fri, 24 Mar 2023 11:01:26 +01:00 kernel/smp: Make csdlock_debug= resettable It is currently possible to set the csdlock_debug_enabled static branch, but not to reset it. This is an issue when several different entities supply kernel boot parameters and also for kernels built with CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT=y. Therefore, make the csdlock_debug=0 kernel boot parameter turn off debugging. Last one wins! Reported-by: Jes Sorensen Signed-off-by: Paul E. McKenney Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juergen Gross Link: https://lore.kernel.org/r/20230321005516.50558-4-paulmck@kernel.org --- Documentation/admin-guide/kernel-parameters.txt | 13 +++++++------ kernel/smp.c | 11 ++++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index b15198a..5f2ec4b 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -889,12 +889,13 @@ cs89x0_media= [HW,NET] Format: { rj45 | aui | bnc } - csdlock_debug= [KNL] Enable debug add-ons of cross-CPU function call - handling. When switched on, additional debug data is - printed to the console in case a hanging CPU is - detected, and that CPU is pinged again in order to try - to resolve the hang situation. The default value of - this option depends on the CSD_LOCK_WAIT_DEBUG_DEFAULT + csdlock_debug= [KNL] Enable or disable debug add-ons of cross-CPU + function call handling. When switched on, + additional debug data is printed to the console + in case a hanging CPU is detected, and that + CPU is pinged again in order to try to resolve + the hang situation. The default value of this + option depends on the CSD_LOCK_WAIT_DEBUG_DEFAULT Kconfig option. dasd= [HW,NET] diff --git a/kernel/smp.c b/kernel/smp.c index 7a85bcd..298ba75 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -116,11 +116,16 @@ static DEFINE_STATIC_KEY_MAYBE(CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT, csdlock_debug */ static int __init csdlock_debug(char *str) { + int ret; unsigned int val = 0; - get_option(&str, &val); - if (val) - static_branch_enable(&csdlock_debug_enabled); + ret = get_option(&str, &val); + if (ret) { + if (val) + static_branch_enable(&csdlock_debug_enabled); + else + static_branch_disable(&csdlock_debug_enabled); + } return 1; }