From patchwork Tue Mar 28 08:34:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 75908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2062352vqo; Tue, 28 Mar 2023 01:44:36 -0700 (PDT) X-Google-Smtp-Source: AKy350ZoAFGOpvPZQ3J6+4xmdoiCXd014pVp3fJqG3OtCysJb2u3JnMWEYqY2MQ0ca6oMxn0DG9T X-Received: by 2002:a17:90a:5105:b0:237:b702:4958 with SMTP id t5-20020a17090a510500b00237b7024958mr14410466pjh.38.1679993075821; Tue, 28 Mar 2023 01:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679993075; cv=none; d=google.com; s=arc-20160816; b=pX/JuwrwHwOaa8V3WwzLJ1ejRMxobyvKaq0ZK5gdq78INV5SOTeavw/EVjNzXS8hMZ Vi7bjqLntAlxS+e1dVOOlLodjoSNE6hKfc066FSm0VAoKQVt3+1HKxI80+BlZPowPM5e R/EFotPlSPtzxaKn01DxosXwkhN/Vn2X/3Fdy2G4CE7NuUKHMowv6tROpp4SA2XkiZ+Z 9XTNRH+YVe6SKSSOLvZ7IpuyDIKu7yBTEPiKIZWAvI/NnpzXPE4v4WAov+HL5lS5cPi5 vSSGGGrugMembMIfzlAqfBs8pl2RsPkrjxwL9AO438CST4fsJoOIjtQKg5a9FDQII5pr y7tg== 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.s=2020e 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a17090a974a00b00233a9c98466si11895122pjw.189.2023.03.28.01.44.23; Tue, 28 Mar 2023 01:44:35 -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.s=2020e 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 S232518AbjC1IfY (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760937315313493764?= X-GMAIL-MSGID: =?utf-8?q?1761600419747556448?= 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; }