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
98cb97ef
Commit
98cb97ef
authored
Feb 19, 2002
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- clean up the vmalloc_to_page() interface: no need for any pgd parameter.
parent
ba493464
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
15 additions
and
14 deletions
+15
-14
drivers/ieee1394/video1394.c
drivers/ieee1394/video1394.c
+3
-3
drivers/media/video/bttv-driver.c
drivers/media/video/bttv-driver.c
+3
-3
drivers/media/video/cpia.c
drivers/media/video/cpia.c
+1
-1
drivers/media/video/meye.c
drivers/media/video/meye.c
+1
-1
drivers/usb/ov511.c
drivers/usb/ov511.c
+1
-1
drivers/usb/pwc-if.c
drivers/usb/pwc-if.c
+1
-1
drivers/usb/se401.c
drivers/usb/se401.c
+1
-1
drivers/usb/usbvideo.c
drivers/usb/usbvideo.c
+1
-1
include/linux/mm.h
include/linux/mm.h
+1
-1
mm/memory.c
mm/memory.c
+2
-1
No files found.
drivers/ieee1394/video1394.c
View file @
98cb97ef
...
...
@@ -177,7 +177,7 @@ static inline unsigned long uvirt_to_bus(unsigned long adr)
{
unsigned
long
kva
,
ret
;
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset
(
current
->
mm
,
adr
),
adr
));
kva
=
page_address
(
vmalloc_to_page
(
adr
));
ret
=
virt_to_bus
((
void
*
)
kva
);
MDEBUG
(
printk
(
"uv2b(%lx-->%lx)"
,
adr
,
ret
));
return
ret
;
...
...
@@ -188,7 +188,7 @@ static inline unsigned long kvirt_to_bus(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
virt_to_bus
((
void
*
)
kva
);
MDEBUG
(
printk
(
"kv2b(%lx-->%lx)"
,
adr
,
ret
));
return
ret
;
...
...
@@ -203,7 +203,7 @@ static inline unsigned long kvirt_to_pa(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
__pa
(
kva
);
MDEBUG
(
printk
(
"kv2pa(%lx-->%lx)"
,
adr
,
ret
));
return
ret
;
...
...
drivers/media/video/bttv-driver.c
View file @
98cb97ef
...
...
@@ -145,7 +145,7 @@ static inline unsigned long uvirt_to_bus(unsigned long adr)
{
unsigned
long
kva
,
ret
;
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset
(
current
->
mm
,
adr
),
adr
));
kva
=
page_address
(
vmalloc_to_page
(
adr
));
ret
=
virt_to_bus
((
void
*
)
kva
);
MDEBUG
(
printk
(
"uv2b(%lx-->%lx)"
,
adr
,
ret
));
return
ret
;
...
...
@@ -156,7 +156,7 @@ static inline unsigned long kvirt_to_bus(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
virt_to_bus
((
void
*
)
kva
);
MDEBUG
(
printk
(
"kv2b(%lx-->%lx)"
,
adr
,
ret
));
return
ret
;
...
...
@@ -171,7 +171,7 @@ static inline unsigned long kvirt_to_pa(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
__pa
(
kva
);
MDEBUG
(
printk
(
"kv2pa(%lx-->%lx)"
,
adr
,
ret
));
return
ret
;
...
...
drivers/media/video/cpia.c
View file @
98cb97ef
...
...
@@ -189,7 +189,7 @@ static inline unsigned long kvirt_to_pa(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
__pa
(
kva
);
return
ret
;
}
...
...
drivers/media/video/meye.c
View file @
98cb97ef
...
...
@@ -126,7 +126,7 @@ static inline unsigned long kvirt_to_pa(unsigned long adr) {
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
__pa
(
kva
);
MDEBUG
(
printk
(
"kv2pa(%lx-->%lx)
\n
"
,
adr
,
ret
));
return
ret
;
...
...
drivers/usb/ov511.c
View file @
98cb97ef
...
...
@@ -383,7 +383,7 @@ kvirt_to_pa(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
__pa
(
kva
);
return
ret
;
}
...
...
drivers/usb/pwc-if.c
View file @
98cb97ef
...
...
@@ -187,7 +187,7 @@ static inline unsigned long kvirt_to_pa(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
__pa
(
kva
);
return
ret
;
}
...
...
drivers/usb/se401.c
View file @
98cb97ef
...
...
@@ -92,7 +92,7 @@ static inline unsigned long kvirt_to_pa(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
__pa
(
kva
);
return
ret
;
}
...
...
drivers/usb/usbvideo.c
View file @
98cb97ef
...
...
@@ -71,7 +71,7 @@ unsigned long usbvideo_kvirt_to_pa(unsigned long adr)
unsigned
long
va
,
kva
,
ret
;
va
=
VMALLOC_VMADDR
(
adr
);
kva
=
page_address
(
vmalloc_to_page
(
pgd_offset_k
(
va
),
va
));
kva
=
page_address
(
vmalloc_to_page
(
va
));
ret
=
__pa
(
kva
);
MDEBUG
(
printk
(
"kv2pa(%lx-->%lx)"
,
adr
,
ret
));
return
ret
;
...
...
include/linux/mm.h
View file @
98cb97ef
...
...
@@ -514,7 +514,7 @@ static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * m
extern
struct
vm_area_struct
*
find_extend_vma
(
struct
mm_struct
*
mm
,
unsigned
long
addr
);
extern
struct
page
*
vmalloc_to_page
(
pgd_t
*
pgd
,
unsigned
long
adr
);
extern
struct
page
*
vmalloc_to_page
(
unsigned
long
adr
);
#endif
/* __KERNEL__ */
...
...
mm/memory.c
View file @
98cb97ef
...
...
@@ -1475,9 +1475,10 @@ int make_pages_present(unsigned long addr, unsigned long end)
/*
* Map a vmalloc()-space virtual address to the physical page.
*/
struct
page
*
vmalloc_to_page
(
pgd_t
*
pgd
,
unsigned
long
addr
)
struct
page
*
vmalloc_to_page
(
unsigned
long
addr
)
{
struct
page
*
page
=
NULL
;
pgd_t
*
pgd
=
pgd_offset_k
(
addr
);
pmd_t
*
pmd
;
pte_t
*
ptep
,
pte
;
...
...
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