diff options
author | Paul Mackerras <paulus@samba.org> | 2007-09-13 11:24:25 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-09-13 11:24:25 -0400 |
commit | b2315372eac9cd9f622c32a93e323cf6f0f03462 (patch) | |
tree | 9e1faa7cdcddf5d90bec4fb9523742d4cce699a1 /arch/i386/mm | |
parent | 5326152fa182b0a16e4abf913ce403e3c7ab53b7 (diff) | |
parent | c87ce65868bbf9bbea9c3f112ff8315302daf8f2 (diff) |
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'arch/i386/mm')
-rw-r--r-- | arch/i386/mm/highmem.c | 7 | ||||
-rw-r--r-- | arch/i386/mm/hugetlbpage.c | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c index ad8d86cc683e..1c3bf95f7356 100644 --- a/arch/i386/mm/highmem.c +++ b/arch/i386/mm/highmem.c | |||
@@ -34,17 +34,16 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot) | |||
34 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ | 34 | /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */ |
35 | pagefault_disable(); | 35 | pagefault_disable(); |
36 | 36 | ||
37 | idx = type + KM_TYPE_NR*smp_processor_id(); | ||
38 | BUG_ON(!pte_none(*(kmap_pte-idx))); | ||
39 | |||
40 | if (!PageHighMem(page)) | 37 | if (!PageHighMem(page)) |
41 | return page_address(page); | 38 | return page_address(page); |
42 | 39 | ||
40 | idx = type + KM_TYPE_NR*smp_processor_id(); | ||
43 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 41 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |
42 | BUG_ON(!pte_none(*(kmap_pte-idx))); | ||
44 | set_pte(kmap_pte-idx, mk_pte(page, prot)); | 43 | set_pte(kmap_pte-idx, mk_pte(page, prot)); |
45 | arch_flush_lazy_mmu_mode(); | 44 | arch_flush_lazy_mmu_mode(); |
46 | 45 | ||
47 | return (void*) vaddr; | 46 | return (void *)vaddr; |
48 | } | 47 | } |
49 | 48 | ||
50 | void *kmap_atomic(struct page *page, enum km_type type) | 49 | void *kmap_atomic(struct page *page, enum km_type type) |
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index efdf95ac8031..6c06d9c0488e 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c | |||
@@ -367,7 +367,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
367 | return -ENOMEM; | 367 | return -ENOMEM; |
368 | 368 | ||
369 | if (flags & MAP_FIXED) { | 369 | if (flags & MAP_FIXED) { |
370 | if (prepare_hugepage_range(addr, len, pgoff)) | 370 | if (prepare_hugepage_range(addr, len)) |
371 | return -EINVAL; | 371 | return -EINVAL; |
372 | return addr; | 372 | return addr; |
373 | } | 373 | } |