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
Kirill Smelkov
linux
Commits
91c4625d
Commit
91c4625d
authored
Dec 21, 2004
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge intel.com:/home/lenb/bk/26-latest-ref
into intel.com:/home/lenb/src/26-latest-dev
parents
1c5e7c21
87f3243f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
113 deletions
+16
-113
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-hub.c
+1
-1
kernel/posix-timers.c
kernel/posix-timers.c
+8
-111
mm/rmap.c
mm/rmap.c
+3
-0
mm/thrash.c
mm/thrash.c
+4
-1
No files found.
drivers/usb/host/ehci-hub.c
View file @
91c4625d
...
@@ -122,7 +122,7 @@ static int ehci_hub_resume (struct usb_hcd *hcd)
...
@@ -122,7 +122,7 @@ static int ehci_hub_resume (struct usb_hcd *hcd)
writel
(
temp
,
&
ehci
->
regs
->
port_status
[
i
]);
writel
(
temp
,
&
ehci
->
regs
->
port_status
[
i
]);
}
}
i
=
HCS_N_PORTS
(
ehci
->
hcs_params
);
i
=
HCS_N_PORTS
(
ehci
->
hcs_params
);
m
sleep
(
20
);
m
delay
(
20
);
while
(
i
--
)
{
while
(
i
--
)
{
temp
=
readl
(
&
ehci
->
regs
->
port_status
[
i
]);
temp
=
readl
(
&
ehci
->
regs
->
port_status
[
i
]);
if
((
temp
&
PORT_SUSPEND
)
==
0
)
if
((
temp
&
PORT_SUSPEND
)
==
0
)
...
...
kernel/posix-timers.c
View file @
91c4625d
...
@@ -10,10 +10,6 @@
...
@@ -10,10 +10,6 @@
* 2004-06-01 Fix CLOCK_REALTIME clock/timer TIMER_ABSTIME bug.
* 2004-06-01 Fix CLOCK_REALTIME clock/timer TIMER_ABSTIME bug.
* Copyright (C) 2004 Boris Hu
* Copyright (C) 2004 Boris Hu
*
*
* 2004-07-27 Provide POSIX compliant clocks
* CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
* by Christoph Lameter
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* the Free Software Foundation; either version 2 of the License, or (at
...
@@ -193,8 +189,6 @@ static int do_posix_gettime(struct k_clock *clock, struct timespec *tp);
...
@@ -193,8 +189,6 @@ static int do_posix_gettime(struct k_clock *clock, struct timespec *tp);
static
u64
do_posix_clock_monotonic_gettime_parts
(
static
u64
do_posix_clock_monotonic_gettime_parts
(
struct
timespec
*
tp
,
struct
timespec
*
mo
);
struct
timespec
*
tp
,
struct
timespec
*
mo
);
int
do_posix_clock_monotonic_gettime
(
struct
timespec
*
tp
);
int
do_posix_clock_monotonic_gettime
(
struct
timespec
*
tp
);
static
int
do_posix_clock_process_gettime
(
struct
timespec
*
tp
);
static
int
do_posix_clock_thread_gettime
(
struct
timespec
*
tp
);
static
struct
k_itimer
*
lock_timer
(
timer_t
timer_id
,
unsigned
long
*
flags
);
static
struct
k_itimer
*
lock_timer
(
timer_t
timer_id
,
unsigned
long
*
flags
);
static
inline
void
unlock_timer
(
struct
k_itimer
*
timr
,
unsigned
long
flags
)
static
inline
void
unlock_timer
(
struct
k_itimer
*
timr
,
unsigned
long
flags
)
...
@@ -215,25 +209,9 @@ static __init int init_posix_timers(void)
...
@@ -215,25 +209,9 @@ static __init int init_posix_timers(void)
.
clock_get
=
do_posix_clock_monotonic_gettime
,
.
clock_get
=
do_posix_clock_monotonic_gettime
,
.
clock_set
=
do_posix_clock_nosettime
.
clock_set
=
do_posix_clock_nosettime
};
};
struct
k_clock
clock_thread
=
{.
res
=
CLOCK_REALTIME_RES
,
.
abs_struct
=
NULL
,
.
clock_get
=
do_posix_clock_thread_gettime
,
.
clock_set
=
do_posix_clock_nosettime
,
.
timer_create
=
do_posix_clock_notimer_create
,
.
nsleep
=
do_posix_clock_nonanosleep
};
struct
k_clock
clock_process
=
{.
res
=
CLOCK_REALTIME_RES
,
.
abs_struct
=
NULL
,
.
clock_get
=
do_posix_clock_process_gettime
,
.
clock_set
=
do_posix_clock_nosettime
,
.
timer_create
=
do_posix_clock_notimer_create
,
.
nsleep
=
do_posix_clock_nonanosleep
};
register_posix_clock
(
CLOCK_REALTIME
,
&
clock_realtime
);
register_posix_clock
(
CLOCK_REALTIME
,
&
clock_realtime
);
register_posix_clock
(
CLOCK_MONOTONIC
,
&
clock_monotonic
);
register_posix_clock
(
CLOCK_MONOTONIC
,
&
clock_monotonic
);
register_posix_clock
(
CLOCK_PROCESS_CPUTIME_ID
,
&
clock_process
);
register_posix_clock
(
CLOCK_THREAD_CPUTIME_ID
,
&
clock_thread
);
posix_timers_cache
=
kmem_cache_create
(
"posix_timers_cache"
,
posix_timers_cache
=
kmem_cache_create
(
"posix_timers_cache"
,
sizeof
(
struct
k_itimer
),
0
,
0
,
NULL
,
NULL
);
sizeof
(
struct
k_itimer
),
0
,
0
,
NULL
,
NULL
);
...
@@ -1220,69 +1198,18 @@ int do_posix_clock_nosettime(struct timespec *tp)
...
@@ -1220,69 +1198,18 @@ int do_posix_clock_nosettime(struct timespec *tp)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
int
do_posix_clock_notimer_create
(
struct
k_itimer
*
timer
)
{
int
do_posix_clock_notimer_create
(
struct
k_itimer
*
timer
)
return
-
EINVAL
;
}
int
do_posix_clock_nonanosleep
(
int
which_lock
,
int
flags
,
struct
timespec
*
t
)
{
/* Single Unix specficiation says to return ENOTSUP but we do not have that */
return
-
EINVAL
;
}
static
unsigned
long
process_ticks
(
task_t
*
p
)
{
unsigned
long
ticks
;
task_t
*
t
;
spin_lock
(
&
p
->
sighand
->
siglock
);
/* The signal structure is shared between all threads */
ticks
=
p
->
signal
->
utime
+
p
->
signal
->
stime
;
/* Add up the cpu time for all the still running threads of this process */
t
=
p
;
do
{
ticks
+=
t
->
utime
+
t
->
stime
;
t
=
next_thread
(
t
);
}
while
(
t
!=
p
);
spin_unlock
(
&
p
->
sighand
->
siglock
);
return
ticks
;
}
static
inline
unsigned
long
thread_ticks
(
task_t
*
p
)
{
return
p
->
utime
+
current
->
stime
;
}
/*
* Single Unix Specification V3:
*
* Implementations shall also support the special clockid_t value
* CLOCK_THREAD_CPUTIME_ID, which represents the CPU-time clock of the calling
* thread when invoking one of the clock_*() or timer_*() functions. For these
* clock IDs, the values returned by clock_gettime() and specified by
* clock_settime() shall represent the amount of execution time of the thread
* associated with the clock.
*/
static
int
do_posix_clock_thread_gettime
(
struct
timespec
*
tp
)
{
{
jiffies_to_timespec
(
thread_ticks
(
current
),
tp
);
return
-
EINVAL
;
return
0
;
}
}
/*
int
do_posix_clock_nonanosleep
(
int
which_clock
,
int
flags
,
struct
timespec
*
t
)
* Single Unix Specification V3:
*
* Implementations shall also support the special clockid_t value
* CLOCK_PROCESS_CPUTIME_ID, which represents the CPU-time clock of the
* calling process when invoking one of the clock_*() or timer_*() functions.
* For these clock IDs, the values returned by clock_gettime() and specified
* by clock_settime() represent the amount of execution time of the process
* associated with the clock.
*/
static
int
do_posix_clock_process_gettime
(
struct
timespec
*
tp
)
{
{
jiffies_to_timespec
(
process_ticks
(
current
),
tp
);
#ifndef ENOTSUP
return
0
;
return
-
EOPNOTSUPP
;
/* aka ENOTSUP in userland for POSIX */
#else
/* parisc does define it separately. */
return
-
ENOTSUP
;
#endif
}
}
asmlinkage
long
asmlinkage
long
...
@@ -1290,10 +1217,6 @@ sys_clock_settime(clockid_t which_clock, const struct timespec __user *tp)
...
@@ -1290,10 +1217,6 @@ sys_clock_settime(clockid_t which_clock, const struct timespec __user *tp)
{
{
struct
timespec
new_tp
;
struct
timespec
new_tp
;
/* Cannot set process specific clocks */
if
(
which_clock
<
0
)
return
-
EINVAL
;
if
((
unsigned
)
which_clock
>=
MAX_CLOCKS
||
if
((
unsigned
)
which_clock
>=
MAX_CLOCKS
||
!
posix_clocks
[
which_clock
].
res
)
!
posix_clocks
[
which_clock
].
res
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -1307,29 +1230,6 @@ sys_clock_settime(clockid_t which_clock, const struct timespec __user *tp)
...
@@ -1307,29 +1230,6 @@ sys_clock_settime(clockid_t which_clock, const struct timespec __user *tp)
static
int
do_clock_gettime
(
clockid_t
which_clock
,
struct
timespec
*
tp
)
static
int
do_clock_gettime
(
clockid_t
which_clock
,
struct
timespec
*
tp
)
{
{
/* Process process specific clocks */
if
(
which_clock
<
0
)
{
task_t
*
t
;
int
pid
=
-
which_clock
;
if
(
pid
<
PID_MAX_LIMIT
)
{
if
((
t
=
find_task_by_pid
(
pid
)))
{
jiffies_to_timespec
(
process_ticks
(
t
),
tp
);
return
0
;
}
return
-
EINVAL
;
}
if
(
pid
<
2
*
PID_MAX_LIMIT
)
{
if
((
t
=
find_task_by_pid
(
pid
-
PID_MAX_LIMIT
)))
{
jiffies_to_timespec
(
thread_ticks
(
t
),
tp
);
return
0
;
}
return
-
EINVAL
;
}
/* More process specific clocks could follow here */
return
-
EINVAL
;
}
if
((
unsigned
)
which_clock
>=
MAX_CLOCKS
||
if
((
unsigned
)
which_clock
>=
MAX_CLOCKS
||
!
posix_clocks
[
which_clock
].
res
)
!
posix_clocks
[
which_clock
].
res
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -1356,9 +1256,6 @@ sys_clock_getres(clockid_t which_clock, struct timespec __user *tp)
...
@@ -1356,9 +1256,6 @@ sys_clock_getres(clockid_t which_clock, struct timespec __user *tp)
{
{
struct
timespec
rtn_tp
;
struct
timespec
rtn_tp
;
/* All process clocks have the resolution of CLOCK_PROCESS_CPUTIME_ID */
if
(
which_clock
<
0
)
which_clock
=
CLOCK_PROCESS_CPUTIME_ID
;
if
((
unsigned
)
which_clock
>=
MAX_CLOCKS
||
if
((
unsigned
)
which_clock
>=
MAX_CLOCKS
||
!
posix_clocks
[
which_clock
].
res
)
!
posix_clocks
[
which_clock
].
res
)
return
-
EINVAL
;
return
-
EINVAL
;
...
...
mm/rmap.c
View file @
91c4625d
...
@@ -395,6 +395,9 @@ int page_referenced(struct page *page, int is_locked, int ignore_token)
...
@@ -395,6 +395,9 @@ int page_referenced(struct page *page, int is_locked, int ignore_token)
{
{
int
referenced
=
0
;
int
referenced
=
0
;
if
(
!
swap_token_default_timeout
)
ignore_token
=
1
;
if
(
page_test_and_clear_young
(
page
))
if
(
page_test_and_clear_young
(
page
))
referenced
++
;
referenced
++
;
...
...
mm/thrash.c
View file @
91c4625d
...
@@ -19,7 +19,10 @@ unsigned long swap_token_check;
...
@@ -19,7 +19,10 @@ unsigned long swap_token_check;
struct
mm_struct
*
swap_token_mm
=
&
init_mm
;
struct
mm_struct
*
swap_token_mm
=
&
init_mm
;
#define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2)
#define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2)
#define SWAP_TOKEN_TIMEOUT (HZ * 300)
#define SWAP_TOKEN_TIMEOUT 0
/*
* Currently disabled; Needs further code to work at HZ * 300.
*/
unsigned
long
swap_token_default_timeout
=
SWAP_TOKEN_TIMEOUT
;
unsigned
long
swap_token_default_timeout
=
SWAP_TOKEN_TIMEOUT
;
/*
/*
...
...
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