Thread (21 messages) 21 messages, 4 authors, 2013-06-28
STALE4760d
Revisions (7)
  1. v2 [diff vs current]
  2. v2 current
  3. v2 [diff vs current]
  4. v2 [diff vs current]
  5. v2 [diff vs current]
  6. v2 [diff vs current]
  7. v3 [diff vs current]

[PATCH v2 3/5] ARM: add support for kernel mode NEON

From: Ard Biesheuvel <hidden>
Date: 2013-06-26 10:55:33

Replying to self:

On 25 June 2013 22:24, Ard Biesheuvel [off-list ref] wrote:
+void kernel_neon_end(void)
+{
+       /* Disable the NEON/VFP unit. */
+       fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
+       barrier();
+       dec_preempt_count();
+}
+EXPORT_SYMBOL(kernel_neon_end);
Meh. This is not going to please the RT crowd, as preempt_schedule()
will not be called on PREEMPT builds in this case.

Propose to replace it with

    preempt_enable();
#ifndef CONFIG_PREEMPT_COUNT
    /* in this case, the preempt_enable() right above is just a barrier() */
    dec_preempt_count();
#endif

(and the converse in kernel_neon_begin())

In that case, preempt_disable will either be just a barrier(), or it
will re-enable preemption, and potentially reschedule if the preempt
count has dropped to zero.

-- 
Ard.

+
+#endif /* CONFIG_KERNEL_MODE_NEON */
+
 /*
  * VFP support code initialisation.
  */
--
1.8.1.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help