sequenceDiagram
    participant caller as caller
    participant irq as irq.c
    participant irqdomain as irqdomain.c
    participant irqdesc as irqdesc.c
    participant bitmap as bitmap.c

    activate caller
    caller ->> irq: irq_of_parse_and_map

    activate irq
        Note right of irq: irq_of_parse_and_map
        irq ->> irq: of_irq_parse_one
        irq ->> irqdomain: irq_create_of_mapping
        activate irqdomain
        Note right of irqdomain :irq_create_of_mapping
        irqdomain ->> irqdomain: of_phandle_args_to_fwspec
        irqdomain ->> irqdomain: irq_create_fwspec_mapping
        activate irqdomain
            Note right of irqdomain :irq_create_fwspec_mapping
            irqdomain ->> irqdomain: irq_domain_translate
            irqdomain ->> irqdomain: irq_find_mapping
            opt irq_find_mapping > 0
                irqdomain -->> irq: return
                irq -->> caller: return
            end
            alt irq_domain_is_hierarchy
                irqdomain ->> irqdomain: irq_domain_alloc_irqs
                irqdomain ->> irqdesc: irq_domain_alloc_descs
        activate irqdesc
        Note right of irqdesc :irq_domain_alloc_descs
            else
                irqdomain ->> irqdomain: irq_create_mapping
                irqdomain ->> irqdesc: irq_domain_alloc_descs
            end
        irqdesc ->> irqdesc : __irq_alloc_descs
        activate irqdesc
        Note right of irqdesc: __irq_alloc_descs
        irqdesc ->> bitmap: bitmap_find_next_zero_area
        activate bitmap
        bitmap ->> bitmap: bitmap_find_next_zero_area_off
        bitmap -->> irqdesc: return
        deactivate bitmap
        irqdesc -->> irqdomain: return
        deactivate irqdomain
        deactivate irqdesc
        deactivate irqdesc

        irqdomain -->> irq: return
        deactivate irqdomain
        irq -->> caller: return
    deactivate irq
    deactivate caller