Re: [KJ] [PATCH] generic_serial: replace cli()/sti() with spin_lock_irqsave()/spin_unlock_irqrestore()

From: Matthew Wilcox
Date: Fri Dec 17 2004 - 22:07:27 EST


On Fri, Dec 17, 2004 at 06:25:39PM -0600, James Nelson wrote:
>
> +static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
> +

It can't be static. The drivers are going to have to use it in their
interrupt routines to synchronise with the generic_serial code.

It'd be much better to convert the drivers that use generic_serial
to use serial_core instead. I'd recommend not touching this unless you
have the hardware concerned.

--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/