mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Smita Koralahalli" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>,
	Borislav Petkov <bp@suse.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: ras/core] x86/mce: Avoid unnecessary padding in struct mce_bank
Date: Tue, 05 Apr 2022 20:56:17 -0000	[thread overview]
Message-ID: <164919217791.389.16926889046664512675.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220225193342.215780-2-Smita.KoralahalliChannabasappa@amd.com>

The following commit has been merged into the ras/core branch of tip:

Commit-ID:     9f1b19b977ee3cbd3fe9135ff63dbf221eac1d6a
Gitweb:        https://git.kernel.org/tip/9f1b19b977ee3cbd3fe9135ff63dbf221eac1d6a
Author:        Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
AuthorDate:    Fri, 25 Feb 2022 13:33:40 -06:00
Committer:     Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 05 Apr 2022 21:23:34 +02:00

x86/mce: Avoid unnecessary padding in struct mce_bank

Convert struct mce_bank member "init" from bool to a bitfield to get rid
of unnecessary padding.

$ pahole -C mce_bank arch/x86/kernel/cpu/mce/core.o

before:

  /* size: 16, cachelines: 1, members: 2 */
  /* padding: 7 */
  /* last cacheline: 16 bytes */

after:

  /* size: 16, cachelines: 1, members: 3 */
  /* last cacheline: 16 bytes */

No functional changes.

Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220225193342.215780-2-Smita.KoralahalliChannabasappa@amd.com
---
 arch/x86/kernel/cpu/mce/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 981496e..d775fcd 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -69,7 +69,9 @@ DEFINE_PER_CPU_READ_MOSTLY(unsigned int, mce_num_banks);
 
 struct mce_bank {
 	u64			ctl;			/* subevents to enable */
-	bool			init;			/* initialise bank? */
+
+	__u64 init			: 1,		/* initialise bank? */
+	      __reserved_1		: 63;
 };
 static DEFINE_PER_CPU_READ_MOSTLY(struct mce_bank[MAX_NR_BANKS], mce_banks_array);
 

  reply	other threads:[~2022-04-06  2:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25 19:33 [PATCH v4 0/3] x86/mce: Support extended MCA_ADDR address on SMCA systems Smita Koralahalli
2022-02-25 19:33 ` [PATCH v4 1/3] x86/mce: Avoid unnecessary padding in struct mce_bank Smita Koralahalli
2022-04-05 20:56   ` tip-bot2 for Smita Koralahalli [this message]
2022-02-25 19:33 ` [PATCH v4 2/3] x86/mce: Define function to extract ErrorAddr from MCA_ADDR Smita Koralahalli
2022-03-31 13:24   ` Borislav Petkov
2022-04-03 13:16     ` Borislav Petkov
2022-04-03 18:50       ` Borislav Petkov
2022-04-03 19:58         ` Thomas Gleixner
2022-04-03 20:44           ` Borislav Petkov
2022-04-04 20:55             ` Smita Koralahalli
2022-04-04 21:56               ` Borislav Petkov
2022-02-25 19:33 ` [PATCH v4 3/3] x86/mce: Add support for Extended Physical Address MCA changes Smita Koralahalli
2022-03-11 21:00 ` [PATCH v4 0/3] x86/mce: Support extended MCA_ADDR address on SMCA systems Koralahalli Channabasappa, Smita

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=164919217791.389.16926889046664512675.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=Smita.KoralahalliChannabasappa@amd.com \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®