Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
78cfa516
Commit
78cfa516
authored
21 years ago
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: iseries soft disable and do_page_fault fixes from Ben Herrenschmidt
parent
6e6c9118
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
54 deletions
+24
-54
arch/ppc64/kernel/head.S
arch/ppc64/kernel/head.S
+20
-41
arch/ppc64/mm/fault.c
arch/ppc64/mm/fault.c
+4
-13
No files found.
arch/ppc64/kernel/head.S
View file @
78cfa516
...
...
@@ -40,6 +40,15 @@
#define DO_SOFT_DISABLE
#endif
/*
copy
saved
SOFTE
bit
or
EE
bit
from
saved
MSR
depending
*
if
we
are
doing
soft
-
disable
or
not
*/
#ifdef DO_SOFT_DISABLE
#define DO_COPY_EE() ld r20,SOFTE(r1)
#else
#define DO_COPY_EE() rldicl r20,r23,49,63
#endif
/*
*
hcall
interface
to
pSeries
LPAR
*/
...
...
@@ -618,11 +627,7 @@ stab_bolted_user_return:
ld
r4
,
_DAR
(
r1
)
ld
r5
,
_DSISR
(
r1
)
addi
r3
,
r1
,
STACK_FRAME_OVERHEAD
#ifdef DO_SOFT_DISABLE
ld
r20
,
SOFTE
(
r1
)
/*
Copy
saved
SOFTE
bit
*/
#else
rldicl
r20
,
r23
,
49
,
63
/*
copy
EE
bit
from
saved
MSR
*/
#endif
DO_COPY_EE
()
li
r6
,
0x300
bl
.
save_remaining_regs
bl
.
do_page_fault
...
...
@@ -644,12 +649,9 @@ DataAccessSLB_common:
or
.
r3
,
r3
,
r3
/*
Check
return
code
*/
beq
fast_exception_return
/*
Return
if
we
succeeded
*/
addi
r3
,
r1
,
STACK_FRAME_OVERHEAD
#ifdef DO_SOFT_DISABLE
ld
r20
,
SOFTE
(
r1
)
#else
rldicl
r20
,
r23
,
49
,
63
/*
copy
EE
bit
from
saved
MSR
*/
#endif
DO_COPY_EE
()
li
r6
,
0x380
li
r5
,
0
bl
.
save_remaining_regs
bl
.
do_page_fault
b
.
ret_from_except
...
...
@@ -670,13 +672,9 @@ InstructionAccess_common:
bl
.
do_hash_page_ISI
/*
Try
to
handle
as
hpte
fault
*/
1
:
mr
r4
,
r22
mr
r5
,
r23
rlwinm
r5
,
r23
,
0
,
4
,
4
/*
We
only
care
about
PR
in
error_code
*/
addi
r3
,
r1
,
STACK_FRAME_OVERHEAD
#ifdef DO_SOFT_DISABLE
ld
r20
,
SOFTE
(
r1
)
#else
rldicl
r20
,
r23
,
49
,
63
/*
copy
EE
bit
from
saved
MSR
*/
#endif
DO_COPY_EE
()
li
r6
,
0x400
bl
.
save_remaining_regs
bl
.
do_page_fault
...
...
@@ -692,12 +690,9 @@ InstructionAccessSLB_common:
beq
+
fast_exception_return
/*
Return
if
we
succeeded
*/
addi
r3
,
r1
,
STACK_FRAME_OVERHEAD
#ifdef DO_SOFT_DISABLE
ld
r20
,
SOFTE
(
r1
)
#else
rldicl
r20
,
r23
,
49
,
63
/*
copy
EE
bit
from
saved
MSR
*/
#endif
DO_COPY_EE
()
li
r6
,
0x480
li
r5
,
0
bl
.
save_remaining_regs
bl
.
do_page_fault
b
.
ret_from_except
...
...
@@ -769,11 +764,7 @@ HardwareInterrupt_entry:
Alignment_common
:
EXCEPTION_PROLOG_COMMON
addi
r3
,
r1
,
STACK_FRAME_OVERHEAD
#ifdef DO_SOFT_DISABLE
ld
r20
,
SOFTE
(
r1
)
#else
rldicl
r20
,
r23
,
49
,
63
/*
copy
EE
bit
from
saved
MSR
*/
#endif
DO_COPY_EE
()
li
r6
,
0x600
bl
.
save_remaining_regs
bl
.
AlignmentException
...
...
@@ -783,11 +774,7 @@ Alignment_common:
ProgramCheck_common
:
EXCEPTION_PROLOG_COMMON
addi
r3
,
r1
,
STACK_FRAME_OVERHEAD
#ifdef DO_SOFT_DISABLE
ld
r20
,
SOFTE
(
r1
)
#else
rldicl
r20
,
r23
,
49
,
63
/*
copy
EE
bit
from
saved
MSR
*/
#endif
DO_COPY_EE
()
li
r6
,
0x700
bl
.
save_remaining_regs
bl
.
ProgramCheckException
...
...
@@ -798,11 +785,7 @@ FPUnavailable_common:
EXCEPTION_PROLOG_COMMON
bne
.
load_up_fpu
/*
if
from
user
,
just
load
it
up
*/
addi
r3
,
r1
,
STACK_FRAME_OVERHEAD
#ifdef DO_SOFT_DISABLE
ld
r20
,
SOFTE
(
r1
)
#else
rldicl
r20
,
r23
,
49
,
63
/*
copy
EE
bit
from
saved
MSR
*/
#endif
DO_COPY_EE
()
li
r6
,
0x800
bl
.
save_remaining_regs
bl
.
KernelFPUnavailableException
...
...
@@ -818,11 +801,7 @@ SystemCall_common:
beq
+
HardwareInterrupt_entry
1
:
#endif
#ifdef DO_SOFT_DISABLE
ld
r20
,
SOFTE
(
r1
)
#else
rldicl
r20
,
r23
,
49
,
63
/*
copy
EE
bit
from
saved
MSR
*/
#endif
DO_COPY_EE
()
li
r6
,
0xC00
bl
.
save_remaining_regs
bl
.
DoSyscall
...
...
This diff is collapsed.
Click to expand it.
arch/ppc64/mm/fault.c
View file @
78cfa516
...
...
@@ -46,8 +46,10 @@ int debugger_kernel_faults = 1;
void
bad_page_fault
(
struct
pt_regs
*
,
unsigned
long
,
int
);
/*
* For 600- and 800-family processors, the error_code parameter is DSISR
* for a data fault, SRR1 for an instruction fault.
* The error_code parameter is
* - DSISR for a non-SLB data access fault,
* - SRR1 & 0x08000000 for a non-SLB instruction access fault
* - 0 any SLB fault.
*/
void
do_page_fault
(
struct
pt_regs
*
regs
,
unsigned
long
address
,
unsigned
long
error_code
)
...
...
@@ -58,17 +60,6 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned
long
code
=
SEGV_MAPERR
;
unsigned
long
is_write
=
error_code
&
0x02000000
;
/*
* Fortunately the bit assignments in SRR1 for an instruction
* fault and DSISR for a data fault are mostly the same for the
* bits we are interested in. But there are some bits which
* indicate errors in DSISR but can validly be set in SRR1.
*/
if
(
regs
->
trap
==
0x400
)
error_code
&=
0x48200000
;
else
if
(
regs
->
trap
!=
0x300
)
/* ensure error_code is 0 on SLB miss */
error_code
=
0
;
#ifdef CONFIG_DEBUG_KERNEL
if
(
debugger_fault_handler
&&
(
regs
->
trap
==
0x300
||
regs
->
trap
==
0x380
))
{
...
...
This diff is collapsed.
Click to expand it.
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