Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
5679732a
Commit
5679732a
authored
Mar 11, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/sfr
parents
d2429752
36f06199
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
arch/i386/kernel/sysenter.c
arch/i386/kernel/sysenter.c
+1
-0
arch/i386/kernel/vm86.c
arch/i386/kernel/vm86.c
+1
-1
include/asm-i386/processor.h
include/asm-i386/processor.h
+9
-4
kernel/posix-timers.c
kernel/posix-timers.c
+7
-2
No files found.
arch/i386/kernel/sysenter.c
View file @
5679732a
...
@@ -40,6 +40,7 @@ void enable_sep_cpu(void *info)
...
@@ -40,6 +40,7 @@ void enable_sep_cpu(void *info)
int
cpu
=
get_cpu
();
int
cpu
=
get_cpu
();
struct
tss_struct
*
tss
=
init_tss
+
cpu
;
struct
tss_struct
*
tss
=
init_tss
+
cpu
;
tss
->
ss1
=
__KERNEL_CS
;
wrmsr
(
MSR_IA32_SYSENTER_CS
,
__KERNEL_CS
,
0
);
wrmsr
(
MSR_IA32_SYSENTER_CS
,
__KERNEL_CS
,
0
);
wrmsr
(
MSR_IA32_SYSENTER_ESP
,
tss
->
esp0
,
0
);
wrmsr
(
MSR_IA32_SYSENTER_ESP
,
tss
->
esp0
,
0
);
wrmsr
(
MSR_IA32_SYSENTER_EIP
,
(
unsigned
long
)
sysenter_entry
,
0
);
wrmsr
(
MSR_IA32_SYSENTER_EIP
,
(
unsigned
long
)
sysenter_entry
,
0
);
...
...
arch/i386/kernel/vm86.c
View file @
5679732a
...
@@ -291,7 +291,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
...
@@ -291,7 +291,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
tss
=
init_tss
+
smp_processor_id
();
tss
=
init_tss
+
smp_processor_id
();
tss
->
esp0
=
tsk
->
thread
.
esp0
=
(
unsigned
long
)
&
info
->
VM86_TSS_ESP0
;
tss
->
esp0
=
tsk
->
thread
.
esp0
=
(
unsigned
long
)
&
info
->
VM86_TSS_ESP0
;
disable_sysenter
();
disable_sysenter
(
tss
);
tsk
->
thread
.
screen_bitmap
=
info
->
screen_bitmap
;
tsk
->
thread
.
screen_bitmap
=
info
->
screen_bitmap
;
if
(
info
->
flags
&
VM86_SCREEN_BITMAP
)
if
(
info
->
flags
&
VM86_SCREEN_BITMAP
)
...
...
include/asm-i386/processor.h
View file @
5679732a
...
@@ -347,7 +347,7 @@ struct tss_struct {
...
@@ -347,7 +347,7 @@ struct tss_struct {
unsigned
long
esp0
;
unsigned
long
esp0
;
unsigned
short
ss0
,
__ss0h
;
unsigned
short
ss0
,
__ss0h
;
unsigned
long
esp1
;
unsigned
long
esp1
;
unsigned
short
ss1
,
__ss1h
;
unsigned
short
ss1
,
__ss1h
;
/* ss1 is used to cache MSR_IA32_SYSENTER_CS */
unsigned
long
esp2
;
unsigned
long
esp2
;
unsigned
short
ss2
,
__ss2h
;
unsigned
short
ss2
,
__ss2h
;
unsigned
long
__cr3
;
unsigned
long
__cr3
;
...
@@ -413,15 +413,20 @@ static inline void load_esp0(struct tss_struct *tss, unsigned long esp0)
...
@@ -413,15 +413,20 @@ static inline void load_esp0(struct tss_struct *tss, unsigned long esp0)
{
{
tss
->
esp0
=
esp0
;
tss
->
esp0
=
esp0
;
if
(
cpu_has_sep
)
{
if
(
cpu_has_sep
)
{
wrmsr
(
MSR_IA32_SYSENTER_CS
,
__KERNEL_CS
,
0
);
if
(
tss
->
ss1
!=
__KERNEL_CS
)
{
tss
->
ss1
=
__KERNEL_CS
;
wrmsr
(
MSR_IA32_SYSENTER_CS
,
__KERNEL_CS
,
0
);
}
wrmsr
(
MSR_IA32_SYSENTER_ESP
,
esp0
,
0
);
wrmsr
(
MSR_IA32_SYSENTER_ESP
,
esp0
,
0
);
}
}
}
}
static
inline
void
disable_sysenter
(
void
)
static
inline
void
disable_sysenter
(
struct
tss_struct
*
tss
)
{
{
if
(
cpu_has_sep
)
if
(
cpu_has_sep
)
{
tss
->
ss1
=
0
;
wrmsr
(
MSR_IA32_SYSENTER_CS
,
0
,
0
);
wrmsr
(
MSR_IA32_SYSENTER_CS
,
0
,
0
);
}
}
}
#define start_thread(regs, new_eip, new_esp) do { \
#define start_thread(regs, new_eip, new_esp) do { \
...
...
kernel/posix-timers.c
View file @
5679732a
...
@@ -1273,7 +1273,7 @@ do_clock_nanosleep(clockid_t which_clock, int flags, struct timespec *tsave)
...
@@ -1273,7 +1273,7 @@ do_clock_nanosleep(clockid_t which_clock, int flags, struct timespec *tsave)
spin_unlock_irq
(
&
nanosleep_abs_list_lock
);
spin_unlock_irq
(
&
nanosleep_abs_list_lock
);
}
}
if
(
active
)
{
if
(
active
)
{
unsigned
long
jiffies_f
=
jiffies
;
long
jiffies_left
;
/*
/*
* Always restart abs calls from scratch to pick up any
* Always restart abs calls from scratch to pick up any
...
@@ -1282,7 +1282,12 @@ do_clock_nanosleep(clockid_t which_clock, int flags, struct timespec *tsave)
...
@@ -1282,7 +1282,12 @@ do_clock_nanosleep(clockid_t which_clock, int flags, struct timespec *tsave)
if
(
abs
)
if
(
abs
)
return
-
ERESTARTNOHAND
;
return
-
ERESTARTNOHAND
;
jiffies_to_timespec
(
new_timer
.
expires
-
jiffies_f
,
tsave
);
jiffies_left
=
new_timer
.
expires
-
jiffies
;
if
(
jiffies_left
<
0
)
return
0
;
jiffies_to_timespec
(
jiffies_left
,
tsave
);
while
(
tsave
->
tv_nsec
<
0
)
{
while
(
tsave
->
tv_nsec
<
0
)
{
tsave
->
tv_nsec
+=
NSEC_PER_SEC
;
tsave
->
tv_nsec
+=
NSEC_PER_SEC
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment