From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Sat, 17 Oct 2015 14:54:57 +0800 Subject: [U-Boot] [PATCH v3] nios2: convert cache flush to use dm cpu data In-Reply-To: <201510170100.05843.marex@denx.de> References: <1444119600-31999-1-git-send-email-thomas@wytron.com.t> <1444786719-31736-1-git-send-email-thomas@wytron.com.tw> <201510170100.05843.marex@denx.de> Message-ID: <5621F0C1.6070906@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, On 10/17/2015 07:00 AM, Marek Vasut wrote: >> +static void __flush_dcache(unsigned long start, unsigned long end) >> +{ >> + unsigned long addr; >> + >> + start &= ~(gd->arch.dcache_line_size - 1); >> + end += (gd->arch.dcache_line_size - 1); >> + end &= ~(gd->arch.dcache_line_size - 1); > > I really don't think we should do this alignment here :-( The rounding to get flush range is necessary to keep it confirm to the interface defined in linux/Documentation/cachetlb.txt. Removing the rounding and adding "range check and keep" is a violation to the common interface. You cannot agree to the common interface and, at the same time, insist on changing the definition by your own. Best regards, Thomas