mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Erik Mouw <J.A.K.Mouw@its.tudelft.nl>
To: Emmanuel Michon <emmanuel_michon@realmagic.fr>
Cc: linux-kernel@vger.kernel.org
Subject: Re: module programming smp-safety howto?
Date: Wed, 10 Apr 2002 12:49:56 +0200	[thread overview]
Message-ID: <20020410104956.GD1465@arthur.ubicom.tudelft.nl> (raw)
In-Reply-To: <7w7knf98gk.fsf@avalon.france.sdesigns.com>

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
http://www.kernelnewbies.org/documents/ .

> 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!).


Erik

-- 
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: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/

  reply	other threads:[~2002-04-10 10:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-10 10:03 Emmanuel Michon
2002-04-10 10:49 ` Erik Mouw [this message]
2002-04-10 13:33 ` Anton Altaparmakov
2002-04-10 16:42   ` Emmanuel Michon
2002-04-14 13:11     ` pjd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020410104956.GD1465@arthur.ubicom.tudelft.nl \
    --to=j.a.k.mouw@its.tudelft.nl \
    --cc=emmanuel_michon@realmagic.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®