mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Patrick van de Lageweg <patrick@bitwizard.nl>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Rogier Wolff <R.E.Wolff@BitWizard.nl>,
	Eric Wood <eric@interplas.com>,
	bmckinlay@perle.com, tmckinlay@perle.com
Subject: Re: [PATCH] RIO
Date: Wed, 8 Dec 2004 13:57:37 +0000	[thread overview]
Message-ID: <20041208135737.GB31975@infradead.org> (raw)
In-Reply-To: <20041208132951.GC19937@bitwizard.nl>

On Wed, Dec 08, 2004 at 02:29:51PM +0100, Patrick van de Lageweg wrote:
> Hi,
> 
> This patch converts all save_flags/restore_flags to the new 
> spin_lick_irqsave/spin_unlock_irqrestore calls, as well as some
> other 2.6.X cleanups. This allows the "rio" driver to become
> SMP safe.
> 
> 
> Signed-off-by: Patrick vd Lageweg <patrick@bitwizard.nl>
> Signed-off-by: Rogier Wolff <R.E.Wolff@BitWizard.nl>
> 
>         Patrick

> diff -u -r linux-2.6.10-rc3-clean/drivers/char/Kconfig linux-2.6.10-rc3-rio/drivers/char/Kconfig
> --- linux-2.6.10-rc3-clean/drivers/char/Kconfig	Fri Dec  3 15:13:32 2004
> +++ linux-2.6.10-rc3-rio/drivers/char/Kconfig	Fri Dec  3 15:28:48 2004
> @@ -299,7 +299,7 @@
>  
>  config RIO
>  	tristate "Specialix RIO system support"
> -	depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP
> +	depends on SERIAL_NONSTANDARD
>  	help
>  	  This is a driver for the Specialix RIO, a smart serial card which
>  	  drives an outboard box that can support up to 128 ports.  Product
> diff -u -r linux-2.6.10-rc3-clean/drivers/char/rio/linux_compat.h linux-2.6.10-rc3-rio/drivers/char/rio/linux_compat.h
> --- linux-2.6.10-rc3-clean/drivers/char/rio/linux_compat.h	Fri Dec  3 15:11:52 2004
> +++ linux-2.6.10-rc3-rio/drivers/char/rio/linux_compat.h	Fri Dec  3 15:28:48 2004
> @@ -19,8 +19,8 @@
>  #include <linux/interrupt.h>
>  
>  
> -#define disable(oldspl) save_flags (oldspl)
> -#define restore(oldspl) restore_flags (oldspl)
> +#define disable(oldspl) local_irq_save(oldspl);
> +#define restore(oldspl) local_irq_restore(oldspl) ;

This looks broken.  local_irq_* really isn't for driver use except for
exception case.  Also please kill such silly wrappers..

>  
>  #define sysbrk(x) kmalloc ((x),in_interrupt()? GFP_ATOMIC : GFP_KERNEL)
>  #define sysfree(p,size) kfree ((p))

dito here.  Also the in_interrupt() check is wrong.


Looking at the driver with it's deep mess and K&R prototypes you might
be better off with a start from scratch.


  reply	other threads:[~2004-12-08 13:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-08 13:29 Patrick van de Lageweg
2004-12-08 13:57 ` Christoph Hellwig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-12-01 12:40 [PATCH] rio Patrick van de Lageweg
2000-12-01 15:39 ` Rogier Wolff
2000-11-30 14:38 Patrick van de Lageweg

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=20041208135737.GB31975@infradead.org \
    --to=hch@infradead.org \
    --cc=R.E.Wolff@BitWizard.nl \
    --cc=bmckinlay@perle.com \
    --cc=eric@interplas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patrick@bitwizard.nl \
    --cc=tmckinlay@perle.com \
    --cc=torvalds@osdl.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®