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: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to