RE: Problem on a kernel driver(SuSE, SMP)

From: Libershteyn, Vladimir (vladimir.libershteyn@hp.com)
Date: Wed Sep 04 2002 - 18:52:30 EST


> -----Original Message-----
> From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
> Sent: Wednesday, September 04, 2002 4:45 PM
> To: Libershteyn, Vladimir
> Cc: Christoph Hellwig; linux-kernel@vger.kernel.org
> Subject: RE: Problem on a kernel driver(SuSE, SMP)
>
>
> On Wed, 2002-09-04 at 18:56, Libershteyn, Vladimir wrote:
>
> > //
> > // sleep until data is ready
> > //
> > down_interruptible(&a->sem[enumerator]);
>
> Suppose its interrupted. You dont check that and handle it..
>

Agree, I'll fix it(thanks for noticing that), but it's not the point.
The point is THIS INSTRUCTION HANGS. NO RETURN FROM IT.

>
> > board_address = ((unsigned long *)((unsigned char
> *)a->vaddr + OutputQueueFilled));
> > length = *board_address;
>
> You can't poke around in memory directly either. Yes it works
> on x86 but
> unless you use ioremap combined with readl and friends it
> wont work they
> way you expect on ia64, x86-64, ...
>

I did exactly what you've said. You have to understand,
attached is a PART of the code. All the right initializations were made
prior to that and AGAIN, EVERYTHING WORKS FINE ON A RED HAT AND ON SUSE
NON_SMP

Regards,
Vlad
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:23 EST