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
82f98979
Commit
82f98979
authored
Apr 05, 2003
by
Pete Zaitcev
Committed by
David S. Miller
Apr 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[sparc] Update system.h (gcc-3 & misc)
parent
5d361067
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
17 deletions
+7
-17
include/asm-sparc/system.h
include/asm-sparc/system.h
+7
-17
No files found.
include/asm-sparc/system.h
View file @
82f98979
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
#include <asm/segment.h>
#include <asm/segment.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/openprom.h>
/* romvec. XXX will be dealt later. Promise. */
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/btfixup.h>
#include <asm/btfixup.h>
...
@@ -95,20 +94,12 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
...
@@ -95,20 +94,12 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
} while(0)
} while(0)
#endif
#endif
// #define prepare_arch_schedule(prev) task_lock(prev)
// #define finish_arch_schedule(prev) task_unlock(prev)
#define prepare_arch_schedule(prev) do{ }while(0)
#define finish_arch_schedule(prev) do{ }while(0)
/*
/*
* Flush windows so that the VM switch which follows
* Flush windows so that the VM switch which follows
* would not pull the stack from under us.
* would not pull the stack from under us.
*
*
* SWITCH_ENTER and SWITH_DO_LAZY_FPU do not work yet (e.g. SMP does not work)
* SWITCH_ENTER and SWITH_DO_LAZY_FPU do not work yet (e.g. SMP does not work)
* XXX WTF is the above comment? Found in late teen 2.4.x.
* XXX WTF is the above comment? Found in late teen 2.4.x.
*
* XXX prepare_arch_switch() is much smarter than this in sparc64, are we sure?
* XXX Cosider if doing it the flush_user_windows way is faster (by uwinmask).
*/
*/
#define prepare_arch_switch(rq, next) do { \
#define prepare_arch_switch(rq, next) do { \
__asm__ __volatile__( \
__asm__ __volatile__( \
...
@@ -133,14 +124,13 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
...
@@ -133,14 +124,13 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
* - Anton & Pete
* - Anton & Pete
*/
*/
#define switch_to(prev, next, last) do { \
#define switch_to(prev, next, last) do { \
__label__ here; \
register unsigned long task_pc asm("o7"); \
SWITCH_ENTER(prev); \
SWITCH_ENTER(prev); \
SWITCH_DO_LAZY_FPU(next); \
SWITCH_DO_LAZY_FPU(next); \
next->active_mm->cpu_vm_mask |= (1 << smp_processor_id()); \
next->active_mm->cpu_vm_mask |= (1 << smp_processor_id()); \
task_pc = ((unsigned long) &&here) - 0x8; \
__asm__ __volatile__( \
__asm__ __volatile__( \
"sethi %%hi(here - 0x8), %%o7\n\t" \
"mov %%g6, %%g3\n\t" \
"mov %%g6, %%g3\n\t" \
"or %%o7, %%lo(here - 0x8), %%o7\n\t" \
"rd %%psr, %%g4\n\t" \
"rd %%psr, %%g4\n\t" \
"std %%sp, [%%g6 + %4]\n\t" \
"std %%sp, [%%g6 + %4]\n\t" \
"rd %%wim, %%g5\n\t" \
"rd %%wim, %%g5\n\t" \
...
@@ -155,7 +145,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
...
@@ -155,7 +145,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
"wr %%g4, 0x20, %%psr\n\t" \
"wr %%g4, 0x20, %%psr\n\t" \
"nop\n\t" \
"nop\n\t" \
"nop\n\t" \
"nop\n\t" \
"nop\n\t"
/* LEON needs
thi
s: load to %sp depends on CWP. */
\
"nop\n\t"
/* LEON needs
all 3 nop
s: load to %sp depends on CWP. */
\
"ldd [%%g6 + %4], %%sp\n\t" \
"ldd [%%g6 + %4], %%sp\n\t" \
"wr %%g5, 0x0, %%wim\n\t" \
"wr %%g5, 0x0, %%wim\n\t" \
"ldd [%%sp + 0x00], %%l0\n\t" \
"ldd [%%sp + 0x00], %%l0\n\t" \
...
@@ -165,18 +155,18 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
...
@@ -165,18 +155,18 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
"nop\n\t" \
"nop\n\t" \
"jmpl %%o7 + 0x8, %%g0\n\t" \
"jmpl %%o7 + 0x8, %%g0\n\t" \
" ld [%%g3 + %5], %0\n\t" \
" ld [%%g3 + %5], %0\n\t" \
"here:\n" \
: "=&r" (last) \
: "=&r" (last) \
: "r" (&(current_set[hard_smp_processor_id()])), \
: "r" (&(current_set[hard_smp_processor_id()])), \
"r" ((next)->thread_info), \
"r" ((next)->thread_info), \
"i" (TI_KPSR), \
"i" (TI_KPSR), \
"i" (TI_KSP), \
"i" (TI_KSP), \
"i" (TI_TASK), \
"i" (TI_TASK) \
"r" (task_pc) \
: "g1", "g2", "g3", "g4", "g5", "g7", \
: "g1", "g2", "g3", "g4", "g5", "g7", \
"l0", "l1", "l3", "l4", "l5", "l6", "l7", \
"l0", "l1", "l3", "l4", "l5", "l6", "l7", \
"i0", "i1", "i2", "i3", "i4", "i5", \
"i0", "i1", "i2", "i3", "i4", "i5", \
"o0", "o1", "o2", "o3"
);
\
"o0", "o1", "o2", "o3"
, "o7");
\
here:;
} while(0)
} while(0)
/*
/*
* Changing the IRQ level on the Sparc.
* Changing the IRQ level on the Sparc.
...
...
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