Skip to content

Kernel module cannot request interrupt 79 after kernel update from 4.9 to 4.14 #2590

Closed
@tz77

Description

@tz77

After a kernel upgrade from 4.9 to 4.14 via apt-get upgrade on a Raspberry Pi 3, loading my uio-based kernel module fails with uio_register_device() returning -EINVAL. The kernel module tries to request IRQ 79 for the edge detection of all GPIOs on bank 0. The other uio_info structure fields name and version are also populated, and irq_flags is set to IRQF_SHARED.

A more detailed analysis shows that uio_register_device() fails because request_irq() returns -EINVAL as the outcome of request_threaded_irq(), which in turns fails, because irq_settings_can_request(desc) returns false due to desc->status_use_accessors having the _IRQ_NOREQUEST bit set.

This seems to indicate that IRQ 79 (for gpio_int[0], used to be 49 as in the BCM2835 ARM Peripherals document) cannot be requested any longer with kernel 4.14.

An observation that might be related to this is that the 4.14 content of /proc/interrupts does not have the two lines
79: 0 0 0 0 ARMCTRL-level 81 Edge 3f200000.gpio:bank0
80: 0 0 0 0 ARMCTRL-level 82 Edge 3f200000.gpio:bank1
whereas the 4.9 kernel does have them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions