On Sun, 16 Nov 2008, Laurent Vivier wrote:
> Le 16 nov. 08 � 11:52, Geert Uytterhoeven a �crit :
> > On Sat, 15 Nov 2008, Laurent Vivier wrote:
> > > +static inline void set_swim_mode(struct swim *base, int enable)
> > ^ __iomem
> > > +{
> > > + struct iwm *iwm_base;
> > ^ __iomem
> >
> > (cfr. sparse warnings, when building with `make C=1')
>
> I don't have the command sparse on my system (debian stable).
It's available in lenny and sid. I used to compile my own.
> > > + unsigned long flags;
> > > +
> > > + if (!enable) {
> > > + swim_write(base, mode0, 0xf8);
> > > + return;
> > > + }
> > > +
> > > + iwm_base = (struct iwm *)base;
> > > + local_save_flags(flags);
> > > + local_irq_disable();
> >
> > local_save_flags(flags) + local_irq_disable() = local_irq_save(flags)
> >
> > However, to make the driver future-save (we don't have SMP nor preempt
> > support
> > yet), it's better to add a spinlock and use spin_lock_irqsave().
> >
> > > + local_irq_restore(flags);
> >
> > ... and spin_unlock_irqrestore().
>
> Is it really needed as this driver will only work on mac m68k and all are
> uniprocessor ?
If we ever want to support CONFIG_PREEMPT, we also need it.
But as we currently don't support that, you can ignore me ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html