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: <54475E41.3030205@atmel.com>
Date:	Wed, 22 Oct 2014 15:35:29 +0800
From:	Josh Wu <josh.wu@...el.com>
To:	Vinod Koul <vinod.koul@...el.com>,
	Herve Codina <herve.codina@...ad.com>
CC:	"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"David Woodhouse" <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	Jingoo Han <jg1.han@...sung.com>,
	EzequielGarcia <ezequiel.garcia@...e-electrons.com>,
	Mark Brown <broonie@...aro.org>,
	Nicolas Ferre <nicolas.ferre@...el.com>,
	BartlomiejZolnierkiewicz <b.zolnierkie@...sung.com>,
	Bo Shen <voice.shen@...el.com>,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michael Grzeschik <m.grzeschik@...gutronix.de>,
	Josh Triplett <josh@...htriplett.org>,
	Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
	HuangShijie <shijie8@...il.com>,
	Michael Opdenacker <michael.opdenacker@...e-electrons.com>
Subject: Re: [PATCH 1/2] mtd: atmel_nand: use __iowrite32_copy for 32 bitcopy

Hi,

On 10/21/2014 6:35 PM, Vinod Koul wrote:
> On Tue, Oct 21, 2014 at 12:20:06PM +0200, Herve Codina wrote:
>> Hi,
> Please don't top post
>> I didn't go deeper in atmel_nand.c code to see other accesses but old
>> copy use writel_relaxed which is a macro to __raw_writel((__force u32)
>> cpu_to_le32(v),c)
>>
>> __iowrite32_copy use directly __raw_writel(*src++, dst++)
>>
>> So we skip cpu_to_le32. Is it ok for all system using atmel_nand ?
> Also would be a good question if we need barriers as __iowrite32_copy()
> doesn't guarantee any ordering.
>

Just diving the code, I found the atmel-nand code use this function to 
transfer write these buffer to NFC sram.
And the NFC sram is not io space.
Also there should has no issue in barriers as it is in a SRAM.

So I think right way is use memcpy function to replace the 
ioread32/iowrite32. Since we use them for SRAM transfer not IO.
I'll prepare a new patch which do above replace.

Best Regards,
Josh Wu
--
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