From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760122AbcJTLLh (ORCPT ); Thu, 20 Oct 2016 07:11:37 -0400 Received: from terminus.zytor.com ([198.137.202.10]:39622 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755137AbcJTLLf (ORCPT ); Thu, 20 Oct 2016 07:11:35 -0400 Date: Thu, 20 Oct 2016 04:10:39 -0700 From: tip-bot for Josh Poimboeuf Message-ID: Cc: hpa@zytor.com, mingo@kernel.org, peterz@infradead.org, tglx@linutronix.de, luto@kernel.org, dvlasenk@redhat.com, nilayvaish@gmail.com, linux-kernel@vger.kernel.org, bp@alien8.de, jpoimboe@redhat.com, torvalds@linux-foundation.org, brgerst@gmail.com Reply-To: peterz@infradead.org, hpa@zytor.com, mingo@kernel.org, dvlasenk@redhat.com, linux-kernel@vger.kernel.org, nilayvaish@gmail.com, tglx@linutronix.de, luto@kernel.org, bp@alien8.de, jpoimboe@redhat.com, torvalds@linux-foundation.org, brgerst@gmail.com In-Reply-To: <6cf569410bfa84cf923902fc4d628444cace94be.1474480779.git.jpoimboe@redhat.com> References: <6cf569410bfa84cf923902fc4d628444cace94be.1474480779.git.jpoimboe@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/boot/smp/32: Fix initial idle stack location on 32-bit kernels Git-Commit-ID: b9b1a9c363ff7b17b2a35e20e28e86a449cfde1f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: b9b1a9c363ff7b17b2a35e20e28e86a449cfde1f Gitweb: http://git.kernel.org/tip/b9b1a9c363ff7b17b2a35e20e28e86a449cfde1f Author: Josh Poimboeuf AuthorDate: Wed, 21 Sep 2016 16:04:03 -0500 Committer: Ingo Molnar CommitDate: Thu, 20 Oct 2016 09:15:23 +0200 x86/boot/smp/32: Fix initial idle stack location on 32-bit kernels On 32-bit kernels, the initial idle stack calculation doesn't take into account the TOP_OF_KERNEL_STACK_PADDING, making the stack end address inconsistent with other tasks on 32-bit. Signed-off-by: Josh Poimboeuf Reviewed-by: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Nilay Vaish Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/6cf569410bfa84cf923902fc4d628444cace94be.1474480779.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/smpboot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 951f093..dcbd45a 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -964,9 +964,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) int cpu0_nmi_registered = 0; unsigned long timeout; - idle->thread.sp = (unsigned long) (((struct pt_regs *) - (THREAD_SIZE + task_stack_page(idle))) - 1); - + idle->thread.sp = (unsigned long)task_pt_regs(idle); early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu); initial_code = (unsigned long)start_secondary; initial_stack = idle->thread.sp;