Home
last modified time | relevance | path

Searched hist:"99 a97a8b" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/
H A Dbase.c99a97a8b Sun Apr 02 00:03:28 CDT 2017 Adam Borowski <kilobyte@angband.pl> 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: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
99a97a8b Sun Apr 02 00:03:28 CDT 2017 Adam Borowski <kilobyte@angband.pl> 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: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>