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
51d8b7a3
Commit
51d8b7a3
authored
Sep 04, 2002
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Preserve f11-f15 around calls into firmware. Patch by John Marvin.
parent
d73794d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
6 deletions
+88
-6
arch/ia64/kernel/ia64_ksyms.c
arch/ia64/kernel/ia64_ksyms.c
+2
-0
arch/ia64/kernel/pal.S
arch/ia64/kernel/pal.S
+45
-0
include/asm-ia64/pal.h
include/asm-ia64/pal.h
+38
-6
include/asm-ia64/sal.h
include/asm-ia64/sal.h
+3
-0
No files found.
arch/ia64/kernel/ia64_ksyms.c
View file @
51d8b7a3
...
...
@@ -127,6 +127,8 @@ EXPORT_SYMBOL(ia64_pal_call_phys_stacked);
EXPORT_SYMBOL
(
ia64_pal_call_phys_static
);
EXPORT_SYMBOL
(
ia64_pal_call_stacked
);
EXPORT_SYMBOL
(
ia64_pal_call_static
);
EXPORT_SYMBOL
(
ia64_load_scratch_fpregs
);
EXPORT_SYMBOL
(
ia64_save_scratch_fpregs
);
extern
struct
efi
efi
;
EXPORT_SYMBOL
(
efi
);
...
...
arch/ia64/kernel/pal.S
View file @
51d8b7a3
...
...
@@ -245,3 +245,48 @@ GLOBAL_ENTRY(ia64_pal_call_phys_stacked)
br.ret.sptk.many
b0
END
(
ia64_pal_call_phys_stacked
)
/*
*
Save
scratch
fp
scratch
regs
which
aren
't saved in pt_regs already (fp10-fp15).
*
*
NOTE
:
We
need
to
do
this
since
firmware
(
SAL
and
PAL
)
may
use
any
of
the
scratch
*
regs
fp
-
low
partition
.
*
*
Inputs
:
*
in0
Address
of
stack
storage
for
fp
regs
*/
GLOBAL_ENTRY
(
ia64_save_scratch_fpregs
)
alloc
r3
=
ar
.
pfs
,
1
,
0
,
0
,
0
add
r2
=
16
,
in0
;;
stf.spill
[
in0
]
=
f10
,
32
stf.spill
[
r2
]
=
f11
,
32
;;
stf.spill
[
in0
]
=
f12
,
32
stf.spill
[
r2
]
=
f13
,
32
;;
stf.spill
[
in0
]
=
f14
,
32
stf.spill
[
r2
]
=
f15
,
32
br.ret.sptk.many
rp
END
(
ia64_save_scratch_fpregs
)
/*
*
Load
scratch
fp
scratch
regs
(
fp10
-
fp15
)
*
*
Inputs
:
*
in0
Address
of
stack
storage
for
fp
regs
*/
GLOBAL_ENTRY
(
ia64_load_scratch_fpregs
)
alloc
r3
=
ar
.
pfs
,
1
,
0
,
0
,
0
add
r2
=
16
,
in0
;;
ldf.fill
f10
=
[
in0
],
32
ldf.fill
f11
=
[
r2
],
32
;;
ldf.fill
f12
=
[
in0
],
32
ldf.fill
f13
=
[
r2
],
32
;;
ldf.fill
f14
=
[
in0
],
32
ldf.fill
f15
=
[
r2
],
32
br.ret.sptk.many
rp
END
(
ia64_load_scratch_fpregs
)
include/asm-ia64/pal.h
View file @
51d8b7a3
...
...
@@ -78,6 +78,7 @@
#ifndef __ASSEMBLY__
#include <linux/types.h>
#include <asm/fpu.h>
/*
* Data types needed to pass information into PAL procedures and
...
...
@@ -649,12 +650,43 @@ extern struct ia64_pal_retval ia64_pal_call_static (u64, u64, u64, u64, u64);
extern
struct
ia64_pal_retval
ia64_pal_call_stacked
(
u64
,
u64
,
u64
,
u64
);
extern
struct
ia64_pal_retval
ia64_pal_call_phys_static
(
u64
,
u64
,
u64
,
u64
);
extern
struct
ia64_pal_retval
ia64_pal_call_phys_stacked
(
u64
,
u64
,
u64
,
u64
);
#define PAL_CALL(iprv,a0,a1,a2,a3) iprv = ia64_pal_call_static(a0, a1, a2, a3, 0)
#define PAL_CALL_IC_OFF(iprv,a0,a1,a2,a3) iprv = ia64_pal_call_static(a0, a1, a2, a3, 1)
#define PAL_CALL_STK(iprv,a0,a1,a2,a3) iprv = ia64_pal_call_stacked(a0, a1, a2, a3)
#define PAL_CALL_PHYS(iprv,a0,a1,a2,a3) iprv = ia64_pal_call_phys_static(a0, a1, a2, a3)
#define PAL_CALL_PHYS_STK(iprv,a0,a1,a2,a3) iprv = ia64_pal_call_phys_stacked(a0, a1, a2, a3)
extern
void
ia64_save_scratch_fpregs
(
struct
ia64_fpreg
*
);
extern
void
ia64_load_scratch_fpregs
(
struct
ia64_fpreg
*
);
#define PAL_CALL(iprv,a0,a1,a2,a3) do { \
struct ia64_fpreg fr[6]; \
ia64_save_scratch_fpregs(fr); \
iprv = ia64_pal_call_static(a0, a1, a2, a3, 0); \
ia64_load_scratch_fpregs(fr); \
} while (0)
#define PAL_CALL_IC_OFF(iprv,a0,a1,a2,a3) do { \
struct ia64_fpreg fr[6]; \
ia64_save_scratch_fpregs(fr); \
iprv = ia64_pal_call_static(a0, a1, a2, a3, 1); \
ia64_load_scratch_fpregs(fr); \
} while (0)
#define PAL_CALL_STK(iprv,a0,a1,a2,a3) do { \
struct ia64_fpreg fr[6]; \
ia64_save_scratch_fpregs(fr); \
iprv = ia64_pal_call_stacked(a0, a1, a2, a3); \
ia64_load_scratch_fpregs(fr); \
} while (0)
#define PAL_CALL_PHYS(iprv,a0,a1,a2,a3) do { \
struct ia64_fpreg fr[6]; \
ia64_save_scratch_fpregs(fr); \
iprv = ia64_pal_call_phys_static(a0, a1, a2, a3); \
ia64_load_scratch_fpregs(fr); \
} while (0)
#define PAL_CALL_PHYS_STK(iprv,a0,a1,a2,a3) do { \
struct ia64_fpreg fr[6]; \
ia64_save_scratch_fpregs(fr); \
iprv = ia64_pal_call_phys_stacked(a0, a1, a2, a3); \
ia64_load_scratch_fpregs(fr); \
} while (0)
typedef
int
(
*
ia64_pal_handler
)
(
u64
,
...);
extern
ia64_pal_handler
ia64_pal
;
...
...
include/asm-ia64/sal.h
View file @
51d8b7a3
...
...
@@ -38,9 +38,12 @@ extern spinlock_t sal_lock;
# define SAL_CALL(result,args...) do { \
unsigned long flags; \
struct ia64_fpreg fr[6]; \
ia64_save_scratch_fpregs(fr); \
spin_lock_irqsave(&sal_lock, flags); \
__SAL_CALL(result,args); \
spin_unlock_irqrestore(&sal_lock, flags); \
ia64_load_scratch_fpregs(fr); \
} while (0)
#define SAL_SET_VECTORS 0x01000000
...
...
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