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
379a95d1
Commit
379a95d1
authored
Nov 20, 2007
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: Tidy up various clear_page()/copy_page() definitions.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
bcb28e42
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
61 deletions
+36
-61
arch/sh/lib64/page_clear.S
arch/sh/lib64/page_clear.S
+2
-2
arch/sh/lib64/page_copy.S
arch/sh/lib64/page_copy.S
+27
-29
arch/sh/mm/copy_page.S
arch/sh/mm/copy_page.S
+3
-3
arch/sh/mm/init.c
arch/sh/mm/init.c
+0
-15
arch/sh/mm/pg-nommu.c
arch/sh/mm/pg-nommu.c
+2
-2
include/asm-sh/page.h
include/asm-sh/page.h
+2
-10
No files found.
arch/sh/lib64/page_clear.S
View file @
379a95d1
...
...
@@ -25,8 +25,8 @@
.
little
.
balign
8
.
global
sh64_page_clear
sh64_page_clear
:
.
global
clear_page
clear_page
:
pta
/
l
1
f
,
tr1
pta
/
l
2
f
,
tr2
ptabs
/
l
r18
,
tr0
...
...
arch/sh/lib64/page_copy.S
View file @
379a95d1
...
...
@@ -10,8 +10,8 @@
of
SH5
-
101
cut2
eval
chip
with
Cayman
board
DDR
memory
.
Parameters
:
r2
:
source
effective
address
(
start
of
page
)
r3
:
destination
effective
address
(
start
of
page
)
r2
:
destination
effective
address
(
start
of
page
)
r3
:
source
effective
address
(
start
of
page
)
Always
copies
4096
bytes
.
...
...
@@ -27,10 +27,10 @@
.
little
.
balign
8
.
global
sh64_page_copy
sh64_page_copy
:
.
global
copy_page
copy_page
:
/
*
Copy
4096
bytes
worth
of
data
from
r
2
to
r3
.
/
*
Copy
4096
bytes
worth
of
data
from
r
3
to
r2
.
Do
prefetches
4
lines
ahead
.
Do
alloco
2
lines
ahead
*/
...
...
@@ -41,21 +41,21 @@ sh64_page_copy:
#if 0
/
*
TAKum03020
*/
ld.q
r
2
,
0x00
,
r63
ld.q
r
2
,
0x20
,
r63
ld.q
r
2
,
0x40
,
r63
ld.q
r
2
,
0x60
,
r63
ld.q
r
3
,
0x00
,
r63
ld.q
r
3
,
0x20
,
r63
ld.q
r
3
,
0x40
,
r63
ld.q
r
3
,
0x60
,
r63
#endif
alloco
r
3
,
0x00
alloco
r
2
,
0x00
synco
!
TAKum03020
alloco
r
3
,
0x20
alloco
r
2
,
0x20
synco
!
TAKum03020
movi
3968
,
r6
add
r
3
,
r6
,
r6
add
r
2
,
r6
,
r6
addi
r6
,
64
,
r7
addi
r7
,
64
,
r8
sub
r
2
,
r3
,
r60
sub
r
3
,
r2
,
r60
addi
r60
,
8
,
r61
addi
r61
,
8
,
r62
addi
r62
,
8
,
r23
...
...
@@ -67,25 +67,23 @@ sh64_page_copy:
1
:
#if 0
/
*
TAKum03020
*/
bge
/
u
r
3
,
r6
,
tr2
!
skip
prefetch
for
last
4
lines
ldx.q
r
3
,
r22
,
r63
!
prefetch
4
lines
hence
bge
/
u
r
2
,
r6
,
tr2
!
skip
prefetch
for
last
4
lines
ldx.q
r
2
,
r22
,
r63
!
prefetch
4
lines
hence
#endif
2
:
bge
/
u
r
3
,
r7
,
tr3
!
skip
alloco
for
last
2
lines
alloco
r
3
,
0x40
!
alloc
destination
line
2
lines
ahead
bge
/
u
r
2
,
r7
,
tr3
!
skip
alloco
for
last
2
lines
alloco
r
2
,
0x40
!
alloc
destination
line
2
lines
ahead
synco
!
TAKum03020
3
:
ldx.q
r
3
,
r60
,
r36
ldx.q
r
3
,
r61
,
r37
ldx.q
r
3
,
r62
,
r38
ldx.q
r
3
,
r23
,
r39
st.q
r
3
,
0
,
r36
st.q
r
3
,
8
,
r37
st.q
r
3
,
16
,
r38
st.q
r
3
,
24
,
r39
addi
r
3
,
32
,
r3
bgt
/
l
r8
,
r
3
,
tr1
ldx.q
r
2
,
r60
,
r36
ldx.q
r
2
,
r61
,
r37
ldx.q
r
2
,
r62
,
r38
ldx.q
r
2
,
r23
,
r39
st.q
r
2
,
0
,
r36
st.q
r
2
,
8
,
r37
st.q
r
2
,
16
,
r38
st.q
r
2
,
24
,
r39
addi
r
2
,
32
,
r2
bgt
/
l
r8
,
r
2
,
tr1
blink
tr0
,
r63
!
return
arch/sh/mm/copy_page.S
View file @
379a95d1
...
...
@@ -9,11 +9,11 @@
#include <asm/page.h>
/*
*
copy_page
_slow
*
copy_page
*
@
to
:
P1
address
*
@
from
:
P1
address
*
*
void
copy_page
_slow
(
void
*
to
,
void
*
from
)
*
void
copy_page
(
void
*
to
,
void
*
from
)
*/
/*
...
...
@@ -23,7 +23,7 @@
*
r10
---
to
*
r11
---
from
*/
ENTRY
(
copy_page
_slow
)
ENTRY
(
copy_page
)
mov.l
r8
,
@
-
r15
mov.l
r10
,
@
-
r15
mov.l
r11
,
@
-
r15
...
...
arch/sh/mm/init.c
View file @
379a95d1
...
...
@@ -24,9 +24,6 @@
DEFINE_PER_CPU
(
struct
mmu_gather
,
mmu_gathers
);
pgd_t
swapper_pg_dir
[
PTRS_PER_PGD
];
void
(
*
copy_page
)(
void
*
from
,
void
*
to
);
void
(
*
clear_page
)(
void
*
to
);
void
show_mem
(
void
)
{
int
total
=
0
,
reserved
=
0
,
free
=
0
;
...
...
@@ -203,18 +200,6 @@ void __init mem_init(void)
memset
(
empty_zero_page
,
0
,
PAGE_SIZE
);
__flush_wback_region
(
empty_zero_page
,
PAGE_SIZE
);
/*
* Setup wrappers for copy/clear_page(), these will get overridden
* later in the boot process if a better method is available.
*/
#ifdef CONFIG_MMU
copy_page
=
copy_page_slow
;
clear_page
=
clear_page_slow
;
#else
copy_page
=
copy_page_nommu
;
clear_page
=
clear_page_nommu
;
#endif
after_bootmem
=
1
;
codesize
=
(
unsigned
long
)
&
_etext
-
(
unsigned
long
)
&
_text
;
...
...
arch/sh/mm/pg-nommu.c
View file @
379a95d1
...
...
@@ -14,12 +14,12 @@
#include <linux/string.h>
#include <asm/page.h>
void
copy_page
_nommu
(
void
*
to
,
void
*
from
)
void
copy_page
(
void
*
to
,
void
*
from
)
{
memcpy
(
to
,
from
,
PAGE_SIZE
);
}
void
clear_page
_nommu
(
void
*
to
)
void
clear_page
(
void
*
to
)
{
memset
(
to
,
0
,
PAGE_SIZE
);
}
...
...
include/asm-sh/page.h
View file @
379a95d1
...
...
@@ -55,20 +55,12 @@
#ifndef __ASSEMBLY__
extern
void
(
*
clear_page
)(
void
*
to
);
extern
void
(
*
copy_page
)(
void
*
to
,
void
*
from
);
extern
unsigned
long
shm_align_mask
;
extern
unsigned
long
max_low_pfn
,
min_low_pfn
;
extern
unsigned
long
memory_start
,
memory_end
;
#ifdef CONFIG_MMU
extern
void
clear_page_slow
(
void
*
to
);
extern
void
copy_page_slow
(
void
*
to
,
void
*
from
);
#else
extern
void
clear_page_nommu
(
void
*
to
);
extern
void
copy_page_nommu
(
void
*
to
,
void
*
from
);
#endif
extern
void
clear_page
(
void
*
to
);
extern
void
copy_page
(
void
*
to
,
void
*
from
);
#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \
(defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB))
...
...
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