Skip to content

Commit

Permalink
Merge git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Browse files Browse the repository at this point in the history
Pull MIPS fixes from Ralf Baechle:

 - Fix a comment

 - A small cleanup the main purpose of which is to work around an
   internal compiler error bug in certain Codesource toolchains.

* git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: mm: Move some checks out of 'for' loop in DMA operations
  MIPS: cpu-features.h: s/MIPS53/MIPS64/
  • Loading branch information
Linus Torvalds committed Sep 25, 2013
2 parents 06367d5 + 55c25c2 commit b482041
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion arch/mips/include/asm/cpu-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@

/*
* MIPS32, MIPS64, VR5500, IDT32332, IDT32334 and maybe a few other
* pre-MIPS32/MIPS53 processors have CLO, CLZ. The IDT RC64574 is 64-bit and
* pre-MIPS32/MIPS64 processors have CLO, CLZ. The IDT RC64574 is 64-bit and
* has CLO and CLZ but not DCLO nor DCLZ. For 64-bit kernels
* cpu_has_clo_clz also indicates the availability of DCLO and DCLZ.
*/
Expand Down
12 changes: 4 additions & 8 deletions arch/mips/mm/dma-default.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,25 +308,21 @@ static void mips_dma_sync_sg_for_cpu(struct device *dev,
{
int i;

/* Make sure that gcc doesn't leave the empty loop body. */
for (i = 0; i < nelems; i++, sg++) {
if (cpu_needs_post_dma_flush(dev))
if (cpu_needs_post_dma_flush(dev))
for (i = 0; i < nelems; i++, sg++)
__dma_sync(sg_page(sg), sg->offset, sg->length,
direction);
}
}

static void mips_dma_sync_sg_for_device(struct device *dev,
struct scatterlist *sg, int nelems, enum dma_data_direction direction)
{
int i;

/* Make sure that gcc doesn't leave the empty loop body. */
for (i = 0; i < nelems; i++, sg++) {
if (!plat_device_is_coherent(dev))
if (!plat_device_is_coherent(dev))
for (i = 0; i < nelems; i++, sg++)
__dma_sync(sg_page(sg), sg->offset, sg->length,
direction);
}
}

int mips_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
Expand Down

0 comments on commit b482041

Please sign in to comment.