[RFC/PATCH 6/7] ARM: ARM11 MPCore: DMA_CACHE_RWFO operations are not preempt safe
George G. Davis
gdavis at mvista.com
Thu Oct 6 15:41:45 EDT 2011
On Oct 6, 2011, at 12:40 PM, Russell King - ARM Linux wrote:
> On Thu, Oct 06, 2011 at 01:08:33AM -0400, gdavis at mvista.com wrote:
>> v6_dma_inv_range:
>> #ifdef CONFIG_DMA_CACHE_RWFO
>> +#ifdef CONFIG_PREEMPT
>> + stmdb sp!, {r4, r10, r11}
>> + get_thread_info r10
>> + ldr r4, [r10, #TI_PREEMPT] @ get preempt count
>> + add r11, r4, #1 @ increment it
>> + str r11, [r10, #TI_PREEMPT] @ disable preempt
>> +#endif
>
> r11 is the frame pointer. On kernels built with the frame pointer
> enabled, this register must either be a valid frame pointer or zero.
Doh!
> There's no reason to use r4, r10 and r11 here - you could use r4, r5
> and ip (r12) - and then there's no need to save ip as that's allowed
> to be corrupted by called functions.
OK, I'll make these changes in the next round.
Thanks again!
--
Regards,
George
More information about the linux-arm-kernel
mailing list