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
24e9d0b9
Commit
24e9d0b9
authored
Jul 10, 2007
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MIPS] Hook for platforms to define cachability of /dev/mem regions
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
8bb809df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
arch/mips/mm/cache.c
arch/mips/mm/cache.c
+10
-0
drivers/char/mem.c
drivers/char/mem.c
+7
-0
No files found.
arch/mips/mm/cache.c
View file @
24e9d0b9
...
...
@@ -6,6 +6,8 @@
* Copyright (C) 1994 - 2003, 07 by Ralf Baechle (ralf@linux-mips.org)
* Copyright (C) 2007 MIPS Technologies, Inc.
*/
#include <linux/fs.h>
#include <linux/fcntl.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
...
...
@@ -164,3 +166,11 @@ void __init cpu_cache_init(void)
panic
(
cache_panic
);
}
int
__weak
__uncached_access
(
struct
file
*
file
,
unsigned
long
addr
)
{
if
(
file
->
f_flags
&
O_SYNC
)
return
1
;
return
addr
>=
__pa
(
high_memory
);
}
drivers/char/mem.c
View file @
24e9d0b9
...
...
@@ -75,6 +75,13 @@ static inline int uncached_access(struct file *file, unsigned long addr)
* On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases.
*/
return
!
(
efi_mem_attributes
(
addr
)
&
EFI_MEMORY_WB
);
#elif defined(CONFIG_MIPS)
{
extern
int
__uncached_access
(
struct
file
*
file
,
unsigned
long
addr
);
return
__uncached_access
(
file
,
addr
);
}
#else
/*
* Accessing memory above the top the kernel knows about or through a file pointer
...
...
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