Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp865296imm; Fri, 29 Jun 2018 07:39:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJuSPvxRkicX/1v9FQTQBdansR+G6BABfV5QkrnL8v87aYtNOYTluVJdG9rPYv7Fk5fdmTp X-Received: by 2002:a63:b213:: with SMTP id x19-v6mr12837610pge.393.1530283151932; Fri, 29 Jun 2018 07:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530283151; cv=none; d=google.com; s=arc-20160816; b=as54ddm+a/Rg1/aqQ85HkBEEDs4+P7xK1kbuAJQxTCDen/IYGNmPy0x6zF0I7KincS Ecu5YVvwIrlzhsVKefiY2dMVHOjD43xf6/PFgL0R3byB+pObNYovC5qHonq1wkvw9vXx dqmNK6hcN0y+q8xTfXMUd3f3lI8uARtHNQ6D4ihDLTMnBp1xYfSrB2EMn7WooYIRfEUW EmbMtiS/GcqytlQSbI/F7XqniivAk41aJztLQM+0aEQyJYSHozlo2P0Lg5B6PRSLHmne ExSBozArnvZsrBYQn4ucswdM2gnsASD1Y/RKY+5wYiCNPg6sC3Q66R6ajoVzzZ628Jf8 baMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=M6PtsPYG2VMtOSYImLqnKOIgzUtRPsuE2h8TRWOr/TY=; b=n3IMmPtUS9HJN0jNyH3J27+/FwFYL19JS8CVrPBXJyJupL5GSLwFjIiPtRyIXcgSJg +20EQ3860NEpDiky6iDd9oCUAAfKOGpFlHUcQscBQfqcKJnUY5L5HCXNs0pGZIIO9/3T qz4ONwibA9vlpQJtFxI7PlbuqhO8Dyhu2tTluJnrhmCLfNhqiMl/08P3tawxAl5YCYbl ba42Oc8PyOptg4sIDzatZC3HyJEjN88/B5m7Qg6WvULPGsWTcgsWPKHBdZObKUXAyfxN 2+B9lfHi1xDz7Wqia38XXi2OUXY1Rrmr0WTxoFRCNCZTdpjHLTFpSsMp4pbdrUdUjQ2Y JBYQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si9489385plb.331.2018.06.29.07.38.57; Fri, 29 Jun 2018 07:39:11 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964838AbeF2Oes (ORCPT + 99 others); Fri, 29 Jun 2018 10:34:48 -0400 Received: from mga17.intel.com ([192.55.52.151]:9673 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755471AbeF2Oer (ORCPT ); Fri, 29 Jun 2018 10:34:47 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 07:34:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,285,1526367600"; d="scan'208";a="51490721" Received: from romley-ivt3.sc.intel.com ([172.25.110.60]) by fmsmga008.fm.intel.com with ESMTP; 29 Jun 2018 07:34:45 -0700 From: Fenghua Yu To: "Thomas Gleixner" , "Ingo Molnar" , "H Peter Anvin" Cc: "Ashok Raj" , "Alan Cox" , "Dave Hansen" , "Peter Zijlstra" , "Rafael Wysocki" , "Tony Luck" , "Ravi V Shankar" , "linux-kernel" , "x86" , Fenghua Yu Subject: [PATCH v2 4/4] x86/split_lock: Disable #AC for split locked accesses Date: Fri, 29 Jun 2018 07:33:27 -0700 Message-Id: <1530282807-66555-5-git-send-email-fenghua.yu@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1530282807-66555-1-git-send-email-fenghua.yu@intel.com> References: <1530282807-66555-1-git-send-email-fenghua.yu@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org By default, #AC for split lock is enabled. In some cases (e.g. system hang when firmware hits split lock), user may want to opt-out of the feature. Kernel parameter "ac_split_lock_off" disables the feature during boot time. Signed-off-by: Fenghua Yu --- Documentation/admin-guide/kernel-parameters.txt | 4 ++++ arch/x86/kernel/cpu/test_ctl.c | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index efc7aa7a0670..7bf3b37dccdb 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4086,6 +4086,10 @@ spia_pedr= spia_peddr= + ac_split_lock_off [X86] + Disable #AC exception for split locked accesses. + By default, this feature is enabled in kernel. + srcutree.counter_wrap_check [KNL] Specifies how frequently to check for grace-period sequence counter wrap for the diff --git a/arch/x86/kernel/cpu/test_ctl.c b/arch/x86/kernel/cpu/test_ctl.c index f12e8b24215d..4e6ed267e8b7 100644 --- a/arch/x86/kernel/cpu/test_ctl.c +++ b/arch/x86/kernel/cpu/test_ctl.c @@ -85,3 +85,12 @@ void setup_ac_split_lock(void) pr_info_once("#AC for split lock is disabled\n"); } } + +static __init int ac_split_lock_off(char *str) +{ + enable_ac_split_lock = false; + + return 0; +} + +early_param("ac_split_lock_off", ac_split_lock_off); -- 2.5.0