diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2005-10-30 21:00:04 +0000 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2005-10-30 21:00:04 +0000 |
| commit | 07b188ab773e183871e57b33ae37bf635c9f12ba (patch) | |
| tree | 311df8a0dd12fb7bd3e9b5b1a5ca500f0428d679 /arch/mips/mm/highmem.c | |
| parent | 47c564e10f219f867bdb49225972749a43485a47 (diff) | |
| parent | 9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43 (diff) | |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'arch/mips/mm/highmem.c')
| -rw-r--r-- | arch/mips/mm/highmem.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c index dd5e2e31885b..1f7b37b38f5c 100644 --- a/arch/mips/mm/highmem.c +++ b/arch/mips/mm/highmem.c @@ -83,6 +83,25 @@ void __kunmap_atomic(void *kvaddr, enum km_type type) preempt_check_resched(); } +/* + * This is the same as kmap_atomic() but can map memory that doesn't + * have a struct page associated with it. + */ +void *kmap_atomic_pfn(unsigned long pfn, enum km_type type) +{ + enum fixed_addresses idx; + unsigned long vaddr; + + inc_preempt_count(); + + idx = type + KM_TYPE_NR*smp_processor_id(); + vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); + set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot)); + flush_tlb_one(vaddr); + + return (void*) vaddr; +} + struct page *__kmap_atomic_to_page(void *ptr) { unsigned long idx, vaddr = (unsigned long)ptr; |
