]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: use bitmasks for GSI IRQ values
authorAlex Elder <elder@linaro.org>
Wed, 8 Feb 2023 20:56:49 +0000 (14:56 -0600)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Feb 2023 08:06:32 +0000 (08:06 +0000)
commitc5ebba75c7625e5cb62cb5423883cc3764779420
treea97f102c3c6898645f94e06a3d65eca9c98296e4
parentd86603e940ae5107a1669952070027726054142f
net: ipa: use bitmasks for GSI IRQ values

There are seven GSI interrupt types that can be signaled by a single
GSI IRQ.  These are represented in a bitmask, and the gsi_irq_type_id
enumerated type defines what each bit position represents.

Similarly, the global and general GSI interrupt types each has a set
of conditions it signals, and both types have an enumerated type
that defines which bit that represents each condition.

When used, these enumerated values are passed as an argument to BIT()
in *all* cases.  So clean up the code a little bit by defining the
enumerated type values as one-bit masks rather than bit positions.

Rename gsi_general_id to be gsi_general_irq_id for consistency.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/gsi.c
drivers/net/ipa/gsi_reg.h