From: Borislav Petkov <bp@alien8.de>
To: Tony Luck <tony.luck@intel.com>
Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
Aristeu Rozanski <aris@redhat.com>,
Mauro Carvalho Chehab <mchehab@s-opensource.com>,
linux-edac@vger.kernel.org
Subject: [2/5] x86/mce: Add macors for corrected error count bit field
Date: Mon, 24 Sep 2018 22:24:34 +0200 [thread overview]
Message-ID: <20180924202434.GF20187@zn.tnic> (raw)
On Mon, Sep 24, 2018 at 01:16:10PM -0700, Tony Luck wrote:
> From: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
>
> The bit field 52:38 of MCi_STATUS is for corrected error count.
> Add {*_SHIFT|*_MASK|*_CEC(c)} macros for the bit field.
>
> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
> arch/x86/include/asm/mce.h | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
> index d53e5dd7471a..a81a22e3592c 100644
> --- a/arch/x86/include/asm/mce.h
> +++ b/arch/x86/include/asm/mce.h
> @@ -30,15 +30,18 @@
> #define MCG_EXT_CTL_LMCE_EN BIT_ULL(0) /* Enable LMCE */
>
> /* MCi_STATUS register defines */
> -#define MCI_STATUS_VAL BIT_ULL(63) /* valid error */
> -#define MCI_STATUS_OVER BIT_ULL(62) /* previous errors lost */
> -#define MCI_STATUS_UC BIT_ULL(61) /* uncorrected error */
> -#define MCI_STATUS_EN BIT_ULL(60) /* error enabled */
> -#define MCI_STATUS_MISCV BIT_ULL(59) /* misc error reg. valid */
> -#define MCI_STATUS_ADDRV BIT_ULL(58) /* addr reg. valid */
> -#define MCI_STATUS_PCC BIT_ULL(57) /* processor context corrupt */
> -#define MCI_STATUS_S BIT_ULL(56) /* Signaled machine check */
> -#define MCI_STATUS_AR BIT_ULL(55) /* Action required */
> +#define MCI_STATUS_VAL BIT_ULL(63) /* valid error */
> +#define MCI_STATUS_OVER BIT_ULL(62) /* previous errors lost */
> +#define MCI_STATUS_UC BIT_ULL(61) /* uncorrected error */
> +#define MCI_STATUS_EN BIT_ULL(60) /* error enabled */
> +#define MCI_STATUS_MISCV BIT_ULL(59) /* misc error reg. valid */
> +#define MCI_STATUS_ADDRV BIT_ULL(58) /* addr reg. valid */
> +#define MCI_STATUS_PCC BIT_ULL(57) /* processor context corrupt */
> +#define MCI_STATUS_S BIT_ULL(56) /* Signaled machine check */
> +#define MCI_STATUS_AR BIT_ULL(55) /* Action required */
> +#define MCI_STATUS_CEC_SHIFT 38 /* Corrected Error Count */
> +#define MCI_STATUS_CEC_MASK 0x1fffc000000000ULL
> +#define MCI_STATUS_CEC(c) (((c) & MCI_STATUS_CEC_MASK) >> MCI_STATUS_CEC_SHIFT)
This is the wrong separation of changes: the *first* patch should
contain the switch to use BIT_ULL() and the vertical realignment
of all bits, i.e., cleanup, and the second should only add the new
functionality, i.e., macros in this case.
next reply other threads:[~2018-09-24 20:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 20:24 Borislav Petkov [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-09-24 20:16 [2/5] x86/mce: Add macors for corrected error count bit field Luck, Tony
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180924202434.GF20187@zn.tnic \
--to=bp@alien8.de \
--cc=aris@redhat.com \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@s-opensource.com \
--cc=qiuxu.zhuo@intel.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.