Skip to content
Commit 99a97a8b authored by Adam Borowski's avatar Adam Borowski Committed by Ben Skeggs
Browse files

drm/nouveau/gpio: enable interrupts on cards with 32 gpio lines



The code attempts to enable them, but hits an undefined behaviour by
shifting by the entire register's width:

    int lines = 32;
    u32 mask = (1 << lines) - 1;    // 00000000 on x86
    u32 mask = (1 << lines) - 1;    // ffffffff on arm (32)
    u32 mask = (1 << lines) - 1;    // 00000000 on arm64
    u32 mask = (1ULL << lines) - 1; // ffffffff everywhere

Signed-off-by: default avatarAdam Borowski <kilobyte@angband.pl>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent b2c4ef70
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment