diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-17 12:56:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-17 12:56:11 -0400 |
commit | b9836e08375d86834edcde45e3628e63db8b9624 (patch) | |
tree | a173fe2ab6fbc3e5b44f19faecd50a65efa9cfdd /drivers/char | |
parent | 6566abdbd0566fc1b5950c9f87ef57c7443d6fa8 (diff) | |
parent | 0917798d82212f884fff650e7e520de3b438f947 (diff) |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: fix microcode driver newly spewing warnings
x86, PAT: Remove page granularity tracking for vm_insert_pfn maps
x86: disable X86_PTRACE_BTS for now
x86, documentation: kernel-parameters replace X86-32,X86-64 with X86
x86: pci-swiotlb.c swiotlb_dma_ops should be static
x86, PAT: Remove duplicate memtype reserve in devmem mmap
x86, PAT: Consolidate code in pat_x_mtrr_type() and reserve_memtype()
x86, PAT: Changing memtype to WC ensuring no WB alias
x86, PAT: Handle faults cleanly in set_memory_ APIs
x86, PAT: Change order of cpa and free in set_memory_wb
x86, CPA: Change idmap attribute before ioremap attribute setup
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/mem.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 3586b3b3df3f..8f05c38c2f06 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -301,33 +301,7 @@ static inline int private_mapping_ok(struct vm_area_struct *vma) | |||
301 | } | 301 | } |
302 | #endif | 302 | #endif |
303 | 303 | ||
304 | void __attribute__((weak)) | ||
305 | map_devmem(unsigned long pfn, unsigned long len, pgprot_t prot) | ||
306 | { | ||
307 | /* nothing. architectures can override. */ | ||
308 | } | ||
309 | |||
310 | void __attribute__((weak)) | ||
311 | unmap_devmem(unsigned long pfn, unsigned long len, pgprot_t prot) | ||
312 | { | ||
313 | /* nothing. architectures can override. */ | ||
314 | } | ||
315 | |||
316 | static void mmap_mem_open(struct vm_area_struct *vma) | ||
317 | { | ||
318 | map_devmem(vma->vm_pgoff, vma->vm_end - vma->vm_start, | ||
319 | vma->vm_page_prot); | ||
320 | } | ||
321 | |||
322 | static void mmap_mem_close(struct vm_area_struct *vma) | ||
323 | { | ||
324 | unmap_devmem(vma->vm_pgoff, vma->vm_end - vma->vm_start, | ||
325 | vma->vm_page_prot); | ||
326 | } | ||
327 | |||
328 | static struct vm_operations_struct mmap_mem_ops = { | 304 | static struct vm_operations_struct mmap_mem_ops = { |
329 | .open = mmap_mem_open, | ||
330 | .close = mmap_mem_close, | ||
331 | #ifdef CONFIG_HAVE_IOREMAP_PROT | 305 | #ifdef CONFIG_HAVE_IOREMAP_PROT |
332 | .access = generic_access_phys | 306 | .access = generic_access_phys |
333 | #endif | 307 | #endif |
@@ -362,7 +336,6 @@ static int mmap_mem(struct file * file, struct vm_area_struct * vma) | |||
362 | vma->vm_pgoff, | 336 | vma->vm_pgoff, |
363 | size, | 337 | size, |
364 | vma->vm_page_prot)) { | 338 | vma->vm_page_prot)) { |
365 | unmap_devmem(vma->vm_pgoff, size, vma->vm_page_prot); | ||
366 | return -EAGAIN; | 339 | return -EAGAIN; |
367 | } | 340 | } |
368 | return 0; | 341 | return 0; |