Change IRQ received from request_threaded_irq

bgiles

New Member
Credits
27
I have two audio drivers using a shared irq. If possible, I would like to change one of the drivers to use a different irq number. I have tried to trace the function calls back through the kernel source but tend to get lost in the many layers structures.
I am looking at the 4.19.130 Linux Kernel.
see sound/soc/intel/skylake/skl.c
C:
static int skl_acquire_irq(struct hdac_bus *bus, int do_disconnect)
{
    struct skl *skl = bus_to_skl(bus);
    int ret;

    ret = request_threaded_irq(skl->pci->irq, skl_interrupt,
            skl_threaded_handler,
            IRQF_SHARED,
            KBUILD_MODNAME, bus);
see sound/soc/intel/skylake/skl-sst-dsp.c
C:
int skl_dsp_acquire_irq(struct sst_dsp *sst)
{
    struct sst_dsp_device *sst_dev = sst->sst_dev;
    int ret;

    /* Register the ISR */
    ret = request_threaded_irq(sst->irq, sst->ops->irq_handler,
        sst_dev->thread, IRQF_SHARED, "AudioDSP", sst);
Can someone give me some tips on how to best track back through the code to locate where this IRQ value is set?
 
Last edited:


bgiles

New Member
Credits
27
I actually get an intermittent problem where the IRQ gets disabled because a spurious interrupt happens and does not get handled. I would like to change one of the devices IRQ number to see if the issue follows a specific driver
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
19,654
It looks like you can change the affinity - but we're way outside of my wheelhouse with this. Hopefully someone will know more.


Perhaps changing the affinity for one of the devices will get you sorted?
 

bgiles

New Member
Credits
27
Forgive my ignorance. My background is in hardware design and I know enough in the kernel to be dangerous but I wouldn't say I am an expert either.
@KGIII What do you mean by affinity?
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
19,654
The link explains it better than I can, but each IRQ has an affinity for a CPU core. You can change this affinity, putting one device's affinity on one core and the second device on another. The page even tells you how to find that information. It's a kernel thing and not a distro-specific thing, so it being on a Red Hat site shouldn't change anything.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top