linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Tony Luck <tony.luck@intel.com>, Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH v1 5/5] x86/mce: Sort mca_config members to get rid of unnecessary padding
Date: Wed, 22 Sep 2021 18:51:01 +0200	[thread overview]
Message-ID: <20210922165101.18951-6-bp@alien8.de> (raw)
In-Reply-To: <20210922165101.18951-1-bp@alien8.de>

From: Borislav Petkov <bp@suse.de>

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

before:

   /* size: 40, cachelines: 1, members: 16 */
   /* sum members: 21, holes: 1, sum holes: 3 */
   /* sum bitfield members: 64 bits, bit holes: 2, sum bit holes: 32 bits */
   /* padding: 4 */
   /* last cacheline: 40 bytes */

after:

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

No functional changes.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/kernel/cpu/mce/internal.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kernel/cpu/mce/internal.h b/arch/x86/kernel/cpu/mce/internal.h
index 21865545cd3b..37b9e381ef02 100644
--- a/arch/x86/kernel/cpu/mce/internal.h
+++ b/arch/x86/kernel/cpu/mce/internal.h
@@ -113,11 +113,6 @@ static inline void mce_unregister_injector_chain(struct notifier_block *nb)	{ }
 #endif
 
 struct mca_config {
-	bool dont_log_ce;
-	bool cmci_disabled;
-	bool ignore_ce;
-	bool print_all;
-
 	__u64 lmce_disabled		: 1,
 	      disabled			: 1,
 	      ser			: 1,
@@ -127,11 +122,16 @@ struct mca_config {
 	      initialized		: 1,
 	      __reserved		: 58;
 
-	s8 bootlog;
+	bool dont_log_ce;
+	bool cmci_disabled;
+	bool ignore_ce;
+	bool print_all;
+
 	int tolerant;
 	int monarch_timeout;
 	int panic_timeout;
 	u32 rip_msr;
+	s8 bootlog;
 };
 
 extern struct mca_config mca_cfg;
-- 
2.29.2


  parent reply	other threads:[~2021-09-22 16:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 16:50 [PATCH v1 0/5] x86/mce: Remove indirect calls Borislav Petkov
2021-09-22 16:50 ` [PATCH v1 1/5] x86/mce: Get rid of the mce_severity function pointer Borislav Petkov
2021-09-23  9:50   ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-09-22 16:50 ` [PATCH v1 2/5] x86/mce: Get rid of machine_check_vector Borislav Petkov
2021-09-23  9:50   ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-09-22 16:50 ` [PATCH v1 3/5] x86/mce: Get rid of msr_ops Borislav Petkov
2021-09-23  9:50   ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-09-22 16:51 ` [PATCH v1 4/5] x86/mce: Get rid of the ->quirk_no_way_out() indirect call Borislav Petkov
2021-09-23  9:50   ` [tip: ras/core] " tip-bot2 for Borislav Petkov
2021-09-22 16:51 ` Borislav Petkov [this message]
2021-09-23  9:50   ` [tip: ras/core] x86/mce: Sort mca_config members to get rid of unnecessary padding tip-bot2 for Borislav Petkov
2021-09-22 20:35 ` [PATCH v1 0/5] x86/mce: Remove indirect calls Luck, Tony
2021-09-22 20:42   ` Borislav Petkov

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=20210922165101.18951-6-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=Yazen.Ghannam@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).