Commit 4417be55 authored by Martin Peres's avatar Martin Peres Committed by Ben Skeggs

drm/nouveau/pwr/fuc: make $r1-$r10 registers callee-saved in kernel.fuc

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent b9fcf971
...@@ -98,12 +98,16 @@ wr32: ...@@ -98,12 +98,16 @@ wr32:
// $r14 - ns // $r14 - ns
// $r0 - zero // $r0 - zero
nsec: nsec:
push $r9
push $r8
nv_iord($r8, NV_PPWR_TIMER_LOW) nv_iord($r8, NV_PPWR_TIMER_LOW)
nsec_loop: nsec_loop:
nv_iord($r9, NV_PPWR_TIMER_LOW) nv_iord($r9, NV_PPWR_TIMER_LOW)
sub b32 $r9 $r8 sub b32 $r9 $r8
cmp b32 $r9 $r14 cmp b32 $r9 $r14
bra l #nsec_loop bra l #nsec_loop
pop $r8
pop $r9
ret ret
// busy-wait for a period of time // busy-wait for a period of time
...@@ -115,6 +119,8 @@ nsec: ...@@ -115,6 +119,8 @@ nsec:
// $r11 - timeout (ns) // $r11 - timeout (ns)
// $r0 - zero // $r0 - zero
wait: wait:
push $r9
push $r8
nv_iord($r8, NV_PPWR_TIMER_LOW) nv_iord($r8, NV_PPWR_TIMER_LOW)
wait_loop: wait_loop:
nv_rd32($r10, $r14) nv_rd32($r10, $r14)
...@@ -126,6 +132,8 @@ wait: ...@@ -126,6 +132,8 @@ wait:
cmp b32 $r9 $r11 cmp b32 $r9 $r11
bra l #wait_loop bra l #wait_loop
wait_done: wait_done:
pop $r8
pop $r9
ret ret
// $r15 - current (kern) // $r15 - current (kern)
...@@ -460,6 +468,9 @@ send: ...@@ -460,6 +468,9 @@ send:
// $r14 - process // $r14 - process
// $r0 - zero // $r0 - zero
recv: recv:
push $r9
push $r8
ld b32 $r8 D[$r14 + #proc_qget] ld b32 $r8 D[$r14 + #proc_qget]
ld b32 $r9 D[$r14 + #proc_qput] ld b32 $r9 D[$r14 + #proc_qput]
bclr $flags $p1 bclr $flags $p1
...@@ -492,6 +503,8 @@ recv: ...@@ -492,6 +503,8 @@ recv:
bset $flags $p1 bset $flags $p1
pop $r15 pop $r15
recv_done: recv_done:
pop $r8
pop $r9
ret ret
init: init:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment