Skip to contentSkip to conversation

Guidelines to make RT patch for driver

DISCUSSION Mikhail Lodigin 2 participants 2 messages Mar 30, 2012 – Apr 13, 2012

lore
Share & tools
lore
#0 lore raw

Hello,
on my AT91SAM9263 based board RT patched kernel works great! Thanks to all involved. But when ethernet is in use - latency, measured by cyclictest, reach 7000000 and beyond.
The ethernet driver for this processor is macb.c. (in 3.2 it is in drivers/net/ethernet/cadence, in 3.0 it is in drivers/net/).
I'm ready to find out how to RT-patch it and of course share the resulted patch, but I need some starting point for patching drivers besides general RT-stuff. I've noticed that some network drivers patched in one way and others a in another. Maybe some discussion existed which I didn't found. So any help would be greatly appreciated. Thanks in advance,
Mikhail

#1 lore raw
Quoted 11 lines · Mikhail Lodigin

Hello,
on my AT91SAM9263 based board RT patched kernel works great! Thanks to all involved. But when ethernet is in use - latency, measured by cyclictest, reach 7000000 and beyond.
The ethernet driver for this processor is macb.c. (in 3.2 it is in drivers/net/ethernet/cadence, in 3.0 it is in drivers/net/).
I'm ready to find out how to RT-patch it and of course share the resulted patch, but I need some starting point for patching drivers besides general RT-stuff. I've noticed that some network drivers patched in one way and others a in another. Maybe some discussion existed which I didn't found. So any help would be greatly appreciated.

There is no general recipe. The best way to do it is to use the tracer. cyclictest has a commandline option for stopping the trace when the latency exceeds a given treshold.

     cyclictest -p80 -n -f -b 1000

will start the function tracer and stop it once the latency exceeds 1000us.

Thanks,

tglx