From patchwork Sun Dec 21 20:40:54 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 15174 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id E5A3BDDD04 for ; Mon, 22 Dec 2008 07:39:26 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751005AbYLUUjZ (ORCPT ); Sun, 21 Dec 2008 15:39:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751022AbYLUUjZ (ORCPT ); Sun, 21 Dec 2008 15:39:25 -0500 Received: from pfepb.post.tele.dk ([195.41.46.236]:35671 "EHLO pfepb.post.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750963AbYLUUjY (ORCPT ); Sun, 21 Dec 2008 15:39:24 -0500 Received: from ravnborg.org (x1-6-00-1e-2a-84-ae-3e.k225.webspeed.dk [80.163.61.94]) by pfepb.post.tele.dk (Postfix) with ESMTP id 525D4F84063; Sun, 21 Dec 2008 21:39:20 +0100 (CET) Received: by ravnborg.org (Postfix, from userid 500) id 306A4580D0; Sun, 21 Dec 2008 21:40:55 +0100 (CET) Date: Sun, 21 Dec 2008 21:40:54 +0100 From: Sam Ravnborg To: David Miller , sparclinux Cc: Kyle McMartin Subject: [PATCH] sparc: use .data.init_task section for init_thread_union Message-ID: <20081221204054.GA18284@uranus.ravnborg.org> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Use a dedicated aligned section for the init_thread_union variable and declare this section in vmlinux.lds. This align sparc with most other architectures. Eventually this allow the init_task bits to be unified across all architectures. Signed-off-by: Sam Ravnborg Cc: Kyle McMartin --- Build tested on sparc32 and sparc64 - no boot test! Sam arch/sparc/kernel/init_task.c | 3 +-- arch/sparc/kernel/vmlinux.lds.S | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c index 8e64ebc..62126e4 100644 --- a/arch/sparc/kernel/init_task.c +++ b/arch/sparc/kernel/init_task.c @@ -23,6 +23,5 @@ EXPORT_SYMBOL(init_task); * in etrap.S which assumes it. */ union thread_union init_thread_union - __attribute__((section (".text\"\n\t#"))) - __attribute__((aligned (THREAD_SIZE))) + __attribute__((section (".data.init_task"))) = { INIT_THREAD_INFO(init_task) }; diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index 4bfbeff..59c8d09 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S @@ -1,7 +1,9 @@ /* ld script for sparc32/sparc64 kernel */ #include + #include +#include #ifdef CONFIG_SPARC32 #define INITIAL_ADDRESS 0x10000 + SIZEOF_HEADERS @@ -65,8 +67,15 @@ SECTIONS .data.read_mostly : { *(.data.read_mostly) } + /* End of data section */ _edata = .; PROVIDE (edata = .); + + /* init_task */ + . = ALIGN(THREAD_SIZE); + .data.init_task : { + *(.data.init_task) + } .fixup : { __start___fixup = .; *(.fixup)