Message ID | 50D10224.30600@codeaurora.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Dec 18, 2012 at 03:54:12PM -0800, Stephen Boyd wrote: > Can you try this patch? I'll probably send a follow up patch that > consolidates the duplicated preempt_decrement code into some assembly > macro. We may also want to fix it up so that assembly stubs call into > the preempt tracer. I'm not sure how that works right now with VFP. This looks like a sensible fix to me - once tested of course.
On 12/18/12 16:01, Russell King - ARM Linux wrote: > On Tue, Dec 18, 2012 at 03:54:12PM -0800, Stephen Boyd wrote: >> Can you try this patch? I'll probably send a follow up patch that >> consolidates the duplicated preempt_decrement code into some assembly >> macro. We may also want to fix it up so that assembly stubs call into >> the preempt tracer. I'm not sure how that works right now with VFP. > This looks like a sensible fix to me - once tested of course. Kluba, did the patch work for you?
On Wed, 02 Jan 2013 16:41:00 -0800 Stephen Boyd <sboyd@codeaurora.org> wrote: > On 12/18/12 16:01, Russell King - ARM Linux wrote: > > On Tue, Dec 18, 2012 at 03:54:12PM -0800, Stephen Boyd wrote: > >> Can you try this patch? I'll probably send a follow up patch that > >> consolidates the duplicated preempt_decrement code into some > >> assembly macro. We may also want to fix it up so that assembly > >> stubs call into the preempt tracer. I'm not sure how that works > >> right now with VFP. > > This looks like a sensible fix to me - once tested of course. > > Kluba, did the patch work for you? > Sorry for being late, was on holiday. Yes, you were right, CONFIG_DEBUG_PREEMPT (after breaking dependency on CONFIG_PREEMPT - this is how I caught the exact place) and CONFIG_DEBUG_ATOMIC_SLEEP was enabled due to bug hunting in own code (and found yet another at an unexpected place). I have chosen #ifdef CONFIG_PREEMPT to match with assembly code, but your solution seems more reasonable. Regards, Patrik
On 01/03/13 23:48, Patrik, Kluba wrote: > Sorry for being late, was on holiday. Yes, you were right, > CONFIG_DEBUG_PREEMPT (after breaking dependency on CONFIG_PREEMPT - > this is how I caught the exact place) and CONFIG_DEBUG_ATOMIC_SLEEP was > enabled due to bug hunting in own code (and found yet another at an > unexpected place). > I have chosen #ifdef CONFIG_PREEMPT to match with assembly code, but > your solution seems more reasonable. Did you test my patch? If so, can I get your tested by please so I can stick it in the patch tracker? Thanks, Stephen
On Fri, 04 Jan 2013 14:21:46 -0800 Stephen Boyd <sboyd@codeaurora.org> wrote: > On 01/03/13 23:48, Patrik, Kluba wrote: > > Sorry for being late, was on holiday. Yes, you were right, > > CONFIG_DEBUG_PREEMPT (after breaking dependency on CONFIG_PREEMPT - > > this is how I caught the exact place) and CONFIG_DEBUG_ATOMIC_SLEEP > > was enabled due to bug hunting in own code (and found yet another > > at an unexpected place). > > I have chosen #ifdef CONFIG_PREEMPT to match with assembly code, but > > your solution seems more reasonable. > > Did you test my patch? If so, can I get your tested by please so I can > stick it in the patch tracker? Yes, I have tested it. Here you are: Tested-by: Patrik Kluba <pkluba@dension.com> Bye, Patrik
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S index cc926c9..323ce1a 100644 --- a/arch/arm/vfp/entry.S +++ b/arch/arm/vfp/entry.S @@ -22,7 +22,7 @@ @ IRQs disabled. @ ENTRY(do_vfp) -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT ldr r4, [r10, #TI_PREEMPT] @ get preempt count add r11, r4, #1 @ increment it str r11, [r10, #TI_PREEMPT] @@ -35,7 +35,7 @@ ENTRY(do_vfp) ENDPROC(do_vfp) ENTRY(vfp_null_entry) -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT get_thread_info r10 ldr r4, [r10, #TI_PREEMPT] @ get preempt count sub r11, r4, #1 @ decrement it @@ -53,7 +53,7 @@ ENDPROC(vfp_null_entry) __INIT ENTRY(vfp_testing_entry) -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT get_thread_info r10 ldr r4, [r10, #TI_PREEMPT] @ get preempt count sub r11, r4, #1 @ decrement it diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index ea0349f..dd5e56f 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S @@ -168,7 +168,7 @@ vfp_hw_state_valid: @ else it's one 32-bit instruction, so @ always subtract 4 from the following @ instruction address. -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT get_thread_info r10 ldr r4, [r10, #TI_PREEMPT] @ get preempt count sub r11, r4, #1 @ decrement it @@ -192,7 +192,7 @@ look_for_VFP_exceptions: @ not recognised by VFP DBGSTR "not VFP" -#ifdef CONFIG_PREEMPT +#ifdef CONFIG_PREEMPT_COUNT get_thread_info r10 ldr r4, [r10, #TI_PREEMPT] @ get preempt count sub r11, r4, #1 @ decrement it