Change IRQ received from request_threaded_irq

bgiles

New Member
Joined
May 12, 2021
Messages
3
Reaction score
0
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:


I spent some time searching. Anything I found was ancient - like 2005 era.

The modern kernel should handle shared interrupts. Is this actually causing you a problem, or are you just tinkering and learning?
 
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
 
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?
 
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.
 

Staff online

Members online


Top