Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
7575a49f
Commit
7575a49f
authored
Mar 23, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Implement flush_anon_page().
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
80e89593
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
arch/mips/mm/cache.c
arch/mips/mm/cache.c
+15
-1
arch/mips/mm/init.c
arch/mips/mm/init.c
+2
-2
include/asm-mips/cacheflush.h
include/asm-mips/cacheflush.h
+12
-0
No files found.
arch/mips/mm/cache.c
View file @
7575a49f
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
* License. See the file "COPYING" in the main directory of this archive
* License. See the file "COPYING" in the main directory of this archive
* for more details.
* for more details.
*
*
* Copyright (C) 1994 - 2003 by Ralf Baechle
* Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org)
* Copyright (C) 2007 MIPS Technologies, Inc.
*/
*/
#include <linux/init.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
...
@@ -88,6 +89,19 @@ void __flush_dcache_page(struct page *page)
...
@@ -88,6 +89,19 @@ void __flush_dcache_page(struct page *page)
EXPORT_SYMBOL
(
__flush_dcache_page
);
EXPORT_SYMBOL
(
__flush_dcache_page
);
void
__flush_anon_page
(
struct
page
*
page
,
unsigned
long
vmaddr
)
{
if
(
pages_do_alias
((
unsigned
long
)
page_address
(
page
),
vmaddr
))
{
void
*
kaddr
;
kaddr
=
kmap_coherent
(
page
,
vmaddr
);
flush_data_cache_page
((
unsigned
long
)
kaddr
);
kunmap_coherent
(
kaddr
);
}
}
EXPORT_SYMBOL
(
__flush_anon_page
);
void
__update_cache
(
struct
vm_area_struct
*
vma
,
unsigned
long
address
,
void
__update_cache
(
struct
vm_area_struct
*
vma
,
unsigned
long
address
,
pte_t
pte
)
pte_t
pte
)
{
{
...
...
arch/mips/mm/init.c
View file @
7575a49f
...
@@ -123,7 +123,7 @@ static void __init kmap_coherent_init(void)
...
@@ -123,7 +123,7 @@ static void __init kmap_coherent_init(void)
static
inline
void
kmap_coherent_init
(
void
)
{}
static
inline
void
kmap_coherent_init
(
void
)
{}
#endif
#endif
static
inline
void
*
kmap_coherent
(
struct
page
*
page
,
unsigned
long
addr
)
void
*
kmap_coherent
(
struct
page
*
page
,
unsigned
long
addr
)
{
{
enum
fixed_addresses
idx
;
enum
fixed_addresses
idx
;
unsigned
long
vaddr
,
flags
,
entrylo
;
unsigned
long
vaddr
,
flags
,
entrylo
;
...
@@ -177,7 +177,7 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr)
...
@@ -177,7 +177,7 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr)
#define UNIQUE_ENTRYHI(idx) (CKSEG0 + ((idx) << (PAGE_SHIFT + 1)))
#define UNIQUE_ENTRYHI(idx) (CKSEG0 + ((idx) << (PAGE_SHIFT + 1)))
static
inline
void
kunmap_coherent
(
struct
page
*
page
)
void
kunmap_coherent
(
struct
page
*
page
)
{
{
#ifndef CONFIG_MIPS_MT_SMTC
#ifndef CONFIG_MIPS_MT_SMTC
unsigned
int
wired
;
unsigned
int
wired
;
...
...
include/asm-mips/cacheflush.h
View file @
7575a49f
...
@@ -48,6 +48,15 @@ static inline void flush_dcache_page(struct page *page)
...
@@ -48,6 +48,15 @@ static inline void flush_dcache_page(struct page *page)
#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
#define ARCH_HAS_FLUSH_ANON_PAGE
extern
void
__flush_anon_page
(
struct
page
*
,
unsigned
long
);
static
inline
void
flush_anon_page
(
struct
vm_area_struct
*
vma
,
struct
page
*
page
,
unsigned
long
vmaddr
)
{
if
(
cpu_has_dc_aliases
&&
PageAnon
(
page
))
__flush_anon_page
(
page
,
vmaddr
);
}
static
inline
void
flush_icache_page
(
struct
vm_area_struct
*
vma
,
static
inline
void
flush_icache_page
(
struct
vm_area_struct
*
vma
,
struct
page
*
page
)
struct
page
*
page
)
{
{
...
@@ -86,4 +95,7 @@ extern void (*flush_data_cache_page)(unsigned long addr);
...
@@ -86,4 +95,7 @@ extern void (*flush_data_cache_page)(unsigned long addr);
/* Run kernel code uncached, useful for cache probing functions. */
/* Run kernel code uncached, useful for cache probing functions. */
unsigned
long
__init
run_uncached
(
void
*
func
);
unsigned
long
__init
run_uncached
(
void
*
func
);
extern
void
*
kmap_coherent
(
struct
page
*
page
,
unsigned
long
addr
);
extern
void
kunmap_coherent
(
struct
page
*
page
);
#endif
/* _ASM_CACHEFLUSH_H */
#endif
/* _ASM_CACHEFLUSH_H */
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