From: Alexander van Heukelum <heukelum@mailshack.com>
To: Alexander van Heukelum <heukelum@fastmail.fm>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Resend: [PATCH 2/9] traps: x86_64: make math_state_restore more like i386
Date: Fri, 3 Oct 2008 23:16:12 +0200 [thread overview]
Message-ID: <20081003211612.GA1690@mailshack.com> (raw)
In-Reply-To: <1223064040-23170-1-git-send-email-heukelum@fastmail.fm>
- rename variable me -> tsk
- get thread and tsk like i386
- expand used_math()
- copy comment
Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
---
arch/x86/kernel/traps_64.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
It looks like patches 2 and 7 have been eaten along the way... Trying
those again.
Greetings,
Alexander
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 8cf590b..a7aef2d 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -609,14 +609,15 @@ asmlinkage void __attribute__((weak)) mce_threshold_interrupt(void)
*/
asmlinkage void math_state_restore(void)
{
- struct task_struct *me = current;
+ struct thread_info *thread = current_thread_info();
+ struct task_struct *tsk = thread->task;
- if (!used_math()) {
+ if (!tsk_used_math(tsk)) {
local_irq_enable();
/*
* does a slab alloc which can sleep
*/
- if (init_fpu(me)) {
+ if (init_fpu(tsk)) {
/*
* ran out of memory!
*/
@@ -630,13 +631,13 @@ asmlinkage void math_state_restore(void)
/*
* Paranoid restore. send a SIGSEGV if we fail to restore the state.
*/
- if (unlikely(restore_fpu_checking(me))) {
+ if (unlikely(restore_fpu_checking(tsk))) {
stts();
- force_sig(SIGSEGV, me);
+ force_sig(SIGSEGV, tsk);
return;
}
- task_thread_info(me)->status |= TS_USEDFPU;
- me->fpu_counter++;
+ thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */
+ tsk->fpu_counter++;
}
EXPORT_SYMBOL_GPL(math_state_restore);
--
1.5.4.3
next prev parent reply other threads:[~2008-10-03 21:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 20:00 [PATCH 0/9] traps: x86: finalize unification of traps.c Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 1/9] traps: x86: converge trap_init functions Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 2/9] traps: x86_64: make math_state_restore more like i386 Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 3/9] traps: i386: use preempt_conditional_sti/cli in do_int3 Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 4/9] traps: x86_64: make io_check_error equal to the one on i386 Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 5/9] traps: i386: expand clear_mem_error and remove from mach_traps.h Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 6/9] traps: x86_64: use task_pid_nr(tsk) instead of tsk->pid in do_general_protection Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 7/9] traps: x86: various noop-changes preparing for unification of traps_xx.c Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 8/9] traps: x86: make traps_32.c and traps_64.c equal Alexander van Heukelum
2008-10-03 20:00 ` [PATCH 9/9] traps: x86: finalize unification of traps.c Alexander van Heukelum
2008-10-03 21:16 ` Alexander van Heukelum [this message]
2008-10-03 21:17 ` Resend: [PATCH 7/9] traps: x86: various noop-changes preparing for unification of traps_xx.c Alexander van Heukelum
2008-10-04 8:52 ` [PATCH 0/9] traps: x86: finalize unification of traps.c Ingo Molnar
2008-10-04 9:27 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081003211612.GA1690@mailshack.com \
--to=heukelum@mailshack.com \
--cc=heukelum@fastmail.fm \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.