Fwd: Removing Giant from a driver



---------- Forwarded message ----------
From: usleepless@xxxxxxxxx <usleepless@xxxxxxxxx>
Date: Oct 14, 2006 10:32 PM
Subject: Removing Giant from a driver
To: freebsd-questions@xxxxxxxxxxx


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-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Removing Giant from a driver
    ... i have been tweaking the pvr250 driver to support pvr150s/500s. ... want to remove Giant from the code. ...
    (freebsd-questions)
  • Removing Giant from a driver
    ... i have been tweaking the pvr250 driver to support pvr150s/500s. ... want to remove Giant from the code. ...
    (freebsd-questions)
  • Re: Fwd: Removing Giant from a driver
    ... pass that mutex instead of Giant... ... I doubt this driver is using a fast interrupt handler... ... A fast interrupt handler doesn't context switch, ... don't understand what Giant is good for. ...
    (freebsd-hackers)
  • Re: New TTY layer: condvar(9) and Giant
    ... to reimplement a new TTY layer that fixes a lot of architectural ... I'm using a new PTY driver called pts. ... per-class mutex to lock all related TTY devices down at once (i.e. ... When set to Giant, all TTY instances will lock down the ...
    (freebsd-arch)
  • Re: Pen Drive & Win98
    ... > drives are controlled by the same driver. ... >> "Are you still wasting your time with spam?... ... >> Protected by GIANT Company's Spam Inspector ...
    (microsoft.public.development.device.drivers)