All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Alexis Berlemont <berlemont.hauw@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Comedi buffer management.
Date: Tue, 21 Oct 2008 17:58:48 +0200	[thread overview]
Message-ID: <48FDFC38.4060807@domain.hid> (raw)
In-Reply-To: <200810210045.16020.berlemont.hauw@domain.hid>

Alexis Berlemont wrote:
> Hi Gilles,
> 
> Sorry for answering so late. I was unable to regularly check my private mails 
> the last week; I missed yours.
> 
>> I commited in trunk a fix of Xenomai heap management for the highmem
>> case. What the patch does is essentially replacing __va_to_kva (which
>> does not work correctly with highmem) with vmalloc_to_page, which is
>> available on all linux versions Xenomai supports.
>>
>> However, I found that comedi buffer management also uses __va_to_kva. We
>> can fix SetPageReserved and ClearPageReserved easily to use
>> vmalloc_to_page, however, I do not see what pg_list is used for, so do
>> not really know how to fix it. Here is a proposed patch:
> 
> If I remember well, pg_list may be used by some PCI/PCIe DMA components which 
> can dump acquired data to physically non-contiguous buffers. In such cases, 
> the driver has to provide a list of the pages addresses into which the DMA 
> controller can trigger shots.
> 
> Many thanks for your fix. 

No problem, really, I actually did not fix pg_list. It will not work
with highmem. What do the DMA needs? physical adresses? Then you need to
replace page_address(vmalloc_to_page(vaddr)) with
page_to_phys(vmalloc_to_page(vaddr))

Or you may store the struct page, and let the drivers do what they want
with it.

-- 
                                                 Gilles.


      reply	other threads:[~2008-10-21 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-12 10:28 [Xenomai-core] Comedi buffer management Gilles Chanteperdrix
2008-10-12 12:51 ` Gilles Chanteperdrix
2008-10-20 22:45 ` Alexis Berlemont
2008-10-21 15:58   ` Gilles Chanteperdrix [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48FDFC38.4060807@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=berlemont.hauw@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.