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
Show 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)
...
@@ -371,46 +371,51 @@ unsigned long mm_ptov (unsigned long paddr)
#endif
#endif
/* invalidate page in both caches */
/* invalidate page in both caches */
#define clear040(paddr) \
static
inline
void
clear040
(
unsigned
long
paddr
)
__asm__ __volatile__ ("nop\n\t" \
{
".chip 68040\n\t" \
asm
volatile
(
"cinvp %%bc,(%0)\n\t" \
"nop
\n\t
"
".chip 68k" \
".chip 68040
\n\t
"
: : "a" (paddr))
"cinvp %%bc,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
paddr
));
}
/* invalidate page in i-cache */
/* invalidate page in i-cache */
#define cleari040(paddr) \
static
inline
void
cleari040
(
unsigned
long
paddr
)
__asm__ __volatile__ ("nop\n\t" \
{
".chip 68040\n\t" \
asm
volatile
(
"cinvp %%ic,(%0)\n\t" \
"nop
\n\t
"
".chip 68k" \
".chip 68040
\n\t
"
: : "a" (paddr))
"cinvp %%ic,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
paddr
));
}
/* push page in both caches */
/* push page in both caches */
#define push040(paddr) \
/* RZ: cpush %bc DOES invalidate %ic, regardless of DPI */
__asm__ __volatile__ ("nop\n\t" \
static
inline
void
push040
(
unsigned
long
paddr
)
".chip 68040\n\t" \
{
"cpushp %%bc,(%0)\n\t" \
asm
volatile
(
".chip 68k" \
"nop
\n\t
"
: : "a" (paddr))
".chip 68040
\n\t
"
"cpushp %%bc,(%0)
\n\t
"
".chip 68k"
:
:
"a"
(
paddr
));
}
/* push and invalidate page in both caches, must disable ints
/* push and invalidate page in both caches, must disable ints
* to avoid invalidating valid data */
* to avoid invalidating valid data */
#define pushcl040(paddr) \
static
inline
void
pushcl040
(
unsigned
long
paddr
)
do { unsigned long flags; \
{
save_flags(flags); \
unsigned
long
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)
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.
* 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)
...
@@ -504,7 +509,7 @@ void cache_push (unsigned long paddr, int len)
paddr
&=
PAGE_MASK
;
paddr
&=
PAGE_MASK
;
do
{
do
{
push
cli
040
(
paddr
);
push040
(
paddr
);
paddr
+=
tmp
;
paddr
+=
tmp
;
}
while
((
len
-=
tmp
)
>
0
);
}
while
((
len
-=
tmp
)
>
0
);
}
}
...
@@ -530,12 +535,6 @@ void cache_push (unsigned long paddr, int len)
...
@@ -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
#ifndef CONFIG_SINGLE_MEMORY_CHUNK
int
mm_end_of_chunk
(
unsigned
long
addr
,
int
len
)
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