spibus access serialization
Luiz Otavio O Souza
loos.br at gmail.com
Mon Sep 3 13:20:58 UTC 2012
On Sep 2, 2012, at 4:50 PM, Warner Losh wrote:
>
> On Sep 2, 2012, at 6:37 AM, Luiz Otavio O Souza wrote:
>
>> <spibus-01.diff>
>
> This looks good to me as is.
>
> spibus-02.diff
>
> This looks good as well. There's another change mixed in (DEVMETHOD_END), but it is likely benign enough to go in with this. If you really want, split it out, but if you don't really want, things are OK as is.
>
> spibus-03.diff
>
> + mtx_sleep(sc, &sc->sc_mtx, 0, "ar71xx_spi", 0);
>
> I'm not sure I see what wakes this up. Am I missing something? Same is true in all the drivers. The rest is decent enough, but does mean we can only do acquire/release in a sleepable context. Is that going to be OK?
No, you're right, the patch is incomplete (my bad) :-/
For now doing the acquire/release only on sleepable context isn't causing any problems, do you think i should change this ?
I'll update the patch and do some more work to move some of common code to default methods or to spibus code as suggested by ray at .
Thanks for the review!
Luiz
More information about the freebsd-arch
mailing list