From: alad@hss.hns.com
To: linux-kernel@vger.kernel.org
Subject: __switch_to macro
Date: Fri, 6 Apr 2001 12:53:10 +0530 [thread overview]
Message-ID: <65256A26.0027EA80.00@sandesh.hss.hns.com> (raw)
Hi,
The note above __switch_to macro in i386/kernel/process.c says that we no
more use hardware context switching as some problems in recovering from
saved state that is no longer valid. (I am peeking into 2.2 kernel). Now I have
following questions
1) What exactly is meant by ' stale segment register values' in the note.
2) In the above macro, I think we recover gracefully from error condition while
recovering fs and gs segment registers . The loadsegment(fs,next->tss.fs) and
loadsegment(gs,next->tss.gs) does it. I am not able to understand loadsegment
macro. The macro is as under
/** Load a segment. Fall back on loading a zero segment if something goes wrong
**/
#define loadsegment(seg,value) \
asm volatile("\n" \
"1:\t" \
"movl %0,%%" #seg "\n" \
"2:\n" \
"3:\t" \
"pushl $0\n\t" \
"jmp 2b\n" \
".previous\n" \
".section __ex_table,\"a\"\n\t \
"/align 4\n\t" \
".long 1b,3b\n" \
".previous" \
: :"m" (*(unsigned int *)&(value)))
I also want to know what is 'something' in the comment above the macro
Thanks in advance
Amol
next reply other threads:[~2001-04-06 7:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-06 7:23 alad [this message]
2001-04-06 8:48 ` Jamie Lokier
2001-04-06 9:12 alad
2001-04-06 11:39 ` Jamie Lokier
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=65256A26.0027EA80.00@sandesh.hss.hns.com \
--to=alad@hss.hns.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®