I believe that the discussion in Rubini's book ("Linux Device Drivers")
about allocating DMA buffers is still correct for the 2.2.x (and probably
the 2.4.x) kernels too. In that book (Ch 13), he says that you can
statically allocate (in module start-up) DMA-suitable buffers by using
either kmalloc() or get_free_pages() by ORing the GFP_DMA "priority" with
either GFP_KERNEL or GFP_ATOMIC.
Norman Dresner
Fellow Systems Engineer &(SGI) Advanced Signal Processing Laboratory
Administrator
Radar Systems Engineering Department
Electronic Systems and Sensors Segment
Northrop Grumman Corporation
MS 520
Box 746
Baltimore MD 21203
Voice: (410) 993 - 2096 Mornings; all-day voice-mail
(410) 969 - 8068 Afternoons with answering machine
FAX: (410) 993 - 8084 On-site
(410) 969 - 8068 Afternoons; call first to arrange
E-Mail: Mornings: mailto:[EMAIL PROTECTED]
Afternoons: mailto:[EMAIL PROTECTED]
> -----Original Message-----
> From: Basham, Richard R [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 10, 2001 5:41 PM
> To: Real Time Linux; '[EMAIL PROTECTED]'
> Subject: RE: [rtl] paging problem with RTL-3.0
>
> Ken,
>
> I believe that your assumption about the buffer not being contiguous is
> correct. Therefore, you should let the task run past the end of the
> buffer. If you want to keep this functionality without too much effort
> you could revert the old method of allocating shared memory by reserving
> it at boot up through lilo. This memory is contiguous.
>
> I hope this helps,
>
> Rich
>
> > ----------
> > From: Ken Teh[SMTP:[EMAIL PROTECTED]]
> > Reply To: [EMAIL PROTECTED]
> > Sent: Tuesday, April 10, 2001 1:59 PM
> > To: Real Time Linux
> > Subject: [rtl] paging problem with RTL-3.0
> >
> > It appears that I cannot page when running my rt code. RTLinux is
> version
> > 3.0
> >
> > I have a statically defined buffer that is partitioned into n+2 buffers,
> each
> > 2048 bytes long and a function that fills these buffers with multiple
> > blocks of "event" data. The function writes arbitrary length event data
> and
> > I allow the function to overrun a buffer boundary. The calling function
> > actually catches the overrun and translates (shifts) the "last" event
> into
> > the next buffer so that the completed buffer does not contain partial
> event
> > data.
> >
> > The system does an oops when the function overflows from buffer 1 (first
> > buffer is buffer 0) into buffer 2. At times it's worse -- it resets the
> > computer and goes into the reboot cycle. If I fix the function so it
> never
> > overruns a buffer boundary, then the code runs without any problems.
> >
> > The n buffers are actually made into a circular buffer queue. The n+1
> > buffer is used for the overflow of buffer n, and the n+2 buffer is the
> > temporary buffer which I use to translate an event data block that has
> > overrun a buffer boundary. I've checked that with my modified function
> > (that does not overrun a buffer boundary), that the buffers "circulate"
> > without any problems.
> >
> > My inference is that my logically contiguous buffer that is partitioned
> into
> > n+2 buffers is not really physically contiguous and that when my
> function
> > overflows buffer 1, ie, crosses a page boundary, the system does a hard
> > crash. I have the same behaviour with the mbuff device. The function
> is
> > called by a thread that is dispatched by an interrupt handler.
> >
> > Can anyone shed light on this?
> >
> > The oops message repeats, but I don't know how to read an oops and I've
> seen
> > 2 varieties of oops messages - one says kernel cannot deference NULL
> virtual
> > pointer, process is init, the second variety says something about trying
> to
> > kill an interrupt handler, aiee killing idle task. I'm not sure I
> believe
> > either one.
> >
> > Ken
> >
> > -- [rtl] ---
> > To unsubscribe:
> > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> > --
> > For more information on Real-Time Linux see:
> > http://www.rtlinux.org/rtlinux/
> >
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/