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
2d6d3d27
Commit
2d6d3d27
authored
Feb 19, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/gregkh/linux/pci-2.6
into ppc970.osdl.org:/home/torvalds/v2.5/linux
parents
44bd49d5
f1db380a
Changes
35
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
448 additions
and
520 deletions
+448
-520
arch/sparc/Makefile
arch/sparc/Makefile
+0
-9
arch/sparc/kernel/entry.S
arch/sparc/kernel/entry.S
+202
-203
arch/sparc/kernel/etrap.S
arch/sparc/kernel/etrap.S
+7
-8
arch/sparc/kernel/head.S
arch/sparc/kernel/head.S
+88
-89
arch/sparc/kernel/rtrap.S
arch/sparc/kernel/rtrap.S
+13
-14
arch/sparc/kernel/sclow.S
arch/sparc/kernel/sclow.S
+1
-2
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sparc_ksyms.c
+1
-2
arch/sparc/kernel/sunos_asm.S
arch/sparc/kernel/sunos_asm.S
+19
-20
arch/sparc/kernel/trampoline.S
arch/sparc/kernel/trampoline.S
+22
-23
arch/sparc/kernel/wof.S
arch/sparc/kernel/wof.S
+7
-8
arch/sparc/kernel/wuf.S
arch/sparc/kernel/wuf.S
+7
-8
arch/sparc/lib/ashldi3.S
arch/sparc/lib/ashldi3.S
+2
-4
arch/sparc/lib/ashrdi3.S
arch/sparc/lib/ashrdi3.S
+2
-4
arch/sparc/lib/atomic.S
arch/sparc/lib/atomic.S
+0
-1
arch/sparc/lib/bitops.S
arch/sparc/lib/bitops.S
+6
-7
arch/sparc/lib/blockops.S
arch/sparc/lib/blockops.S
+3
-4
arch/sparc/lib/checksum.S
arch/sparc/lib/checksum.S
+10
-11
arch/sparc/lib/copy_user.S
arch/sparc/lib/copy_user.S
+2
-3
arch/sparc/lib/locks.S
arch/sparc/lib/locks.S
+0
-1
arch/sparc/lib/lshrdi3.S
arch/sparc/lib/lshrdi3.S
+2
-4
arch/sparc/lib/memcmp.S
arch/sparc/lib/memcmp.S
+3
-5
arch/sparc/lib/memcpy.S
arch/sparc/lib/memcpy.S
+3
-5
arch/sparc/lib/memscan.S
arch/sparc/lib/memscan.S
+5
-7
arch/sparc/lib/memset.S
arch/sparc/lib/memset.S
+9
-10
arch/sparc/lib/strlen.S
arch/sparc/lib/strlen.S
+2
-4
arch/sparc/lib/strlen_user.S
arch/sparc/lib/strlen_user.S
+3
-5
arch/sparc/lib/strncmp.S
arch/sparc/lib/strncmp.S
+3
-5
arch/sparc/lib/strncpy_from_user.S
arch/sparc/lib/strncpy_from_user.S
+2
-3
arch/sparc/math-emu/Makefile
arch/sparc/math-emu/Makefile
+1
-1
arch/sparc/mm/viking.S
arch/sparc/mm/viking.S
+0
-1
include/asm-sparc/asmmacro.h
include/asm-sparc/asmmacro.h
+4
-4
include/asm-sparc/checksum.h
include/asm-sparc/checksum.h
+3
-4
include/asm-sparc/cprefix.h
include/asm-sparc/cprefix.h
+0
-25
include/asm-sparc/head.h
include/asm-sparc/head.h
+8
-8
include/asm-sparc/winmacro.h
include/asm-sparc/winmacro.h
+8
-8
No files found.
arch/sparc/Makefile
View file @
2d6d3d27
...
@@ -11,21 +11,12 @@
...
@@ -11,21 +11,12 @@
# Uncomment the first CFLAGS if you are doing kgdb source level
# Uncomment the first CFLAGS if you are doing kgdb source level
# debugging of the kernel to get the proper debugging information.
# debugging of the kernel to get the proper debugging information.
IS_EGCS
:=
$(
shell
if
$(CC)
-m32
-S
-o
/dev/null
-xc
/dev/null
>
/dev/null 2>&1
;
then
echo
y
;
else
echo
n
;
fi
;
)
NEW_GAS
:=
$(
shell
if
$(LD)
--version
2>&1 |
grep
'elf64_sparc'
>
/dev/null
;
then
echo
y
;
else
echo
n
;
fi
)
ifeq
($(NEW_GAS),y)
AS
:=
$(AS)
-32
AS
:=
$(AS)
-32
LDFLAGS
:=
-m
elf32_sparc
LDFLAGS
:=
-m
elf32_sparc
endif
#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
ifneq
($(IS_EGCS),y)
CFLAGS
:=
$(CFLAGS)
-pipe
-mno-fpu
-fcall-used-g5
-fcall-used-g7
else
CFLAGS
:=
$(CFLAGS)
-m32
-pipe
-mno-fpu
-fcall-used-g5
-fcall-used-g7
CFLAGS
:=
$(CFLAGS)
-m32
-pipe
-mno-fpu
-fcall-used-g5
-fcall-used-g7
AFLAGS
:=
$(AFLAGS)
-m32
AFLAGS
:=
$(AFLAGS)
-m32
endif
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
# Since 2.5.40, the first stage is left not btfix-ed.
# Since 2.5.40, the first stage is left not btfix-ed.
...
...
arch/sparc/kernel/entry.S
View file @
2d6d3d27
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/asm_offsets.h>
#include <asm/asm_offsets.h>
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/cprefix.h>
#include <asm/vaddrs.h>
#include <asm/vaddrs.h>
#include <asm/memreg.h>
#include <asm/memreg.h>
#include <asm/page.h>
#include <asm/page.h>
...
@@ -68,8 +67,8 @@ in_trap_handler:
...
@@ -68,8 +67,8 @@ in_trap_handler:
!
available
before
jumping
into
C
code
.
It
will
also
restore
the
world
if
you
!
available
before
jumping
into
C
code
.
It
will
also
restore
the
world
if
you
!
return
from
handle_exception
.
!
return
from
handle_exception
.
.
globl
C_LABEL
(
trap_low
)
.
globl
trap_low
C_LABEL
(
trap_low
)
:
trap_low
:
rd
%
wim
,
%
l3
rd
%
wim
,
%
l3
SAVE_ALL
SAVE_ALL
...
@@ -104,7 +103,7 @@ C_LABEL(trap_low):
...
@@ -104,7 +103,7 @@ C_LABEL(trap_low):
wr
%
l0
,
PSR_ET
,
%
psr
wr
%
l0
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
handle_exception
)
call
handle_exception
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
Pass
address
of
registers
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
Pass
address
of
registers
/
*
Load
new
kgdb
register
set
.
*/
/
*
Load
new
kgdb
register
set
.
*/
...
@@ -134,8 +133,8 @@ C_LABEL(trap_low):
...
@@ -134,8 +133,8 @@ C_LABEL(trap_low):
#ifdef CONFIG_BLK_DEV_FD
#ifdef CONFIG_BLK_DEV_FD
.
text
.
text
.
align
4
.
align
4
.
globl
C_LABEL
(
floppy_hardint
)
.
globl
floppy_hardint
C_LABEL
(
floppy_hardint
)
:
floppy_hardint
:
/
*
/
*
*
This
code
cannot
touch
registers
%
l0
%
l1
and
%
l2
*
This
code
cannot
touch
registers
%
l0
%
l1
and
%
l2
*
because
SAVE_ALL
depends
on
their
values
.
It
depends
*
because
SAVE_ALL
depends
on
their
values
.
It
depends
...
@@ -149,21 +148,21 @@ C_LABEL(floppy_hardint):
...
@@ -149,21 +148,21 @@ C_LABEL(floppy_hardint):
*/
*/
/
*
Do
we
have
work
to
do
?
*/
/
*
Do
we
have
work
to
do
?
*/
sethi
%
hi
(
C_LABEL
(
doing_pdma
)
),
%
l7
sethi
%
hi
(
doing_pdma
),
%
l7
ld
[%
l7
+
%
lo
(
C_LABEL
(
doing_pdma
)
)],
%
l7
ld
[%
l7
+
%
lo
(
doing_pdma
)],
%
l7
cmp
%
l7
,
0
cmp
%
l7
,
0
be
floppy_dosoftint
be
floppy_dosoftint
nop
nop
/
*
Load
fdc
register
base
*/
/
*
Load
fdc
register
base
*/
sethi
%
hi
(
C_LABEL
(
fdc_status
)
),
%
l3
sethi
%
hi
(
fdc_status
),
%
l3
ld
[%
l3
+
%
lo
(
C_LABEL
(
fdc_status
)
)],
%
l3
ld
[%
l3
+
%
lo
(
fdc_status
)],
%
l3
/
*
Setup
register
addresses
*/
/
*
Setup
register
addresses
*/
sethi
%
hi
(
C_LABEL
(
pdma_vaddr
)
),
%
l5
!
transfer
buffer
sethi
%
hi
(
pdma_vaddr
),
%
l5
!
transfer
buffer
ld
[%
l5
+
%
lo
(
C_LABEL
(
pdma_vaddr
)
)],
%
l4
ld
[%
l5
+
%
lo
(
pdma_vaddr
)],
%
l4
sethi
%
hi
(
C_LABEL
(
pdma_size
)
),
%
l5
!
bytes
to
go
sethi
%
hi
(
pdma_size
),
%
l5
!
bytes
to
go
ld
[%
l5
+
%
lo
(
C_LABEL
(
pdma_size
)
)],
%
l6
ld
[%
l5
+
%
lo
(
pdma_size
)],
%
l6
next_byte
:
next_byte
:
ldub
[%
l3
],
%
l7
ldub
[%
l3
],
%
l7
...
@@ -195,15 +194,15 @@ floppy_write:
...
@@ -195,15 +194,15 @@ floppy_write:
/
*
fall
through
...
*/
/
*
fall
through
...
*/
floppy_tdone
:
floppy_tdone
:
sethi
%
hi
(
C_LABEL
(
pdma_vaddr
)
),
%
l5
sethi
%
hi
(
pdma_vaddr
),
%
l5
st
%
l4
,
[%
l5
+
%
lo
(
C_LABEL
(
pdma_vaddr
)
)]
st
%
l4
,
[%
l5
+
%
lo
(
pdma_vaddr
)]
sethi
%
hi
(
C_LABEL
(
pdma_size
)
),
%
l5
sethi
%
hi
(
pdma_size
),
%
l5
st
%
l6
,
[%
l5
+
%
lo
(
C_LABEL
(
pdma_size
)
)]
st
%
l6
,
[%
l5
+
%
lo
(
pdma_size
)]
/
*
Flip
terminal
count
pin
*/
/
*
Flip
terminal
count
pin
*/
set
C_LABEL
(
auxio_register
)
,
%
l7
set
auxio_register
,
%
l7
ld
[%
l7
],
%
l7
ld
[%
l7
],
%
l7
set
C_LABEL
(
sparc_cpu_model
)
,
%
l5
set
sparc_cpu_model
,
%
l5
ld
[%
l5
],
%
l5
ld
[%
l5
],
%
l5
subcc
%
l5
,
1
,
%
g0
/*
enum
{
sun4c
=
1
}
; */
subcc
%
l5
,
1
,
%
g0
/*
enum
{
sun4c
=
1
}
; */
be
1
f
be
1
f
...
@@ -228,9 +227,9 @@ floppy_tdone:
...
@@ -228,9 +227,9 @@ floppy_tdone:
stb
%
l5
,
[%
l7
]
stb
%
l5
,
[%
l7
]
/
*
Prevent
recursion
*/
/
*
Prevent
recursion
*/
sethi
%
hi
(
C_LABEL
(
doing_pdma
)
),
%
l7
sethi
%
hi
(
doing_pdma
),
%
l7
b
floppy_dosoftint
b
floppy_dosoftint
st
%
g0
,
[%
l7
+
%
lo
(
C_LABEL
(
doing_pdma
)
)]
st
%
g0
,
[%
l7
+
%
lo
(
doing_pdma
)]
/
*
We
emptied
the
FIFO
,
but
we
haven
't read everything
/
*
We
emptied
the
FIFO
,
but
we
haven
't read everything
*
as
of
yet
.
Store
the
current
transfer
address
and
*
as
of
yet
.
Store
the
current
transfer
address
and
...
@@ -238,10 +237,10 @@ floppy_tdone:
...
@@ -238,10 +237,10 @@ floppy_tdone:
*
fast
IRQ
comes
in
.
*
fast
IRQ
comes
in
.
*/
*/
floppy_fifo_emptied
:
floppy_fifo_emptied
:
sethi
%
hi
(
C_LABEL
(
pdma_vaddr
)
),
%
l5
sethi
%
hi
(
pdma_vaddr
),
%
l5
st
%
l4
,
[%
l5
+
%
lo
(
C_LABEL
(
pdma_vaddr
)
)]
st
%
l4
,
[%
l5
+
%
lo
(
pdma_vaddr
)]
sethi
%
hi
(
C_LABEL
(
pdma_size
)
),
%
l7
sethi
%
hi
(
pdma_size
),
%
l7
st
%
l6
,
[%
l7
+
%
lo
(
C_LABEL
(
pdma_size
)
)]
st
%
l6
,
[%
l7
+
%
lo
(
pdma_size
)]
/
*
Restore
condition
codes
*/
/
*
Restore
condition
codes
*/
wr
%
l0
,
0x0
,
%
psr
wr
%
l0
,
0x0
,
%
psr
...
@@ -251,13 +250,13 @@ floppy_fifo_emptied:
...
@@ -251,13 +250,13 @@ floppy_fifo_emptied:
rett
%
l2
rett
%
l2
floppy_overrun
:
floppy_overrun
:
sethi
%
hi
(
C_LABEL
(
pdma_vaddr
)
),
%
l5
sethi
%
hi
(
pdma_vaddr
),
%
l5
st
%
l4
,
[%
l5
+
%
lo
(
C_LABEL
(
pdma_vaddr
)
)]
st
%
l4
,
[%
l5
+
%
lo
(
pdma_vaddr
)]
sethi
%
hi
(
C_LABEL
(
pdma_size
)
),
%
l5
sethi
%
hi
(
pdma_size
),
%
l5
st
%
l6
,
[%
l5
+
%
lo
(
C_LABEL
(
pdma_size
)
)]
st
%
l6
,
[%
l5
+
%
lo
(
pdma_size
)]
/
*
Prevent
recursion
*/
/
*
Prevent
recursion
*/
sethi
%
hi
(
C_LABEL
(
doing_pdma
)
),
%
l7
sethi
%
hi
(
doing_pdma
),
%
l7
st
%
g0
,
[%
l7
+
%
lo
(
C_LABEL
(
doing_pdma
)
)]
st
%
g0
,
[%
l7
+
%
lo
(
doing_pdma
)]
/
*
fall
through
...
*/
/
*
fall
through
...
*/
floppy_dosoftint
:
floppy_dosoftint
:
...
@@ -273,7 +272,7 @@ floppy_dosoftint:
...
@@ -273,7 +272,7 @@ floppy_dosoftint:
mov
11
,
%
o0
!
floppy
irq
level
(
unused
anyway
)
mov
11
,
%
o0
!
floppy
irq
level
(
unused
anyway
)
mov
%
g0
,
%
o1
!
devid
is
not
used
in
fast
interrupts
mov
%
g0
,
%
o1
!
devid
is
not
used
in
fast
interrupts
call
C_LABEL
(
sparc_floppy_irq
)
call
sparc_floppy_irq
add
%
sp
,
STACKFRAME_SZ
,
%
o2
!
struct
pt_regs
*
regs
add
%
sp
,
STACKFRAME_SZ
,
%
o2
!
struct
pt_regs
*
regs
RESTORE_ALL
RESTORE_ALL
...
@@ -290,7 +289,7 @@ bad_trap_handler:
...
@@ -290,7 +289,7 @@ bad_trap_handler:
mov
%
l7
,
%
o0
!
trap
number
mov
%
l7
,
%
o0
!
trap
number
mov
%
l0
,
%
o1
!
psr
mov
%
l0
,
%
o1
!
psr
call
C_LABEL
(
do_hw_interrupt
)
call
do_hw_interrupt
mov
%
l1
,
%
o2
!
pc
mov
%
l1
,
%
o2
!
pc
RESTORE_ALL
RESTORE_ALL
...
@@ -322,7 +321,7 @@ real_irq_continue:
...
@@ -322,7 +321,7 @@ real_irq_continue:
WRITE_PAUSE
WRITE_PAUSE
mov
%
l7
,
%
o0
!
irq
level
mov
%
l7
,
%
o0
!
irq
level
patch_handler_irq
:
patch_handler_irq
:
call
C_LABEL
(
handler_irq
)
call
handler_irq
add
%
sp
,
STACKFRAME_SZ
,
%
o1
!
pt_regs
ptr
add
%
sp
,
STACKFRAME_SZ
,
%
o1
!
pt_regs
ptr
or
%
l0
,
PSR_PIL
,
%
g2
!
restore
PIL
after
handler_irq
or
%
l0
,
PSR_PIL
,
%
g2
!
restore
PIL
after
handler_irq
wr
%
g2
,
PSR_ET
,
%
psr
!
keep
ET
up
wr
%
g2
,
PSR_ET
,
%
psr
!
keep
ET
up
...
@@ -339,7 +338,7 @@ smp4m_ticker:
...
@@ -339,7 +338,7 @@ smp4m_ticker:
WRITE_PAUSE
WRITE_PAUSE
wr
%
g2
,
PSR_ET
,
%
psr
wr
%
g2
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
smp4m_percpu_timer_interrupt
)
call
smp4m_percpu_timer_interrupt
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
wr
%
l0
,
PSR_ET
,
%
psr
wr
%
l0
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
...
@@ -351,7 +350,7 @@ smp4m_ticker:
...
@@ -351,7 +350,7 @@ smp4m_ticker:
*/
*/
maybe_smp4m_msg
:
maybe_smp4m_msg
:
GET_PROCESSOR_MID
(
o3
,
o2
)
GET_PROCESSOR_MID
(
o3
,
o2
)
set
C_LABEL
(
sun4m_interrupts
)
,
%
l5
set
sun4m_interrupts
,
%
l5
ld
[%
l5
],
%
o5
ld
[%
l5
],
%
o5
sethi
%
hi
(
0x60000000
),
%
o4
sethi
%
hi
(
0x60000000
),
%
o4
sll
%
o3
,
12
,
%
o3
sll
%
o3
,
12
,
%
o3
...
@@ -378,10 +377,10 @@ maybe_smp4m_msg:
...
@@ -378,10 +377,10 @@ maybe_smp4m_msg:
tst
%
o2
tst
%
o2
bne
2
f
bne
2
f
nop
nop
call
C_LABEL
(
smp_reschedule_irq
)
call
smp_reschedule_irq
add
%
o7
,
8
,
%
o7
add
%
o7
,
8
,
%
o7
2
:
2
:
call
C_LABEL
(
smp_stop_cpu_irq
)
call
smp_stop_cpu_irq
nop
nop
RESTORE_ALL
RESTORE_ALL
...
@@ -391,7 +390,7 @@ linux_trap_ipi15_sun4m:
...
@@ -391,7 +390,7 @@ linux_trap_ipi15_sun4m:
SAVE_ALL
SAVE_ALL
sethi
%
hi
(
0x80000000
),
%
o2
sethi
%
hi
(
0x80000000
),
%
o2
GET_PROCESSOR_MID
(
o0
,
o1
)
GET_PROCESSOR_MID
(
o0
,
o1
)
set
C_LABEL
(
sun4m_interrupts
)
,
%
l5
set
sun4m_interrupts
,
%
l5
ld
[%
l5
],
%
o5
ld
[%
l5
],
%
o5
sll
%
o0
,
12
,
%
o0
sll
%
o0
,
12
,
%
o0
add
%
o5
,
%
o0
,
%
o5
add
%
o5
,
%
o0
,
%
o5
...
@@ -407,7 +406,7 @@ linux_trap_ipi15_sun4m:
...
@@ -407,7 +406,7 @@ linux_trap_ipi15_sun4m:
WRITE_PAUSE
WRITE_PAUSE
wr
%
l4
,
PSR_ET
,
%
psr
wr
%
l4
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
smp4m_cross_call_irq
)
call
smp4m_cross_call_irq
nop
nop
b
ret_trap_lockless_ipi
b
ret_trap_lockless_ipi
clr
%
l6
clr
%
l6
...
@@ -426,7 +425,7 @@ linux_trap_ipi15_sun4m:
...
@@ -426,7 +425,7 @@ linux_trap_ipi15_sun4m:
WRITE_PAUSE
WRITE_PAUSE
wr
%
l4
,
PSR_ET
,
%
psr
wr
%
l4
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
sun4m_nmi
)
call
sun4m_nmi
nop
nop
st
%
l4
,
[%
l5
+
0x8
]
st
%
l4
,
[%
l5
+
0x8
]
WRITE_PAUSE
WRITE_PAUSE
...
@@ -447,7 +446,7 @@ smp4d_ticker:
...
@@ -447,7 +446,7 @@ smp4d_ticker:
WRITE_PAUSE
WRITE_PAUSE
wr
%
g2
,
PSR_ET
,
%
psr
wr
%
g2
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
smp4d_percpu_timer_interrupt
)
call
smp4d_percpu_timer_interrupt
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
wr
%
l0
,
PSR_ET
,
%
psr
wr
%
l0
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
...
@@ -475,7 +474,7 @@ linux_trap_ipi15_sun4d:
...
@@ -475,7 +474,7 @@ linux_trap_ipi15_sun4d:
WRITE_PAUSE
WRITE_PAUSE
wr
%
l4
,
PSR_ET
,
%
psr
wr
%
l4
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
smp4d_cross_call_irq
)
call
smp4d_cross_call_irq
nop
nop
b
ret_trap_lockless_ipi
b
ret_trap_lockless_ipi
clr
%
l6
clr
%
l6
...
@@ -513,7 +512,7 @@ bad_instruction:
...
@@ -513,7 +512,7 @@ bad_instruction:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
do_illegal_instruction
)
call
do_illegal_instruction
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -533,7 +532,7 @@ priv_instruction:
...
@@ -533,7 +532,7 @@ priv_instruction:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
do_priv_instruction
)
call
do_priv_instruction
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -552,7 +551,7 @@ mna_handler:
...
@@ -552,7 +551,7 @@ mna_handler:
WRITE_PAUSE
WRITE_PAUSE
ld
[%
l1
],
%
o1
ld
[%
l1
],
%
o1
call
C_LABEL
(
kernel_unaligned_trap
)
call
kernel_unaligned_trap
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
RESTORE_ALL
RESTORE_ALL
...
@@ -564,7 +563,7 @@ mna_fromuser:
...
@@ -564,7 +563,7 @@ mna_fromuser:
WRITE_PAUSE
WRITE_PAUSE
ld
[%
l1
],
%
o1
ld
[%
l1
],
%
o1
call
C_LABEL
(
user_unaligned_trap
)
call
user_unaligned_trap
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
RESTORE_ALL
RESTORE_ALL
...
@@ -581,7 +580,7 @@ fpd_trap_handler:
...
@@ -581,7 +580,7 @@ fpd_trap_handler:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
do_fpd_trap
)
call
do_fpd_trap
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -593,8 +592,8 @@ fpe_trap_handler:
...
@@ -593,8 +592,8 @@ fpe_trap_handler:
set
fpsave_magic
,
%
l5
set
fpsave_magic
,
%
l5
cmp
%
l1
,
%
l5
cmp
%
l1
,
%
l5
be
1
f
be
1
f
sethi
%
hi
(
C_LABEL
(
fpsave
)
),
%
l5
sethi
%
hi
(
fpsave
),
%
l5
or
%
l5
,
%
lo
(
C_LABEL
(
fpsave
)
),
%
l5
or
%
l5
,
%
lo
(
fpsave
),
%
l5
cmp
%
l1
,
%
l5
cmp
%
l1
,
%
l5
bne
2
f
bne
2
f
sethi
%
hi
(
fpsave_catch2
),
%
l5
sethi
%
hi
(
fpsave_catch2
),
%
l5
...
@@ -620,7 +619,7 @@ fpe_trap_handler:
...
@@ -620,7 +619,7 @@ fpe_trap_handler:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
do_fpe_trap
)
call
do_fpe_trap
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -637,7 +636,7 @@ do_tag_overflow:
...
@@ -637,7 +636,7 @@ do_tag_overflow:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
handle_tag_overflow
)
call
handle_tag_overflow
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -654,7 +653,7 @@ do_watchpoint:
...
@@ -654,7 +653,7 @@ do_watchpoint:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
handle_watchpoint
)
call
handle_watchpoint
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -671,7 +670,7 @@ do_reg_access:
...
@@ -671,7 +670,7 @@ do_reg_access:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
handle_reg_access
)
call
handle_reg_access
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -688,7 +687,7 @@ do_cp_disabled:
...
@@ -688,7 +687,7 @@ do_cp_disabled:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
handle_cp_disabled
)
call
handle_cp_disabled
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -705,7 +704,7 @@ do_cp_exception:
...
@@ -705,7 +704,7 @@ do_cp_exception:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
handle_cp_exception
)
call
handle_cp_exception
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -722,7 +721,7 @@ do_hw_divzero:
...
@@ -722,7 +721,7 @@ do_hw_divzero:
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
mov
%
l1
,
%
o1
mov
%
l1
,
%
o1
mov
%
l2
,
%
o2
mov
%
l2
,
%
o2
call
C_LABEL
(
handle_hw_divzero
)
call
handle_hw_divzero
mov
%
l0
,
%
o3
mov
%
l0
,
%
o3
RESTORE_ALL
RESTORE_ALL
...
@@ -739,7 +738,7 @@ do_flush_windows:
...
@@ -739,7 +738,7 @@ do_flush_windows:
bne
dfw_kernel
bne
dfw_kernel
nop
nop
call
C_LABEL
(
flush_user_windows
)
call
flush_user_windows
nop
nop
/
*
Advance
over
the
trap
instruction
.
*/
/
*
Advance
over
the
trap
instruction
.
*/
...
@@ -805,8 +804,8 @@ linux_trap_nmi_sun4c:
...
@@ -805,8 +804,8 @@ linux_trap_nmi_sun4c:
/
*
Ugh
,
we
need
to
clear
the
IRQ
line
.
This
is
now
/
*
Ugh
,
we
need
to
clear
the
IRQ
line
.
This
is
now
*
a
very
sun4c
specific
trap
handler
...
*
a
very
sun4c
specific
trap
handler
...
*/
*/
sethi
%
hi
(
C_LABEL
(
interrupt_enable
)
),
%
l5
sethi
%
hi
(
interrupt_enable
),
%
l5
ld
[%
l5
+
%
lo
(
C_LABEL
(
interrupt_enable
)
)],
%
l5
ld
[%
l5
+
%
lo
(
interrupt_enable
)],
%
l5
ldub
[%
l5
],
%
l6
ldub
[%
l5
],
%
l6
andn
%
l6
,
INTS_ENAB
,
%
l6
andn
%
l6
,
INTS_ENAB
,
%
l6
stb
%
l6
,
[%
l5
]
stb
%
l6
,
[%
l5
]
...
@@ -829,51 +828,51 @@ linux_trap_nmi_sun4c:
...
@@ -829,51 +828,51 @@ linux_trap_nmi_sun4c:
lda
[%
o0
]
ASI_CONTROL
,
%
o4
!
async
vaddr
lda
[%
o0
]
ASI_CONTROL
,
%
o4
!
async
vaddr
sub
%
o0
,
0x4
,
%
o0
sub
%
o0
,
0x4
,
%
o0
lda
[%
o0
]
ASI_CONTROL
,
%
o3
!
async
error
lda
[%
o0
]
ASI_CONTROL
,
%
o3
!
async
error
call
C_LABEL
(
sparc_lvl15_nmi
)
call
sparc_lvl15_nmi
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
RESTORE_ALL
RESTORE_ALL
.
align
4
.
align
4
.
globl
C_LABEL
(
invalid_segment_patch1_ff
)
.
globl
invalid_segment_patch1_ff
.
globl
C_LABEL
(
invalid_segment_patch2_ff
)
.
globl
invalid_segment_patch2_ff
C_LABEL
(
invalid_segment_patch1_ff
)
:
cmp
%
l4
,
0xff
invalid_segment_patch1_ff
:
cmp
%
l4
,
0xff
C_LABEL
(
invalid_segment_patch2_ff
)
:
mov
0xff
,
%
l3
invalid_segment_patch2_ff
:
mov
0xff
,
%
l3
.
align
4
.
align
4
.
globl
C_LABEL
(
invalid_segment_patch1_1ff
)
.
globl
invalid_segment_patch1_1ff
.
globl
C_LABEL
(
invalid_segment_patch2_1ff
)
.
globl
invalid_segment_patch2_1ff
C_LABEL
(
invalid_segment_patch1_1ff
)
:
cmp
%
l4
,
0x1ff
invalid_segment_patch1_1ff
:
cmp
%
l4
,
0x1ff
C_LABEL
(
invalid_segment_patch2_1ff
)
:
mov
0x1ff
,
%
l3
invalid_segment_patch2_1ff
:
mov
0x1ff
,
%
l3
.
align
4
.
align
4
.
globl
C_LABEL
(
num_context_patch1_16
),
C_LABEL
(
num_context_patch2_16
)
.
globl
num_context_patch1_16
,
num_context_patch2_16
C_LABEL
(
num_context_patch1_16
)
:
mov
0x10
,
%
l7
num_context_patch1_16
:
mov
0x10
,
%
l7
C_LABEL
(
num_context_patch2_16
)
:
mov
0x10
,
%
l7
num_context_patch2_16
:
mov
0x10
,
%
l7
.
align
4
.
align
4
.
globl
C_LABEL
(
vac_linesize_patch_32
)
.
globl
vac_linesize_patch_32
C_LABEL
(
vac_linesize_patch_32
)
:
subcc
%
l7
,
32
,
%
l7
vac_linesize_patch_32
:
subcc
%
l7
,
32
,
%
l7
.
align
4
.
align
4
.
globl
C_LABEL
(
vac_hwflush_patch1_on
),
C_LABEL
(
vac_hwflush_patch2_on
)
.
globl
vac_hwflush_patch1_on
,
vac_hwflush_patch2_on
/*
/*
*
Ugly
,
but
we
cant
use
hardware
flushing
on
the
sun4
and
we
'd require
*
Ugly
,
but
we
cant
use
hardware
flushing
on
the
sun4
and
we
'd require
*
two
instructions
(
Anton
)
*
two
instructions
(
Anton
)
*/
*/
#ifdef CONFIG_SUN4
#ifdef CONFIG_SUN4
C_LABEL
(
vac_hwflush_patch1_on
)
:
nop
vac_hwflush_patch1_on
:
nop
#else
#else
C_LABEL
(
vac_hwflush_patch1_on
)
:
addcc
%
l7
,
-
PAGE_SIZE
,
%
l7
vac_hwflush_patch1_on
:
addcc
%
l7
,
-
PAGE_SIZE
,
%
l7
#endif
#endif
C_LABEL
(
vac_hwflush_patch2_on
)
:
sta
%
g0
,
[%
l3
+
%
l7
]
ASI_HWFLUSHSEG
vac_hwflush_patch2_on
:
sta
%
g0
,
[%
l3
+
%
l7
]
ASI_HWFLUSHSEG
.
globl
C_LABEL
(
invalid_segment_patch1
),
C_LABEL
(
invalid_segment_patch2
)
.
globl
invalid_segment_patch1
,
invalid_segment_patch2
.
globl
C_LABEL
(
num_context_patch1
),
C_LABEL
(
num_context_patch2
)
.
globl
num_context_patch1
,
num_context_patch2
.
globl
C_LABEL
(
vac_linesize_patch
),
C_LABEL
(
vac_hwflush_patch1
)
.
globl
vac_linesize_patch
,
vac_hwflush_patch1
.
globl
C_LABEL
(
vac_hwflush_patch2
)
.
globl
vac_hwflush_patch2
.
align
4
.
align
4
.
globl
sun4c_fault
.
globl
sun4c_fault
...
@@ -886,8 +885,8 @@ C_LABEL(vac_hwflush_patch2_on): sta %g0, [%l3 + %l7] ASI_HWFLUSHSEG
...
@@ -886,8 +885,8 @@ C_LABEL(vac_hwflush_patch2_on): sta %g0, [%l3 + %l7] ASI_HWFLUSHSEG
!
We
want
error
in
%
l5
,
vaddr
in
%
l6
!
We
want
error
in
%
l5
,
vaddr
in
%
l6
sun4c_fault
:
sun4c_fault
:
#ifdef CONFIG_SUN4
#ifdef CONFIG_SUN4
sethi
%
hi
(
C_LABEL
(
sun4c_memerr_reg
)
),
%
l4
sethi
%
hi
(
sun4c_memerr_reg
),
%
l4
ld
[%
l4
+%
lo
(
C_LABEL
(
sun4c_memerr_reg
)
)],
%
l4
!
memerr
ctrl
reg
addr
ld
[%
l4
+%
lo
(
sun4c_memerr_reg
)],
%
l4
!
memerr
ctrl
reg
addr
ld
[%
l4
],
%
l6
!
memerr
ctrl
reg
ld
[%
l4
],
%
l6
!
memerr
ctrl
reg
ld
[%
l4
+
4
],
%
l5
!
memerr
vaddr
reg
ld
[%
l4
+
4
],
%
l5
!
memerr
vaddr
reg
andcc
%
l6
,
0x80
,
%
g0
!
check
for
error
type
andcc
%
l6
,
0x80
,
%
g0
!
check
for
error
type
...
@@ -895,7 +894,7 @@ sun4c_fault:
...
@@ -895,7 +894,7 @@ sun4c_fault:
be
0
f
!
normal
error
be
0
f
!
normal
error
sethi
%
hi
(
AC_BUS_ERROR
),
%
l4
!
bus
err
reg
addr
sethi
%
hi
(
AC_BUS_ERROR
),
%
l4
!
bus
err
reg
addr
call
C_LABEL
(
prom_halt
)
!
something
weird
happened
call
prom_halt
!
something
weird
happened
!
what
exactly
did
happen
?
!
what
exactly
did
happen
?
!
what
should
we
do
here
?
!
what
should
we
do
here
?
...
@@ -959,12 +958,12 @@ sun4c_fault:
...
@@ -959,12 +958,12 @@ sun4c_fault:
/
*
Test
for
NULL
pte_t
*
in
vmalloc
area
.
*/
/
*
Test
for
NULL
pte_t
*
in
vmalloc
area
.
*/
sethi
%
hi
(
VMALLOC_START
),
%
l4
sethi
%
hi
(
VMALLOC_START
),
%
l4
cmp
%
l5
,
%
l4
cmp
%
l5
,
%
l4
blu
,
a
C_LABEL
(
invalid_segment_patch1
)
blu
,
a
invalid_segment_patch1
lduXa
[%
l5
]
ASI_SEGMAP
,
%
l4
lduXa
[%
l5
]
ASI_SEGMAP
,
%
l4
sethi
%
hi
(
C_LABEL
(
swapper_pg_dir
)
),
%
l4
sethi
%
hi
(
swapper_pg_dir
),
%
l4
srl
%
l5
,
SUN4C_PGDIR_SHIFT
,
%
l6
srl
%
l5
,
SUN4C_PGDIR_SHIFT
,
%
l6
or
%
l4
,
%
lo
(
C_LABEL
(
swapper_pg_dir
)
),
%
l4
or
%
l4
,
%
lo
(
swapper_pg_dir
),
%
l4
sll
%
l6
,
2
,
%
l6
sll
%
l6
,
2
,
%
l6
ld
[%
l4
+
%
l6
],
%
l4
ld
[%
l4
+
%
l6
],
%
l4
#ifdef CONFIG_SUN4
#ifdef CONFIG_SUN4
...
@@ -976,15 +975,15 @@ sun4c_fault:
...
@@ -976,15 +975,15 @@ sun4c_fault:
be
sun4c_fault_fromuser
be
sun4c_fault_fromuser
lduXa
[%
l5
]
ASI_SEGMAP
,
%
l4
lduXa
[%
l5
]
ASI_SEGMAP
,
%
l4
C_LABEL
(
invalid_segment_patch1
)
:
invalid_segment_patch1
:
cmp
%
l4
,
0x7f
cmp
%
l4
,
0x7f
bne
1
f
bne
1
f
sethi
%
hi
(
C_LABEL
(
sun4c_kfree_ring
)
),
%
l4
sethi
%
hi
(
sun4c_kfree_ring
),
%
l4
or
%
l4
,
%
lo
(
C_LABEL
(
sun4c_kfree_ring
)
),
%
l4
or
%
l4
,
%
lo
(
sun4c_kfree_ring
),
%
l4
ld
[%
l4
+
0x18
],
%
l3
ld
[%
l4
+
0x18
],
%
l3
deccc
%
l3
!
do
we
have
a
free
entry
?
deccc
%
l3
!
do
we
have
a
free
entry
?
bcs
,
a
2
f
!
no
,
unmap
one
.
bcs
,
a
2
f
!
no
,
unmap
one
.
sethi
%
hi
(
C_LABEL
(
sun4c_kernel_ring
)
),
%
l4
sethi
%
hi
(
sun4c_kernel_ring
),
%
l4
st
%
l3
,
[%
l4
+
0x18
]
!
sun4c_kfree_ring
.
num_entries
--
st
%
l3
,
[%
l4
+
0x18
]
!
sun4c_kfree_ring
.
num_entries
--
...
@@ -997,8 +996,8 @@ C_LABEL(invalid_segment_patch1):
...
@@ -997,8 +996,8 @@ C_LABEL(invalid_segment_patch1):
st
%
l7
,
[%
l3
+
0x04
]
!
next
->
prev
=
entry
->
prev
st
%
l7
,
[%
l3
+
0x04
]
!
next
->
prev
=
entry
->
prev
st
%
l3
,
[%
l7
+
0x00
]
!
entry
->
prev
->
next
=
next
st
%
l3
,
[%
l7
+
0x00
]
!
entry
->
prev
->
next
=
next
sethi
%
hi
(
C_LABEL
(
sun4c_kernel_ring
)
),
%
l4
sethi
%
hi
(
sun4c_kernel_ring
),
%
l4
or
%
l4
,
%
lo
(
C_LABEL
(
sun4c_kernel_ring
)
),
%
l4
or
%
l4
,
%
lo
(
sun4c_kernel_ring
),
%
l4
!
head
=
&
sun4c_kernel_ring
.
ringhd
!
head
=
&
sun4c_kernel_ring
.
ringhd
ld
[%
l4
+
0x00
],
%
l7
!
head
->
next
ld
[%
l4
+
0x00
],
%
l7
!
head
->
next
...
@@ -1016,7 +1015,7 @@ C_LABEL(invalid_segment_patch1):
...
@@ -1016,7 +1015,7 @@ C_LABEL(invalid_segment_patch1):
ld
[%
l6
+
0x08
],
%
l5
ld
[%
l6
+
0x08
],
%
l5
2
:
2
:
or
%
l4
,
%
lo
(
C_LABEL
(
sun4c_kernel_ring
)
),
%
l4
or
%
l4
,
%
lo
(
sun4c_kernel_ring
),
%
l4
!
head
=
&
sun4c_kernel_ring
.
ringhd
!
head
=
&
sun4c_kernel_ring
.
ringhd
ld
[%
l4
+
0x04
],
%
l6
!
entry
=
head
->
prev
ld
[%
l4
+
0x04
],
%
l6
!
entry
=
head
->
prev
...
@@ -1030,11 +1029,11 @@ C_LABEL(invalid_segment_patch1):
...
@@ -1030,11 +1029,11 @@ C_LABEL(invalid_segment_patch1):
sethi
%
hi
((
64
*
1024
)),
%
l7
sethi
%
hi
((
64
*
1024
)),
%
l7
#endif
#endif
9
:
9
:
C_LABEL
(
vac_hwflush_patch1
)
:
vac_hwflush_patch1
:
C_LABEL
(
vac_linesize_patch
)
:
vac_linesize_patch
:
subcc
%
l7
,
16
,
%
l7
subcc
%
l7
,
16
,
%
l7
bne
9
b
bne
9
b
C_LABEL
(
vac_hwflush_patch2
)
:
vac_hwflush_patch2
:
sta
%
g0
,
[%
l3
+
%
l7
]
ASI_FLUSHSEG
sta
%
g0
,
[%
l3
+
%
l7
]
ASI_FLUSHSEG
st
%
l5
,
[%
l6
+
0x08
]
!
entry
->
vaddr
=
address
st
%
l5
,
[%
l6
+
0x08
]
!
entry
->
vaddr
=
address
...
@@ -1055,7 +1054,7 @@ C_LABEL(vac_hwflush_patch2):
...
@@ -1055,7 +1054,7 @@ C_LABEL(vac_hwflush_patch2):
mov
%
l3
,
%
l5
!
address
=
tmp
mov
%
l3
,
%
l5
!
address
=
tmp
4
:
4
:
C_LABEL
(
num_context_patch1
)
:
num_context_patch1
:
mov
0x08
,
%
l7
mov
0x08
,
%
l7
ld
[%
l6
+
0x08
],
%
l4
ld
[%
l6
+
0x08
],
%
l4
...
@@ -1072,7 +1071,7 @@ C_LABEL(num_context_patch1):
...
@@ -1072,7 +1071,7 @@ C_LABEL(num_context_patch1):
3
:
deccc
%
l7
3
:
deccc
%
l7
sethi
%
hi
(
AC_CONTEXT
),
%
l3
sethi
%
hi
(
AC_CONTEXT
),
%
l3
stba
%
l7
,
[%
l3
]
ASI_CONTROL
stba
%
l7
,
[%
l3
]
ASI_CONTROL
C_LABEL
(
invalid_segment_patch2
)
:
invalid_segment_patch2
:
mov
0x7f
,
%
l3
mov
0x7f
,
%
l3
stXa
%
l3
,
[%
l5
]
ASI_SEGMAP
stXa
%
l3
,
[%
l5
]
ASI_SEGMAP
andn
%
l4
,
0x1ff
,
%
l3
andn
%
l4
,
0x1ff
,
%
l3
...
@@ -1108,12 +1107,12 @@ C_LABEL(invalid_segment_patch2):
...
@@ -1108,12 +1107,12 @@ C_LABEL(invalid_segment_patch2):
add
%
l5
,
%
l4
,
%
l5
add
%
l5
,
%
l4
,
%
l5
b
7
f
b
7
f
sethi
%
hi
(
C_LABEL
(
sun4c_kernel_faults
)
),
%
l4
sethi
%
hi
(
sun4c_kernel_faults
),
%
l4
1
:
1
:
srl
%
l5
,
SUN4C_PGDIR_SHIFT
,
%
l3
srl
%
l5
,
SUN4C_PGDIR_SHIFT
,
%
l3
sethi
%
hi
(
C_LABEL
(
swapper_pg_dir
)
),
%
l4
sethi
%
hi
(
swapper_pg_dir
),
%
l4
or
%
l4
,
%
lo
(
C_LABEL
(
swapper_pg_dir
)
),
%
l4
or
%
l4
,
%
lo
(
swapper_pg_dir
),
%
l4
sll
%
l3
,
2
,
%
l3
sll
%
l3
,
2
,
%
l3
ld
[%
l4
+
%
l3
],
%
l4
ld
[%
l4
+
%
l3
],
%
l4
#ifndef CONFIG_SUN4
#ifndef CONFIG_SUN4
...
@@ -1137,11 +1136,11 @@ C_LABEL(invalid_segment_patch2):
...
@@ -1137,11 +1136,11 @@ C_LABEL(invalid_segment_patch2):
bne
2
b
bne
2
b
add
%
l5
,
%
l4
,
%
l5
add
%
l5
,
%
l4
,
%
l5
sethi
%
hi
(
C_LABEL
(
sun4c_kernel_faults
)
),
%
l4
sethi
%
hi
(
sun4c_kernel_faults
),
%
l4
7
:
7
:
ld
[%
l4
+
%
lo
(
C_LABEL
(
sun4c_kernel_faults
)
)],
%
l3
ld
[%
l4
+
%
lo
(
sun4c_kernel_faults
)],
%
l3
inc
%
l3
inc
%
l3
st
%
l3
,
[%
l4
+
%
lo
(
C_LABEL
(
sun4c_kernel_faults
)
)]
st
%
l3
,
[%
l4
+
%
lo
(
sun4c_kernel_faults
)]
/
*
Restore
condition
codes
*/
/
*
Restore
condition
codes
*/
wr
%
l0
,
0x0
,
%
psr
wr
%
l0
,
0x0
,
%
psr
...
@@ -1163,14 +1162,14 @@ sun4c_fault_fromuser:
...
@@ -1163,14 +1162,14 @@ sun4c_fault_fromuser:
wr
%
l0
,
PSR_ET
,
%
psr
wr
%
l0
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
do_sun4c_fault
)
call
do_sun4c_fault
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
arg1
=
pt_regs
ptr
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
arg1
=
pt_regs
ptr
RESTORE_ALL
RESTORE_ALL
.
align
4
.
align
4
.
globl
C_LABEL
(
srmmu_fault
)
.
globl
srmmu_fault
C_LABEL
(
srmmu_fault
)
:
srmmu_fault
:
mov
0x400
,
%
l5
mov
0x400
,
%
l5
mov
0x300
,
%
l4
mov
0x300
,
%
l4
...
@@ -1197,7 +1196,7 @@ C_LABEL(srmmu_fault):
...
@@ -1197,7 +1196,7 @@ C_LABEL(srmmu_fault):
wr
%
l0
,
PSR_ET
,
%
psr
wr
%
l0
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
do_sparc_fault
)
call
do_sparc_fault
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
arg1
=
pt_regs
ptr
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
arg1
=
pt_regs
ptr
RESTORE_ALL
RESTORE_ALL
...
@@ -1207,19 +1206,19 @@ C_LABEL(srmmu_fault):
...
@@ -1207,19 +1206,19 @@ C_LABEL(srmmu_fault):
*
like
indir_syscall
(
scall_num
,
arg0
,
arg1
,
arg2
...
)
; etc.
*
like
indir_syscall
(
scall_num
,
arg0
,
arg1
,
arg2
...
)
; etc.
*
This
is
complete
brain
damage
.
*
This
is
complete
brain
damage
.
*/
*/
.
globl
C_LABEL
(
sunos_indir
)
.
globl
sunos_indir
C_LABEL
(
sunos_indir
)
:
sunos_indir
:
mov
%
o7
,
%
l4
mov
%
o7
,
%
l4
cmp
%
o0
,
NR_SYSCALLS
cmp
%
o0
,
NR_SYSCALLS
blu
,
a
1
f
blu
,
a
1
f
sll
%
o0
,
0x2
,
%
o0
sll
%
o0
,
0x2
,
%
o0
sethi
%
hi
(
C_LABEL
(
sunos_nosys
)
),
%
l6
sethi
%
hi
(
sunos_nosys
),
%
l6
b
2
f
b
2
f
or
%
l6
,
%
lo
(
C_LABEL
(
sunos_nosys
)
),
%
l6
or
%
l6
,
%
lo
(
sunos_nosys
),
%
l6
1
:
1
:
set
C_LABEL
(
sunos_sys_table
)
,
%
l7
set
sunos_sys_table
,
%
l7
ld
[%
l7
+
%
o0
],
%
l6
ld
[%
l7
+
%
o0
],
%
l6
2
:
2
:
...
@@ -1233,17 +1232,17 @@ C_LABEL(sunos_indir):
...
@@ -1233,17 +1232,17 @@ C_LABEL(sunos_indir):
#endif
#endif
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_nis_syscall
)
.
globl
sys_nis_syscall
C_LABEL
(
sys_nis_syscall
)
:
sys_nis_syscall
:
mov
%
o7
,
%
l5
mov
%
o7
,
%
l5
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
*
regs
arg
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
*
regs
arg
call
C_LABEL
(
c_sys_nis_syscall
)
call
c_sys_nis_syscall
mov
%
l5
,
%
o7
mov
%
l5
,
%
o7
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_ptrace
)
.
globl
sys_ptrace
C_LABEL
(
sys_ptrace
)
:
sys_ptrace
:
call
C_LABEL
(
do_ptrace
)
call
do_ptrace
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
...
@@ -1251,49 +1250,49 @@ C_LABEL(sys_ptrace):
...
@@ -1251,49 +1250,49 @@ C_LABEL(sys_ptrace):
be
1
f
be
1
f
nop
nop
call
C_LABEL
(
syscall_trace
)
call
syscall_trace
nop
nop
1
:
1
:
RESTORE_ALL
RESTORE_ALL
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_execve
)
.
globl
sys_execve
C_LABEL
(
sys_execve
)
:
sys_execve
:
mov
%
o7
,
%
l5
mov
%
o7
,
%
l5
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
*
regs
arg
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
*
regs
arg
call
C_LABEL
(
sparc_execve
)
call
sparc_execve
mov
%
l5
,
%
o7
mov
%
l5
,
%
o7
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_pipe
)
.
globl
sys_pipe
C_LABEL
(
sys_pipe
)
:
sys_pipe
:
mov
%
o7
,
%
l5
mov
%
o7
,
%
l5
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
*
regs
arg
add
%
sp
,
STACKFRAME_SZ
,
%
o0
!
pt_regs
*
regs
arg
call
C_LABEL
(
sparc_pipe
)
call
sparc_pipe
mov
%
l5
,
%
o7
mov
%
l5
,
%
o7
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_sigaltstack
)
.
globl
sys_sigaltstack
C_LABEL
(
sys_sigaltstack
)
:
sys_sigaltstack
:
mov
%
o7
,
%
l5
mov
%
o7
,
%
l5
mov
%
fp
,
%
o2
mov
%
fp
,
%
o2
call
C_LABEL
(
do_sigaltstack
)
call
do_sigaltstack
mov
%
l5
,
%
o7
mov
%
l5
,
%
o7
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_sigstack
)
.
globl
sys_sigstack
C_LABEL
(
sys_sigstack
)
:
sys_sigstack
:
mov
%
o7
,
%
l5
mov
%
o7
,
%
l5
mov
%
fp
,
%
o2
mov
%
fp
,
%
o2
call
C_LABEL
(
do_sys_sigstack
)
call
do_sys_sigstack
mov
%
l5
,
%
o7
mov
%
l5
,
%
o7
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_sigpause
)
.
globl
sys_sigpause
C_LABEL
(
sys_sigpause
)
:
sys_sigpause
:
/
*
Note
:
%
o0
already
has
correct
value
...
*/
/
*
Note
:
%
o0
already
has
correct
value
...
*/
call
C_LABEL
(
do_sigpause
)
call
do_sigpause
add
%
sp
,
STACKFRAME_SZ
,
%
o1
add
%
sp
,
STACKFRAME_SZ
,
%
o1
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
...
@@ -1301,7 +1300,7 @@ C_LABEL(sys_sigpause):
...
@@ -1301,7 +1300,7 @@ C_LABEL(sys_sigpause):
be
1
f
be
1
f
nop
nop
call
C_LABEL
(
syscall_trace
)
call
syscall_trace
nop
nop
1
:
1
:
...
@@ -1309,9 +1308,9 @@ C_LABEL(sys_sigpause):
...
@@ -1309,9 +1308,9 @@ C_LABEL(sys_sigpause):
RESTORE_ALL
RESTORE_ALL
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_sigsuspend
)
.
globl
sys_sigsuspend
C_LABEL
(
sys_sigsuspend
)
:
sys_sigsuspend
:
call
C_LABEL
(
do_sigsuspend
)
call
do_sigsuspend
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
...
@@ -1319,7 +1318,7 @@ C_LABEL(sys_sigsuspend):
...
@@ -1319,7 +1318,7 @@ C_LABEL(sys_sigsuspend):
be
1
f
be
1
f
nop
nop
call
C_LABEL
(
syscall_trace
)
call
syscall_trace
nop
nop
1
:
1
:
...
@@ -1327,10 +1326,10 @@ C_LABEL(sys_sigsuspend):
...
@@ -1327,10 +1326,10 @@ C_LABEL(sys_sigsuspend):
RESTORE_ALL
RESTORE_ALL
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_rt_sigsuspend
)
.
globl
sys_rt_sigsuspend
C_LABEL
(
sys_rt_sigsuspend
)
:
sys_rt_sigsuspend
:
/
*
Note
:
%
o0
,
%
o1
already
have
correct
value
...
*/
/
*
Note
:
%
o0
,
%
o1
already
have
correct
value
...
*/
call
C_LABEL
(
do_rt_sigsuspend
)
call
do_rt_sigsuspend
add
%
sp
,
STACKFRAME_SZ
,
%
o2
add
%
sp
,
STACKFRAME_SZ
,
%
o2
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
...
@@ -1338,7 +1337,7 @@ C_LABEL(sys_rt_sigsuspend):
...
@@ -1338,7 +1337,7 @@ C_LABEL(sys_rt_sigsuspend):
be
1
f
be
1
f
nop
nop
call
C_LABEL
(
syscall_trace
)
call
syscall_trace
nop
nop
1
:
1
:
...
@@ -1346,9 +1345,9 @@ C_LABEL(sys_rt_sigsuspend):
...
@@ -1346,9 +1345,9 @@ C_LABEL(sys_rt_sigsuspend):
RESTORE_ALL
RESTORE_ALL
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_sigreturn
)
.
globl
sys_sigreturn
C_LABEL
(
sys_sigreturn
)
:
sys_sigreturn
:
call
C_LABEL
(
do_sigreturn
)
call
do_sigreturn
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
...
@@ -1356,7 +1355,7 @@ C_LABEL(sys_sigreturn):
...
@@ -1356,7 +1355,7 @@ C_LABEL(sys_sigreturn):
be
1
f
be
1
f
nop
nop
call
C_LABEL
(
syscall_trace
)
call
syscall_trace
nop
nop
1
:
1
:
...
@@ -1366,9 +1365,9 @@ C_LABEL(sys_sigreturn):
...
@@ -1366,9 +1365,9 @@ C_LABEL(sys_sigreturn):
RESTORE_ALL
RESTORE_ALL
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_rt_sigreturn
)
.
globl
sys_rt_sigreturn
C_LABEL
(
sys_rt_sigreturn
)
:
sys_rt_sigreturn
:
call
C_LABEL
(
do_rt_sigreturn
)
call
do_rt_sigreturn
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
ld
[%
curptr
+
TI_FLAGS
],
%
l5
ld
[%
curptr
+
TI_FLAGS
],
%
l5
...
@@ -1376,7 +1375,7 @@ C_LABEL(sys_rt_sigreturn):
...
@@ -1376,7 +1375,7 @@ C_LABEL(sys_rt_sigreturn):
be
1
f
be
1
f
nop
nop
call
C_LABEL
(
syscall_trace
)
call
syscall_trace
nop
nop
1
:
1
:
...
@@ -1391,8 +1390,8 @@ C_LABEL(sys_rt_sigreturn):
...
@@ -1391,8 +1390,8 @@ C_LABEL(sys_rt_sigreturn):
*
XXX
code
just
like
on
sparc64
...
-
DaveM
*
XXX
code
just
like
on
sparc64
...
-
DaveM
*/
*/
.
align
4
.
align
4
.
globl
C_LABEL
(
sys_fork
)
,
flush_patch_two
.
globl
sys_fork
,
flush_patch_two
C_LABEL
(
sys_fork
)
:
sys_fork
:
mov
%
o7
,
%
l5
mov
%
o7
,
%
l5
flush_patch_two
:
flush_patch_two
:
FLUSH_ALL_KERNEL_WINDOWS
;
FLUSH_ALL_KERNEL_WINDOWS
;
...
@@ -1406,12 +1405,12 @@ flush_patch_two:
...
@@ -1406,12 +1405,12 @@ flush_patch_two:
std
%
g4
,
[%
o4
+
AOFF_task_thread
+
AOFF_thread_fork_kpsr
]
std
%
g4
,
[%
o4
+
AOFF_task_thread
+
AOFF_thread_fork_kpsr
]
add
%
sp
,
STACKFRAME_SZ
,
%
o2
!
arg2
:
pt_regs
ptr
add
%
sp
,
STACKFRAME_SZ
,
%
o2
!
arg2
:
pt_regs
ptr
mov
0
,
%
o3
mov
0
,
%
o3
call
C_LABEL
(
sparc_do_fork
)
call
sparc_do_fork
mov
%
l5
,
%
o7
mov
%
l5
,
%
o7
/
*
Whee
,
kernel
threads
!
*/
/
*
Whee
,
kernel
threads
!
*/
.
globl
C_LABEL
(
sys_clone
)
,
flush_patch_three
.
globl
sys_clone
,
flush_patch_three
C_LABEL
(
sys_clone
)
:
sys_clone
:
mov
%
o7
,
%
l5
mov
%
o7
,
%
l5
flush_patch_three
:
flush_patch_three
:
FLUSH_ALL_KERNEL_WINDOWS
;
FLUSH_ALL_KERNEL_WINDOWS
;
...
@@ -1430,12 +1429,12 @@ flush_patch_three:
...
@@ -1430,12 +1429,12 @@ flush_patch_three:
std
%
g4
,
[%
o4
+
AOFF_task_thread
+
AOFF_thread_fork_kpsr
]
std
%
g4
,
[%
o4
+
AOFF_task_thread
+
AOFF_thread_fork_kpsr
]
add
%
sp
,
STACKFRAME_SZ
,
%
o2
!
arg2
:
pt_regs
ptr
add
%
sp
,
STACKFRAME_SZ
,
%
o2
!
arg2
:
pt_regs
ptr
mov
0
,
%
o3
mov
0
,
%
o3
call
C_LABEL
(
sparc_do_fork
)
call
sparc_do_fork
mov
%
l5
,
%
o7
mov
%
l5
,
%
o7
/
*
Whee
,
real
vfork
!
*/
/
*
Whee
,
real
vfork
!
*/
.
globl
C_LABEL
(
sys_vfork
)
,
flush_patch_four
.
globl
sys_vfork
,
flush_patch_four
C_LABEL
(
sys_vfork
)
:
sys_vfork
:
flush_patch_four
:
flush_patch_four
:
FLUSH_ALL_KERNEL_WINDOWS
;
FLUSH_ALL_KERNEL_WINDOWS
;
ld
[%
curptr
+
TI_TASK
],
%
o4
ld
[%
curptr
+
TI_TASK
],
%
o4
...
@@ -1447,16 +1446,16 @@ flush_patch_four:
...
@@ -1447,16 +1446,16 @@ flush_patch_four:
sethi
%
hi
(
0x4000
| 0x0100 |
SIGCHLD
),
%
o0
sethi
%
hi
(
0x4000
| 0x0100 |
SIGCHLD
),
%
o0
mov
%
fp
,
%
o1
mov
%
fp
,
%
o1
or
%
o0
,
%
lo
(
0x4000
| 0x0100 |
SIGCHLD
),
%
o0
or
%
o0
,
%
lo
(
0x4000
| 0x0100 |
SIGCHLD
),
%
o0
sethi
%
hi
(
C_LABEL
(
sparc_do_fork
)
),
%
l1
sethi
%
hi
(
sparc_do_fork
),
%
l1
mov
0
,
%
o3
mov
0
,
%
o3
jmpl
%
l1
+
%
lo
(
C_LABEL
(
sparc_do_fork
)
),
%
g0
jmpl
%
l1
+
%
lo
(
sparc_do_fork
),
%
g0
add
%
sp
,
STACKFRAME_SZ
,
%
o2
add
%
sp
,
STACKFRAME_SZ
,
%
o2
.
align
4
.
align
4
linux_sparc_ni_syscall
:
linux_sparc_ni_syscall
:
sethi
%
hi
(
C_LABEL
(
sys_ni_syscall
)
),
%
l7
sethi
%
hi
(
sys_ni_syscall
),
%
l7
b
syscall_is_too_hard
b
syscall_is_too_hard
or
%
l7
,
%
lo
(
C_LABEL
(
sys_ni_syscall
)
),
%
l7
or
%
l7
,
%
lo
(
sys_ni_syscall
),
%
l7
linux_fast_syscall
:
linux_fast_syscall
:
andn
%
l7
,
3
,
%
l7
andn
%
l7
,
3
,
%
l7
...
@@ -1467,7 +1466,7 @@ linux_fast_syscall:
...
@@ -1467,7 +1466,7 @@ linux_fast_syscall:
mov
%
i3
,
%
o3
mov
%
i3
,
%
o3
linux_syscall_trace
:
linux_syscall_trace
:
call
C_LABEL
(
syscall_trace
)
call
syscall_trace
nop
nop
mov
%
i0
,
%
o0
mov
%
i0
,
%
o0
mov
%
i1
,
%
o1
mov
%
i1
,
%
o1
...
@@ -1476,11 +1475,11 @@ linux_syscall_trace:
...
@@ -1476,11 +1475,11 @@ linux_syscall_trace:
b
2
f
b
2
f
mov
%
i4
,
%
o4
mov
%
i4
,
%
o4
.
globl
C_LABEL
(
ret_from_fork
)
.
globl
ret_from_fork
C_LABEL
(
ret_from_fork
)
:
ret_from_fork
:
call
schedule_tail
call
schedule_tail
mov
%
g3
,
%
o0
mov
%
g3
,
%
o0
b
C_LABEL
(
ret_sys_call
)
b
ret_sys_call
ld
[%
sp
+
STACKFRAME_SZ
+
PT_I0
],
%
o0
ld
[%
sp
+
STACKFRAME_SZ
+
PT_I0
],
%
o0
/
*
Linux
native
and
SunOS
system
calls
enter
here
...
*/
/
*
Linux
native
and
SunOS
system
calls
enter
here
...
*/
...
@@ -1518,8 +1517,8 @@ syscall_is_too_hard:
...
@@ -1518,8 +1517,8 @@ syscall_is_too_hard:
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
.
globl
C_LABEL
(
ret_sys_call
)
.
globl
ret_sys_call
C_LABEL
(
ret_sys_call
)
:
ret_sys_call
:
ld
[%
curptr
+
TI_FLAGS
],
%
l6
ld
[%
curptr
+
TI_FLAGS
],
%
l6
cmp
%
o0
,
-
ENOIOCTLCMD
cmp
%
o0
,
-
ENOIOCTLCMD
ld
[%
sp
+
STACKFRAME_SZ
+
PT_PSR
],
%
g3
ld
[%
sp
+
STACKFRAME_SZ
+
PT_PSR
],
%
g3
...
@@ -1554,7 +1553,7 @@ C_LABEL(ret_sys_call):
...
@@ -1554,7 +1553,7 @@ C_LABEL(ret_sys_call):
st
%
l2
,
[%
sp
+
STACKFRAME_SZ
+
PT_NPC
]
st
%
l2
,
[%
sp
+
STACKFRAME_SZ
+
PT_NPC
]
linux_syscall_trace2
:
linux_syscall_trace2
:
call
C_LABEL
(
syscall_trace
)
call
syscall_trace
add
%
l1
,
0x4
,
%
l2
/*
npc
=
npc
+
4
*/
add
%
l1
,
0x4
,
%
l2
/*
npc
=
npc
+
4
*/
st
%
l1
,
[%
sp
+
STACKFRAME_SZ
+
PT_PC
]
st
%
l1
,
[%
sp
+
STACKFRAME_SZ
+
PT_PC
]
b
ret_trap_entry
b
ret_trap_entry
...
@@ -1595,7 +1594,7 @@ solaris_syscall:
...
@@ -1595,7 +1594,7 @@ solaris_syscall:
nop
nop
mov
%
i0
,
%
l5
mov
%
i0
,
%
l5
call
C_LABEL
(
do_solaris_syscall
)
call
do_solaris_syscall
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
...
@@ -1651,7 +1650,7 @@ sunos_syscall:
...
@@ -1651,7 +1650,7 @@ sunos_syscall:
nop
nop
nop
nop
mov
%
i0
,
%
l5
mov
%
i0
,
%
l5
call
C_LABEL
(
do_sunos_syscall
)
call
do_sunos_syscall
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
#endif
#endif
...
@@ -1664,7 +1663,7 @@ bsd_syscall:
...
@@ -1664,7 +1663,7 @@ bsd_syscall:
blu
,
a
1
f
blu
,
a
1
f
sll
%
g1
,
2
,
%
l4
sll
%
g1
,
2
,
%
l4
set
C_LABEL
(
sys_ni_syscall
)
,
%
l7
set
sys_ni_syscall
,
%
l7
b
bsd_is_too_hard
b
bsd_is_too_hard
nop
nop
...
@@ -1707,8 +1706,8 @@ bsd_is_too_hard:
...
@@ -1707,8 +1706,8 @@ bsd_is_too_hard:
*/
*/
sub
%
g0
,
%
o0
,
%
o0
sub
%
g0
,
%
o0
,
%
o0
#if 0 /* XXX todo XXX */
#if 0 /* XXX todo XXX */
sethi
%
hi
(
C_LABEL
(
bsd_xlatb_rorl
),
%
o3
sethi
%
hi
(
bsd_xlatb_rorl
),
%
o3
or
%
o3
,
%
lo
(
C_LABEL
(
bsd_xlatb_rorl
)
),
%
o3
or
%
o3
,
%
lo
(
bsd_xlatb_rorl
),
%
o3
sll
%
o0
,
2
,
%
o0
sll
%
o0
,
2
,
%
o0
ld
[%
o3
+
%
o0
],
%
o0
ld
[%
o3
+
%
o0
],
%
o0
#endif
#endif
...
@@ -1731,8 +1730,8 @@ bsd_is_too_hard:
...
@@ -1731,8 +1730,8 @@ bsd_is_too_hard:
*
void
*
fpqueue
,
unsigned
long
*
fpqdepth
)
*
void
*
fpqueue
,
unsigned
long
*
fpqdepth
)
*/
*/
.
globl
C_LABEL
(
fpsave
)
.
globl
fpsave
C_LABEL
(
fpsave
)
:
fpsave
:
st
%
fsr
,
[%
o1
]
!
this
can
trap
on
us
if
fpu
is
in
bogon
state
st
%
fsr
,
[%
o1
]
!
this
can
trap
on
us
if
fpu
is
in
bogon
state
ld
[%
o1
],
%
g1
ld
[%
o1
],
%
g1
set
0x2000
,
%
g4
set
0x2000
,
%
g4
...
@@ -1782,13 +1781,13 @@ fpsave_catch:
...
@@ -1782,13 +1781,13 @@ fpsave_catch:
st
%
fsr
,
[%
o1
]
st
%
fsr
,
[%
o1
]
fpsave_catch2
:
fpsave_catch2
:
b
C_LABEL
(
fpsave
)
+
4
b
fpsave
+
4
st
%
fsr
,
[%
o1
]
st
%
fsr
,
[%
o1
]
/
*
void
fpload
(
unsigned
long
*
fpregs
,
unsigned
long
*
fsr
)
; */
/
*
void
fpload
(
unsigned
long
*
fpregs
,
unsigned
long
*
fsr
)
; */
.
globl
C_LABEL
(
fpload
)
.
globl
fpload
C_LABEL
(
fpload
)
:
fpload
:
ldd
[%
o0
+
0x00
],
%f0
ldd
[%
o0
+
0x00
],
%f0
ldd
[%
o0
+
0x08
],
%f2
ldd
[%
o0
+
0x08
],
%f2
ldd
[%
o0
+
0x10
],
%f4
ldd
[%
o0
+
0x10
],
%f4
...
@@ -1809,8 +1808,8 @@ C_LABEL(fpload):
...
@@ -1809,8 +1808,8 @@ C_LABEL(fpload):
retl
retl
nop
nop
.
globl
C_LABEL
(
ndelay
)
.
globl
ndelay
C_LABEL
(
ndelay
)
:
ndelay
:
save
%
sp
,
-
STACKFRAME_SZ
,
%
sp
save
%
sp
,
-
STACKFRAME_SZ
,
%
sp
mov
%
i0
,
%
o0
mov
%
i0
,
%
o0
call
.
umul
call
.
umul
...
@@ -1818,8 +1817,8 @@ C_LABEL(ndelay):
...
@@ -1818,8 +1817,8 @@ C_LABEL(ndelay):
ba
delay_continue
ba
delay_continue
nop
nop
.
globl
C_LABEL
(
udelay
)
.
globl
udelay
C_LABEL
(
udelay
)
:
udelay
:
save
%
sp
,
-
STACKFRAME_SZ
,
%
sp
save
%
sp
,
-
STACKFRAME_SZ
,
%
sp
mov
%
i0
,
%
o0
mov
%
i0
,
%
o0
sethi
%
hi
(
0x10c6
),
%
o1
sethi
%
hi
(
0x10c6
),
%
o1
...
@@ -1827,12 +1826,12 @@ C_LABEL(udelay):
...
@@ -1827,12 +1826,12 @@ C_LABEL(udelay):
or
%
o1
,
%
lo
(
0x10c6
),
%
o1
or
%
o1
,
%
lo
(
0x10c6
),
%
o1
delay_continue
:
delay_continue
:
#ifndef CONFIG_SMP
#ifndef CONFIG_SMP
sethi
%
hi
(
C_LABEL
(
loops_per_jiffy
)
),
%
o3
sethi
%
hi
(
loops_per_jiffy
),
%
o3
call
.
umul
call
.
umul
ld
[%
o3
+
%
lo
(
C_LABEL
(
loops_per_jiffy
)
)],
%
o1
ld
[%
o3
+
%
lo
(
loops_per_jiffy
)],
%
o1
#else
#else
GET_PROCESSOR_OFFSET
(
o4
,
o2
)
GET_PROCESSOR_OFFSET
(
o4
,
o2
)
set
C_LABEL
(
cpu_data
)
,
%
o3
set
cpu_data
,
%
o3
call
.
umul
call
.
umul
ld
[%
o3
+
%
o4
],
%
o1
ld
[%
o3
+
%
o4
],
%
o1
#endif
#endif
...
@@ -1858,14 +1857,14 @@ breakpoint_trap:
...
@@ -1858,14 +1857,14 @@ breakpoint_trap:
WRITE_PAUSE
WRITE_PAUSE
st
%
i0
,
[%
sp
+
STACKFRAME_SZ
+
PT_G0
]
!
for
restarting
syscalls
st
%
i0
,
[%
sp
+
STACKFRAME_SZ
+
PT_G0
]
!
for
restarting
syscalls
call
C_LABEL
(
sparc_breakpoint
)
call
sparc_breakpoint
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
RESTORE_ALL
RESTORE_ALL
.
align
4
.
align
4
.
globl
C_LABEL
(
__handle_exception
)
,
flush_patch_exception
.
globl
__handle_exception
,
flush_patch_exception
C_LABEL
(
__handle_exception
)
:
__handle_exception
:
flush_patch_exception
:
flush_patch_exception
:
FLUSH_ALL_KERNEL_WINDOWS
;
FLUSH_ALL_KERNEL_WINDOWS
;
ldd
[%
o0
],
%
o6
ldd
[%
o0
],
%
o6
...
@@ -1873,7 +1872,7 @@ flush_patch_exception:
...
@@ -1873,7 +1872,7 @@ flush_patch_exception:
mov
1
,
%
g1
!
signal
EFAULT
condition
mov
1
,
%
g1
!
signal
EFAULT
condition
.
align
4
.
align
4
.
globl
C_LABEL
(
kill_user_windows
)
,
kuw_patch1_7win
.
globl
kill_user_windows
,
kuw_patch1_7win
.
globl
kuw_patch1
.
globl
kuw_patch1
kuw_patch1_7win
:
sll
%
o3
,
6
,
%
o3
kuw_patch1_7win
:
sll
%
o3
,
6
,
%
o3
...
@@ -1881,7 +1880,7 @@ kuw_patch1_7win: sll %o3, 6, %o3
...
@@ -1881,7 +1880,7 @@ kuw_patch1_7win: sll %o3, 6, %o3
*
case
scenerio
,
it
is
several
times
better
than
taking
the
*
case
scenerio
,
it
is
several
times
better
than
taking
the
*
traps
with
the
old
method
of
just
doing
flush_user_windows
()
.
*
traps
with
the
old
method
of
just
doing
flush_user_windows
()
.
*/
*/
C_LABEL
(
kill_user_windows
)
:
kill_user_windows
:
ld
[%
g6
+
TI_UWINMASK
],
%
o0
!
get
current
umask
ld
[%
g6
+
TI_UWINMASK
],
%
o0
!
get
current
umask
orcc
%
g0
,
%
o0
,
%
g0
!
if
no
bits
set
,
we
are
done
orcc
%
g0
,
%
o0
,
%
g0
!
if
no
bits
set
,
we
are
done
be
3
f
!
nothing
to
do
be
3
f
!
nothing
to
do
...
@@ -1911,8 +1910,8 @@ kuw_patch1:
...
@@ -1911,8 +1910,8 @@ kuw_patch1:
st
%
g0
,
[%
g6
+
TI_W_SAVED
]
!
no
windows
saved
st
%
g0
,
[%
g6
+
TI_W_SAVED
]
!
no
windows
saved
.
align
4
.
align
4
.
globl
C_LABEL
(
restore_current
)
.
globl
restore_current
C_LABEL
(
restore_current
)
:
restore_current
:
LOAD_CURRENT
(
g6
,
o0
)
LOAD_CURRENT
(
g6
,
o0
)
retl
retl
nop
nop
...
@@ -1932,8 +1931,8 @@ linux_trap_ipi15_pcic:
...
@@ -1932,8 +1931,8 @@ linux_trap_ipi15_pcic:
*
The
busy
loop
is
necessary
because
the
PIO
error
*
The
busy
loop
is
necessary
because
the
PIO
error
*
sometimes
does
not
go
away
quickly
and
we
trap
again
.
*
sometimes
does
not
go
away
quickly
and
we
trap
again
.
*/
*/
sethi
%
hi
(
C_LABEL
(
pcic_regs
)
),
%
o1
sethi
%
hi
(
pcic_regs
),
%
o1
ld
[%
o1
+
%
lo
(
C_LABEL
(
pcic_regs
)
)],
%
o2
ld
[%
o1
+
%
lo
(
pcic_regs
)],
%
o2
!
Get
pending
status
for
printouts
later
.
!
Get
pending
status
for
printouts
later
.
ld
[%
o2
+
PCI_SYS_INT_PENDING
],
%
o0
ld
[%
o2
+
PCI_SYS_INT_PENDING
],
%
o0
...
@@ -1952,12 +1951,12 @@ linux_trap_ipi15_pcic:
...
@@ -1952,12 +1951,12 @@ linux_trap_ipi15_pcic:
wr
%
l4
,
PSR_ET
,
%
psr
wr
%
l4
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
pcic_nmi
)
call
pcic_nmi
add
%
sp
,
STACKFRAME_SZ
,
%
o1
!
struct
pt_regs
*
regs
add
%
sp
,
STACKFRAME_SZ
,
%
o1
!
struct
pt_regs
*
regs
RESTORE_ALL
RESTORE_ALL
.
globl
C_LABEL
(
pcic_nmi_trap_patch
)
.
globl
pcic_nmi_trap_patch
C_LABEL
(
pcic_nmi_trap_patch
)
:
pcic_nmi_trap_patch
:
sethi
%
hi
(
linux_trap_ipi15_pcic
),
%
l3
sethi
%
hi
(
linux_trap_ipi15_pcic
),
%
l3
jmpl
%
l3
+
%
lo
(
linux_trap_ipi15_pcic
),
%
g0
jmpl
%
l3
+
%
lo
(
linux_trap_ipi15_pcic
),
%
g0
rd
%
psr
,
%
l0
rd
%
psr
,
%
l0
...
...
arch/sparc/kernel/etrap.S
View file @
2d6d3d27
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*/
*/
#include <asm/cprefix.h>
#include <asm/head.h>
#include <asm/head.h>
#include <asm/asi.h>
#include <asm/asi.h>
#include <asm/contregs.h>
#include <asm/contregs.h>
...
@@ -217,9 +216,9 @@ tsetup_patch6:
...
@@ -217,9 +216,9 @@ tsetup_patch6:
/
*
Call
MMU
-
architecture
dependent
stack
checking
/
*
Call
MMU
-
architecture
dependent
stack
checking
*
routine
.
*
routine
.
*/
*/
.
globl
C_LABEL
(
tsetup_mmu_patchme
)
.
globl
tsetup_mmu_patchme
C_LABEL
(
tsetup_mmu_patchme
)
:
tsetup_mmu_patchme
:
b
C_LABEL
(
tsetup_sun4c_stackchk
)
b
tsetup_sun4c_stackchk
andcc
%
sp
,
0x7
,
%
g0
andcc
%
sp
,
0x7
,
%
g0
/
*
Architecture
specific
stack
checking
routines
.
When
either
/
*
Architecture
specific
stack
checking
routines
.
When
either
...
@@ -229,8 +228,8 @@ C_LABEL(tsetup_mmu_patchme):
...
@@ -229,8 +228,8 @@ C_LABEL(tsetup_mmu_patchme):
*/
*/
#define glob_tmp g1
#define glob_tmp g1
.
globl
C_LABEL
(
tsetup_sun4c_stackchk
)
.
globl
tsetup_sun4c_stackchk
C_LABEL
(
tsetup_sun4c_stackchk
)
:
tsetup_sun4c_stackchk
:
/
*
Done
by
caller
:
andcc
%
sp
,
0x7
,
%
g0
*/
/
*
Done
by
caller
:
andcc
%
sp
,
0x7
,
%
g0
*/
bne
trap_setup_user_stack_is_bolixed
bne
trap_setup_user_stack_is_bolixed
sra
%
sp
,
29
,
%
glob_tmp
sra
%
sp
,
29
,
%
glob_tmp
...
@@ -276,8 +275,8 @@ tsetup_sun4c_onepage:
...
@@ -276,8 +275,8 @@ tsetup_sun4c_onepage:
jmpl
%
t_retpc
+
0x8
,
%
g0
jmpl
%
t_retpc
+
0x8
,
%
g0
mov
%
t_kstack
,
%
sp
mov
%
t_kstack
,
%
sp
.
globl
C_LABEL
(
tsetup_srmmu_stackchk
)
.
globl
tsetup_srmmu_stackchk
C_LABEL
(
tsetup_srmmu_stackchk
)
:
tsetup_srmmu_stackchk
:
/
*
Check
results
of
callers
andcc
%
sp
,
0x7
,
%
g0
*/
/
*
Check
results
of
callers
andcc
%
sp
,
0x7
,
%
g0
*/
bne
trap_setup_user_stack_is_bolixed
bne
trap_setup_user_stack_is_bolixed
sethi
%
hi
(
PAGE_OFFSET
),
%
glob_tmp
sethi
%
hi
(
PAGE_OFFSET
),
%
glob_tmp
...
...
arch/sparc/kernel/head.S
View file @
2d6d3d27
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
#include <linux/config.h>
#include <linux/config.h>
#include <linux/init.h>
#include <linux/init.h>
#include <asm/cprefix.h>
#include <asm/head.h>
#include <asm/head.h>
#include <asm/asi.h>
#include <asm/asi.h>
#include <asm/contregs.h>
#include <asm/contregs.h>
...
@@ -34,18 +33,18 @@
...
@@ -34,18 +33,18 @@
*/
*/
.
align
4
.
align
4
.
globl
C_LABEL
(
cputyp
)
.
globl
cputyp
C_LABEL
(
cputyp
)
:
cputyp
:
.
word
1
.
word
1
.
align
4
.
align
4
.
globl
C_LABEL
(
cputypval
)
.
globl
cputypval
C_LABEL
(
cputypval
)
:
cputypval
:
.
asciz
"sun4c"
.
asciz
"sun4c"
.
ascii
" "
.
ascii
" "
C_LABEL
(
cputypvalend
)
:
cputypvalend
:
C_LABEL
(
cputypvallen
)
=
C_LABEL
(
cputypvar
)
-
C_LABEL
(
cputypval
)
cputypvallen
=
cputypvar
-
cputypval
.
align
4
.
align
4
/*
/*
...
@@ -56,12 +55,12 @@ C_LABEL(cputypvallen) = C_LABEL(cputypvar) - C_LABEL(cputypval)
...
@@ -56,12 +55,12 @@ C_LABEL(cputypvallen) = C_LABEL(cputypvar) - C_LABEL(cputypval)
/*
Uh
,
actually
Linus
it
is
I
who
cannot
spell
.
Too
much
murky
/*
Uh
,
actually
Linus
it
is
I
who
cannot
spell
.
Too
much
murky
*
Sparc
assembly
will
do
this
to
ya
.
*
Sparc
assembly
will
do
this
to
ya
.
*/
*/
C_LABEL
(
cputypvar
)
:
cputypvar
:
.
asciz
"compatability"
.
asciz
"compatability"
/*
Tested
on
SS
-
5
,
SS
-
10
.
Probably
someone
at
Sun
applied
a
spell
-
checker
.
*/
/*
Tested
on
SS
-
5
,
SS
-
10
.
Probably
someone
at
Sun
applied
a
spell
-
checker
.
*/
.
align
4
.
align
4
C_LABEL
(
cputypvar_sun4m
)
:
cputypvar_sun4m
:
.
asciz
"compatible"
.
asciz
"compatible"
.
align
4
.
align
4
...
@@ -88,14 +87,14 @@ sun4e_notsup:
...
@@ -88,14 +87,14 @@ sun4e_notsup:
/
*
The
Sparc
trap
table
,
bootloader
gives
us
control
at
_start
.
*/
/
*
The
Sparc
trap
table
,
bootloader
gives
us
control
at
_start
.
*/
.
text
.
text
.
globl
start
,
_stext
,
_start
,
__stext
.
globl
start
,
_stext
,
_start
,
__stext
.
globl
C_LABEL
(
trapbase
)
.
globl
trapbase
_start
:
/
*
danger
danger
*/
_start
:
/
*
danger
danger
*/
__stext
:
__stext
:
_stext
:
_stext
:
start
:
start
:
C_LABEL
(
trapbase
)
:
trapbase
:
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
C_LABEL
(
trapbase_cpu0
)
:
trapbase_cpu0
:
#endif
#endif
/*
We
get
control
passed
to
us
here
at
t_zero
.
*/
/*
We
get
control
passed
to
us
here
at
t_zero
.
*/
t_zero
:
b
gokernel
; nop; nop; nop;
t_zero
:
b
gokernel
; nop; nop; nop;
...
@@ -202,13 +201,13 @@ t_badfc:BAD_TRAP(0xfc) BAD_TRAP(0xfd)
...
@@ -202,13 +201,13 @@ t_badfc:BAD_TRAP(0xfc) BAD_TRAP(0xfd)
dbtrap
:
BAD_TRAP
(0
xfe
)
/*
Debugger
/
PROM
breakpoint
#
1
*/
dbtrap
:
BAD_TRAP
(0
xfe
)
/*
Debugger
/
PROM
breakpoint
#
1
*/
dbtrap2
:
BAD_TRAP
(
0xff
)
/
*
Debugger
/
PROM
breakpoint
#
2
*/
dbtrap2
:
BAD_TRAP
(
0xff
)
/
*
Debugger
/
PROM
breakpoint
#
2
*/
.
globl
C_LABEL
(
end_traptable
)
.
globl
end_traptable
C_LABEL
(
end_traptable
)
:
end_traptable
:
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
/
*
Trap
tables
for
the
other
cpus
.
*/
/
*
Trap
tables
for
the
other
cpus
.
*/
.
globl
C_LABEL
(
trapbase_cpu1
),
C_LABEL
(
trapbase_cpu2
),
C_LABEL
(
trapbase_cpu3
)
.
globl
trapbase_cpu1
,
trapbase_cpu2
,
trapbase_cpu3
C_LABEL
(
trapbase_cpu1
)
:
trapbase_cpu1
:
BAD_TRAP
(0
x0
)
SRMMU_TFAULT
TRAP_ENTRY
(
0x2
,
bad_instruction
)
BAD_TRAP
(0
x0
)
SRMMU_TFAULT
TRAP_ENTRY
(
0x2
,
bad_instruction
)
TRAP_ENTRY
(0
x3
,
priv_instruction
)
TRAP_ENTRY
(
0x4
,
fpd_trap_handler
)
TRAP_ENTRY
(0
x3
,
priv_instruction
)
TRAP_ENTRY
(
0x4
,
fpd_trap_handler
)
WINDOW_SPILL
WINDOW_FILL
TRAP_ENTRY
(
0x7
,
mna_handler
)
WINDOW_SPILL
WINDOW_FILL
TRAP_ENTRY
(
0x7
,
mna_handler
)
...
@@ -276,7 +275,7 @@ C_LABEL(trapbase_cpu1):
...
@@ -276,7 +275,7 @@ C_LABEL(trapbase_cpu1):
BAD_TRAP
(0
xf7
)
BAD_TRAP
(
0xf8
)
BAD_TRAP
(
0xf9
)
BAD_TRAP
(
0xfa
)
BAD_TRAP
(
0xfb
)
BAD_TRAP
(0
xf7
)
BAD_TRAP
(
0xf8
)
BAD_TRAP
(
0xf9
)
BAD_TRAP
(
0xfa
)
BAD_TRAP
(
0xfb
)
BAD_TRAP
(0
xfc
)
BAD_TRAP
(
0xfd
)
BAD_TRAP
(
0xfe
)
BAD_TRAP
(
0xff
)
BAD_TRAP
(0
xfc
)
BAD_TRAP
(
0xfd
)
BAD_TRAP
(
0xfe
)
BAD_TRAP
(
0xff
)
C_LABEL
(
trapbase_cpu2
)
:
trapbase_cpu2
:
BAD_TRAP
(0
x0
)
SRMMU_TFAULT
TRAP_ENTRY
(
0x2
,
bad_instruction
)
BAD_TRAP
(0
x0
)
SRMMU_TFAULT
TRAP_ENTRY
(
0x2
,
bad_instruction
)
TRAP_ENTRY
(0
x3
,
priv_instruction
)
TRAP_ENTRY
(
0x4
,
fpd_trap_handler
)
TRAP_ENTRY
(0
x3
,
priv_instruction
)
TRAP_ENTRY
(
0x4
,
fpd_trap_handler
)
WINDOW_SPILL
WINDOW_FILL
TRAP_ENTRY
(
0x7
,
mna_handler
)
WINDOW_SPILL
WINDOW_FILL
TRAP_ENTRY
(
0x7
,
mna_handler
)
...
@@ -344,7 +343,7 @@ C_LABEL(trapbase_cpu2):
...
@@ -344,7 +343,7 @@ C_LABEL(trapbase_cpu2):
BAD_TRAP
(0
xf7
)
BAD_TRAP
(
0xf8
)
BAD_TRAP
(
0xf9
)
BAD_TRAP
(
0xfa
)
BAD_TRAP
(
0xfb
)
BAD_TRAP
(0
xf7
)
BAD_TRAP
(
0xf8
)
BAD_TRAP
(
0xf9
)
BAD_TRAP
(
0xfa
)
BAD_TRAP
(
0xfb
)
BAD_TRAP
(0
xfc
)
BAD_TRAP
(
0xfd
)
BAD_TRAP
(
0xfe
)
BAD_TRAP
(
0xff
)
BAD_TRAP
(0
xfc
)
BAD_TRAP
(
0xfd
)
BAD_TRAP
(
0xfe
)
BAD_TRAP
(
0xff
)
C_LABEL
(
trapbase_cpu3
)
:
trapbase_cpu3
:
BAD_TRAP
(0
x0
)
SRMMU_TFAULT
TRAP_ENTRY
(
0x2
,
bad_instruction
)
BAD_TRAP
(0
x0
)
SRMMU_TFAULT
TRAP_ENTRY
(
0x2
,
bad_instruction
)
TRAP_ENTRY
(0
x3
,
priv_instruction
)
TRAP_ENTRY
(
0x4
,
fpd_trap_handler
)
TRAP_ENTRY
(0
x3
,
priv_instruction
)
TRAP_ENTRY
(
0x4
,
fpd_trap_handler
)
WINDOW_SPILL
WINDOW_FILL
TRAP_ENTRY
(
0x7
,
mna_handler
)
WINDOW_SPILL
WINDOW_FILL
TRAP_ENTRY
(
0x7
,
mna_handler
)
...
@@ -418,25 +417,25 @@ C_LABEL(trapbase_cpu3):
...
@@ -418,25 +417,25 @@ C_LABEL(trapbase_cpu3):
/*
This
was
the
only
reasonable
way
I
could
think
of
to
properly
align
/*
This
was
the
only
reasonable
way
I
could
think
of
to
properly
align
*
these
page
-
table
data
structures
.
*
these
page
-
table
data
structures
.
*/
*/
.
globl
C_LABEL
(
pg0
),
C_LABEL
(
pg1
),
C_LABEL
(
pg2
),
C_LABEL
(
pg3
)
.
globl
pg0
,
pg1
,
pg2
,
pg3
.
globl
C_LABEL
(
empty_bad_page
)
.
globl
empty_bad_page
.
globl
C_LABEL
(
empty_bad_page_table
)
.
globl
empty_bad_page_table
.
globl
C_LABEL
(
empty_zero_page
)
.
globl
empty_zero_page
.
globl
C_LABEL
(
swapper_pg_dir
)
.
globl
swapper_pg_dir
C_LABEL
(
swapper_pg_dir
)
:
.
skip
PAGE_SIZE
swapper_pg_dir
:
.
skip
PAGE_SIZE
C_LABEL
(
pg0
):
.
skip
PAGE_SIZE
pg0
:
.
skip
PAGE_SIZE
C_LABEL
(
pg1
):
.
skip
PAGE_SIZE
pg1
:
.
skip
PAGE_SIZE
C_LABEL
(
pg2
):
.
skip
PAGE_SIZE
pg2
:
.
skip
PAGE_SIZE
C_LABEL
(
pg3
):
.
skip
PAGE_SIZE
pg3
:
.
skip
PAGE_SIZE
C_LABEL
(
empty_bad_page
)
:
.
skip
PAGE_SIZE
empty_bad_page
:
.
skip
PAGE_SIZE
C_LABEL
(
empty_bad_page_table
):
.
skip
PAGE_SIZE
empty_bad_page_table
:
.
skip
PAGE_SIZE
C_LABEL
(
empty_zero_page
):
.
skip
PAGE_SIZE
empty_zero_page
:
.
skip
PAGE_SIZE
.
global
C_LABEL
(
root_flags
)
.
global
root_flags
.
global
C_LABEL
(
ram_flags
)
.
global
ram_flags
.
global
C_LABEL
(
root_dev
)
.
global
root_dev
.
global
C_LABEL
(
sparc_ramdisk_image
)
.
global
sparc_ramdisk_image
.
global
C_LABEL
(
sparc_ramdisk_size
)
.
global
sparc_ramdisk_size
/*
This
stuff
has
to
be
in
sync
with
SILO
and
other
potential
boot
loaders
/*
This
stuff
has
to
be
in
sync
with
SILO
and
other
potential
boot
loaders
*
Fields
should
be
kept
upward
compatible
and
whenever
any
change
is
made
,
*
Fields
should
be
kept
upward
compatible
and
whenever
any
change
is
made
,
...
@@ -445,17 +444,17 @@ C_LABEL(empty_zero_page): .skip PAGE_SIZE
...
@@ -445,17 +444,17 @@ C_LABEL(empty_zero_page): .skip PAGE_SIZE
.
ascii
"HdrS"
.
ascii
"HdrS"
.
word
LINUX_VERSION_CODE
.
word
LINUX_VERSION_CODE
.
half
0x0203
/*
HdrS
version
*/
.
half
0x0203
/*
HdrS
version
*/
C_LABEL
(
root_flags
)
:
root_flags
:
.
half
1
.
half
1
C_LABEL
(
root_dev
)
:
root_dev
:
.
half
0
.
half
0
C_LABEL
(
ram_flags
)
:
ram_flags
:
.
half
0
.
half
0
C_LABEL
(
sparc_ramdisk_image
)
:
sparc_ramdisk_image
:
.
word
0
.
word
0
C_LABEL
(
sparc_ramdisk_size
)
:
sparc_ramdisk_size
:
.
word
0
.
word
0
.
word
C_LABEL
(
reboot_command
)
.
word
reboot_command
.
word
0
,
0
,
0
.
word
0
,
0
,
0
.
word
_end
.
word
_end
...
@@ -517,7 +516,7 @@ copy_prom_lvl14:
...
@@ -517,7 +516,7 @@ copy_prom_lvl14:
/
*
DJHR
/
*
DJHR
*
preserve
our
linked
/
calculated
instructions
*
preserve
our
linked
/
calculated
instructions
*/
*/
set
C_LABEL
(
lvl14_save
)
,
%
g1
set
lvl14_save
,
%
g1
set
t_irq14
,
%
g3
set
t_irq14
,
%
g3
sub
%
g1
,
%
l6
,
%
g1
!
translate
to
physical
sub
%
g1
,
%
l6
,
%
g1
!
translate
to
physical
sub
%
g3
,
%
l6
,
%
g3
!
translate
to
physical
sub
%
g3
,
%
l6
,
%
g3
!
translate
to
physical
...
@@ -761,11 +760,11 @@ execute_in_high_mem:
...
@@ -761,11 +760,11 @@ execute_in_high_mem:
mov
%
l0
,
%
o0
!
put
back
romvec
mov
%
l0
,
%
o0
!
put
back
romvec
mov
%
l1
,
%
o1
!
and
debug_vec
mov
%
l1
,
%
o1
!
and
debug_vec
sethi
%
hi
(
C_LABEL
(
prom_vector_p
)
),
%
g1
sethi
%
hi
(
prom_vector_p
),
%
g1
st
%
o0
,
[%
g1
+
%
lo
(
C_LABEL
(
prom_vector_p
)
)]
st
%
o0
,
[%
g1
+
%
lo
(
prom_vector_p
)]
sethi
%
hi
(
C_LABEL
(
linux_dbvec
)
),
%
g1
sethi
%
hi
(
linux_dbvec
),
%
g1
st
%
o1
,
[%
g1
+
%
lo
(
C_LABEL
(
linux_dbvec
)
)]
st
%
o1
,
[%
g1
+
%
lo
(
linux_dbvec
)]
ld
[%
o0
+
0x4
],
%
o3
ld
[%
o0
+
0x4
],
%
o3
and
%
o3
,
0x3
,
%
o5
!
get
the
version
and
%
o3
,
0x3
,
%
o5
!
get
the
version
...
@@ -808,10 +807,10 @@ found_version:
...
@@ -808,10 +807,10 @@ found_version:
or
%
g0
,
%
g0
,
%
o0
!
next_node
(
0
)
=
first_node
or
%
g0
,
%
g0
,
%
o0
!
next_node
(
0
)
=
first_node
or
%
o0
,
%
g0
,
%
g6
or
%
o0
,
%
g0
,
%
g6
sethi
%
hi
(
C_LABEL
(
cputypvar
)
),
%
o1
!
First
node
has
cpu
-
arch
sethi
%
hi
(
cputypvar
),
%
o1
!
First
node
has
cpu
-
arch
or
%
o1
,
%
lo
(
C_LABEL
(
cputypvar
)
),
%
o1
or
%
o1
,
%
lo
(
cputypvar
),
%
o1
sethi
%
hi
(
C_LABEL
(
cputypval
)
),
%
o2
!
information
,
the
string
sethi
%
hi
(
cputypval
),
%
o2
!
information
,
the
string
or
%
o2
,
%
lo
(
C_LABEL
(
cputypval
)
),
%
o2
or
%
o2
,
%
lo
(
cputypval
),
%
o2
ld
[%
l1
],
%
l0
!
'compatibility'
tells
ld
[%
l1
],
%
l0
!
'compatibility'
tells
ld
[%
l0
+
0xc
],
%
l0
!
that
we
want
'sun4x'
where
ld
[%
l0
+
0xc
],
%
l0
!
that
we
want
'sun4x'
where
call
%
l0
!
x
is
one
of
''
,
'c'
,
'm'
,
call
%
l0
!
x
is
one
of
''
,
'c'
,
'm'
,
...
@@ -824,17 +823,17 @@ found_version:
...
@@ -824,17 +823,17 @@ found_version:
nop
nop
or
%
g6
,
%
g0
,
%
o0
or
%
g6
,
%
g0
,
%
o0
sethi
%
hi
(
C_LABEL
(
cputypvar_sun4m
)
),
%
o1
sethi
%
hi
(
cputypvar_sun4m
),
%
o1
or
%
o1
,
%
lo
(
C_LABEL
(
cputypvar_sun4m
)
),
%
o1
or
%
o1
,
%
lo
(
cputypvar_sun4m
),
%
o1
sethi
%
hi
(
C_LABEL
(
cputypval
)
),
%
o2
sethi
%
hi
(
cputypval
),
%
o2
or
%
o2
,
%
lo
(
C_LABEL
(
cputypval
)
),
%
o2
or
%
o2
,
%
lo
(
cputypval
),
%
o2
ld
[%
l1
],
%
l0
ld
[%
l1
],
%
l0
ld
[%
l0
+
0xc
],
%
l0
ld
[%
l0
+
0xc
],
%
l0
call
%
l0
call
%
l0
nop
nop
got_prop
:
got_prop
:
set
C_LABEL
(
cputypval
)
,
%
o2
set
cputypval
,
%
o2
ldub
[%
o2
+
0x4
],
%
l1
ldub
[%
o2
+
0x4
],
%
l1
cmp
%
l1
,
' '
cmp
%
l1
,
' '
...
@@ -853,7 +852,7 @@ got_prop:
...
@@ -853,7 +852,7 @@ got_prop:
b
no_sun4u_here
!
AIEEE
,
a
V9
sun4u
...
Get
our
BIG
BROTHER
kernel
:
))
b
no_sun4u_here
!
AIEEE
,
a
V9
sun4u
...
Get
our
BIG
BROTHER
kernel
:
))
nop
nop
1
:
set
C_LABEL
(
cputypval
)
,
%
l1
1
:
set
cputypval
,
%
l1
ldub
[%
l1
+
0x4
],
%
l1
ldub
[%
l1
+
0x4
],
%
l1
cmp
%
l1
,
'm'
!
Test
for
sun4d
,
sun4e
?
cmp
%
l1
,
'm'
!
Test
for
sun4d
,
sun4e
?
be
sun4m_init
be
sun4m_init
...
@@ -875,8 +874,8 @@ got_prop:
...
@@ -875,8 +874,8 @@ got_prop:
sun4d_init
:
sun4d_init
:
/
*
Need
to
patch
call
to
handler_irq
*/
/
*
Need
to
patch
call
to
handler_irq
*/
set
C_LABEL
(
patch_handler_irq
)
,
%
g4
set
patch_handler_irq
,
%
g4
set
C_LABEL
(
sun4d_handler_irq
)
,
%
g5
set
sun4d_handler_irq
,
%
g5
sethi
%
hi
(
0x40000000
),
%
g3
!
call
sethi
%
hi
(
0x40000000
),
%
g3
!
call
sub
%
g5
,
%
g4
,
%
g5
sub
%
g5
,
%
g4
,
%
g5
srl
%
g5
,
2
,
%
g5
srl
%
g5
,
2
,
%
g5
...
@@ -997,8 +996,8 @@ sun4c_continue_boot:
...
@@ -997,8 +996,8 @@ sun4c_continue_boot:
*
show
-
time
!
*
show
-
time
!
*/
*/
sethi
%
hi
(
C_LABEL
(
cputyp
)
),
%
o0
sethi
%
hi
(
cputyp
),
%
o0
st
%
g4
,
[%
o0
+
%
lo
(
C_LABEL
(
cputyp
)
)]
st
%
g4
,
[%
o0
+
%
lo
(
cputyp
)]
/
*
Turn
on
Supervisor
,
EnableFloating
,
and
all
the
PIL
bits
.
/
*
Turn
on
Supervisor
,
EnableFloating
,
and
all
the
PIL
bits
.
*
Also
puts
us
in
register
window
zero
with
traps
off
.
*
Also
puts
us
in
register
window
zero
with
traps
off
.
...
@@ -1008,14 +1007,14 @@ sun4c_continue_boot:
...
@@ -1008,14 +1007,14 @@ sun4c_continue_boot:
WRITE_PAUSE
WRITE_PAUSE
/
*
I
want
a
kernel
stack
NOW
!
*/
/
*
I
want
a
kernel
stack
NOW
!
*/
set
C_LABEL
(
init_thread_union
)
,
%
g1
set
init_thread_union
,
%
g1
set
(
THREAD_SIZE
-
STACKFRAME_SZ
),
%
g2
set
(
THREAD_SIZE
-
STACKFRAME_SZ
),
%
g2
add
%
g1
,
%
g2
,
%
sp
add
%
g1
,
%
g2
,
%
sp
mov
0
,
%
fp
/*
And
for
good
luck
*/
mov
0
,
%
fp
/*
And
for
good
luck
*/
/
*
Zero
out
our
BSS
section
.
*/
/
*
Zero
out
our
BSS
section
.
*/
set
C_LABEL
(
__bss_start
)
,
%
o0
!
First
address
of
BSS
set
__bss_start
,
%
o0
!
First
address
of
BSS
set
C_LABEL
(
end
)
,
%
o1
!
Last
address
of
BSS
set
end
,
%
o1
!
Last
address
of
BSS
add
%
o0
,
0x1
,
%
o0
add
%
o0
,
0x1
,
%
o0
1
:
1
:
stb
%
g0
,
[%
o0
]
stb
%
g0
,
[%
o0
]
...
@@ -1026,11 +1025,11 @@ sun4c_continue_boot:
...
@@ -1026,11 +1025,11 @@ sun4c_continue_boot:
/
*
Initialize
the
uwinmask
value
for
init
task
just
in
case
.
/
*
Initialize
the
uwinmask
value
for
init
task
just
in
case
.
*
But
first
make
current_set
[
boot_cpu_id
]
point
to
something
useful
.
*
But
first
make
current_set
[
boot_cpu_id
]
point
to
something
useful
.
*/
*/
set
C_LABEL
(
init_thread_union
)
,
%
g6
set
init_thread_union
,
%
g6
set
C_LABEL
(
current_set
)
,
%
g2
set
current_set
,
%
g2
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
sethi
%
hi
(
C_LABEL
(
boot_cpu_id4
)
),
%
g3
sethi
%
hi
(
boot_cpu_id4
),
%
g3
ldub
[%
g3
+
%
lo
(
C_LABEL
(
boot_cpu_id4
)
)],
%
g3
ldub
[%
g3
+
%
lo
(
boot_cpu_id4
)],
%
g3
st
%
g6
,
[%
g2
]
st
%
g6
,
[%
g2
]
add
%
g2
,
%
g3
,
%
g2
add
%
g2
,
%
g3
,
%
g2
#endif
#endif
...
@@ -1124,14 +1123,14 @@ sun4c_continue_boot:
...
@@ -1124,14 +1123,14 @@ sun4c_continue_boot:
st
%
g4
,
[%
g5
+
0x1c
]
st
%
g4
,
[%
g5
+
0x1c
]
2
:
2
:
sethi
%
hi
(
C_LABEL
(
nwindows
)
),
%
g4
sethi
%
hi
(
nwindows
),
%
g4
st
%
g3
,
[%
g4
+
%
lo
(
C_LABEL
(
nwindows
)
)]
!
store
final
value
st
%
g3
,
[%
g4
+
%
lo
(
nwindows
)]
!
store
final
value
sub
%
g3
,
0x1
,
%
g3
sub
%
g3
,
0x1
,
%
g3
sethi
%
hi
(
C_LABEL
(
nwindowsm1
)
),
%
g4
sethi
%
hi
(
nwindowsm1
),
%
g4
st
%
g3
,
[%
g4
+
%
lo
(
C_LABEL
(
nwindowsm1
)
)]
st
%
g3
,
[%
g4
+
%
lo
(
nwindowsm1
)]
/
*
Here
we
go
,
start
using
Linux
's trap table... */
/
*
Here
we
go
,
start
using
Linux
's trap table... */
set
C_LABEL
(
trapbase
)
,
%
g3
set
trapbase
,
%
g3
wr
%
g3
,
0x0
,
%
tbr
wr
%
g3
,
0x0
,
%
tbr
WRITE_PAUSE
WRITE_PAUSE
...
@@ -1147,12 +1146,12 @@ sun4c_continue_boot:
...
@@ -1147,12 +1146,12 @@ sun4c_continue_boot:
*
off
to
start_kernel
()
.
*
off
to
start_kernel
()
.
*/
*/
sethi
%
hi
(
C_LABEL
(
prom_vector_p
)
),
%
g5
sethi
%
hi
(
prom_vector_p
),
%
g5
ld
[%
g5
+
%
lo
(
C_LABEL
(
prom_vector_p
)
)],
%
o0
ld
[%
g5
+
%
lo
(
prom_vector_p
)],
%
o0
call
C_LABEL
(
prom_init
)
call
prom_init
nop
nop
call
C_LABEL
(
start_kernel
)
call
start_kernel
nop
nop
/
*
We
should
not
get
here
.
*/
/
*
We
should
not
get
here
.
*/
...
@@ -1162,7 +1161,7 @@ sun4c_continue_boot:
...
@@ -1162,7 +1161,7 @@ sun4c_continue_boot:
sun4_init
:
sun4_init
:
#ifdef CONFIG_SUN4
#ifdef CONFIG_SUN4
/*
There
,
happy
now
Adrian
?
*/
/*
There
,
happy
now
Adrian
?
*/
set
C_LABEL
(
cputypval
)
,
%
o2
!
Let
everyone
know
we
set
cputypval
,
%
o2
!
Let
everyone
know
we
set
' '
,
%
o0
!
are
a
"sun4 "
architecture
set
' '
,
%
o0
!
are
a
"sun4 "
architecture
stb
%
o0
,
[%
o2
+
0x4
]
stb
%
o0
,
[%
o2
+
0x4
]
...
@@ -1289,8 +1288,8 @@ halt_me:
...
@@ -1289,8 +1288,8 @@ halt_me:
*
gets
initialized
in
c
-
code
so
all
routines
can
use
it
.
*
gets
initialized
in
c
-
code
so
all
routines
can
use
it
.
*/
*/
.
globl
C_LABEL
(
prom_vector_p
)
.
globl
prom_vector_p
C_LABEL
(
prom_vector_p
)
:
prom_vector_p
:
.
word
0
.
word
0
/*
We
calculate
the
following
at
boot
time
,
window
fills
/
spills
and
trap
entry
/*
We
calculate
the
following
at
boot
time
,
window
fills
/
spills
and
trap
entry
...
@@ -1298,25 +1297,25 @@ C_LABEL(prom_vector_p):
...
@@ -1298,25 +1297,25 @@ C_LABEL(prom_vector_p):
*/
*/
.
align
4
.
align
4
.
globl
C_LABEL
(
nwindows
)
.
globl
nwindows
.
globl
C_LABEL
(
nwindowsm1
)
.
globl
nwindowsm1
C_LABEL
(
nwindows
)
:
nwindows
:
.
word
8
.
word
8
C_LABEL
(
nwindowsm1
)
:
nwindowsm1
:
.
word
7
.
word
7
/*
Boot
time
debugger
vector
value
.
We
need
this
later
on
.
*/
/*
Boot
time
debugger
vector
value
.
We
need
this
later
on
.
*/
.
align
4
.
align
4
.
globl
C_LABEL
(
linux_dbvec
)
.
globl
linux_dbvec
C_LABEL
(
linux_dbvec
)
:
linux_dbvec
:
.
word
0
.
word
0
.
word
0
.
word
0
.
align
8
.
align
8
.
globl
C_LABEL
(
lvl14_save
)
.
globl
lvl14_save
C_LABEL
(
lvl14_save
)
:
lvl14_save
:
.
word
0
.
word
0
.
word
0
.
word
0
.
word
0
.
word
0
...
...
arch/sparc/kernel/rtrap.S
View file @
2d6d3d27
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*/
*/
#include <asm/cprefix.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
#include <asm/psr.h>
...
@@ -47,9 +46,9 @@ rtrap_7win_patch5: and %g1, 0x7f, %g1
...
@@ -47,9 +46,9 @@ rtrap_7win_patch5: and %g1, 0x7f, %g1
.
globl
ret_trap_entry
,
rtrap_patch1
,
rtrap_patch2
.
globl
ret_trap_entry
,
rtrap_patch1
,
rtrap_patch2
.
globl
rtrap_patch3
,
rtrap_patch4
,
rtrap_patch5
.
globl
rtrap_patch3
,
rtrap_patch4
,
rtrap_patch5
.
globl
C_LABEL
(
ret_trap_lockless_ipi
)
.
globl
ret_trap_lockless_ipi
ret_trap_entry
:
ret_trap_entry
:
C_LABEL
(
ret_trap_lockless_ipi
)
:
ret_trap_lockless_ipi
:
andcc
%
t_psr
,
PSR_PS
,
%
g0
andcc
%
t_psr
,
PSR_PS
,
%
g0
be
1
f
be
1
f
nop
nop
...
@@ -64,7 +63,7 @@ C_LABEL(ret_trap_lockless_ipi):
...
@@ -64,7 +63,7 @@ C_LABEL(ret_trap_lockless_ipi):
be
signal_p
be
signal_p
nop
nop
call
C_LABEL
(
schedule
)
call
schedule
nop
nop
ld
[%
curptr
+
TI_FLAGS
],
%
g2
ld
[%
curptr
+
TI_FLAGS
],
%
g2
...
@@ -76,7 +75,7 @@ signal_p:
...
@@ -76,7 +75,7 @@ signal_p:
clr
%
o0
clr
%
o0
mov
%
l5
,
%
o2
mov
%
l5
,
%
o2
mov
%
l6
,
%
o3
mov
%
l6
,
%
o3
call
C_LABEL
(
do_signal
)
call
do_signal
add
%
sp
,
STACKFRAME_SZ
,
%
o1
!
pt_regs
ptr
add
%
sp
,
STACKFRAME_SZ
,
%
o1
!
pt_regs
ptr
/
*
Fall
through
.
*/
/
*
Fall
through
.
*/
...
@@ -95,7 +94,7 @@ ret_trap_continue:
...
@@ -95,7 +94,7 @@ ret_trap_continue:
WRITE_PAUSE
WRITE_PAUSE
mov
1
,
%
o1
mov
1
,
%
o1
call
C_LABEL
(
try_to_clear_window_buffer
)
call
try_to_clear_window_buffer
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
b
signal_p
b
signal_p
...
@@ -131,8 +130,8 @@ rtrap_patch2: and %glob_tmp, 0xff, %glob_tmp
...
@@ -131,8 +130,8 @@ rtrap_patch2: and %glob_tmp, 0xff, %glob_tmp
*
branch
to
the
user
stack
checking
routine
*
branch
to
the
user
stack
checking
routine
*
for
return
from
traps
.
*
for
return
from
traps
.
*/
*/
.
globl
C_LABEL
(
rtrap_mmu_patchme
)
.
globl
rtrap_mmu_patchme
C_LABEL
(
rtrap_mmu_patchme
):
b
C_LABEL
(
sun4c_rett_stackchk
)
rtrap_mmu_patchme
:
b
sun4c_rett_stackchk
andcc
%
fp
,
0x7
,
%
g0
andcc
%
fp
,
0x7
,
%
g0
ret_trap_userwins_ok
:
ret_trap_userwins_ok
:
...
@@ -165,7 +164,7 @@ ret_trap_unaligned_pc:
...
@@ -165,7 +164,7 @@ ret_trap_unaligned_pc:
wr
%
t_psr
,
PSR_ET
,
%
psr
wr
%
t_psr
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
do_memaccess_unaligned
)
call
do_memaccess_unaligned
nop
nop
b
signal_p
b
signal_p
...
@@ -215,15 +214,15 @@ ret_trap_user_stack_is_bolixed:
...
@@ -215,15 +214,15 @@ ret_trap_user_stack_is_bolixed:
wr
%
t_psr
,
PSR_ET
,
%
psr
wr
%
t_psr
,
PSR_ET
,
%
psr
WRITE_PAUSE
WRITE_PAUSE
call
C_LABEL
(
window_ret_fault
)
call
window_ret_fault
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
b
signal_p
b
signal_p
ld
[%
curptr
+
TI_FLAGS
],
%
g2
ld
[%
curptr
+
TI_FLAGS
],
%
g2
.
globl
C_LABEL
(
sun4c_rett_stackchk
)
.
globl
sun4c_rett_stackchk
C_LABEL
(
sun4c_rett_stackchk
)
:
sun4c_rett_stackchk
:
be
1
f
be
1
f
and
%
fp
,
0xfff
,
%
g1
!
delay
slot
and
%
fp
,
0xfff
,
%
g1
!
delay
slot
...
@@ -286,8 +285,8 @@ sun4c_rett_onepage:
...
@@ -286,8 +285,8 @@ sun4c_rett_onepage:
b
ret_trap_userwins_ok
b
ret_trap_userwins_ok
save
%
g0
,
%
g0
,
%
g0
save
%
g0
,
%
g0
,
%
g0
.
globl
C_LABEL
(
srmmu_rett_stackchk
)
.
globl
srmmu_rett_stackchk
C_LABEL
(
srmmu_rett_stackchk
)
:
srmmu_rett_stackchk
:
bne
ret_trap_user_stack_is_bolixed
bne
ret_trap_user_stack_is_bolixed
sethi
%
hi
(
PAGE_OFFSET
),
%
g1
sethi
%
hi
(
PAGE_OFFSET
),
%
g1
cmp
%
g1
,
%
fp
cmp
%
g1
,
%
fp
...
...
arch/sparc/kernel/sclow.S
View file @
2d6d3d27
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
*
Copyright
(
C
)
1996
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*
Copyright
(
C
)
1996
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*/
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/asm_offsets.h>
#include <asm/asm_offsets.h>
#include <asm/errno.h>
#include <asm/errno.h>
...
@@ -31,7 +30,7 @@
...
@@ -31,7 +30,7 @@
jmp
%
l2
; \
jmp
%
l2
; \
rett
%
l2
+
4
;
rett
%
l2
+
4
;
#define LABEL(func)
CONCAT(func, _low)
#define LABEL(func)
func##_low
.
globl
LABEL
(
sunosnop
)
.
globl
LABEL
(
sunosnop
)
LABEL
(
sunosnop
):
LABEL
(
sunosnop
):
...
...
arch/sparc/kernel/sparc_ksyms.c
View file @
2d6d3d27
...
@@ -298,8 +298,7 @@ EXPORT_SYMBOL(__copy_user);
...
@@ -298,8 +298,7 @@ EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL
(
__strncpy_from_user
);
EXPORT_SYMBOL
(
__strncpy_from_user
);
/* Networking helper routines. */
/* Networking helper routines. */
/* XXX This is NOVERS because C_LABEL_STR doesn't get the version number. -DaveM */
EXPORT_SYMBOL
(
__csum_partial_copy_sparc_generic
);
EXPORT_SYMBOL_NOVERS
(
__csum_partial_copy_sparc_generic
);
EXPORT_SYMBOL
(
csum_partial
);
EXPORT_SYMBOL
(
csum_partial
);
/* Cache flushing. */
/* Cache flushing. */
...
...
arch/sparc/kernel/sunos_asm.S
View file @
2d6d3d27
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
*
Copyright
(
C
)
1995
Adrian
M
.
Rodriguez
(
adrian
@
remus
.
rutgers
.
edu
)
*
Copyright
(
C
)
1995
Adrian
M
.
Rodriguez
(
adrian
@
remus
.
rutgers
.
edu
)
*/
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
.
text
.
text
...
@@ -19,50 +18,50 @@
...
@@ -19,50 +18,50 @@
*
value
as
in
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
*/
*
value
as
in
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
*/
/
*
SunOS
getpid
()
returns
pid
in
%
o0
and
ppid
in
%
o1
*/
/
*
SunOS
getpid
()
returns
pid
in
%
o0
and
ppid
in
%
o1
*/
.
globl
C_LABEL
(
sunos_getpid
)
.
globl
sunos_getpid
C_LABEL
(
sunos_getpid
)
:
sunos_getpid
:
call
C_LABEL
(
sys_getppid
)
call
sys_getppid
nop
nop
call
C_LABEL
(
sys_getpid
)
call
sys_getpid
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I1
]
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I1
]
b
C_LABEL
(
ret_sys_call
)
b
ret_sys_call
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
/
*
SunOS
getuid
()
returns
uid
in
%
o0
and
euid
in
%
o1
*/
/
*
SunOS
getuid
()
returns
uid
in
%
o0
and
euid
in
%
o1
*/
.
globl
C_LABEL
(
sunos_getuid
)
.
globl
sunos_getuid
C_LABEL
(
sunos_getuid
)
:
sunos_getuid
:
call
C_LABEL
(
sys_geteuid16
)
call
sys_geteuid16
nop
nop
call
C_LABEL
(
sys_getuid16
)
call
sys_getuid16
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I1
]
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I1
]
b
C_LABEL
(
ret_sys_call
)
b
ret_sys_call
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
/
*
SunOS
getgid
()
returns
gid
in
%
o0
and
egid
in
%
o1
*/
/
*
SunOS
getgid
()
returns
gid
in
%
o0
and
egid
in
%
o1
*/
.
globl
C_LABEL
(
sunos_getgid
)
.
globl
sunos_getgid
C_LABEL
(
sunos_getgid
)
:
sunos_getgid
:
call
C_LABEL
(
sys_getegid16
)
call
sys_getegid16
nop
nop
call
C_LABEL
(
sys_getgid16
)
call
sys_getgid16
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I1
]
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I1
]
b
C_LABEL
(
ret_sys_call
)
b
ret_sys_call
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
st
%
o0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I0
]
/
*
SunOS
's execv() call only specifies the argv argument, the
/
*
SunOS
's execv() call only specifies the argv argument, the
*
environment
settings
are
the
same
as
the
calling
processes
.
*
environment
settings
are
the
same
as
the
calling
processes
.
*/
*/
.
globl
C_LABEL
(
sunos_execv
)
.
globl
sunos_execv
C_LABEL
(
sunos_execv
)
:
sunos_execv
:
st
%
g0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I2
]
st
%
g0
,
[%
sp
+
STACKFRAME_SZ
+
PT_I2
]
call
C_LABEL
(
sparc_execve
)
call
sparc_execve
add
%
sp
,
STACKFRAME_SZ
,
%
o0
add
%
sp
,
STACKFRAME_SZ
,
%
o0
b
C_LABEL
(
ret_sys_call
)
b
ret_sys_call
ld
[%
sp
+
STACKFRAME_SZ
+
PT_I0
],
%
o0
ld
[%
sp
+
STACKFRAME_SZ
+
PT_I0
],
%
o0
arch/sparc/kernel/trampoline.S
View file @
2d6d3d27
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
*/
*/
#include <linux/init.h>
#include <linux/init.h>
#include <asm/cprefix.h>
#include <asm/head.h>
#include <asm/head.h>
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/page.h>
#include <asm/page.h>
...
@@ -15,8 +14,8 @@
...
@@ -15,8 +14,8 @@
#include <asm/vaddrs.h>
#include <asm/vaddrs.h>
#include <asm/contregs.h>
#include <asm/contregs.h>
.
globl
C_LABEL
(
sun4m_cpu_startup
),
C_LABEL
(
__smp4m_processor_id
)
.
globl
sun4m_cpu_startup
,
__smp4m_processor_id
.
globl
C_LABEL
(
sun4d_cpu_startup
),
C_LABEL
(
__smp4d_processor_id
)
.
globl
sun4d_cpu_startup
,
__smp4d_processor_id
__INIT
__INIT
.
align
4
.
align
4
...
@@ -26,21 +25,21 @@
...
@@ -26,21 +25,21 @@
*
in
and
sets
PIL
in
%
psr
to
15
,
no
irqs
.
*
in
and
sets
PIL
in
%
psr
to
15
,
no
irqs
.
*/
*/
C_LABEL
(
sun4m_cpu_startup
)
:
sun4m_cpu_startup
:
cpu1_startup
:
cpu1_startup
:
sethi
%
hi
(
C_LABEL
(
trapbase_cpu1
)
),
%
g3
sethi
%
hi
(
trapbase_cpu1
),
%
g3
b
1
f
b
1
f
or
%
g3
,
%
lo
(
C_LABEL
(
trapbase_cpu1
)
),
%
g3
or
%
g3
,
%
lo
(
trapbase_cpu1
),
%
g3
cpu2_startup
:
cpu2_startup
:
sethi
%
hi
(
C_LABEL
(
trapbase_cpu2
)
),
%
g3
sethi
%
hi
(
trapbase_cpu2
),
%
g3
b
1
f
b
1
f
or
%
g3
,
%
lo
(
C_LABEL
(
trapbase_cpu2
)
),
%
g3
or
%
g3
,
%
lo
(
trapbase_cpu2
),
%
g3
cpu3_startup
:
cpu3_startup
:
sethi
%
hi
(
C_LABEL
(
trapbase_cpu3
)
),
%
g3
sethi
%
hi
(
trapbase_cpu3
),
%
g3
b
1
f
b
1
f
or
%
g3
,
%
lo
(
C_LABEL
(
trapbase_cpu3
)
),
%
g3
or
%
g3
,
%
lo
(
trapbase_cpu3
),
%
g3
1
:
1
:
/
*
Set
up
a
sane
%
psr
--
PIL
<
0xf
>
S
<
0x1
>
PS
<
0x1
>
CWP
<
0x0
>
*/
/
*
Set
up
a
sane
%
psr
--
PIL
<
0xf
>
S
<
0x1
>
PS
<
0x1
>
CWP
<
0x0
>
*/
...
@@ -58,7 +57,7 @@ cpu3_startup:
...
@@ -58,7 +57,7 @@ cpu3_startup:
WRITE_PAUSE
WRITE_PAUSE
/
*
Give
ourselves
a
stack
and
curptr
.
*/
/
*
Give
ourselves
a
stack
and
curptr
.
*/
set
C_LABEL
(
current_set
)
,
%
g5
set
current_set
,
%
g5
srl
%
g3
,
10
,
%
g4
srl
%
g3
,
10
,
%
g4
and
%
g4
,
0xc
,
%
g4
and
%
g4
,
0xc
,
%
g4
ld
[%
g5
+
%
g4
],
%
g6
ld
[%
g5
+
%
g4
],
%
g6
...
@@ -73,13 +72,13 @@ cpu3_startup:
...
@@ -73,13 +72,13 @@ cpu3_startup:
WRITE_PAUSE
WRITE_PAUSE
/
*
Init
our
caches
,
etc
.
*/
/
*
Init
our
caches
,
etc
.
*/
set
C_LABEL
(
poke_srmmu
)
,
%
g5
set
poke_srmmu
,
%
g5
ld
[%
g5
],
%
g5
ld
[%
g5
],
%
g5
call
%
g5
call
%
g5
nop
nop
/
*
Start
this
processor
.
*/
/
*
Start
this
processor
.
*/
call
C_LABEL
(
smp4m_callin
)
call
smp4m_callin
nop
nop
b
,
a
smp_do_cpu_idle
b
,
a
smp_do_cpu_idle
...
@@ -88,22 +87,22 @@ cpu3_startup:
...
@@ -88,22 +87,22 @@ cpu3_startup:
.
align
4
.
align
4
smp_do_cpu_idle
:
smp_do_cpu_idle
:
call
C_LABEL
(
init_idle
)
call
init_idle
nop
nop
call
C_LABEL
(
cpu_idle
)
call
cpu_idle
mov
0
,
%
o0
mov
0
,
%
o0
call
C_LABEL
(
cpu_panic
)
call
cpu_panic
nop
nop
C_LABEL
(
__smp4m_processor_id
)
:
__smp4m_processor_id
:
rd
%
tbr
,
%
g2
rd
%
tbr
,
%
g2
srl
%
g2
,
12
,
%
g2
srl
%
g2
,
12
,
%
g2
and
%
g2
,
3
,
%
g2
and
%
g2
,
3
,
%
g2
retl
retl
mov
%
g1
,
%
o7
mov
%
g1
,
%
o7
C_LABEL
(
__smp4d_processor_id
)
:
__smp4d_processor_id
:
lda
[%
g0
]
ASI_M_VIKING_TMP1
,
%
g2
lda
[%
g0
]
ASI_M_VIKING_TMP1
,
%
g2
retl
retl
mov
%
g1
,
%
o7
mov
%
g1
,
%
o7
...
@@ -114,7 +113,7 @@ C_LABEL(__smp4d_processor_id):
...
@@ -114,7 +113,7 @@ C_LABEL(__smp4d_processor_id):
__INIT
__INIT
.
align
4
.
align
4
C_LABEL
(
sun4d_cpu_startup
)
:
sun4d_cpu_startup
:
/
*
Set
up
a
sane
%
psr
--
PIL
<
0xf
>
S
<
0x1
>
PS
<
0x1
>
CWP
<
0x0
>
*/
/
*
Set
up
a
sane
%
psr
--
PIL
<
0xf
>
S
<
0x1
>
PS
<
0x1
>
CWP
<
0x0
>
*/
set
(
PSR_PIL
| PSR_S |
PSR_PS
),
%
g1
set
(
PSR_PIL
| PSR_S |
PSR_PS
),
%
g1
wr
%
g1
,
0x0
,
%
psr
!
traps
off
though
wr
%
g1
,
0x0
,
%
psr
!
traps
off
though
...
@@ -126,7 +125,7 @@ C_LABEL(sun4d_cpu_startup):
...
@@ -126,7 +125,7 @@ C_LABEL(sun4d_cpu_startup):
WRITE_PAUSE
WRITE_PAUSE
/
*
Set
tbr
-
we
use
just
one
trap
table
.
*/
/
*
Set
tbr
-
we
use
just
one
trap
table
.
*/
set
C_LABEL
(
trapbase
)
,
%
g1
set
trapbase
,
%
g1
wr
%
g1
,
0x0
,
%
tbr
wr
%
g1
,
0x0
,
%
tbr
WRITE_PAUSE
WRITE_PAUSE
...
@@ -138,7 +137,7 @@ C_LABEL(sun4d_cpu_startup):
...
@@ -138,7 +137,7 @@ C_LABEL(sun4d_cpu_startup):
sta
%
g1
,
[%
g0
]
ASI_M_VIKING_TMP1
sta
%
g1
,
[%
g0
]
ASI_M_VIKING_TMP1
/
*
Give
ourselves
a
stack
and
curptr
.
*/
/
*
Give
ourselves
a
stack
and
curptr
.
*/
set
C_LABEL
(
current_set
)
,
%
g5
set
current_set
,
%
g5
srl
%
g3
,
1
,
%
g4
srl
%
g3
,
1
,
%
g4
ld
[%
g5
+
%
g4
],
%
g6
ld
[%
g5
+
%
g4
],
%
g6
...
@@ -152,13 +151,13 @@ C_LABEL(sun4d_cpu_startup):
...
@@ -152,13 +151,13 @@ C_LABEL(sun4d_cpu_startup):
WRITE_PAUSE
WRITE_PAUSE
/
*
Init
our
caches
,
etc
.
*/
/
*
Init
our
caches
,
etc
.
*/
set
C_LABEL
(
poke_srmmu
)
,
%
g5
set
poke_srmmu
,
%
g5
ld
[%
g5
],
%
g5
ld
[%
g5
],
%
g5
call
%
g5
call
%
g5
nop
nop
/
*
Start
this
processor
.
*/
/
*
Start
this
processor
.
*/
call
C_LABEL
(
smp4d_callin
)
call
smp4d_callin
nop
nop
b
,
a
smp_do_cpu_idle
b
,
a
smp_do_cpu_idle
arch/sparc/kernel/wof.S
View file @
2d6d3d27
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*/
*/
#include <asm/cprefix.h>
#include <asm/contregs.h>
#include <asm/contregs.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
...
@@ -164,8 +163,8 @@ spwin_fromuser:
...
@@ -164,8 +163,8 @@ spwin_fromuser:
*
the
label
'spwin_user_stack_is_bolixed'
which
will
take
*
the
label
'spwin_user_stack_is_bolixed'
which
will
take
*
care
of
things
at
that
point
.
*
care
of
things
at
that
point
.
*/
*/
.
globl
C_LABEL
(
spwin_mmu_patchme
)
.
globl
spwin_mmu_patchme
C_LABEL
(
spwin_mmu_patchme
):
b
C_LABEL
(
spwin_sun4c_stackchk
)
spwin_mmu_patchme
:
b
spwin_sun4c_stackchk
andcc
%
sp
,
0x7
,
%
g0
andcc
%
sp
,
0x7
,
%
g0
spwin_good_ustack
:
spwin_good_ustack
:
...
@@ -253,7 +252,7 @@ spnwin_patch3: and %twin_tmp, 0xff, %twin_tmp ! patched on 7win Sparcs
...
@@ -253,7 +252,7 @@ spnwin_patch3: and %twin_tmp, 0xff, %twin_tmp ! patched on 7win Sparcs
/
*
Turn
on
traps
and
call
c
-
code
to
deal
with
it
.
*/
/
*
Turn
on
traps
and
call
c
-
code
to
deal
with
it
.
*/
wr
%
t_psr
,
PSR_ET
,
%
psr
wr
%
t_psr
,
PSR_ET
,
%
psr
nop
nop
call
C_LABEL
(
window_overflow_fault
)
call
window_overflow_fault
nop
nop
/
*
Return
from
trap
if
C
-
code
actually
fixes
things
,
if
it
/
*
Return
from
trap
if
C
-
code
actually
fixes
things
,
if
it
...
@@ -307,8 +306,8 @@ spwin_bad_ustack_from_kernel:
...
@@ -307,8 +306,8 @@ spwin_bad_ustack_from_kernel:
*
As
noted
above
%
curptr
cannot
be
touched
by
this
routine
at
all
.
*
As
noted
above
%
curptr
cannot
be
touched
by
this
routine
at
all
.
*/
*/
.
globl
C_LABEL
(
spwin_sun4c_stackchk
)
.
globl
spwin_sun4c_stackchk
C_LABEL
(
spwin_sun4c_stackchk
)
:
spwin_sun4c_stackchk
:
/
*
LOCATION
:
Window
to
be
saved
on
the
stack
*/
/
*
LOCATION
:
Window
to
be
saved
on
the
stack
*/
/
*
See
if
the
stack
is
in
the
address
space
hole
but
first
,
/
*
See
if
the
stack
is
in
the
address
space
hole
but
first
,
...
@@ -379,8 +378,8 @@ spwin_sun4c_onepage:
...
@@ -379,8 +378,8 @@ spwin_sun4c_onepage:
*
works
for
all
current
v8
/
srmmu
implementations
,
we
'll
*
works
for
all
current
v8
/
srmmu
implementations
,
we
'll
*
see
...
*
see
...
*/
*/
.
globl
C_LABEL
(
spwin_srmmu_stackchk
)
.
globl
spwin_srmmu_stackchk
C_LABEL
(
spwin_srmmu_stackchk
)
:
spwin_srmmu_stackchk
:
/
*
LOCATION
:
Window
to
be
saved
on
the
stack
*/
/
*
LOCATION
:
Window
to
be
saved
on
the
stack
*/
/
*
Because
of
SMP
concerns
and
speed
we
play
a
trick
.
/
*
Because
of
SMP
concerns
and
speed
we
play
a
trick
.
...
...
arch/sparc/kernel/wuf.S
View file @
2d6d3d27
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
*
Copyright
(
C
)
1995
David
S
.
Miller
*
Copyright
(
C
)
1995
David
S
.
Miller
*/
*/
#include <asm/cprefix.h>
#include <asm/contregs.h>
#include <asm/contregs.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
...
@@ -135,8 +134,8 @@ fwin_from_user:
...
@@ -135,8 +134,8 @@ fwin_from_user:
/
*
Branch
to
the
architecture
specific
stack
validation
/
*
Branch
to
the
architecture
specific
stack
validation
*
routine
.
They
can
be
found
below
...
*
routine
.
They
can
be
found
below
...
*/
*/
.
globl
C_LABEL
(
fwin_mmu_patchme
)
.
globl
fwin_mmu_patchme
C_LABEL
(
fwin_mmu_patchme
):
b
C_LABEL
(
sun4c_fwin_stackchk
)
fwin_mmu_patchme
:
b
sun4c_fwin_stackchk
andcc
%
sp
,
0x7
,
%
g0
andcc
%
sp
,
0x7
,
%
g0
#define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - STACKFRAME_SZ)
#define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - STACKFRAME_SZ)
...
@@ -190,7 +189,7 @@ fwin_user_stack_is_bolixed:
...
@@ -190,7 +189,7 @@ fwin_user_stack_is_bolixed:
wr
%
t_psr
,
PSR_ET
,
%
psr
!
enable
traps
wr
%
t_psr
,
PSR_ET
,
%
psr
!
enable
traps
nop
nop
call
C_LABEL
(
window_underflow_fault
)
call
window_underflow_fault
mov
%
g4
,
%
o0
mov
%
g4
,
%
o0
b
ret_trap_entry
b
ret_trap_entry
...
@@ -244,8 +243,8 @@ fwin_user_finish_up:
...
@@ -244,8 +243,8 @@ fwin_user_finish_up:
*/
*/
.
align
4
.
align
4
.
globl
C_LABEL
(
sun4c_fwin_stackchk
)
.
globl
sun4c_fwin_stackchk
C_LABEL
(
sun4c_fwin_stackchk
)
:
sun4c_fwin_stackchk
:
/
*
LOCATION
:
Window
'W'
*/
/
*
LOCATION
:
Window
'W'
*/
/
*
Caller
did
'andcc %sp, 0x7, %g0'
*/
/
*
Caller
did
'andcc %sp, 0x7, %g0'
*/
...
@@ -295,8 +294,8 @@ sun4c_fwin_onepage:
...
@@ -295,8 +294,8 @@ sun4c_fwin_onepage:
/
*
A
page
had
bad
page
permissions
,
losing
...
*/
/
*
A
page
had
bad
page
permissions
,
losing
...
*/
b
,
a
fwin_user_stack_is_bolixed
b
,
a
fwin_user_stack_is_bolixed
.
globl
C_LABEL
(
srmmu_fwin_stackchk
)
.
globl
srmmu_fwin_stackchk
C_LABEL
(
srmmu_fwin_stackchk
)
:
srmmu_fwin_stackchk
:
/
*
LOCATION
:
Window
'W'
*/
/
*
LOCATION
:
Window
'W'
*/
/
*
Caller
did
'andcc %sp, 0x7, %g0'
*/
/
*
Caller
did
'andcc %sp, 0x7, %g0'
*/
...
...
arch/sparc/lib/ashldi3.S
View file @
2d6d3d27
...
@@ -5,12 +5,10 @@
...
@@ -5,12 +5,10 @@
*
Copyright
(
C
)
1999
David
S
.
Miller
(
davem
@
redhat
.
com
)
*
Copyright
(
C
)
1999
David
S
.
Miller
(
davem
@
redhat
.
com
)
*/
*/
#include <asm/cprefix.h>
.
text
.
text
.
align
4
.
align
4
.
globl
C_LABEL
(
__ashldi3
)
.
globl
__ashldi3
C_LABEL
(
__ashldi3
)
:
__ashldi3
:
cmp
%
o2
,
0
cmp
%
o2
,
0
be
9
f
be
9
f
mov
0x20
,
%
g2
mov
0x20
,
%
g2
...
...
arch/sparc/lib/ashrdi3.S
View file @
2d6d3d27
...
@@ -5,12 +5,10 @@
...
@@ -5,12 +5,10 @@
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*
Copyright
(
C
)
1995
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*/
*/
#include <asm/cprefix.h>
.
text
.
text
.
align
4
.
align
4
.
globl
C_LABEL
(
__ashrdi3
)
.
globl
__ashrdi3
C_LABEL
(
__ashrdi3
)
:
__ashrdi3
:
tst
%
o2
tst
%
o2
be
3
f
be
3
f
or
%
g0
,
32
,
%
g2
or
%
g0
,
32
,
%
g2
...
...
arch/sparc/lib/atomic.S
View file @
2d6d3d27
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
#include <asm/psr.h>
...
...
arch/sparc/lib/bitops.S
View file @
2d6d3d27
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
*/
*/
#include <linux/config.h>
#include <linux/config.h>
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
#include <asm/psr.h>
...
@@ -29,7 +28,7 @@ ___set_bit:
...
@@ -29,7 +28,7 @@ ___set_bit:
wr
%
g5
,
0x0
,
%
psr
wr
%
g5
,
0x0
,
%
psr
nop
; nop; nop
nop
; nop; nop
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
set
C_LABEL
(
bitops_spinlock
)
,
%
g5
set
bitops_spinlock
,
%
g5
2
:
ldstub
[%
g5
],
%
g7
!
Spin
on
the
byte
lock
for
SMP
.
2
:
ldstub
[%
g5
],
%
g7
!
Spin
on
the
byte
lock
for
SMP
.
orcc
%
g7
,
0x0
,
%
g0
!
Did
we
get
it
?
orcc
%
g7
,
0x0
,
%
g0
!
Did
we
get
it
?
bne
2
b
!
Nope
...
bne
2
b
!
Nope
...
...
@@ -39,7 +38,7 @@ ___set_bit:
...
@@ -39,7 +38,7 @@ ___set_bit:
and
%
g7
,
%
g2
,
%
g2
and
%
g7
,
%
g2
,
%
g2
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
st
%
g5
,
[%
g1
]
st
%
g5
,
[%
g1
]
set
C_LABEL
(
bitops_spinlock
)
,
%
g5
set
bitops_spinlock
,
%
g5
stb
%
g0
,
[%
g5
]
stb
%
g0
,
[%
g5
]
#else
#else
st
%
g5
,
[%
g1
]
st
%
g5
,
[%
g1
]
...
@@ -58,7 +57,7 @@ ___clear_bit:
...
@@ -58,7 +57,7 @@ ___clear_bit:
wr
%
g5
,
0x0
,
%
psr
wr
%
g5
,
0x0
,
%
psr
nop
; nop; nop
nop
; nop; nop
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
set
C_LABEL
(
bitops_spinlock
)
,
%
g5
set
bitops_spinlock
,
%
g5
2
:
ldstub
[%
g5
],
%
g7
!
Spin
on
the
byte
lock
for
SMP
.
2
:
ldstub
[%
g5
],
%
g7
!
Spin
on
the
byte
lock
for
SMP
.
orcc
%
g7
,
0x0
,
%
g0
!
Did
we
get
it
?
orcc
%
g7
,
0x0
,
%
g0
!
Did
we
get
it
?
bne
2
b
!
Nope
...
bne
2
b
!
Nope
...
...
@@ -68,7 +67,7 @@ ___clear_bit:
...
@@ -68,7 +67,7 @@ ___clear_bit:
and
%
g7
,
%
g2
,
%
g2
and
%
g7
,
%
g2
,
%
g2
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
st
%
g5
,
[%
g1
]
st
%
g5
,
[%
g1
]
set
C_LABEL
(
bitops_spinlock
)
,
%
g5
set
bitops_spinlock
,
%
g5
stb
%
g0
,
[%
g5
]
stb
%
g0
,
[%
g5
]
#else
#else
st
%
g5
,
[%
g1
]
st
%
g5
,
[%
g1
]
...
@@ -87,7 +86,7 @@ ___change_bit:
...
@@ -87,7 +86,7 @@ ___change_bit:
wr
%
g5
,
0x0
,
%
psr
wr
%
g5
,
0x0
,
%
psr
nop
; nop; nop
nop
; nop; nop
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
set
C_LABEL
(
bitops_spinlock
)
,
%
g5
set
bitops_spinlock
,
%
g5
2
:
ldstub
[%
g5
],
%
g7
!
Spin
on
the
byte
lock
for
SMP
.
2
:
ldstub
[%
g5
],
%
g7
!
Spin
on
the
byte
lock
for
SMP
.
orcc
%
g7
,
0x0
,
%
g0
!
Did
we
get
it
?
orcc
%
g7
,
0x0
,
%
g0
!
Did
we
get
it
?
bne
2
b
!
Nope
...
bne
2
b
!
Nope
...
...
@@ -97,7 +96,7 @@ ___change_bit:
...
@@ -97,7 +96,7 @@ ___change_bit:
and
%
g7
,
%
g2
,
%
g2
and
%
g7
,
%
g2
,
%
g2
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
st
%
g5
,
[%
g1
]
st
%
g5
,
[%
g1
]
set
C_LABEL
(
bitops_spinlock
)
,
%
g5
set
bitops_spinlock
,
%
g5
stb
%
g0
,
[%
g5
]
stb
%
g0
,
[%
g5
]
#else
#else
st
%
g5
,
[%
g1
]
st
%
g5
,
[%
g1
]
...
...
arch/sparc/lib/blockops.S
View file @
2d6d3d27
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
*
Copyright
(
C
)
1996
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*
Copyright
(
C
)
1996
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*/
*/
#include <asm/cprefix.h>
#include <asm/page.h>
#include <asm/page.h>
/
*
Zero
out
64
bytes
of
memory
at
(
buf
+
offset
)
.
/
*
Zero
out
64
bytes
of
memory
at
(
buf
+
offset
)
.
...
@@ -46,9 +45,9 @@
...
@@ -46,9 +45,9 @@
.
text
.
text
.
align
4
.
align
4
.
globl
C_LABEL
(
bzero_1page
),
C_LABEL
(
__copy_1page
)
.
globl
bzero_1page
,
__copy_1page
C_LABEL
(
bzero_1page
)
:
bzero_1page
:
/*
NOTE
:
If
you
change
the
number
of
insns
of
this
routine
,
please
check
/*
NOTE
:
If
you
change
the
number
of
insns
of
this
routine
,
please
check
*
arch
/
sparc
/
mm
/
hypersparc
.
S
*/
*
arch
/
sparc
/
mm
/
hypersparc
.
S
*/
/
*
%
o0
=
buf
*/
/
*
%
o0
=
buf
*/
...
@@ -67,7 +66,7 @@ C_LABEL(bzero_1page):
...
@@ -67,7 +66,7 @@ C_LABEL(bzero_1page):
retl
retl
nop
nop
C_LABEL
(
__copy_1page
)
:
__copy_1page
:
/*
NOTE
:
If
you
change
the
number
of
insns
of
this
routine
,
please
check
/*
NOTE
:
If
you
change
the
number
of
insns
of
this
routine
,
please
check
*
arch
/
sparc
/
mm
/
hypersparc
.
S
*/
*
arch
/
sparc
/
mm
/
hypersparc
.
S
*/
/
*
%
o0
=
dst
,
%
o1
=
src
*/
/
*
%
o0
=
dst
,
%
o1
=
src
*/
...
...
arch/sparc/lib/checksum.S
View file @
2d6d3d27
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
*
BSD4
.4
portable
checksum
routine
*
BSD4
.4
portable
checksum
routine
*/
*/
#include <asm/cprefix.h>
#include <asm/errno.h>
#include <asm/errno.h>
#define CSUM_BIGCHUNK(buf, offset, sum, t0, t1, t2, t3, t4, t5) \
#define CSUM_BIGCHUNK(buf, offset, sum, t0, t1, t2, t3, t4, t5) \
...
@@ -104,8 +103,8 @@ csum_partial_fix_alignment:
...
@@ -104,8 +103,8 @@ csum_partial_fix_alignment:
/
*
The
common
case
is
to
get
called
with
a
nicely
aligned
/
*
The
common
case
is
to
get
called
with
a
nicely
aligned
*
buffer
of
size
0x20
.
Follow
the
code
path
for
that
case
.
*
buffer
of
size
0x20
.
Follow
the
code
path
for
that
case
.
*/
*/
.
globl
C_LABEL
(
csum_partial
)
.
globl
csum_partial
C_LABEL
(
csum_partial
)
:
/
*
%
o0
=
buf
,
%
o1
=
len
,
%
o2
=
sum
*/
csum_partial
:
/
*
%
o0
=
buf
,
%
o1
=
len
,
%
o2
=
sum
*/
andcc
%
o0
,
0x7
,
%
g0
!
alignment
problems
?
andcc
%
o0
,
0x7
,
%
g0
!
alignment
problems
?
bne
csum_partial_fix_alignment
!
yep
,
handle
it
bne
csum_partial_fix_alignment
!
yep
,
handle
it
sethi
%
hi
(
cpte
-
8
),
%
g7
!
prepare
table
jmp
ptr
sethi
%
hi
(
cpte
-
8
),
%
g7
!
prepare
table
jmp
ptr
...
@@ -142,8 +141,8 @@ cpte: bne csum_partial_end_cruft ! yep, handle it
...
@@ -142,8 +141,8 @@ cpte: bne csum_partial_end_cruft ! yep, handle it
cpout
:
retl
!
get
outta
here
cpout
:
retl
!
get
outta
here
mov
%
o2
,
%
o0
!
return
computed
csum
mov
%
o2
,
%
o0
!
return
computed
csum
.
globl
C_LABEL
(
__csum_partial_copy_start
),
C_LABEL
(
__csum_partial_copy_end
)
.
globl
__csum_partial_copy_start
,
__csum_partial_copy_end
C_LABEL
(
__csum_partial_copy_start
)
:
__csum_partial_copy_start
:
/*
Work
around
cpp
-
rob
*/
/*
Work
around
cpp
-
rob
*/
#define ALLOC #alloc
#define ALLOC #alloc
...
@@ -329,8 +328,8 @@ cc_dword_align:
...
@@ -329,8 +328,8 @@ cc_dword_align:
*
out
of
you
,
game
over
,
lights
out
.
*
out
of
you
,
game
over
,
lights
out
.
*/
*/
.
align
8
.
align
8
.
globl
C_LABEL
(
__csum_partial_copy_sparc_generic
)
.
globl
__csum_partial_copy_sparc_generic
C_LABEL
(
__csum_partial_copy_sparc_generic
)
:
__csum_partial_copy_sparc_generic
:
/
*
%
o0
=
src
,
%
o1
=
dest
,
%
g1
=
len
,
%
g7
=
sum
*/
/
*
%
o0
=
src
,
%
o1
=
dest
,
%
g1
=
len
,
%
g7
=
sum
*/
xor
%
o0
,
%
o1
,
%
o4
!
get
changing
bits
xor
%
o0
,
%
o1
,
%
o4
!
get
changing
bits
andcc
%
o4
,
3
,
%
g0
!
check
for
mismatched
alignment
andcc
%
o4
,
3
,
%
g0
!
check
for
mismatched
alignment
...
@@ -472,7 +471,7 @@ ccslow: cmp %g1, 0
...
@@ -472,7 +471,7 @@ ccslow: cmp %g1, 0
4
:
addcc
%
g7
,
%
g5
,
%
g7
4
:
addcc
%
g7
,
%
g5
,
%
g7
retl
retl
addx
%
g0
,
%
g7
,
%
o0
addx
%
g0
,
%
g7
,
%
o0
C_LABEL
(
__csum_partial_copy_end
)
:
__csum_partial_copy_end
:
/*
We
do
these
strange
calculations
for
the
csum_
*
_from_user
case
only
,
ie
.
/*
We
do
these
strange
calculations
for
the
csum_
*
_from_user
case
only
,
ie
.
*
we
only
bother
with
faults
on
loads
...
*/
*
we
only
bother
with
faults
on
loads
...
*/
...
@@ -551,7 +550,7 @@ C_LABEL(__csum_partial_copy_end):
...
@@ -551,7 +550,7 @@ C_LABEL(__csum_partial_copy_end):
mov
%
i5
,
%
o0
mov
%
i5
,
%
o0
mov
%
i7
,
%
o1
mov
%
i7
,
%
o1
mov
%
i4
,
%
o2
mov
%
i4
,
%
o2
call
C_LABEL
(
lookup_fault
)
call
lookup_fault
mov
%
g7
,
%
i4
mov
%
g7
,
%
i4
cmp
%
o0
,
2
cmp
%
o0
,
2
bne
1
f
bne
1
f
...
@@ -561,7 +560,7 @@ C_LABEL(__csum_partial_copy_end):
...
@@ -561,7 +560,7 @@ C_LABEL(__csum_partial_copy_end):
mov
%
i0
,
%
o1
mov
%
i0
,
%
o1
mov
%
i1
,
%
o0
mov
%
i1
,
%
o0
5
:
5
:
call
C_LABEL
(
__memcpy
)
call
__memcpy
mov
%
i2
,
%
o2
mov
%
i2
,
%
o2
tst
%
o0
tst
%
o0
bne
,
a
2
f
bne
,
a
2
f
...
@@ -570,7 +569,7 @@ C_LABEL(__csum_partial_copy_end):
...
@@ -570,7 +569,7 @@ C_LABEL(__csum_partial_copy_end):
2
:
2
:
mov
%
i1
,
%
o0
mov
%
i1
,
%
o0
6
:
6
:
call
C_LABEL
(
__bzero
)
call
__bzero
mov
%
i3
,
%
o1
mov
%
i3
,
%
o1
1
:
1
:
ld
[%
sp
+
168
],
%
o2
!
struct_ptr
of
parent
ld
[%
sp
+
168
],
%
o2
!
struct_ptr
of
parent
...
...
arch/sparc/lib/copy_user.S
View file @
2d6d3d27
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
*
Returns
0
if
successful
,
otherwise
count
of
bytes
not
copied
yet
*
Returns
0
if
successful
,
otherwise
count
of
bytes
not
copied
yet
*/
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/asmmacro.h>
#include <asm/asmmacro.h>
#include <asm/page.h>
#include <asm/page.h>
...
@@ -118,7 +117,7 @@
...
@@ -118,7 +117,7 @@
.
globl
__copy_user_begin
.
globl
__copy_user_begin
__copy_user_begin
:
__copy_user_begin
:
.
globl
C_LABEL
(
__copy_user
)
.
globl
__copy_user
dword_align
:
dword_align
:
andcc
%
o1
,
1
,
%
g0
andcc
%
o1
,
1
,
%
g0
be
4
f
be
4
f
...
@@ -145,7 +144,7 @@ dword_align:
...
@@ -145,7 +144,7 @@ dword_align:
b
3
f
b
3
f
add
%
o0
,
2
,
%
o0
add
%
o0
,
2
,
%
o0
C_LABEL
(
__copy_user
)
:
/
*
%
o0
=
dst
%
o1
=
src
%
o2
=
len
*/
__copy_user
:
/
*
%
o0
=
dst
%
o1
=
src
%
o2
=
len
*/
xor
%
o0
,
%
o1
,
%
o4
xor
%
o0
,
%
o1
,
%
o4
1
:
1
:
andcc
%
o4
,
3
,
%
o5
andcc
%
o4
,
3
,
%
o5
...
...
arch/sparc/lib/locks.S
View file @
2d6d3d27
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
*
Copyright
(
C
)
1998
Jakub
Jelinek
(
jj
@
ultra
.
linux
.
cz
)
*
Copyright
(
C
)
1998
Jakub
Jelinek
(
jj
@
ultra
.
linux
.
cz
)
*/
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
#include <asm/psr.h>
#include <asm/smp.h>
#include <asm/smp.h>
...
...
arch/sparc/lib/lshrdi3.S
View file @
2d6d3d27
/*
$Id
:
lshrdi3
.
S
,
v
1
.1
1999
/
03
/
21
06
:
37
:
45
davem
Exp
$
*/
/*
$Id
:
lshrdi3
.
S
,
v
1
.1
1999
/
03
/
21
06
:
37
:
45
davem
Exp
$
*/
#include <asm/cprefix.h>
.
globl
__lshrdi3
__lshrdi3
:
.
globl
C_LABEL
(
__lshrdi3
)
C_LABEL
(
__lshrdi3
):
cmp
%
o2
,
0
cmp
%
o2
,
0
be
3
f
be
3
f
mov
0x20
,
%
g2
mov
0x20
,
%
g2
...
...
arch/sparc/lib/memcmp.S
View file @
2d6d3d27
#include <asm/cprefix.h>
.
text
.
text
.
align
4
.
align
4
.
global
C_LABEL
(
__memcmp
),
C_LABEL
(
memcmp
)
.
global
__memcmp
,
memcmp
C_LABEL
(
__memcmp
)
:
__memcmp
:
C_LABEL
(
memcmp
)
:
memcmp
:
#if 1
#if 1
cmp
%
o2
,
0
cmp
%
o2
,
0
ble
L3
ble
L3
...
...
arch/sparc/lib/memcpy.S
View file @
2d6d3d27
...
@@ -9,13 +9,11 @@
...
@@ -9,13 +9,11 @@
#ifdef __KERNEL__
#ifdef __KERNEL__
#include <asm/cprefix.h>
#define FUNC(x) \
#define FUNC(x) \
.
globl
C_LABEL
(
x
)
;
\
.
globl
x
;
\
.
type
C_LABEL
(
x
),
@
function
;
\
.
type
x
,
@
function
;
\
.
align
4
; \
.
align
4
; \
C_LABEL
(
x
)
:
x
:
#undef FASTER_REVERSE
#undef FASTER_REVERSE
#undef FASTER_NONALIGNED
#undef FASTER_NONALIGNED
...
...
arch/sparc/lib/memscan.S
View file @
2d6d3d27
...
@@ -4,8 +4,6 @@
...
@@ -4,8 +4,6 @@
*
Copyright
(
C
)
1996
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*
Copyright
(
C
)
1996
David
S
.
Miller
(
davem
@
caip
.
rutgers
.
edu
)
*/
*/
#include <asm/cprefix.h>
/*
In
essence
,
this
is
just
a
fancy
strlen
.
*/
/*
In
essence
,
this
is
just
a
fancy
strlen
.
*/
#define LO_MAGIC 0x01010101
#define LO_MAGIC 0x01010101
...
@@ -13,9 +11,9 @@
...
@@ -13,9 +11,9 @@
.
text
.
text
.
align
4
.
align
4
.
globl
C_LABEL
(
__memscan_zero
),
C_LABEL
(
__memscan_generic
)
.
globl
__memscan_zero
,
__memscan_generic
.
globl
C_LABEL
(
memscan
)
.
globl
memscan
C_LABEL
(
__memscan_zero
)
:
__memscan_zero
:
/
*
%
o0
=
addr
,
%
o1
=
size
*/
/
*
%
o0
=
addr
,
%
o1
=
size
*/
cmp
%
o1
,
0
cmp
%
o1
,
0
bne
,
a
1
f
bne
,
a
1
f
...
@@ -114,8 +112,8 @@ mzero_found_it:
...
@@ -114,8 +112,8 @@ mzero_found_it:
retl
retl
sub
%
o0
,
2
,
%
o0
sub
%
o0
,
2
,
%
o0
C_LABEL
(
memscan
)
:
memscan
:
C_LABEL
(
__memscan_generic
)
:
__memscan_generic
:
/
*
%
o0
=
addr
,
%
o1
=
c
,
%
o2
=
size
*/
/
*
%
o0
=
addr
,
%
o1
=
c
,
%
o2
=
size
*/
cmp
%
o2
,
0
cmp
%
o2
,
0
bne
,
a
0
f
bne
,
a
0
f
...
...
arch/sparc/lib/memset.S
View file @
2d6d3d27
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
*
occurs
and
we
were
called
as
clear_user
.
*
occurs
and
we
were
called
as
clear_user
.
*/
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
/*
Work
around
cpp
-
rob
*/
/*
Work
around
cpp
-
rob
*/
...
@@ -61,12 +60,12 @@
...
@@ -61,12 +60,12 @@
.
globl
__bzero_begin
.
globl
__bzero_begin
__bzero_begin
:
__bzero_begin
:
.
globl
C_LABEL
(
__bzero
),
C_LABEL
(
__memset
)
,
.
globl
__bzero
,
__memset
,
.
globl
C_LABEL
(
memset
)
.
globl
memset
.
globl
C_LABEL
(
__memset_start
),
C_LABEL
(
__memset_end
)
.
globl
__memset_start
,
__memset_end
C_LABEL
(
__memset_start
)
:
__memset_start
:
C_LABEL
(
__memset
)
:
__memset
:
C_LABEL
(
memset
)
:
memset
:
and
%
o1
,
0xff
,
%
g3
and
%
o1
,
0xff
,
%
g3
sll
%
g3
,
8
,
%
g2
sll
%
g3
,
8
,
%
g2
or
%
g3
,
%
g2
,
%
g3
or
%
g3
,
%
g2
,
%
g3
...
@@ -90,7 +89,7 @@ C_LABEL(memset):
...
@@ -90,7 +89,7 @@ C_LABEL(memset):
b
4
f
b
4
f
sub
%
o0
,
%
o2
,
%
o0
sub
%
o0
,
%
o2
,
%
o0
C_LABEL
(
__bzero
)
:
__bzero
:
mov
%
g0
,
%
g3
mov
%
g0
,
%
g3
1
:
1
:
cmp
%
o1
,
7
cmp
%
o1
,
7
...
@@ -168,7 +167,7 @@ C_LABEL(__bzero):
...
@@ -168,7 +167,7 @@ C_LABEL(__bzero):
0
:
0
:
retl
retl
clr
%
o0
clr
%
o0
C_LABEL
(
__memset_end
)
:
__memset_end
:
.
section
.
fixup
,#
alloc
,#
execinstr
.
section
.
fixup
,#
alloc
,#
execinstr
.
align
4
.
align
4
...
@@ -195,7 +194,7 @@ C_LABEL(__memset_end):
...
@@ -195,7 +194,7 @@ C_LABEL(__memset_end):
save
%
sp
,
-
104
,
%
sp
save
%
sp
,
-
104
,
%
sp
mov
%
i5
,
%
o0
mov
%
i5
,
%
o0
mov
%
i7
,
%
o1
mov
%
i7
,
%
o1
call
C_LABEL
(
lookup_fault
)
call
lookup_fault
mov
%
i4
,
%
o2
mov
%
i4
,
%
o2
ret
ret
restore
restore
...
...
arch/sparc/lib/strlen.S
View file @
2d6d3d27
...
@@ -5,8 +5,6 @@
...
@@ -5,8 +5,6 @@
*
Copyright
(
C
)
1996
Jakub
Jelinek
(
jj
@
sunsite
.
mff
.
cuni
.
cz
)
*
Copyright
(
C
)
1996
Jakub
Jelinek
(
jj
@
sunsite
.
mff
.
cuni
.
cz
)
*/
*/
#include <asm/cprefix.h>
#define LO_MAGIC 0x01010101
#define LO_MAGIC 0x01010101
#define HI_MAGIC 0x80808080
#define HI_MAGIC 0x80808080
...
@@ -42,8 +40,8 @@
...
@@ -42,8 +40,8 @@
mov
2
,
%
o0
mov
2
,
%
o0
.
align
4
.
align
4
.
global
C_LABEL
(
strlen
)
.
global
strlen
C_LABEL
(
strlen
)
:
strlen
:
mov
%
o0
,
%
o1
mov
%
o0
,
%
o1
andcc
%
o0
,
3
,
%
g0
andcc
%
o0
,
3
,
%
g0
bne
0
b
bne
0
b
...
...
arch/sparc/lib/strlen_user.S
View file @
2d6d3d27
...
@@ -8,8 +8,6 @@
...
@@ -8,8 +8,6 @@
*
Copyright
(
C
)
1996
Jakub
Jelinek
(
jj
@
sunsite
.
mff
.
cuni
.
cz
)
*
Copyright
(
C
)
1996
Jakub
Jelinek
(
jj
@
sunsite
.
mff
.
cuni
.
cz
)
*/
*/
#include <asm/cprefix.h>
#define LO_MAGIC 0x01010101
#define LO_MAGIC 0x01010101
#define HI_MAGIC 0x80808080
#define HI_MAGIC 0x80808080
...
@@ -47,10 +45,10 @@
...
@@ -47,10 +45,10 @@
mov
3
,
%
o0
mov
3
,
%
o0
.
align
4
.
align
4
.
global
C_LABEL
(
__strlen_user
),
C_LABEL
(
__strnlen_user
)
.
global
__strlen_user
,
__strnlen_user
C_LABEL
(
__strlen_user
)
:
__strlen_user
:
sethi
%
hi
(
32768
),
%
o1
sethi
%
hi
(
32768
),
%
o1
C_LABEL
(
__strnlen_user
)
:
__strnlen_user
:
mov
%
o1
,
%
g1
mov
%
o1
,
%
g1
mov
%
o0
,
%
o1
mov
%
o0
,
%
o1
andcc
%
o0
,
3
,
%
g0
andcc
%
o0
,
3
,
%
g0
...
...
arch/sparc/lib/strncmp.S
View file @
2d6d3d27
...
@@ -3,13 +3,11 @@
...
@@ -3,13 +3,11 @@
*
generic
strncmp
routine
.
*
generic
strncmp
routine
.
*/
*/
#include <asm/cprefix.h>
.
text
.
text
.
align
4
.
align
4
.
global
C_LABEL
(
__strncmp
),
C_LABEL
(
strncmp
)
.
global
__strncmp
,
strncmp
C_LABEL
(
__strncmp
)
:
__strncmp
:
C_LABEL
(
strncmp
)
:
strncmp
:
mov
%
o0
,
%
g3
mov
%
o0
,
%
g3
mov
0
,
%
o3
mov
0
,
%
o3
...
...
arch/sparc/lib/strncpy_from_user.S
View file @
2d6d3d27
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
*
Copyright
(
C
)
1996
David
S
.
Miller
*
Copyright
(
C
)
1996
David
S
.
Miller
*/
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/ptrace.h>
#include <asm/errno.h>
#include <asm/errno.h>
...
@@ -17,8 +16,8 @@
...
@@ -17,8 +16,8 @@
*
bytes
copied
if
we
hit
a
null
byte
*
bytes
copied
if
we
hit
a
null
byte
*/
*/
.
globl
C_LABEL
(
__strncpy_from_user
)
.
globl
__strncpy_from_user
C_LABEL
(
__strncpy_from_user
)
:
__strncpy_from_user
:
/
*
%
o0
=
dest
,
%
o1
=
src
,
%
o2
=
count
*/
/
*
%
o0
=
dest
,
%
o1
=
src
,
%
o2
=
count
*/
mov
%
o2
,
%
o3
mov
%
o2
,
%
o3
1
:
1
:
...
...
arch/sparc/math-emu/Makefile
View file @
2d6d3d27
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# Makefile for the FPU instruction emulation.
# Makefile for the FPU instruction emulation.
#
#
obj-y
:=
math.o
ashldi3.o
obj-y
:=
math.o
EXTRA_AFLAGS
:=
-ansi
EXTRA_AFLAGS
:=
-ansi
EXTRA_CFLAGS
=
-I
.
-I
$(TOPDIR)
/include/math-emu
-w
EXTRA_CFLAGS
=
-I
.
-I
$(TOPDIR)
/include/math-emu
-w
arch/sparc/mm/viking.S
View file @
2d6d3d27
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
#include <asm/page.h>
#include <asm/page.h>
#include <asm/pgtsrmmu.h>
#include <asm/pgtsrmmu.h>
#include <asm/viking.h>
#include <asm/viking.h>
#include <asm/cprefix.h>
#include <asm/btfixup.h>
#include <asm/btfixup.h>
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
...
...
include/asm-sparc/asmmacro.h
View file @
2d6d3d27
...
@@ -26,17 +26,17 @@
...
@@ -26,17 +26,17 @@
#define GET_PROCESSOR_MID(reg, tmp) \
#define GET_PROCESSOR_MID(reg, tmp) \
rd %tbr, %reg; \
rd %tbr, %reg; \
sethi %hi(
C_LABEL(mid_xlate)
), %tmp; \
sethi %hi(
mid_xlate
), %tmp; \
srl %reg, 12, %reg; \
srl %reg, 12, %reg; \
or %tmp, %lo(
C_LABEL(mid_xlate)
), %tmp; \
or %tmp, %lo(
mid_xlate
), %tmp; \
and %reg, 3, %reg; \
and %reg, 3, %reg; \
ldub [%tmp + %reg], %reg;
ldub [%tmp + %reg], %reg;
#define GET_PROCESSOR_OFFSET(reg, tmp) \
#define GET_PROCESSOR_OFFSET(reg, tmp) \
GET_PROCESSOR_ID(reg) \
GET_PROCESSOR_ID(reg) \
sethi %hi(
C_LABEL(cpu_offset)
), %tmp; \
sethi %hi(
cpu_offset
), %tmp; \
sll %reg, 2, %reg; \
sll %reg, 2, %reg; \
or %tmp, %lo(
C_LABEL(cpu_offset)
), %tmp; \
or %tmp, %lo(
cpu_offset
), %tmp; \
ld [%tmp + %reg], %reg;
ld [%tmp + %reg], %reg;
/* All trap entry points _must_ begin with this macro or else you
/* All trap entry points _must_ begin with this macro or else you
...
...
include/asm-sparc/checksum.h
View file @
2d6d3d27
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
#include <linux/in6.h>
#include <linux/in6.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/cprefix.h>
/* computes the checksum of a memory block at buff, length len,
/* computes the checksum of a memory block at buff, length len,
* and adds in "sum" (32-bit)
* and adds in "sum" (32-bit)
...
@@ -51,7 +50,7 @@ csum_partial_copy_nocheck (const char *src, char *dst, int len,
...
@@ -51,7 +50,7 @@ csum_partial_copy_nocheck (const char *src, char *dst, int len,
register
int
l
asm
(
"g1"
)
=
len
;
register
int
l
asm
(
"g1"
)
=
len
;
__asm__
__volatile__
(
__asm__
__volatile__
(
"call
"
C_LABEL_STR
(
__csum_partial_copy_sparc_generic
)
"
\n\t
"
"call
__csum_partial_copy_sparc_generic
\n\t
"
" mov %6, %%g7
\n
"
" mov %6, %%g7
\n
"
:
"=&r"
(
ret
),
"=&r"
(
d
),
"=&r"
(
l
)
:
"=&r"
(
ret
),
"=&r"
(
d
),
"=&r"
(
l
)
:
"0"
(
ret
),
"1"
(
d
),
"2"
(
l
),
"r"
(
sum
)
:
"0"
(
ret
),
"1"
(
d
),
"2"
(
l
),
"r"
(
sum
)
...
@@ -81,7 +80,7 @@ csum_partial_copy_from_user(const char *src, char *dst, int len,
...
@@ -81,7 +80,7 @@ csum_partial_copy_from_user(const char *src, char *dst, int len,
".word 1f,2
\n\t
"
".word 1f,2
\n\t
"
".previous
\n
"
".previous
\n
"
"1:
\n\t
"
"1:
\n\t
"
"call
"
C_LABEL_STR
(
__csum_partial_copy_sparc_generic
)
"
\n\t
"
"call
__csum_partial_copy_sparc_generic
\n\t
"
" st %8, [%%sp + 64]
\n
"
" st %8, [%%sp + 64]
\n
"
:
"=&r"
(
ret
),
"=&r"
(
d
),
"=&r"
(
l
),
"=&r"
(
s
)
:
"=&r"
(
ret
),
"=&r"
(
d
),
"=&r"
(
l
),
"=&r"
(
s
)
:
"0"
(
ret
),
"1"
(
d
),
"2"
(
l
),
"3"
(
s
),
"r"
(
err
)
:
"0"
(
ret
),
"1"
(
d
),
"2"
(
l
),
"3"
(
s
),
"r"
(
err
)
...
@@ -110,7 +109,7 @@ csum_partial_copy_to_user(const char *src, char *dst, int len,
...
@@ -110,7 +109,7 @@ csum_partial_copy_to_user(const char *src, char *dst, int len,
".word 1f,1
\n\t
"
".word 1f,1
\n\t
"
".previous
\n
"
".previous
\n
"
"1:
\n\t
"
"1:
\n\t
"
"call
"
C_LABEL_STR
(
__csum_partial_copy_sparc_generic
)
"
\n\t
"
"call
__csum_partial_copy_sparc_generic
\n\t
"
" st %8, [%%sp + 64]
\n
"
" st %8, [%%sp + 64]
\n
"
:
"=&r"
(
ret
),
"=&r"
(
d
),
"=&r"
(
l
),
"=&r"
(
s
)
:
"=&r"
(
ret
),
"=&r"
(
d
),
"=&r"
(
l
),
"=&r"
(
s
)
:
"0"
(
ret
),
"1"
(
d
),
"2"
(
l
),
"3"
(
s
),
"r"
(
err
)
:
"0"
(
ret
),
"1"
(
d
),
"2"
(
l
),
"3"
(
s
),
"r"
(
err
)
...
...
include/asm-sparc/cprefix.h
deleted
100644 → 0
View file @
44bd49d5
/* cprefix.h: This file is included by assembly source which needs
* to know what the c-label prefixes are. The newer versions
* of cpp that come with gcc predefine such things to help
* us out. The reason this stuff is needed is to make
* solaris compiles of the kernel work.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#ifndef __SPARC_CPREFIX_H
#define __SPARC_CPREFIX_H
#if defined(__svr4__) || defined(__ELF__)
#define C_LABEL_PREFIX
#define C_LABEL_STR(name) #name
#else
#define C_LABEL_PREFIX _
#define C_LABEL_STR(name) "_" #name
#endif
#define CONCAT(a, b) CONCAT2(a, b)
#define CONCAT2(a, b) a##b
#define C_LABEL(name) CONCAT(C_LABEL_PREFIX, name)
#endif
/* !(__SPARC_CPREFIX_H) */
include/asm-sparc/head.h
View file @
2d6d3d27
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
/* Data/text faults. Defaults to sun4c version at boot time. */
/* Data/text faults. Defaults to sun4c version at boot time. */
#define SPARC_TFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 1, %l7;
#define SPARC_TFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 1, %l7;
#define SPARC_DFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 0, %l7;
#define SPARC_DFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 0, %l7;
#define SRMMU_TFAULT rd %psr, %l0; rd %wim, %l3; b
C_LABEL(srmmu_fault)
; mov 1, %l7;
#define SRMMU_TFAULT rd %psr, %l0; rd %wim, %l3; b
srmmu_fault
; mov 1, %l7;
#define SRMMU_DFAULT rd %psr, %l0; rd %wim, %l3; b
C_LABEL(srmmu_fault)
; mov 0, %l7;
#define SRMMU_DFAULT rd %psr, %l0; rd %wim, %l3; b
srmmu_fault
; mov 0, %l7;
/* This is for traps we should NEVER get. */
/* This is for traps we should NEVER get. */
#define BAD_TRAP(num) \
#define BAD_TRAP(num) \
...
@@ -41,17 +41,17 @@
...
@@ -41,17 +41,17 @@
/* Software trap for Linux system calls. */
/* Software trap for Linux system calls. */
#define LINUX_SYSCALL_TRAP \
#define LINUX_SYSCALL_TRAP \
sethi %hi(
C_LABEL(sys_call_table)
), %l7; \
sethi %hi(
sys_call_table
), %l7; \
or %l7, %lo(
C_LABEL(sys_call_table)
), %l7; \
or %l7, %lo(
sys_call_table
), %l7; \
b linux_sparc_syscall; \
b linux_sparc_syscall; \
rd %psr, %l0;
rd %psr, %l0;
/* Software trap for SunOS4.1.x system calls. */
/* Software trap for SunOS4.1.x system calls. */
#define SUNOS_SYSCALL_TRAP \
#define SUNOS_SYSCALL_TRAP \
rd %psr, %l0; \
rd %psr, %l0; \
sethi %hi(
C_LABEL(sunos_sys_table)
), %l7; \
sethi %hi(
sunos_sys_table
), %l7; \
b linux_sparc_syscall; \
b linux_sparc_syscall; \
or %l7, %lo(
C_LABEL(sunos_sys_table)
), %l7;
or %l7, %lo(
sunos_sys_table
), %l7;
#define SUNOS_NO_SYSCALL_TRAP \
#define SUNOS_NO_SYSCALL_TRAP \
b sunos_syscall; \
b sunos_syscall; \
...
@@ -80,8 +80,8 @@
...
@@ -80,8 +80,8 @@
/* Software trap for Sparc-netbsd system calls. */
/* Software trap for Sparc-netbsd system calls. */
#define NETBSD_SYSCALL_TRAP \
#define NETBSD_SYSCALL_TRAP \
sethi %hi(
C_LABEL(sys_call_table)
), %l7; \
sethi %hi(
sys_call_table
), %l7; \
or %l7, %lo(
C_LABEL(sys_call_table)
), %l7; \
or %l7, %lo(
sys_call_table
), %l7; \
b bsd_syscall; \
b bsd_syscall; \
rd %psr, %l0;
rd %psr, %l0;
...
...
include/asm-sparc/winmacro.h
View file @
2d6d3d27
...
@@ -106,9 +106,9 @@
...
@@ -106,9 +106,9 @@
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
#define LOAD_CURRENT4M(dest_reg, idreg) \
#define LOAD_CURRENT4M(dest_reg, idreg) \
rd %tbr, %idreg; \
rd %tbr, %idreg; \
sethi %hi(
C_LABEL(current_set)
), %dest_reg; \
sethi %hi(
current_set
), %dest_reg; \
srl %idreg, 10, %idreg; \
srl %idreg, 10, %idreg; \
or %dest_reg, %lo(
C_LABEL(current_set)
), %dest_reg; \
or %dest_reg, %lo(
current_set
), %dest_reg; \
and %idreg, 0xc, %idreg; \
and %idreg, 0xc, %idreg; \
ld [%idreg + %dest_reg], %dest_reg;
ld [%idreg + %dest_reg], %dest_reg;
...
@@ -119,15 +119,15 @@
...
@@ -119,15 +119,15 @@
/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
#define LOAD_CURRENT(dest_reg, idreg) \
#define LOAD_CURRENT(dest_reg, idreg) \
sethi %hi(___b_load_current), %idreg; \
sethi %hi(___b_load_current), %idreg; \
sethi %hi(
C_LABEL(current_set)
), %dest_reg; \
sethi %hi(
current_set
), %dest_reg; \
sethi %hi(
C_LABEL(boot_cpu_id4)
), %idreg; \
sethi %hi(
boot_cpu_id4
), %idreg; \
or %dest_reg, %lo(
C_LABEL(current_set)
), %dest_reg; \
or %dest_reg, %lo(
current_set
), %dest_reg; \
ldub [%idreg + %lo(
C_LABEL(boot_cpu_id4)
)], %idreg; \
ldub [%idreg + %lo(
boot_cpu_id4
)], %idreg; \
ld [%idreg + %dest_reg], %dest_reg;
ld [%idreg + %dest_reg], %dest_reg;
#else
#else
#define LOAD_CURRENT(dest_reg, idreg) \
#define LOAD_CURRENT(dest_reg, idreg) \
sethi %hi(
C_LABEL(current_set)
), %idreg; \
sethi %hi(
current_set
), %idreg; \
ld [%idreg + %lo(
C_LABEL(current_set)
)], %dest_reg;
ld [%idreg + %lo(
current_set
)], %dest_reg;
#endif
#endif
#endif
/* !(_SPARC_WINMACRO_H) */
#endif
/* !(_SPARC_WINMACRO_H) */
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