Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 00:34:48 +0000 (16:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 00:34:48 +0000 (16:34 -0800)
Pull sparc updates from David Miller:
 "Just a couple of fixes/cleanups:

   - Correct NUMA latency calculations on sparc64, from Nitin Gupta.

   - ASI_ST_BLKINIT_MRU_S value was wrong, from Rob Gardner.

   - Fix non-faulting load handling of non-quad values, also from Rob
     Gardner.

   - Cleanup VISsave assembler, from Sam Ravnborg.

   - Fix iommu-common code so it doesn't emit rediculous warnings on
     some architectures, particularly ARM"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix numa distance values
  sparc64: Don't restrict fp regs for no-fault loads
  iommu-common: Fix error code used in iommu_tbl_range_{alloc,free}().
  sparc64: use ENTRY/ENDPROC in VISsave
  sparc64: Fix incorrect ASI_ST_BLKINIT_MRU_S value

1  2 
lib/iommu-common.c

diff --combined lib/iommu-common.c
  #include <linux/dma-mapping.h>
  #include <linux/hash.h>
  
- #ifndef       DMA_ERROR_CODE
- #define       DMA_ERROR_CODE (~(dma_addr_t)0x0)
- #endif
  static unsigned long iommu_large_alloc = 15;
  
  static        DEFINE_PER_CPU(unsigned int, iommu_hash_common);
  
  static inline bool need_flush(struct iommu_map_table *iommu)
  {
 -      return (iommu->lazy_flush != NULL &&
 -              (iommu->flags & IOMMU_NEED_FLUSH) != 0);
 +      return ((iommu->flags & IOMMU_NEED_FLUSH) != 0);
  }
  
  static inline void set_flush(struct iommu_map_table *iommu)
@@@ -123,7 -120,7 +119,7 @@@ unsigned long iommu_tbl_range_alloc(str
        /* Sanity check */
        if (unlikely(npages == 0)) {
                WARN_ON_ONCE(1);
-               return DMA_ERROR_CODE;
+               return IOMMU_ERROR_CODE;
        }
  
        if (largealloc) {
                        goto again;
                } else {
                        /* give up */
-                       n = DMA_ERROR_CODE;
+                       n = IOMMU_ERROR_CODE;
                        goto bail;
                }
        }
 -      if (n < pool->hint || need_flush(iommu)) {
 +      if (iommu->lazy_flush &&
 +          (n < pool->hint || need_flush(iommu))) {
                clear_flush(iommu);
                iommu->lazy_flush(iommu);
        }
@@@ -259,7 -255,7 +255,7 @@@ void iommu_tbl_range_free(struct iommu_
        unsigned long flags;
        unsigned long shift = iommu->table_shift;
  
-       if (entry == DMA_ERROR_CODE) /* use default addr->entry mapping */
+       if (entry == IOMMU_ERROR_CODE) /* use default addr->entry mapping */
                entry = (dma_addr - iommu->table_map_base) >> shift;
        pool = get_pool(iommu, entry);