OSDN Git Service

Merge 3.7-rc6 into char-misc-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Nov 2012 02:21:36 +0000 (18:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Nov 2012 02:21:36 +0000 (18:21 -0800)
1  2 
arch/arm/include/asm/io.h
mm/mmap.c

@@@ -64,7 -64,7 +64,7 @@@ extern void __raw_readsl(const void __i
  static inline void __raw_writew(u16 val, volatile void __iomem *addr)
  {
        asm volatile("strh %1, %0"
-                    : "+Qo" (*(volatile u16 __force *)addr)
+                    : "+Q" (*(volatile u16 __force *)addr)
                     : "r" (val));
  }
  
@@@ -72,7 -72,7 +72,7 @@@ static inline u16 __raw_readw(const vol
  {
        u16 val;
        asm volatile("ldrh %1, %0"
-                    : "+Qo" (*(volatile u16 __force *)addr),
+                    : "+Q" (*(volatile u16 __force *)addr),
                       "=r" (val));
        return val;
  }
@@@ -374,7 -374,7 +374,7 @@@ extern void pci_iounmap(struct pci_dev 
  
  #ifdef CONFIG_MMU
  #define ARCH_HAS_VALID_PHYS_ADDR_RANGE
 -extern int valid_phys_addr_range(unsigned long addr, size_t size);
 +extern int valid_phys_addr_range(phys_addr_t addr, size_t size);
  extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
  extern int devmem_is_allowed(unsigned long pfn);
  #endif
diff --combined mm/mmap.c
+++ b/mm/mmap.c
@@@ -89,20 -89,6 +89,20 @@@ int sysctl_max_map_count __read_mostly 
  struct percpu_counter vm_committed_as ____cacheline_aligned_in_smp;
  
  /*
 + * The global memory commitment made in the system can be a metric
 + * that can be used to drive ballooning decisions when Linux is hosted
 + * as a guest. On Hyper-V, the host implements a policy engine for dynamically
 + * balancing memory across competing virtual machines that are hosted.
 + * Several metrics drive this policy engine including the guest reported
 + * memory commitment.
 + */
 +unsigned long vm_memory_committed(void)
 +{
 +      return percpu_counter_read_positive(&vm_committed_as);
 +}
 +EXPORT_SYMBOL_GPL(vm_memory_committed);
 +
 +/*
   * Check that a process has enough memory to allocate a new virtual
   * mapping. 0 means there is enough memory for the allocation to
   * succeed and -ENOMEM implies there is not.
@@@ -348,8 -334,10 +348,10 @@@ void validate_mm(struct mm_struct *mm
        struct vm_area_struct *vma = mm->mmap;
        while (vma) {
                struct anon_vma_chain *avc;
+               vma_lock_anon_vma(vma);
                list_for_each_entry(avc, &vma->anon_vma_chain, same_vma)
                        anon_vma_interval_tree_verify(avc);
+               vma_unlock_anon_vma(vma);
                vma = vma->vm_next;
                i++;
        }