Skip to content

Commit 26eaed4

Browse files
committed
Merge tag 'mips_fixes_4.20_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fixes from Paul Burton: "A couple of small MIPS fixes for 4.20: - Extend an array to avoid overruns on some Octeon hardware, fixing a bug introduced in 4.3. - Fix a coherent DMA regression for systems without cache-coherent DMA introduced in the 4.20 merge window" * tag 'mips_fixes_4.20_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Fix `dma_alloc_coherent' returning a non-coherent allocation MIPS: OCTEON: fix out of bounds array access on CN68XX
2 parents 3541833 + d01501f commit 26eaed4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/mips/cavium-octeon/executive/cvmx-helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void (*cvmx_override_pko_queue_priority) (int pko_port,
6767
void (*cvmx_override_ipd_port_setup) (int ipd_port);
6868

6969
/* Port count per interface */
70-
static int interface_port_count[5];
70+
static int interface_port_count[9];
7171

7272
/**
7373
* Return the number of interfaces the chip has. Each interface

arch/mips/mm/dma-noncoherent.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void *arch_dma_alloc(struct device *dev, size_t size,
5050
void *ret;
5151

5252
ret = dma_direct_alloc_pages(dev, size, dma_handle, gfp, attrs);
53-
if (!ret && !(attrs & DMA_ATTR_NON_CONSISTENT)) {
53+
if (ret && !(attrs & DMA_ATTR_NON_CONSISTENT)) {
5454
dma_cache_wback_inv((unsigned long) ret, size);
5555
ret = (void *)UNCAC_ADDR(ret);
5656
}

0 commit comments

Comments
 (0)