Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39883433 authored by Sonic Zhang's avatar Sonic Zhang Committed by Mike Frysinger
Browse files

Blackfin: no-mpu: fix masking of small uncached dma region



When using an uncached DMA region less than 1 MiB, we try to mask off
the whole last 1 MiB for it.  Unfortunately, this fails as we forgot
to subtract one from the calculated mask, leading to the region still
be marked as cacheable.

Reported-by: default avatarAndrew Rook <andrew.rook@speakerbus.co.uk>
Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 36e11ab2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -116,7 +116,7 @@ void __init generate_cplb_tables_all(void)
	    ((_ramend - uncached_end) >= 1 * 1024 * 1024))
	    ((_ramend - uncached_end) >= 1 * 1024 * 1024))
		dcplb_bounds[i_d].eaddr = uncached_end;
		dcplb_bounds[i_d].eaddr = uncached_end;
	else
	else
		dcplb_bounds[i_d].eaddr = uncached_end & ~(1 * 1024 * 1024);
		dcplb_bounds[i_d].eaddr = uncached_end & ~(1 * 1024 * 1024 - 1);
	dcplb_bounds[i_d++].data = SDRAM_DGENERIC;
	dcplb_bounds[i_d++].data = SDRAM_DGENERIC;
	/* DMA uncached region.  */
	/* DMA uncached region.  */
	if (DMA_UNCACHED_REGION) {
	if (DMA_UNCACHED_REGION) {