Fix detection of ARMv7 minimum cache line lengths
Detail: s/ARMops - Replace the code to calculate the minimum cache line lengths with something much simpler which reads the values directly from the cache type register. The old code was buggy in two ways: (a) the cache size identification register stores the line length as log2(num words)-2, whereas the code throughout the kernel was expecting it to be log2(num bytes)-2 (b) the loop is structured so that it will try and read the details of a non-existent cache level. although it doesn't read anything from CP15, it does result in the minimum cache line length values getting clobbered The net result of the above two bugs being that the OS would treat the CPU as if the minimum line length was just 4 bytes (although other than slowing down cache maintenance ops, this shouldn't have had any bad side-effects) The cache type register directly contains the minimum line lengths as log2(num bytes)-2, so by switching over to use that everything is now fine. Admin: Tested on BB-xM, Pandaboard Fixes issue spotted by Willi Theiss Version 5.35, 4.79.2.251. Tagged as 'Kernel-5_35-4_79_2_251'
Showing
Please register or sign in to comment