Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 2006 19:50:02 -0400
From:      Bill Moran <wmoran@collaborativefusion.com>
To:        usleepless@gmail.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Removing Giant from a driver
Message-ID:  <20061014195002.8dfb46ac.wmoran@collaborativefusion.com>
In-Reply-To: <c39ec84c0610141332q7abf9220q8b2715f33a72e58b@mail.gmail.com>
References:  <c39ec84c0610141332q7abf9220q8b2715f33a72e58b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

You might do better by subscribing to hackers@ and posting there.

This question is a little more technical than this list usually deals
with.

usleepless@gmail.com wrote:
> Hi All,
> 
> i have been tweaking the pvr250 driver to support pvr150s/500s. now i
> want to remove Giant from the code.
> 
> problem is, i am not sure what to do. i have created a mutex which
> replaces the spltty and splx calls. but this crashes my box :-)
> 
> the original code looks like this:
>         /*
>          * Allocate a DMA tag for the scatter / gather list.
>          */
>         error = bus_dma_tag_create(sc->parent_dmat, 1, 0,
>                                    BUS_SPACE_MAXADDR_32BIT,
>                                    BUS_SPACE_MAXADDR, NULL, NULL,
>                                    CXM_SG_BUFFERS
>                                    * sizeof(struct cxm_sg_entry), 1,
>                                    BUS_SPACE_MAXSIZE_32BIT, 0,
> #if __FreeBSD_version >= 501102
>                                    busdma_lock_mutex, &Giant,
> #endif
>                                    &sc->enc_sg.dmat);
> 
> what should it look like?
> 
> and how will i prevent the interrupt routine from interfering with
> userland operations? can i place a "mtx_lock()" call in the interrupt
> routine?
> 
> is there a howto somewhere?
> 
> regards,
> 
> usleep
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


-- 
Bill Moran

Many miles away, something crawls through the slime at the bottom of a
dark, Scottish lake.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061014195002.8dfb46ac.wmoran>