* should we use $(__USER_DS) or $(__KERNEL_DS) when entering interrupt handlers?
@ 2010-03-18 17:38 Yang
0 siblings, 0 replies; only message in thread
From: Yang @ 2010-03-18 17:38 UTC (permalink / raw)
To: linux-kernel
in handling an interrupt, kernel first saves all the register contents , in
the SAVE_ALL macro, in the last part of this macro, it adjusts the
data segment selectors for kernel mode.
in kernel 2.4, the __KERNEL_DS segment is loaded into %ds and %es, at line
98 of:
http://lxr.linux.no/#linux-old+v2.4.31/arch/i386/kernel/entry.S
but in kernel 2.6, __USER_DS segment is loaded into %ds and %es, at line
227 of :
http://lxr.linux.no/#linux+v2.6.33/arch/x86/kernel/entry_32.S
I understand that on x86, all the data segment selector contents are
basically the same, but semantically it's better to use the KERNEL_DS
because we are working in kernel mode?
Thanks!
Yang
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-18 17:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-18 17:38 should we use $(__USER_DS) or $(__KERNEL_DS) when entering interrupt handlers? Yang
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®