From: Jan Kiszka <jan.kiszka@domain.hid>
To: Wolfgang Grandegger <wg@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] PPC405: DMA-problem solved!
Date: Mon, 22 Jan 2007 15:06:55 +0100 [thread overview]
Message-ID: <45B4C4FF.1070501@domain.hid> (raw)
In-Reply-To: <45B3DD0A.3010303@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]
Wolfgang Grandegger wrote:
>> In any case, we need to resolve the arch dependency somehow. I guess
>> it will currently not fly when I kick the full build in examples/ for a
>> non-PPC platform. Any *simple* way to catch this? Would also be
>> applicable to the heartbeat-x86 example then, though this will not cause
>> build troubles.
>
> The only simple way I see is referencing the configured kernel tree.
Sourcing $KSRC/.config into the makefile and evaluating the ARCH? Would
save us from passing ARCH on make invocation...
...
>>> + int res = 0;
>>> + memset((char *)&p_init, sizeof(p_init), 0);
>>> + p_init.polarity = 0;
>>> + p_init.pwidth = PW_8;
>>> + res = ppc4xx_init_dma_channel(DMA_NR, &p_init);
>>> + if (res) {
>>> + printk("%32s: nit_dma_channel return %d %d bytes dest %p\n",
>>> + __FUNCTION__, res, length, dst);
>>> + }
>>> + res = ppc4xx_clr_dma_status(DMA_NR);
>>> + if (res) { + printk("%32s: ppc4xx_clr_dma_status %d\n",
>>> __FUNCTION__, res);
>>> + }
>>> +#warning flush_dcache_all is a performance killer, but I do not know
>>> at the +#warning moment how to flush only the parts needed
>>
>> Can we resolve this? Wolfgang?
>
> flush_dcache_range should do the job. Or even better use the DMA-API
> described in Documentation/DMA-API.txt to get DMA'able memory (as
> pointed out recently on the linuxppc-emmbedded ML).
I definitely prefer to have a tested variant here that is as little
invasive as possible. This is "educational" code, so we should not
spread suboptimal patterns.
>>> + if (rtdm_irq_free (&irq_handle)) {
>>> + printk("%32s: rtdm_irq_free failed\n",__FUNCTION__);
>>> + }
>>> + show_irq(irq);
>>> +}
>
> And should we not also use rtdm_prinkt()?
Not strictly required here, we are in non-rt context.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-01-22 14:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-17 22:33 [Xenomai-core] PPC405: DMA-Problem with OCM (interrupt-example) Niklaus Giger
2007-01-18 0:26 ` Jan Kiszka
2007-01-18 8:31 ` Wolfgang Grandegger
2007-01-19 23:06 ` [Xenomai-core] PPC405: DMA-problem solved! Niklaus Giger
2007-01-20 8:04 ` Jan Kiszka
2007-01-21 21:37 ` Wolfgang Grandegger
2007-01-22 14:06 ` Jan Kiszka [this message]
2007-01-22 7:22 ` Niklaus Giger
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=45B4C4FF.1070501@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=wg@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.