]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: cacheinfo: Update cache_line_size detected from DT or PPTT
authorShaokun Zhang <zhangshaokun@hisilicon.com>
Tue, 28 May 2019 02:16:54 +0000 (10:16 +0800)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 4 Jun 2019 12:47:35 +0000 (13:47 +0100)
commitefccb1c3fa9c70b8fb8b5236a9a7104eff8ee3d2
tree11ca9370d6a563b3e6703cf9b832aa42dc6d562e
parent4d7c000ce0f3ed222ddb9fe1943fe0b47fa24130
arm64: cacheinfo: Update cache_line_size detected from DT or PPTT

cache_line_size is derived from CTR_EL0.CWG field and is called mostly
for I/O device drivers. For some platforms like the HiSilicon Kunpeng920
server SoC, cache line sizes are different between L1/2 cache and L3
cache while L1 cache line size is 64-byte and L3 is 128-byte, but
CTR_EL0.CWG is misreporting using L1 cache line size.

We shall correct the right value which is important for I/O performance.
Let's update the cache line size if it is detected from DT or PPTT
information.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>
Cc: Zhenfa Qiu <qiuzhenfa@hisilicon.com>
Reported-by: Zhenfa Qiu <qiuzhenfa@hisilicon.com>
Suggested-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cache.h
arch/arm64/kernel/cacheinfo.c