Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pcic kthread creation timing
KIYOHARA Takashi wrote:
I saw neither wdc nor NIC at pcmcia (at pcic) attached on hpcmips. And,
if the neither is attached on hpcmips, root device cannot be found. X-<
Hello Kiyohara-san!
hpcarm had this same problem, and I think Peter Postma and I came up
with pretty much the same fix, which used config_interrupts(). See also
PR port-hpcarm/37227 for more detail.
I think at least on hpcarm, the calling sequence before the vmlocking
merge was something like:
pcic_attach (I forget the exact method here)
+----> kthread_create(create_event_thread())
...
(on new thread) create_event_thread()
+----> check for card presence
+----> kthread_create(pcic_event_thread())
which was then flattened to (note, no extra thread creation):
pcic_attach (I forget the exact method here)
+----> create_event_thread()
+----> check for card presence
+----> kthread_create(pcic_event_thread())
The result being that the 'check for card presence' was done before the
PCIC was fully set up and thus no PCMCIA / CF cards were detected at boot.
I saw pcic_event_thread() called earlier than pcic_attach_socket_finish().
Right, exactly.
Perhaps, pcic_attach_socket_finish() should call
kthread_create(pcic_event_thread()) in it if config_interrupts() is slower
than kthread_create().
I think you do want to use config_interrupts() instead of relying on
kthread creation timing... one of the side effects is that you'll be
guaranteed to be called before autoconfiguration finishes and you need
the boot device.
--rafal
Home |
Main Index |
Thread Index |
Old Index