Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182139
b: refs/heads/master
c: 541247f
h: refs/heads/master
i:
  182137: b66852c
  182135: 49e6a3c
v: v3
  • Loading branch information
David Daney authored and Ralf Baechle committed Feb 27, 2010
1 parent c2329b0 commit fed5204
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 399614226cfa45ffaba45b269e8af9ddc26de537
refs/heads/master: 541247f4d26f90ce0d277082d108feb121b6ae03
10 changes: 5 additions & 5 deletions trunk/arch/mips/cavium-octeon/dma-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct bar1_index_state {
};

#ifdef CONFIG_PCI
static DEFINE_SPINLOCK(bar1_lock);
static DEFINE_RAW_SPINLOCK(bar1_lock);
static struct bar1_index_state bar1_state[32];
#endif

Expand Down Expand Up @@ -198,7 +198,7 @@ dma_addr_t octeon_map_dma_mem(struct device *dev, void *ptr, size_t size)
start_index = 31;

/* Only one processor can access the Bar register at once */
spin_lock_irqsave(&bar1_lock, flags);
raw_spin_lock_irqsave(&bar1_lock, flags);

/* Look through Bar1 for existing mapping that will work */
for (index = start_index; index >= 0; index--) {
Expand Down Expand Up @@ -250,7 +250,7 @@ dma_addr_t octeon_map_dma_mem(struct device *dev, void *ptr, size_t size)
(unsigned long long) physical);

done_unlock:
spin_unlock_irqrestore(&bar1_lock, flags);
raw_spin_unlock_irqrestore(&bar1_lock, flags);
done:
pr_debug("dma_map_single 0x%llx->0x%llx\n", physical, result);
return result;
Expand Down Expand Up @@ -324,14 +324,14 @@ void octeon_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr)
"Attempt to unmap an invalid address (0x%llx)\n",
dma_addr);

spin_lock_irqsave(&bar1_lock, flags);
raw_spin_lock_irqsave(&bar1_lock, flags);
bar1_state[index].ref_count--;
if (bar1_state[index].ref_count == 0)
octeon_npi_write32(CVMX_NPI_PCI_BAR1_INDEXX(index), 0);
else if (unlikely(bar1_state[index].ref_count < 0))
panic("dma_unmap_single: Bar1[%u] reference count < 0\n",
(int) index);
spin_unlock_irqrestore(&bar1_lock, flags);
raw_spin_unlock_irqrestore(&bar1_lock, flags);
done:
pr_debug("dma_unmap_single 0x%llx\n", dma_addr);
return;
Expand Down

0 comments on commit fed5204

Please sign in to comment.