lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54520DE4.9090008@imgtec.com>
Date:	Thu, 30 Oct 2014 10:07:32 +0000
From:	James Hogan <james.hogan@...tec.com>
To:	Leonid Yegoshin <Leonid.Yegoshin@...tec.com>,
	<linux-mips@...ux-mips.org>, <nbd@...nwrt.org>, <yanh@...ote.com>,
	<linux-kernel@...r.kernel.org>, <ralf@...ux-mips.org>,
	<alex.smith@...tec.com>, <taohl@...ote.com>, <chenhc@...ote.com>,
	<blogic@...nwrt.org>
Subject: Re: [PATCH] MIPS: DMA: fix coherent alloc in non-coherent systems

Hi Leonid,

On 30/10/14 01:48, Leonid Yegoshin wrote:
> A default dma_alloc_coherent() fails to alloc a coherent memory on non-coherent
> systems in case of device->coherent_dma_mask covering the whole memory space.
> 
> In case of non-coherent systems the coherent memory on MIPS is restricted by
> size of un-cachable segment and should be located in ZONE_DMA.

Has this pretty much always been broken?

> @@ -81,6 +81,11 @@ static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp)
>  		dma_flag = __GFP_DMA;
>  	else
>  #endif
> +#ifdef CONFIG_ZONE_DMA
> +	     if (coherent && !plat_device_is_coherent(dev))

Broken indentation. Please fix to use tabs.

> +			dma_flag = __GFP_DMA;
> +	else
> +#endif
>  #if defined(CONFIG_ZONE_DMA32) && defined(CONFIG_ZONE_DMA)
>  	     if (dev->coherent_dma_mask < DMA_BIT_MASK(32))
>  			dma_flag = __GFP_DMA;

Other than that, this patch looks okay to me (but those with more
experience with MIPS DMA than me may know better).

Reviewed-by: James Hogan <james.hogan@...tec.com>

Thanks
James
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ