How to make FIQ work with vanilla kernel 3.18?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to make FIQ work with vanilla kernel 3.18?

1,399 Views
joshuaclayton
Contributor III

I am having trouble getting a FIQ enabled wtih linux 3.18

We have an application that takes data from a FPGA over the EIM bus at 50kHz.

Porting to 3.18, the old code causes a panic.

I switch ed to use enable_fiq(), and it almost works. It just seems to fall back to the GIC. (I see about 50k interrupts per second in a spurious Irq handler that is set up with request_irq(), but not enabled)

More seriously, I cannot figure out how to put those irq's on cpu 3.

As a result of cpu0 resource contention with network irqs, my userspace application doesn't get all the data...

int evi_init_fiq(struct evifpga_device *dev)

{

        int ret;

        disable_fiq(dev->irq);

        ret = claim_fiq(&fiq_handle);

        if (ret) {

                printk(KERN_ALERT "EVi - Unable to claim FIQ\n");

                return ret;

        }          

        set_fiq_handler(&evi_fiq_handler, SZ_256);

        enable_fiq(dev->irq);

        if (ret) {

                printk(KERN_ALERT "EVi - Unable to enable FIQ on CPU %d\n", FIQ_CPU_TARGET);

                release_fiq(&fiq_handle);

                return ret;

        }          

        return 0;  

}

On 3.0.35  We used a FIQ interrupt on cpu core 3, and then added an isolcpu=3 to the kernel command line to get reliable 50k data.

fiq was enabled by the following:

void fiq_enable(void * data)

{

        unsigned long val;

        val = readl(GIC_CPU_CTRL);

        val |= GIC_CPU_CTRL_BITS_FIQEN;

        writel(val, GIC_CPU_CTRL);

}

I noticed that several of the needed address macros were not exported, and attempts to define them but leave the code otherwise untouched resulted in a kernel panic.

GIC_CPU_CTRL is defined as 0x0 (address ZERO!!!111!!) in 3.0.35, so I'm not sure how this ever worked, but it did.

Message was edited by: Joshua Clayton Remove the reference to initiating the FIQ on a specific cpu core. I don't need this anymore

Labels (2)
Tags (4)
0 Kudos
Reply
2 Replies

786 Views
fabio_estevam
NXP Employee
NXP Employee

Maybe you could try asking this one at linux-arm-kernel mailing list.

0 Kudos
Reply

786 Views
joshuaclayton
Contributor III

After some trepidation, I went ahead and posted to the arm kernel mailing list.

I never did get a response on the arm kernel mailing list. The best I have found so far are patches posted by Daniel Thompson, which purport to enable some NMI like interrupts to use the FIQ mechanism.

I'm now taking a second look after doing other things for a while. So far I have not had success.

0 Kudos
Reply