summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicolas Frattaroli <nicolas.frattaroli@collabora.com>2026-01-16 15:57:31 +0300
committerBoris Brezillon <boris.brezillon@collabora.com>2026-01-22 17:13:43 +0300
commitc5bf1d4e4473f0f18dfba0266a8fd48cb3700e73 (patch)
tree6674b3c7e78b061e6fbd7a1707c3587de3e0c1c3 /include
parent0b2d86670a8438f6e98266a86ab5f407c6e2b0b6 (diff)
downloadlinux-c5bf1d4e4473f0f18dfba0266a8fd48cb3700e73.tar.xz
drm/panthor: Extend IRQ helpers for mask modification/restoration
The current IRQ helpers do not guarantee mutual exclusion that covers the entire transaction from accessing the mask member and modifying the mask register. This makes it hard, if not impossible, to implement mask modification helpers that may change one of these outside the normal suspend/resume/isr code paths. Add a spinlock to struct panthor_irq that protects both the mask member and register. Acquire it in all code paths that access these, but drop it before processing the threaded handler function. Then, add the aforementioned new helpers: enable_events, and disable_events. They work by ORing and NANDing the mask bits. resume is changed to no longer have a mask passed, as pirq->mask is supposed to be the user-requested mask now, rather than a mirror of the INT_MASK register contents. Users of the resume helper are adjusted accordingly, including a rather painful refactor in panthor_mmu.c. In panthor_mmu.c, the bespoke mask modification is excised, and replaced with enable_events/disable_events in as_enable/as_disable. Co-developed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://patch.msgid.link/20260116-panthor-tracepoints-v10-2-d925986e3d1b@collabora.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions