Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jan 2013 14:08:41 +0200
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Jimmy Olgeni <olgeni@olgeni.com>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: [GIANT-LOCKED] even without D_NEEDGIANT
Message-ID:  <50F93B49.5080902@FreeBSD.org>
In-Reply-To: <alpine.BSF.2.00.1301181220120.89140@backoffice.colby.local>
References:  <alpine.BSF.2.00.1301181220120.89140@backoffice.colby.local>

next in thread | previous in thread | raw e-mail | index | archive | help
on 18/01/2013 13:39 Jimmy Olgeni said the following:
> 
> Hello list,
> 
> At $DAILY_JOB I got involved with an ASI board that didn't have any kind of
> FreeBSD support, so I ended up writing a driver for it.
> 
> If you try to ignore the blatant style(9) violations (of which there are many,
> hopefully on the way to be cleaned up) it seems to work fine.
> 
> However, I noticed that when loading the driver I always get a
> message about the giant lock being used, even if D_NEEDGIANT is not
> specified anywhere.
> 
> The actual output when loading is this (FreeBSD 9-STABLE i386):
> 
> dektec0: <DekTec DTA-145> mem 0xfeaff800-0xfeafffff irq 16 at device 13.0 on pci0
> dektec0: [GIANT-LOCKED]
> dektec0: [ITHREAD]
> dektec0: board model 145, firmware version 2 (tx: 0, rx: 2), tx fifo 16384 MB
> 
> Source code here:
> 
>   https://github.com/olgeni/freebsd-dektec/blob/master/dektec.c
> 
> Can anybody offer a clue about what could be triggering the GIANT
> requirement? Could I be doing something that has this, and possibly
> other, unintended side effects?
> 

See INTR_MPSAFE in bus_setup_intr(9).

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50F93B49.5080902>