]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Truncate a too-long interrupt handler name when there is only one handler.
authorian <ian@FreeBSD.org>
Sun, 24 Mar 2019 17:53:26 +0000 (17:53 +0000)
committerian <ian@FreeBSD.org>
Sun, 24 Mar 2019 17:53:26 +0000 (17:53 +0000)
commit3ca12994700486de20beb3ae16f621918d5b6e8a
tree09f8c3fa09e1e7bb7d1c215c33d26044da743faa
parent068eaf9a721979567c774bd6f6f040917d6023a4
Truncate a too-long interrupt handler name when there is only one handler.

There are only 19 bytes available for the name of an interrupt plus the
name(s) of handlers/drivers using it. There is a mechanism from the days of
shared interrupts that replaces some of the handler names with '+' when they
don't all fit into 19 bytes.

In modern times there is typically only one device on an interrupt, but long
device names are the norm, especially with embedded systems. Also, in systems
with multiple interrupt controllers, the names of the interrupts themselves
can be long. For example, 'gic0,s54: imx6_anatop0' doesn't fit, and
replacing the device driver name with a '+' provides no useful info at all.

When there is only one handler but its name was too long to fit, this
change truncates enough leading chars of the handler name (replacing them
with a '-' char to indicate that some chars are missing) to use all 19
bytes, preserving the unit number typically on the end of the name. Using
the prior example, this results in: 'gic0,s54:-6_anatop0' which provides
plenty of info to figure out which device is involved.

PR: 211946
Reviewed by: gonzo@ (prior version without the '-' char)
Differential Revision: https://reviews.freebsd.org/D19675
sys/kern/kern_intr.c