LoongArch: Fix shared cache size calculation
authorHuacai Chen <chenhuacai@loongson.cn>
Wed, 13 Jul 2022 10:00:41 +0000 (18:00 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 29 Jul 2022 10:22:33 +0000 (18:22 +0800)
commit1aea29d7c3569e5b6c40e73c51e9f4b2142c96ef
tree2273750572cd4be482eb7268c8230a40f7e798e8
parent317980e6b4d03884429f2cdaf51efd28f01b71b0
LoongArch: Fix shared cache size calculation

Current calculation of shared cache size is from the node (die) scope,
but we hope 'lscpu' to show the shared cache size of the whole package
for multi-die chips (e.g., Loongson-3C5000L, which contains 4 dies in
one package). So fix it by multiplying nodes_per_package.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/cacheinfo.c