From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 30 Jul 2012 19:32:34 +0200 (CEST) Received: from mail-pb0-f49.google.com ([209.85.160.49]:33933 "EHLO mail-pb0-f49.google.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S1903637Ab2G3Rc1 (ORCPT ); Mon, 30 Jul 2012 19:32:27 +0200 Received: by pbbrq13 with SMTP id rq13so11008378pbb.36 for ; Mon, 30 Jul 2012 10:32:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :user-agent:x-gm-message-state; bh=MiDzq5Kk0iwo/c1nHYZO3Ozr7JXCWxeXk7Z2OZl37pw=; b=ijg7Q+Y4pzXZQS/hFqm2NrMLh0RVIIAwf16jyqr+HkIjCNUHLZVD2Wm3AQZbxRsHL6 LNU8jEKIz+/dQwxnLrnW21APahxc4/hNpXFlrJXTx8FZCFBDrVxAQyXt7BXS4amlhbMs zike4HfOM5QVRDrXqQwdS/otH4d6iqrz9pO/hs0u9hpBvZKioPA7m5HhR9MM3IMctOiK kd8FZ8XAZI27Xfrrvg+6RjZTe+jSwOuE5qaDHQW2p3Hm1Sn9UkTIYwQ4454kh1tvM43Y TRv6EXk1By+CaaB1VMeIrZuE/ziPzjb8/Kc0I9YRjqBeqvlqVedx+GkrwfXQDeOXCXnz pPAQ== Received: by 10.68.217.202 with SMTP id pa10mr7905967pbc.15.1343669540107; Mon, 30 Jul 2012 10:32:20 -0700 (PDT) Received: from localhost (c-67-168-183-230.hsd1.wa.comcast.net. [67.168.183.230]) by mx.google.com with ESMTPS id qp6sm8290255pbc.55.2012.07.30.10.32.18 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jul 2012 10:32:19 -0700 (PDT) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg KH , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, David Daney , Ralf Baechle , linux-mips@linux-mips.org Subject: [ 04/41] MIPS: Properly align the .data..init_task section. Date: Mon, 30 Jul 2012 10:31:03 -0700 Message-Id: <20120730172901.652451653@linuxfoundation.org> X-Mailer: git-send-email 1.7.10.1.362.g242cab3 In-Reply-To: <20120730172901.306897424@linuxfoundation.org> References: <20120730172901.306897424@linuxfoundation.org> User-Agent: quilt/0.60-20.4 X-Gm-Message-State: ALoCoQmIpyCRp4g4kd0R3XLAPyCWxd8OX3bmkZ6GTMH/ua6pxcaFqeGRtWINQuk11PITyMUSF3pB X-archive-position: 34000 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: gregkh@linuxfoundation.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Return-Path: From: Greg KH 3.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Daney commit 7b1c0d26a8e272787f0f9fcc5f3e8531df3b3409 upstream. Improper alignment can lead to unbootable systems and/or random crashes. [ralf@linux-mips.org: This is a lond standing bug since 6eb10bc9e2deab06630261cd05c4cb1e9a60e980 (kernel.org) rsp. c422a10917f75fd19fa7fe070aaaa23e384dae6f (lmo) [MIPS: Clean up linker script using new linker script macros.] so dates back to 2.6.32.] Signed-off-by: David Daney Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/3881/ Signed-off-by: Ralf Baechle Signed-off-by: Greg Kroah-Hartman --- arch/mips/include/asm/thread_info.h | 4 ++-- arch/mips/kernel/vmlinux.lds.S | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h @@ -60,6 +60,8 @@ struct thread_info { register struct thread_info *__current_thread_info __asm__("$28"); #define current_thread_info() __current_thread_info +#endif /* !__ASSEMBLY__ */ + /* thread information allocation */ #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_32BIT) #define THREAD_SIZE_ORDER (1) @@ -97,8 +99,6 @@ register struct thread_info *__current_t #define free_thread_info(info) kfree(info) -#endif /* !__ASSEMBLY__ */ - #define PREEMPT_ACTIVE 0x10000000 /* --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -1,5 +1,6 @@ #include #include +#include #include #undef mips @@ -73,7 +74,7 @@ SECTIONS .data : { /* Data */ . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ - INIT_TASK_DATA(PAGE_SIZE) + INIT_TASK_DATA(THREAD_SIZE) NOSAVE_DATA CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)