Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4f17c43 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

[PATCH] amd64: task_thread_info()



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e52f4ca2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -95,7 +95,7 @@ int save_i387(struct _fpstate __user *buf)
	if (!used_math())
	if (!used_math())
		return 0;
		return 0;
	clear_used_math(); /* trigger finit */
	clear_used_math(); /* trigger finit */
	if (tsk->thread_info->status & TS_USEDFPU) {
	if (task_thread_info(tsk)->status & TS_USEDFPU) {
		err = save_i387_checking((struct i387_fxsave_struct __user *)buf);
		err = save_i387_checking((struct i387_fxsave_struct __user *)buf);
		if (err) return err;
		if (err) return err;
		stts();
		stts();
+1 −1
Original line number Original line Diff line number Diff line
@@ -133,7 +133,7 @@ static void end_8259A_irq (unsigned int irq)
{
{
	if (irq > 256) { 
	if (irq > 256) { 
		char var;
		char var;
		printk("return %p stack %p ti %p\n", __builtin_return_address(0), &var, current->thread_info); 
		printk("return %p stack %p ti %p\n", __builtin_return_address(0), &var, task_thread_info(current));


		BUG(); 
		BUG(); 
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -463,7 +463,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long rsp,
	p->thread.rsp0 = (unsigned long) (childregs+1);
	p->thread.rsp0 = (unsigned long) (childregs+1);
	p->thread.userrsp = me->thread.userrsp; 
	p->thread.userrsp = me->thread.userrsp; 


	set_ti_thread_flag(p->thread_info, TIF_FORK);
	set_tsk_thread_flag(p, TIF_FORK);


	p->thread.fs = me->thread.fs;
	p->thread.fs = me->thread.fs;
	p->thread.gs = me->thread.gs;
	p->thread.gs = me->thread.gs;
+1 −1
Original line number Original line Diff line number Diff line
@@ -814,7 +814,7 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid)
	init_rsp = c_idle.idle->thread.rsp;
	init_rsp = c_idle.idle->thread.rsp;
	per_cpu(init_tss,cpu).rsp0 = init_rsp;
	per_cpu(init_tss,cpu).rsp0 = init_rsp;
	initial_code = start_secondary;
	initial_code = start_secondary;
	clear_ti_thread_flag(c_idle.idle->thread_info, TIF_FORK);
	clear_tsk_thread_flag(c_idle.idle, TIF_FORK);


	printk(KERN_INFO "Booting processor %d/%d APIC 0x%x\n", cpu,
	printk(KERN_INFO "Booting processor %d/%d APIC 0x%x\n", cpu,
		cpus_weight(cpu_present_map),
		cpus_weight(cpu_present_map),
+2 −2
Original line number Original line Diff line number Diff line
@@ -308,7 +308,7 @@ void show_registers(struct pt_regs *regs)
	printk("CPU %d ", cpu);
	printk("CPU %d ", cpu);
	__show_regs(regs);
	__show_regs(regs);
	printk("Process %s (pid: %d, threadinfo %p, task %p)\n",
	printk("Process %s (pid: %d, threadinfo %p, task %p)\n",
		cur->comm, cur->pid, cur->thread_info, cur);
		cur->comm, cur->pid, task_thread_info(cur), cur);


	/*
	/*
	 * When in-kernel, we also print out the stack and code at the
	 * When in-kernel, we also print out the stack and code at the
@@ -912,7 +912,7 @@ asmlinkage void math_state_restore(void)
	if (!used_math())
	if (!used_math())
		init_fpu(me);
		init_fpu(me);
	restore_fpu_checking(&me->thread.i387.fxsave);
	restore_fpu_checking(&me->thread.i387.fxsave);
	me->thread_info->status |= TS_USEDFPU;
	task_thread_info(me)->status |= TS_USEDFPU;
}
}


void __init trap_init(void)
void __init trap_init(void)
Loading