Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4622422pxf; Tue, 16 Mar 2021 19:49:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytC+fImE1TMVW5PzPOHeV5wGJnP716YAoExMG5hXyn/bHGmi7V6HR3addhzPmvVrgAizZI X-Received: by 2002:a05:6402:3089:: with SMTP id de9mr40030174edb.10.1615949350354; Tue, 16 Mar 2021 19:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615949350; cv=none; d=google.com; s=arc-20160816; b=IQdTTrO0I/IG3E78nPudwSsTj6IfOmOBE/ORA9XKSvtHtxCMwaOEGHQr4qejYLi9yE z3UtD+vMVyS+9AguWj3ovyBkVO5/rCgDH6Q5mmpOLBaEApW/GsvSfBa5bxGdEnioVCpw Yx3BLBzSTsCZqXU/fPpzlTHDJfNe8Ty7/LL62sGSZAtlyI70t+uCU5y7f1n72WMpFltF 6HTW0TrcvnQ/CXYfPXQ8/IQ1ViZbZQzRJCyn7nzxnrmB6ByU0vALlwLzlAtvOd1u+7QY OmPGqTcgWJo0el0/k1VafXff2i43vNHfXL5mzPlVRRvR/BqW6erGzwmcTZw7bsobzH2S R8vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=dIoSkUHWSCWKwaMqGzHoieiETsmLBsNpI8PQG28/4JU=; b=tF2mM1mv0kmOTHsz4sPBKKAi/z3fwLDjDzq+iIyjEuvXlgnPjUtPdDnWS6HumotpcK L7SaOSuKLEGOk20sHZhqrprvHZnD2eRneyB0RLqNh6XCLsu2Rar5T6ZG/MBtVXgxBtj4 NKOpQu6XUGGSiSP36U5D7e09pzwPeOEWZYd6gKNDgvTF9eHvJJRCadfZPwqkwLXwKcCh Cq0QSp0SkgRbUCbfuop3kxs1MeEgOE8JjCji6woCPbYmvHTDvZNUmq1UaDqVYOqXnV4K /VU4Q3zETzyOHJe7/x7C+Rnl0OdP8mYuwufr025SDVHvNl3JrZvTyF5I67c+Q26JKwmu SLUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id ay27si15246571edb.171.2021.03.16.19.48.48; Tue, 16 Mar 2021 19:49:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229699AbhCQCqA (ORCPT + 99 others); Tue, 16 Mar 2021 22:46:00 -0400 Received: from mga02.intel.com ([134.134.136.20]:26359 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229571AbhCQCp2 (ORCPT ); Tue, 16 Mar 2021 22:45:28 -0400 IronPort-SDR: jPraQM7cBHKxzm9X00F9HiyR9zuvx92M2jS/3Jj2esA8FjYEELctMTaHqVNOGwWI0Tj0SJ7Cwh J0iCEMQLcjDw== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="176508002" X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="176508002" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 19:45:27 -0700 IronPort-SDR: Zh0sV5Ub02iIIiGOQZh1OemzaPBt6dffjNB2cX0RzHDWLy/WEWW4xZck6Y+2xL27U3dsIyenxS iDn+DznQtmPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="439306015" Received: from linux.intel.com ([10.54.29.200]) by fmsmga002.fm.intel.com with ESMTP; 16 Mar 2021 19:45:26 -0700 Received: from debox1-desk2.jf.intel.com (debox1-desk2.jf.intel.com [10.54.75.16]) by linux.intel.com (Postfix) with ESMTP id 6969E580812; Tue, 16 Mar 2021 19:45:26 -0700 (PDT) From: "David E. Box" To: hdegoede@redhat.com, mgross@linux.intel.com Cc: "David E. Box" , lee.jones@linaro.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] platform_x86: intel_pmt_crashlog: Fix incorrect macros Date: Tue, 16 Mar 2021 19:44:55 -0700 Message-Id: <20210317024455.3071477-2-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210317024455.3071477-1-david.e.box@linux.intel.com> References: <20210317024455.3071477-1-david.e.box@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fixes off-by-one bugs in the macro assignments for the crashlog control bits. Was initially tested on emulation but bug revealed after testing on silicon. Fixes: 5ef9998c96b0 ("platform/x86: Intel PMT Crashlog capability driver") Signed-off-by: David E. Box --- drivers/platform/x86/intel_pmt_crashlog.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/platform/x86/intel_pmt_crashlog.c b/drivers/platform/x86/intel_pmt_crashlog.c index 97dd749c8290..92d315a16cfd 100644 --- a/drivers/platform/x86/intel_pmt_crashlog.c +++ b/drivers/platform/x86/intel_pmt_crashlog.c @@ -23,18 +23,17 @@ #define CRASH_TYPE_OOBMSM 1 /* Control Flags */ -#define CRASHLOG_FLAG_DISABLE BIT(27) +#define CRASHLOG_FLAG_DISABLE BIT(28) /* - * Bits 28 and 29 control the state of bit 31. + * Bits 29 and 30 control the state of bit 31. * - * Bit 28 will clear bit 31, if set, allowing a new crashlog to be captured. - * Bit 29 will immediately trigger a crashlog to be generated, setting bit 31. - * Bit 30 is read-only and reserved as 0. + * Bit 29 will clear bit 31, if set, allowing a new crashlog to be captured. + * Bit 30 will immediately trigger a crashlog to be generated, setting bit 31. * Bit 31 is the read-only status with a 1 indicating log is complete. */ -#define CRASHLOG_FLAG_TRIGGER_CLEAR BIT(28) -#define CRASHLOG_FLAG_TRIGGER_EXECUTE BIT(29) +#define CRASHLOG_FLAG_TRIGGER_CLEAR BIT(29) +#define CRASHLOG_FLAG_TRIGGER_EXECUTE BIT(30) #define CRASHLOG_FLAG_TRIGGER_COMPLETE BIT(31) #define CRASHLOG_FLAG_TRIGGER_MASK GENMASK(31, 28) -- 2.25.1