]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: macb: Factor out the handling of non-hot IRQ events into a separate function
authorKevin Hao <haokexin@gmail.com>
Thu, 2 Apr 2026 13:41:24 +0000 (21:41 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Apr 2026 22:51:04 +0000 (15:51 -0700)
commit6d55ce805b267400e682aa335787775bf253e5d8
treeaf5f098e592d6c243fa16738545f35fbe73cc68f
parent5986ff6e4136105f16d481bd0532b7da2c6344ae
net: macb: Factor out the handling of non-hot IRQ events into a separate function

In the current code, the IRQ handler checks each IRQ event sequentially.
Since most IRQ events are related to TX/RX operations, while other
events occur infrequently, this approach introduces unnecessary overhead
in the hot path for TX/RX processing. This patch reduces such overhead
by extracting the handling of all non-TX/RX events into a new function
and consolidating these events under a new flag. As a result, only a
single check is required to determine whether any non-TX/RX events have
occurred. If such events exist, the handler jumps to the new function.
This optimization reduces four conditional checks to one and prevents
the instruction cache from being polluted with rarely used code in the
hot path.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Link: https://patch.msgid.link/20260402-macb-irq-v2-3-942d98ab1154@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb_main.c