Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 160979
b: refs/heads/master
c: 7929eb9
h: refs/heads/master
i:
  160977: 8463640
  160975: f494cd3
v: v3
  • Loading branch information
Nicolas Pitre authored and Russell King committed Sep 4, 2009
1 parent dc9955b commit 9f7bb65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c47a830c08a26a7c210ae16a0ffe3f56ba86ea69
refs/heads/master: 7929eb9cf643ae416e5081b2a6fa558d37b9854c
8 changes: 8 additions & 0 deletions trunk/arch/arm/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ void *kmap_atomic(struct page *page, enum km_type type)
{
unsigned int idx;
unsigned long vaddr;
void *kmap;

pagefault_disable();
if (!PageHighMem(page))
return page_address(page);

kmap = kmap_high_get(page);
if (kmap)
return kmap;

idx = type + KM_TYPE_NR * smp_processor_id();
vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
#ifdef CONFIG_DEBUG_HIGHMEM
Expand Down Expand Up @@ -80,6 +85,9 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
#else
(void) idx; /* to kill a warning */
#endif
} else if (vaddr >= PKMAP_ADDR(0) && vaddr < PKMAP_ADDR(LAST_PKMAP)) {
/* this address was obtained through kmap_high_get() */
kunmap_high(pte_page(pkmap_page_table[PKMAP_NR(vaddr)]));
}
pagefault_enable();
}
Expand Down

0 comments on commit 9f7bb65

Please sign in to comment.