Our crypto engine has a ring architecture, the descriptor ring is controlled by two variable head and tail. head only get increased/0 when we get a request. tail obly get increased/0 in packet done interrupt.
It is safe if anytime we can only get one request. Yes, it's possible to have multiple requests. One can write a test which loop and sending requests. If two such loops and then we have two requests... Ok. I will put back the locks in. The code used to have locks, we removed for performance optimization. James On Wed, 2008-10-29 at 13:10 -0400, Josh Boyer wrote: > On Wed, 29 Oct 2008 10:04:59 -0700 > James Hsiao <[EMAIL PROTECTED]> wrote: > > > > > - Complete lack of locking code, how do you enforce mutually exclusive > > > > > access to the device? > > > > > > > > The crypto engine have couple bits 'command ready' and 'packet done', > > > > which servers as semaphore here. So, software don't need extra locking. > > > > > > know if it's applicable at all, but I imagine it's not SMP safe. > > > > No, it's not SMP safe. This driver only support single core processors. > > What about preemption? You do not have to be a multi-core CPU to have > SMP-like problems. > > josh _______________________________________________ Linuxppc-dev mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-dev
