Commit 2d54ff2f authored by Paul Mackerras's avatar Paul Mackerras Committed by Paul Mackerras

Further PPC updates - fix thread_saved_pc, make sure init_thread_union

is properly 8kB-aligned.
parent 53cd6170
......@@ -1727,10 +1727,6 @@ m8260_gorom:
.data
.globl sdata
sdata:
.globl init_thread_union
init_thread_union:
.space 8192
.globl empty_zero_page
empty_zero_page:
.space 4096
......
......@@ -1082,8 +1082,6 @@ _GLOBAL(set_context)
*/
.data
_GLOBAL(sdata)
_GLOBAL(init_thread_union)
.space 8192
_GLOBAL(empty_zero_page)
.space 4096
_GLOBAL(swapper_pg_dir)
......
......@@ -971,10 +971,6 @@ set_dec_cpu6:
.data
.globl sdata
sdata:
.globl init_thread_union
init_thread_union:
.space 8192
.globl empty_zero_page
empty_zero_page:
.space 4096
......
......@@ -1496,11 +1496,6 @@ _GLOBAL(abort)
.data
.globl sdata
sdata:
.globl init_thread_union
init_thread_union:
.space 8192
.globl empty_zero_page
empty_zero_page:
.space 4096
......
......@@ -59,6 +59,12 @@ static struct files_struct init_files = INIT_FILES;
static struct signal_struct init_signals = INIT_SIGNALS;
struct mm_struct init_mm = INIT_MM(init_mm);
/* this is 8kB-aligned so we can get to the thread_info struct
at the base of it from the stack pointer with 1 integer instruction. */
union thread_union init_thread_union
__attribute__((__section__(".data.init_task"))) =
{ INIT_THREAD_INFO(init_task) };
/* initial task structure */
struct task_struct init_task = INIT_TASK(init_task);
......
......@@ -35,7 +35,6 @@
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/pmac_feature.h>
#include <asm/thread_info.h>
#if defined CONFIG_KGDB
#include <asm/kgdb.h>
......@@ -542,9 +541,6 @@ int __init ppc_init(void)
arch_initcall(ppc_init);
/* Initial thread_info struct, copied into init_task_union */
struct thread_info init_thread_values __initdata = INIT_THREAD_INFO(init_task);
/* Warning, IO base is not yet inited */
void __init setup_arch(char **cmdline_p)
{
......@@ -553,9 +549,6 @@ void __init setup_arch(char **cmdline_p)
extern char *klimit;
extern void do_init_bootmem(void);
/* initialize the thread_info for the init task */
init_thread_info = init_thread_values;
/* so udelay does something sensible, assume <= 1000 bogomips */
loops_per_jiffy = 500000000 / HZ;
......
......@@ -49,8 +49,9 @@ SECTIONS
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
/* Read-write section, merged into data segment: */
. = (. + 0x0FFF) & 0xFFFFF000;
. = ALIGN(4096);
.data :
{
*(.data)
......@@ -80,6 +81,9 @@ SECTIONS
. = ALIGN(32);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
. = ALIGN(8192);
.data.init_task : { *(.data.init_task) }
. = ALIGN(4096);
__init_begin = .;
.text.init : { *(.text.init) }
......
......@@ -714,10 +714,8 @@ struct thread_struct {
/*
* Return saved PC of a blocked thread. For now, this is the "user" PC
*/
static inline unsigned long thread_saved_pc(struct thread_struct *t)
{
return (t->regs) ? t->regs->nip : 0;
}
#define thread_saved_pc(tsk) \
((tsk)->thread.regs? (tsk)->thread.regs->nip: 0)
#define copy_segments(tsk, mm) do { } while (0)
#define release_segments(mm) do { } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment