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
1d783419
Commit
1d783419
authored
Nov 02, 2002
by
Geert Uytterhoeven
Committed by
Linus Torvalds
Nov 02, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Convert m68k cache macros to inline functions
Convert m68k cache macros to inline functions
parent
668c242d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
39 deletions
+38
-39
arch/m68k/mm/memory.c
arch/m68k/mm/memory.c
+38
-39
No files found.
arch/m68k/mm/memory.c
View file @
1d783419
...
...
@@ -371,46 +371,51 @@ unsigned long mm_ptov (unsigned long paddr)
#endif
/* invalidate page in both caches */
#define clear040(paddr) \
__asm__ __volatile__ ("nop\n\t" \
".chip 68040\n\t" \
"cinvp %%bc,(%0)\n\t" \
".chip 68k" \
: : "a" (paddr))
static
inline
void
clear040
(
unsigned
long
paddr
)
{
asm
volatile
(
"nop
\n\t
"
".chip 68040
\n\t
"
"cinvp %%bc,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
paddr
));
}
/* invalidate page in i-cache */
#define cleari040(paddr) \
__asm__ __volatile__ ("nop\n\t" \
".chip 68040\n\t" \
"cinvp %%ic,(%0)\n\t" \
".chip 68k" \
: : "a" (paddr))
static
inline
void
cleari040
(
unsigned
long
paddr
)
{
asm
volatile
(
"nop
\n\t
"
".chip 68040
\n\t
"
"cinvp %%ic,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
paddr
));
}
/* push page in both caches */
#define push040(paddr) \
__asm__ __volatile__ ("nop\n\t" \
".chip 68040\n\t" \
"cpushp %%bc,(%0)\n\t" \
".chip 68k" \
: : "a" (paddr))
/* RZ: cpush %bc DOES invalidate %ic, regardless of DPI */
static
inline
void
push040
(
unsigned
long
paddr
)
{
asm
volatile
(
"nop
\n\t
"
".chip 68040
\n\t
"
"cpushp %%bc,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
paddr
));
}
/* push and invalidate page in both caches, must disable ints
* to avoid invalidating valid data */
#define pushcl040(paddr) \
do { unsigned long flags; \
save_flags(flags); \
cli(); \
push040(paddr); \
if (CPU_IS_060) clear040(paddr); \
restore_flags(flags); \
} while(0)
/* push page in both caches, invalidate in i-cache */
/* RZ: cpush %bc DOES invalidate %ic, regardless of DPI */
#define pushcli040(paddr) \
do { push040(paddr); \
} while(0)
static
inline
void
pushcl040
(
unsigned
long
paddr
)
{
unsigned
long
flags
;
local_irq_save
(
flags
);
push040
(
paddr
);
if
(
CPU_IS_060
)
clear040
(
paddr
);
local_irq_restore
(
flags
);
}
/*
* 040: Hit every page containing an address in the range paddr..paddr+len-1.
...
...
@@ -504,7 +509,7 @@ void cache_push (unsigned long paddr, int len)
paddr
&=
PAGE_MASK
;
do
{
push
cli
040
(
paddr
);
push040
(
paddr
);
paddr
+=
tmp
;
}
while
((
len
-=
tmp
)
>
0
);
}
...
...
@@ -530,12 +535,6 @@ void cache_push (unsigned long paddr, int len)
}
#undef clear040
#undef cleari040
#undef push040
#undef pushcl040
#undef pushcli040
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
int
mm_end_of_chunk
(
unsigned
long
addr
,
int
len
)
{
...
...
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