irq_desc not found for my interrupt number during request_irq (radix tree of irq_desc has only 64 entries..)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: irq_desc not found for my interrupt number during request_irq (radix tree of irq_desc has only 64 entries..)

Hello all,

I'm doing an linux driver and application test on a qemu arm64 virtual machine.

My virtual machine is slightly modified version of arm 'virt' machine and it has our device model included.

When I do request_irq for INTID 208 (SPI 176) in linux on my arm64 virtual machine, it returns -EINVAL.

I poked into that function and found the desc is returning NULL in function request_threaded_irq.

and irq_to_desc is supposed to return an irq_desc from the irq_radix_tree as shown below.

and I found my request index is 208 but the maxindex of the radix tree is 63.

So it looks like the radix tree of irq_desc has been set to have maximum 64 irq_descs.

Where and how can I set this radix tree size?

I looked at qemu's hw/arm/ab21q-build-acpi.c for MADT or DSDT table parts but couldn't find what to add.

I have my devices address range and irq added in the DSDT and MADT.

static void

build_dsdt(GArray *table_data, BIOSLinker *linker, Ab21qMachineState *vms)

{

...

acpi_dsdt_add_axpu(scope, &memmap[AB21Q_AXPU],

                       (irqmap[AB21Q_AXPU] + ARM_SPI_BASE));

...

}

static void acpi_dsdt_add_axpu(Aml *scope, const MemMapEntry *axpu_memmap,

                                           uint32_t irq)

{

    Aml *dev = aml_device("AXPU");

    aml_append(dev, aml_name_decl("_HID", aml_string("AXPU0011")));

    aml_append(dev, aml_name_decl("_UID", aml_int(0)));

    Aml *crs = aml_resource_template();

    aml_append(crs, aml_memory32_fixed(axpu_memmap->base,

                                       axpu_memmap->size, AML_READ_WRITE));

    aml_append(crs,

               aml_interrupt(AML_CONSUMER, AML_LEVEL, AML_ACTIVE_HIGH,

                             AML_EXCLUSIVE, &irq, 1));

    aml_append(dev, aml_name_decl("_CRS", crs));

    aml_append(scope, dev);

}

I'm not sure if I can just use _HID value as "AXPU0011".

If you see anything wrong and have a suggestion, please tell me.

Thank you!

Chan Kim

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux