Merge branches 'amd-iommu/fixes' and 'dma-debug/fixes' into iommu/fixes
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 22 Jan 2010 17:00:41 +0000 (18:00 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 22 Jan 2010 17:00:41 +0000 (18:00 +0100)
1  2 
lib/dma-debug.c

diff --combined lib/dma-debug.c
index 7d2f0b33e5a82937d2fb615fe5bbbb0de3884777,e03995851e60d60163a3b5cf89e310ac7e85b6a1..ba8b67039d13eac2a81835a92d3241375fb43d3d
@@@ -587,7 -587,7 +587,7 @@@ out_unlock
        return count;
  }
  
- const struct file_operations filter_fops = {
static const struct file_operations filter_fops = {
        .read  = filter_read,
        .write = filter_write,
  };
@@@ -670,13 -670,14 +670,13 @@@ static int device_dma_allocations(struc
        return count;
  }
  
 -static int dma_debug_device_change(struct notifier_block *nb,
 -                                  unsigned long action, void *data)
 +static int dma_debug_device_change(struct notifier_block *nb, unsigned long action, void *data)
  {
        struct device *dev = data;
        int count;
  
        if (global_disable)
 -              return;
 +              return 0;
  
        switch (action) {
        case BUS_NOTIFY_UNBOUND_DRIVER:
@@@ -913,9 -914,6 +913,9 @@@ static void check_sync(struct device *d
                                ref->size);
        }
  
 +      if (entry->direction == DMA_BIDIRECTIONAL)
 +              goto out;
 +
        if (ref->direction != entry->direction) {
                err_printk(dev, entry, "DMA-API: device driver syncs "
                                "DMA memory with different direction "
                                dir2name[ref->direction]);
        }
  
 -      if (entry->direction == DMA_BIDIRECTIONAL)
 -              goto out;
 -
        if (to_cpu && !(entry->direction == DMA_FROM_DEVICE) &&
                      !(ref->direction == DMA_TO_DEVICE))
                err_printk(dev, entry, "DMA-API: device driver syncs "
  
  out:
        put_hash_bucket(bucket, &flags);
 -
  }
  
  void debug_dma_map_page(struct device *dev, struct page *page, size_t offset,