dwc_otg FIQ Handler and Data Aborts

Tom Cook tom.k.cook at gmail.com
Mon Jun 24 06:11:25 EDT 2013


The current dwc_otg driver implementation in
https://github.com/raspberrypi/linux.git causes a kernel oops if a
data abort occurs during the FIQ handler.

Although you might expect this to never happen, there is one case
where it does come up: when using ftrace.  ftrace implements tracing
as a hardware watchpoint, which causes a data abort.  When ftrace is
enabled it instruments the FIQ handler (dwc_otg_hcd_handle_fiq) with a
hw watchpoint, which very quickly leads to a data abort in the
handler.  Since data aborts during FIQ handlers are not implemented,
this leads to a kernel oops.

While it is possible to filter out the FIQ handler using
set_ftrace_filter and set_ftrace_notrace, there must be a way to build
this in to the kernel - after all, data aborts are not handled in IRQ
mode either, and they don't cause kernel oopses.  So I'm guessing that
there is something that should be done to the FIQ handler to make it
'immune' to data aborts that isn't happening.  Can someone point me
toward what that is?

Thanks,
Tom



More information about the linux-rpi-kernel mailing list