[PATCH] nvme: Fix cache alignment

Marek Vasut marek.vasut at gmail.com
Mon Feb 8 16:51:31 CET 2021


On 2/8/21 4:11 PM, Bin Meng wrote:
[...]
>> As I said: I don't see how this patch changes anything on arm64, which
>> the commit messages claims to be the reason for this post.
>> If someone please can confirm, but invalidate_dcache_range() always
>> works on arm64, in fact does the very rounding already that this patch
>> introduces here. So what is the actual fix here?
>>
>> Plus, I consider this blanket rounding more harmful than helpful, since
>> it actually just silences the check_cache_range() check.
>>
>> If we include armv7 here, which in fact would ignore(!) an unaligned
>> invalidate, this is my analysis (just for invalidate):
>> nvme_read_completion_status():          NEEDS ALIGNMENT
>>          size smaller than cache line, cqes[1] base address unaligned.
>>          fix needed, rounding *could* be a temporary fix with comments
>>          as of why this is legitimate in this case.
>>          Better alternative sketched in a previous email.
> 
> This is exactly what I mentioned before [1]. The only problematic
> routine is the nvme_read_completion_status() but I didn't have time to
> experiment with a fix.

I believe it is better to have one single function to handle all the 
cache alignment and operations in the driver instead of having copy of 
the same alignment thing all over the driver.
[...]


More information about the U-Boot mailing list