]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: ipa: only enable GSI channel control IRQs when needed
authorAlex Elder <elder@linaro.org>
Thu, 5 Nov 2020 18:14:01 +0000 (12:14 -0600)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 Nov 2020 23:39:16 +0000 (15:39 -0800)
commitb054d4f9eb4b34c2187b89afb56e25b588618a9c
tree959078b85f0ad45adb765dcf29d8273f6f5161fb
parent3ca97ffd984c477e6bba26a71ebba188b99f1a4c
net: ipa: only enable GSI channel control IRQs when needed

A GSI channel causes a channel control interrupt to fire whenever
its state changes (between NOT_ALLOCATED, ALLOCATED, STARTED, etc.).
We do not support inter-EE channel commands (initiated by other EEs),
so no channel should ever change state except when we request it to.

Currently, we permit *all* channels to generate channel control
interrupts--even those that are never used.  And we enable channel
control interrupts essentially at all times, from setup to teardown.

Instead, disable all channel control interrupts initially in
gsi_irq_setup(), and only enable the channel control interrupt
type for the duration of a channel command.  When doing so, only
allow the channel being operated upon to cause the interrupt to
fire.

Because a channel's interrupt is now enabled only when needed (one
channel at a time), there is no longer any need to zero the channel
mask in gsi_irq_disable().

Add new gsi_irq_type_enable() and gsi_irq_type_disable() as helper
functions to control whether a given GSI interrupt type is enabled.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/gsi.c