Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42661
b: refs/heads/master
c: ad76fb6
h: refs/heads/master
i:
  42659: 46e101e
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed Dec 7, 2006
1 parent 4ae3802 commit cfd24ec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a866374aecc90c7d90619727ccd851ac096b2fc7
refs/heads/master: ad76fb6b5a5183255279e0ab5260715481770678
10 changes: 8 additions & 2 deletions trunk/include/asm-mips/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/uaccess.h>
#include <asm/kmap_types.h>

/* undef for production */
Expand Down Expand Up @@ -70,11 +71,16 @@ static inline void *kmap(struct page *page)

static inline void *kmap_atomic(struct page *page, enum km_type type)
{
pagefault_disable();
return page_address(page);
}

static inline void kunmap_atomic(void *kvaddr, enum km_type type) { }
#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn))
static inline void kunmap_atomic(void *kvaddr, enum km_type type)
{
pagefault_enable();
}

#define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx))

#define kmap_atomic_to_page(ptr) virt_to_page(ptr)

Expand Down
8 changes: 5 additions & 3 deletions trunk/include/linux/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/uaccess.h>

#include <asm/cacheflush.h>

Expand Down Expand Up @@ -41,9 +42,10 @@ static inline void *kmap(struct page *page)

#define kunmap(page) do { (void) (page); } while (0)

#define kmap_atomic(page, idx) page_address(page)
#define kunmap_atomic(addr, idx) do { } while (0)
#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn))
#define kmap_atomic(page, idx) \
({ pagefault_disable(); page_address(page); })
#define kunmap_atomic(addr, idx) do { pagefault_enable(); } while (0)
#define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx))
#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
#endif

Expand Down

0 comments on commit cfd24ec

Please sign in to comment.