Skip to content

Commit 10c931c

Browse files
debox1jwrdegoede
authored andcommitted
platform/x86: intel_pmt_crashlog: Fix incorrect macros
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: 5ef9998 ("platform/x86: Intel PMT Crashlog capability driver") Signed-off-by: David E. Box <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20210317024455.3071477-2-david.e.box@linux.intel.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 7547def commit 10c931c

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

drivers/platform/x86/intel_pmt_crashlog.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,17 @@
2323
#define CRASH_TYPE_OOBMSM 1
2424

2525
/* Control Flags */
26-
#define CRASHLOG_FLAG_DISABLE BIT(27)
26+
#define CRASHLOG_FLAG_DISABLE BIT(28)
2727

2828
/*
29-
* Bits 28 and 29 control the state of bit 31.
29+
* Bits 29 and 30 control the state of bit 31.
3030
*
31-
* Bit 28 will clear bit 31, if set, allowing a new crashlog to be captured.
32-
* Bit 29 will immediately trigger a crashlog to be generated, setting bit 31.
33-
* Bit 30 is read-only and reserved as 0.
31+
* Bit 29 will clear bit 31, if set, allowing a new crashlog to be captured.
32+
* Bit 30 will immediately trigger a crashlog to be generated, setting bit 31.
3433
* Bit 31 is the read-only status with a 1 indicating log is complete.
3534
*/
36-
#define CRASHLOG_FLAG_TRIGGER_CLEAR BIT(28)
37-
#define CRASHLOG_FLAG_TRIGGER_EXECUTE BIT(29)
35+
#define CRASHLOG_FLAG_TRIGGER_CLEAR BIT(29)
36+
#define CRASHLOG_FLAG_TRIGGER_EXECUTE BIT(30)
3837
#define CRASHLOG_FLAG_TRIGGER_COMPLETE BIT(31)
3938
#define CRASHLOG_FLAG_TRIGGER_MASK GENMASK(31, 28)
4039

0 commit comments

Comments
 (0)