[lkml]   [2002]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: module programming smp-safety howto?
On Wed, Apr 10, 2002 at 12:03:23PM +0200, Emmanuel Michon wrote:
> I'm responsible for the development of a kernel module for Sigma
> Designs EM84xx PCI chips (MPEG2 and MPEG4 hardware decoder
> boards). It's working properly now, irq sharing and multiple board
> support is ok.
> I would like to make it smp-safe.
> For instance, I use at a place cli()/restore to implement something that
> looks like a critical section (first code path is in a ioctl, second
> in a irq top half). I guess this approach is wrong with smp.
> Is there some documentation or howto about what changes compared
> to non-smp computers?

Run "make psdocs" in your kernel tree, and you'll find Rusty's
kernel-locking guide in Documentation/DocBook/ . If you don't have the
proper tools, you can also download it from .

> Maybe a specific kernel module can be considered as a good model?

I found the 8139too driver a nice source for good programming practice
(thanks, Jeff!).


J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands Phone: +31-15-2783635
Fax: +31-15-2781843 Email:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.035 / U:1.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site