aboutsummaryrefslogtreecommitdiffstats
path: root/mm/highmem.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2008-03-19 20:00:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-19 21:53:35 -0400
commit77f6078aa8945a18a7780694940e52be0322c2b8 (patch)
tree89cab8be618e775993c8a899ef34dbbfe9901c1a /mm/highmem.c
parent1b578df02207a67a29e8ced4db3b36d89df52fef (diff)
mm: highmem kernel-doc additions
Add kernel-doc comments to highmem.c. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/highmem.c')
-rw-r--r--mm/highmem.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/mm/highmem.c b/mm/highmem.c
index 35d47733cde4..7da4a7b6af11 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -104,8 +104,9 @@ static void flush_all_zero_pkmaps(void)
104 flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP)); 104 flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP));
105} 105}
106 106
107/* Flush all unused kmap mappings in order to remove stray 107/**
108 mappings. */ 108 * kmap_flush_unused - flush all unused kmap mappings in order to remove stray mappings
109 */
109void kmap_flush_unused(void) 110void kmap_flush_unused(void)
110{ 111{
111 spin_lock(&kmap_lock); 112 spin_lock(&kmap_lock);
@@ -163,6 +164,14 @@ start:
163 return vaddr; 164 return vaddr;
164} 165}
165 166
167/**
168 * kmap_high - map a highmem page into memory
169 * @page: &struct page to map
170 *
171 * Returns the page's virtual memory address.
172 *
173 * We cannot call this from interrupts, as it may block.
174 */
166void *kmap_high(struct page *page) 175void *kmap_high(struct page *page)
167{ 176{
168 unsigned long vaddr; 177 unsigned long vaddr;
@@ -170,8 +179,6 @@ void *kmap_high(struct page *page)
170 /* 179 /*
171 * For highmem pages, we can't trust "virtual" until 180 * For highmem pages, we can't trust "virtual" until
172 * after we have the lock. 181 * after we have the lock.
173 *
174 * We cannot call this from interrupts, as it may block
175 */ 182 */
176 spin_lock(&kmap_lock); 183 spin_lock(&kmap_lock);
177 vaddr = (unsigned long)page_address(page); 184 vaddr = (unsigned long)page_address(page);
@@ -185,6 +192,10 @@ void *kmap_high(struct page *page)
185 192
186EXPORT_SYMBOL(kmap_high); 193EXPORT_SYMBOL(kmap_high);
187 194
195/**
196 * kunmap_high - map a highmem page into memory
197 * @page: &struct page to unmap
198 */
188void kunmap_high(struct page *page) 199void kunmap_high(struct page *page)
189{ 200{
190 unsigned long vaddr; 201 unsigned long vaddr;
@@ -259,6 +270,12 @@ static struct page_address_slot *page_slot(struct page *page)
259 return &page_address_htable[hash_ptr(page, PA_HASH_ORDER)]; 270 return &page_address_htable[hash_ptr(page, PA_HASH_ORDER)];
260} 271}
261 272
273/**
274 * page_address - get the mapped virtual address of a page
275 * @page: &struct page to get the virtual address of
276 *
277 * Returns the page's virtual address.
278 */
262void *page_address(struct page *page) 279void *page_address(struct page *page)
263{ 280{
264 unsigned long flags; 281 unsigned long flags;
@@ -288,6 +305,11 @@ done:
288 305
289EXPORT_SYMBOL(page_address); 306EXPORT_SYMBOL(page_address);
290 307
308/**
309 * set_page_address - set a page's virtual address
310 * @page: &struct page to set
311 * @virtual: virtual address to use
312 */
291void set_page_address(struct page *page, void *virtual) 313void set_page_address(struct page *page, void *virtual)
292{ 314{
293 unsigned long flags; 315 unsigned long flags;