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
nexedi
linux
Commits
60080265
Commit
60080265
authored
Jul 11, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define kmap_atomic_pfn() for MIPS.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
129bc8f7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
arch/mips/mm/highmem.c
arch/mips/mm/highmem.c
+19
-0
include/asm-mips/highmem.h
include/asm-mips/highmem.h
+2
-0
No files found.
arch/mips/mm/highmem.c
View file @
60080265
...
...
@@ -83,6 +83,25 @@ void __kunmap_atomic(void *kvaddr, enum km_type type)
preempt_check_resched
();
}
/*
* This is the same as kmap_atomic() but can map memory that doesn't
* have a struct page associated with it.
*/
void
*
kmap_atomic_pfn
(
unsigned
long
pfn
,
enum
km_type
type
)
{
enum
fixed_addresses
idx
;
unsigned
long
vaddr
;
inc_preempt_count
();
idx
=
type
+
KM_TYPE_NR
*
smp_processor_id
();
vaddr
=
__fix_to_virt
(
FIX_KMAP_BEGIN
+
idx
);
set_pte
(
kmap_pte
-
idx
,
pfn_pte
(
pfn
,
kmap_prot
));
flush_tlb_one
(
vaddr
);
return
(
void
*
)
vaddr
;
}
struct
page
*
__kmap_atomic_to_page
(
void
*
ptr
)
{
unsigned
long
idx
,
vaddr
=
(
unsigned
long
)
ptr
;
...
...
include/asm-mips/highmem.h
View file @
60080265
...
...
@@ -75,6 +75,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
}
static
inline
void
kunmap_atomic
(
void
*
kvaddr
,
enum
km_type
type
)
{
}
#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn))
#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
...
...
@@ -86,6 +87,7 @@ extern void *__kmap(struct page *page);
extern
void
__kunmap
(
struct
page
*
page
);
extern
void
*
__kmap_atomic
(
struct
page
*
page
,
enum
km_type
type
);
extern
void
__kunmap_atomic
(
void
*
kvaddr
,
enum
km_type
type
);
extern
void
*
kmap_atomic_pfn
(
unsigned
long
pfn
,
enum
km_type
type
);
extern
struct
page
*
__kmap_atomic_to_page
(
void
*
ptr
);
#define kmap __kmap
...
...
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