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=-2.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 A707FC43141 for ; Fri, 29 Jun 2018 14:34:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DA3D27FB5 for ; Fri, 29 Jun 2018 14:34:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5DA3D27FB5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965023AbeF2Oet (ORCPT ); Fri, 29 Jun 2018 10:34:49 -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