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
47f5817a
Commit
47f5817a
authored
Jun 17, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sparc64: Update for scheduler changes.
parent
c22f5d5b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
57 deletions
+65
-57
arch/sparc64/kernel/entry.S
arch/sparc64/kernel/entry.S
+2
-1
include/asm-sparc64/system.h
include/asm-sparc64/system.h
+63
-56
No files found.
arch/sparc64/kernel/entry.S
View file @
47f5817a
...
@@ -1436,10 +1436,11 @@ ret_from_syscall:
...
@@ -1436,10 +1436,11 @@ ret_from_syscall:
*
%
o7
for
us
.
Check
performance
counter
stuff
too
.
*
%
o7
for
us
.
Check
performance
counter
stuff
too
.
*/
*/
andn
%
o7
,
_TIF_NEWCHILD
,
%
l0
andn
%
o7
,
_TIF_NEWCHILD
,
%
l0
stx
%
l0
,
[%
g6
+
TI_FLAGS
]
#if CONFIG_SMP || CONFIG_PREEMPT
#if CONFIG_SMP || CONFIG_PREEMPT
call
schedule_tail
call
schedule_tail
mov
%
g5
,
%
o0
#endif
#endif
stx
%
l0
,
[%
g6
+
TI_FLAGS
]
andcc
%
l0
,
_TIF_PERFCTR
,
%
g0
andcc
%
l0
,
_TIF_PERFCTR
,
%
g0
be
,
pt
%
icc
,
1
f
be
,
pt
%
icc
,
1
f
nop
nop
...
...
include/asm-sparc64/system.h
View file @
47f5817a
...
@@ -143,7 +143,14 @@ extern void __flushw_user(void);
...
@@ -143,7 +143,14 @@ extern void __flushw_user(void);
#define flush_user_windows flushw_user
#define flush_user_windows flushw_user
#define flush_register_windows flushw_all
#define flush_register_windows flushw_all
#define prepare_to_switch flushw_all
#define prepare_arch_schedule(prev) task_lock(prev)
#define finish_arch_schedule(prev) task_unlock(prev)
#define prepare_arch_switch(rq) \
do { spin_unlock(&(rq)->lock); \
flushw_all(); \
} while (0)
#define finish_arch_switch(rq) __sti()
#ifndef CONFIG_DEBUG_SPINLOCK
#ifndef CONFIG_DEBUG_SPINLOCK
#define CHECK_LOCKS(PREV) do { } while(0)
#define CHECK_LOCKS(PREV) do { } while(0)
...
@@ -172,50 +179,50 @@ if ((PREV)->thread.smp_lock_count) { \
...
@@ -172,50 +179,50 @@ if ((PREV)->thread.smp_lock_count) { \
* not preserve it's value. Hairy, but it lets us remove 2 loads
* not preserve it's value. Hairy, but it lets us remove 2 loads
* and 2 stores in this critical code path. -DaveM
* and 2 stores in this critical code path. -DaveM
*/
*/
#define switch_to(prev, next
)
\
#define switch_to(prev, next
, last)
\
do { CHECK_LOCKS(prev); \
do { CHECK_LOCKS(prev); \
if (test_thread_flag(TIF_PERFCTR)) { \
if (test_thread_flag(TIF_PERFCTR)) { \
unsigned long __tmp; \
unsigned long __tmp; \
read_pcr(__tmp); \
read_pcr(__tmp); \
current_thread_info()->pcr_reg = __tmp; \
current_thread_info()->pcr_reg = __tmp; \
read_pic(__tmp); \
read_pic(__tmp); \
current_thread_info()->kernel_cntd0 += (unsigned int)(__tmp);
\
current_thread_info()->kernel_cntd0 += (unsigned int)(__tmp);\
current_thread_info()->kernel_cntd1 += ((__tmp) >> 32); \
current_thread_info()->kernel_cntd1 += ((__tmp) >> 32); \
} \
} \
save_and_clear_fpu(); \
save_and_clear_fpu(); \
/* If you are tempted to conditionalize the following */
\
/* If you are tempted to conditionalize the following */
\
/* so that ASI is only written if it changes, think again. */
\
/* so that ASI is only written if it changes, think again. */
\
__asm__ __volatile__("wr %%g0, %0, %%asi" \
__asm__ __volatile__("wr %%g0, %0, %%asi" \
: : "r" (__thread_flag_byte_ptr(next->thread_info)[TI_FLAG_BYTE_CURRENT_DS]));
\
: : "r" (__thread_flag_byte_ptr(next->thread_info)[TI_FLAG_BYTE_CURRENT_DS]));\
__asm__ __volatile__( \
__asm__ __volatile__( \
"mov %%g
6, %%g5\n\t"
\
"mov %%g
4, %%g5\n\t"
\
"wrpr %%g0, 0x95, %%pstate\n\t" \
"wrpr %%g0, 0x95, %%pstate\n\t" \
"stx %%i6, [%%sp + 2047 + 0x70]\n\t" \
"stx %%i6, [%%sp + 2047 + 0x70]\n\t" \
"stx %%i7, [%%sp + 2047 + 0x78]\n\t" \
"stx %%i7, [%%sp + 2047 + 0x78]\n\t" \
"rdpr %%wstate, %%o5\n\t" \
"rdpr %%wstate, %%o5\n\t" \
"stx %%o6, [%%g6 + %
2]\n\t"
\
"stx %%o6, [%%g6 + %
3]\n\t"
\
"stb %%o5, [%%g6 + %
1]\n\t"
\
"stb %%o5, [%%g6 + %
2]\n\t"
\
"rdpr %%cwp, %%o5\n\t" \
"rdpr %%cwp, %%o5\n\t" \
"stb %%o5, [%%g6 + %
4]\n\t"
\
"stb %%o5, [%%g6 + %
5]\n\t"
\
"mov %
0, %%g6\n\t"
\
"mov %
1, %%g6\n\t"
\
"ldub [%
0 + %4], %%g1\n\t"
\
"ldub [%
1 + %5], %%g1\n\t"
\
"wrpr %%g1, %%cwp\n\t" \
"wrpr %%g1, %%cwp\n\t" \
"ldx [%%g6 + %
2], %%o6\n\t"
\
"ldx [%%g6 + %
3], %%o6\n\t"
\
"ldub [%%g6 + %
1], %%o5\n\t"
\
"ldub [%%g6 + %
2], %%o5\n\t"
\
"ldx [%%g6 + %
3], %%o7\n\t"
\
"ldx [%%g6 + %
4], %%o7\n\t"
\
"mov %%g6, %%l2\n\t" \
"mov %%g6, %%l2\n\t" \
"wrpr %%o5, 0x0, %%wstate\n\t" \
"wrpr %%o5, 0x0, %%wstate\n\t" \
"ldx [%%sp + 2047 + 0x70], %%i6\n\t" \
"ldx [%%sp + 2047 + 0x70], %%i6\n\t" \
"ldx [%%sp + 2047 + 0x78], %%i7\n\t" \
"ldx [%%sp + 2047 + 0x78], %%i7\n\t" \
"wrpr %%g0, 0x94, %%pstate\n\t" \
"wrpr %%g0, 0x94, %%pstate\n\t" \
"mov %%l2, %%g6\n\t" \
"mov %%l2, %%g6\n\t" \
"ldx [%%g6 + %
6], %%g4\n\t"
\
"ldx [%%g6 + %
7], %%g4\n\t"
\
"wrpr %%g0, 0x96, %%pstate\n\t" \
"wrpr %%g0, 0x96, %%pstate\n\t" \
"andcc %%o7, %
5, %%g0\n\t"
\
"andcc %%o7, %
6, %%g0\n\t"
\
"bne,pn %%icc, ret_from_syscall\n\t" \
"bne,pn %%icc, ret_from_syscall\n\t" \
"
nop\n\t"
\
"
mov %%g5, %0\n\t"
\
:
/* no outputs */
\
:
"=&r" (last)
\
: "
r" (next->thread_info),
\
: "
0" (next->thread_info),
\
"i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_FLAGS), "i" (TI_CWP), \
"i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_FLAGS), "i" (TI_CWP), \
"i" (_TIF_NEWCHILD), "i" (TI_TASK) \
"i" (_TIF_NEWCHILD), "i" (TI_TASK) \
: "cc", "g1", "g2", "g3", "g5", "g7", \
: "cc", "g1", "g2", "g3", "g5", "g7", \
...
...
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