epics-modules / mrfioc2

EPICS driver for Micro Research Finland event timing system devices
http://epics-modules.github.io/mrfioc2/
Other
8 stars 30 forks source link

PSI work #4

Closed mdavidsaver closed 8 years ago

mdavidsaver commented 9 years ago

Changes made by PSI in the past ~1.5 years. There is a lot here,

This work was started with an import of the HG repo at that time. I've used the git-replace feature to make the history appear connected, but to see this requires an additional step to pull down the special "refs/replace/*".

git clone https://github.com/epics-modules/mrfioc2.git
cd mrfioc2
git config --add remote.origin.fetch +refs/replace/*:refs/replace/*
git fetch

I've also done an initial merge of recent mainline changes into the PSI branch so that github would allow a pull request to be created.

The main unresolved issue is what to do about .db files. PSI has created copies of most .db files to apply their naming convention (I applaud their dedication). The existing files (using the NSLS2 convention) aren't installed any longer. While this works fine at PSI, some solution needs to be reach for those of us with existing installs.

This branch also disabled the time provider registration (for performance reasons). This needs to be made conditional somehow.

There are also some house keeping tasks. I'd like the generated files (eg. PDFs) to be removed. Also, plx9030.h needs to be de-duped (move to mrmShared?).

mdavidsaver commented 9 years ago

As a note. Handling of the IRQ_PCIee bit in IRQEnable seems to allow a race between kernel and userspace by the same mechanism as that previously identified for the devices using a PLX PCI bridge. Since the Lattice 0xec30 bridge doesn't seem to have any control registers, the stratagy used for the PLX devices won't work.

I can think of one simple way to completely eliminate the race. Userspace must explicitly disable interrupts w/ devPCIDisableInterrupt() before any RMW outside EVRMRM::isr (when interrupts are already disabled). Don't know what the performance consequences are since this would include EVRMRM::drain_fifo.

Failing this, I can't think of any scheme which doesn't result in some spurious interrupts.

mdavidsaver commented 9 years ago

in drvemIocsh.cpp there are a lot of iocsh functions which have been commented out. What is the status? Should these be kept or removed?

mdavidsaver commented 9 years ago

In an attempt to minimize confusion, instead of committing to this branch, I'll be putting my changes up here https://github.com/mdavidsaver/mrfioc2/tree/psi I'll do a pull request when this is further along.

mdavidsaver commented 8 years ago

Superseded by #10.