Module Name: src Committed By: matt Date: Thu Feb 20 15:52:30 UTC 2014
Modified Files: src/sys/arch/arm/arm: cpufunc_asm_armv7.S Log Message: for non-of-power-2 sets, we need to round to next power of 2. (which is simply doubling the value and then subtracting 1). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/arm/cpufunc_asm_armv7.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/arm/cpufunc_asm_armv7.S diff -u src/sys/arch/arm/arm/cpufunc_asm_armv7.S:1.12 src/sys/arch/arm/arm/cpufunc_asm_armv7.S:1.13 --- src/sys/arch/arm/arm/cpufunc_asm_armv7.S:1.12 Sun Aug 18 06:28:18 2013 +++ src/sys/arch/arm/arm/cpufunc_asm_armv7.S Thu Feb 20 15:52:30 2014 @@ -243,6 +243,8 @@ ENTRY_NP(armv7_icache_inv_all) ubfx r2, r0, #13, #15 @ get num sets - 1 from CCSIDR ubfx r3, r0, #3, #10 @ get numways - 1 from CCSIDR + lsl r3, r3, #1 @ double + sub r3, r3, #1 @ subtract one (now rounded up) clz r1, r3 @ number of bits to MSB of way lsl r3, r3, r1 @ shift into position mov ip, #1 @ @@ -301,6 +303,8 @@ ENTRY_NP(armv7_dcache_inv_all) lsl r1, r1, ip @ r1 = set decr ubfx ip, r0, #3, #10 @ get numways - 1 from [to be discarded] CCSIDR + lsl ip, ip, #1 @ double + sub ip, ip, #1 @ subtract one (now rounded up) clz r2, ip @ number of bits to MSB of way lsl ip, ip, r2 @ shift by that into way position mov r0, #1 @ @@ -364,6 +368,8 @@ ENTRY_NP(armv7_dcache_wbinv_all) lsl r1, r1, ip @ r1 = set decr ubfx ip, r0, #3, #10 @ get numways - 1 from [to be discarded] CCSIDR + lsl ip, ip, #1 @ double + sub ip, ip, #1 @ subtract one (now rounded up) clz r2, ip @ number of bits to MSB of way lsl ip, ip, r2 @ shift by that into way position mov r0, #1 @