Re: [U-Boot] [PATCH] ARMv8: fix bug for flush data cache by set/way

2014-04-07 Thread Scott Wood
On Mon, 2014-03-31 at 09:50 +0800, Leo Yan wrote: > When flush the d$ with set/way instruction, it need calculate the way's > offset = log2(Associativity); but in current uboot's code, it use below > formula to calculate the offset: log2(Associativity * 2 - 1), so finally > it cannot flush data cac

Re: [U-Boot] [PATCH] ARMv8: fix bug for flush data cache by set/way

2014-04-07 Thread Albert ARIBAUD
Hi Leo, On Mon, 31 Mar 2014 09:50:35 +0800, Leo Yan wrote: > When flush the d$ with set/way instruction, it need calculate the way's > offset = log2(Associativity); but in current uboot's code, it use below > formula to calculate the offset: log2(Associativity * 2 - 1), so finally > it cannot fl

Re: [U-Boot] [PATCH] ARMv8: fix bug for flush data cache by set/way

2014-04-01 Thread FengHua
> -Original Messages- > From: "Leo Yan" > Sent Time: 2014-03-31 09:11:47 (Monday) > To: u-boot@lists.denx.de, "David Feng" , "Scott Wood" > > Cc: "Leo Yan" > Subject: [PATCH] ARMv8: fix bug for flush data cache by set/way > > When flush the d$ with set/way instruction, it need calcu

Re: [U-Boot] [PATCH] ARMv8: fix bug for flush data cache by set/way

2014-04-01 Thread Leo Yan
hi David, On 04/01/2014 11:25 AM, feng...@phytium.com.cn wrote: hi Leo, Please reference ARMv8-TRM, the associativity field does not have to be a power of 2. I made the same mistake with you previously and scott identify this. *发件人:* Leo Yan *发送时间:* ‎2014‎年

Re: [U-Boot] [PATCH] ARMv8: fix bug for flush data cache by set/way

2014-04-01 Thread Leo Yan
hi David, I have checked the ARMv8's Architecture Reference Manual DDI0487A_a_armv8_arm.pdf chapter "C4.4.1 DC CISW, Data or unified Cache line Clean and Invalidate by Set/Way", u can see the description as below: SetWay, bits [31:4] Contains two fields: • Way, bits[31:32-A], the number of th

[U-Boot] [PATCH] ARMv8: fix bug for flush data cache by set/way

2014-03-30 Thread Leo Yan
When flush the d$ with set/way instruction, it need calculate the way's offset = log2(Associativity); but in current uboot's code, it use below formula to calculate the offset: log2(Associativity * 2 - 1), so finally it cannot flush data cache properly. Signed-off-by: Leo Yan --- arch/arm/cpu/ar