On Fri, 2013-02-15 at 14:37 +0000, Dietmar Eggemann wrote:
dropped linux-arm-kernel@lists.infradead.org linux-arm-kernel@lists.infradead.org
On 15/02/13 12:06, Jon Medhurst (Tixy) wrote:
On Fri, 2013-02-15 at 10:33 +0000, Lorenzo Pieralisi wrote:
On Fri, Feb 15, 2013 at 10:04:37AM +0000, Jon Medhurst (Tixy) wrote:
On Thu, 2013-02-14 at 17:16 +0000, Will Deacon wrote:
Hi Tixy,
On Thu, Feb 14, 2013 at 05:07:43PM +0000, Jon Medhurst (Tixy) wrote:
The function v7_coherent_kern_range uses the macro icache_line_size to read the current CPUs icache line size for the purpose of invalidating all cache lines in the given range.
Unfortunately, on the TC2 big.LITTLE test chip, the A15 icache line size is 64 bytes, but the A7 size is only 32 bytes. So when the function executes on the A15 it will miss out every alternate cache line for the A7.
There is a signal (IMINLN) to the core which allows A15 to behave as though it has a 32-byte line size and this should be driven correctly for big/little.
How do we set that signal? Is that something we have to set up in Linux or is it something that we expect the Firmware to set up?
If I am not mistaken, SCC register at offset 0x400 (bit 7) allows IMINLN to be forced to 0 (ie Instruction Cache minimum line size == 32 bytes).
This can be done through board.txt so that it is set up as we want.
According to the TRM for TC2 the default value for that register is 0x33330c80, so adding the line "SCC: 0x400 0x33330c00" and incrementing TOTALSCCS does the trick, and the A15's now report an icache size of 32.
We'll have to get everyone with a TC2 to make that change then?
Hi,
I tried with SCC: 0x400 0x33330c00 and incremented TOTALSCCS but it makes no difference for me.
Yes, there are still problems with the Linaro kernel, probably related to all the big.LITTLE, cpuidle or cpufreq code or pathways they trigger. The cache line size change fixed things for me when running mainline Linux, which doesn't have all these new features yet.
Though, the whole ftrace design looks a bit suspect to me, we are relying on every single function in the pathway used for implementing ftrace being marked with 'notrace' (or their file being marked likewise, or the function implemented in assembler). Also, as Will Deacon has pointed out [1], the Architecture specification doesn't guarantee the instruction manipulation being done is safe (though we could quite possibly get away with that).
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-December/136441.h...
I was going to carry on trying to debug this issue between my other tasks, (it's been a background task for me for a long time).