From: tip-bot for Suresh Siddha <suresh.b.siddha@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
stable@kernel.org, suresh.b.siddha@intel.com, tglx@linutronix.de,
hpa@linux.intel.com, jody@nctritech.com
Subject: [tip:x86/urgent] x86, xsave: Use alloc_bootmem_align() instead of alloc_bootmem()
Date: Tue, 14 Dec 2010 00:49:20 GMT [thread overview]
Message-ID: <tip-10340ae130fb70352eae1ae8a00b7906d91bf166@git.kernel.org> (raw)
In-Reply-To: <20101116212442.059967454@sbsiddha-MOBL3.sc.intel.com>
Commit-ID: 10340ae130fb70352eae1ae8a00b7906d91bf166
Gitweb: http://git.kernel.org/tip/10340ae130fb70352eae1ae8a00b7906d91bf166
Author: Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Tue, 16 Nov 2010 13:23:51 -0800
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 13 Dec 2010 16:13:11 -0800
x86, xsave: Use alloc_bootmem_align() instead of alloc_bootmem()
Alignment of alloc_bootmem() depends on the value of
L1_CACHE_SHIFT. What we need here, however, is 64 byte alignment. Use
alloc_bootmem_align() and explicitly specify the alignment instead.
This fixes a kernel boot crash reported by Jody when the cpu in .config
is set to MPENTIUMII but the kernel is booted on a xsave-capable CPU.
Reported-by: Jody Bruchon <jody@nctritech.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <20101116212442.059967454@sbsiddha-MOBL3.sc.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@kernel.org>
---
arch/x86/kernel/xsave.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 9c253bd..5471285 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -394,7 +394,8 @@ static void __init setup_xstate_init(void)
* Setup init_xstate_buf to represent the init state of
* all the features managed by the xsave
*/
- init_xstate_buf = alloc_bootmem(xstate_size);
+ init_xstate_buf = alloc_bootmem_align(xstate_size,
+ __alignof__(struct xsave_struct));
init_xstate_buf->i387.mxcsr = MXCSR_DEFAULT;
clts();
next prev parent reply other threads:[~2010-12-14 0:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 21:23 [patch 1/2] bootmem: add alloc_bootmem_align() Suresh Siddha
2010-11-16 21:23 ` [patch 2/2] xsave: use alloc_bootmem_align() instead of alloc_bootmem() Suresh Siddha
2010-12-14 0:49 ` tip-bot for Suresh Siddha [this message]
2010-11-16 22:14 ` [patch 1/2] bootmem: add alloc_bootmem_align() H. Peter Anvin
2010-11-17 0:06 ` Suresh Siddha
2010-12-14 0:48 ` [tip:x86/urgent] bootmem: Add alloc_bootmem_align() tip-bot for Suresh Siddha
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=tip-10340ae130fb70352eae1ae8a00b7906d91bf166@git.kernel.org \
--to=suresh.b.siddha@intel.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jody@nctritech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
/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).