Skip to content

treewide: Implement new Red Hat driver and device status infrastructure

Scott Weaver requested to merge scweaver/centos-stream-9:hrs-bz2181611 into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2181611
Upstream Status: RHEL only

There are two significant problems with the existing hardware and driver
maintenance process. It is not easy to determine if a driver or piece of
hardware is supported, and it is not easy to determine if a driver or piece of
hardware is deprecated.

This changeset implements new 'centralized' call points to mark hardware and
devices deprecated, unmaintained, or disabled. This removes per-driver code
and reduces the amount of RHEL only code in the kernel.

It is easiest to look at a comparison of the old and new processes. In this
example, I will look at disabling a PCI card. In the old process, a bugzilla
would be opened to mark the device as disabled, and it would be assigned to an
engineer. That engineer would submit code and it would eventually be merged
into the tree. The problem with this process is that it does not make it easy
for others to determine the status of the device without examining the code.
This led to situations where devices were assumed to be supported in RHEL9 but
were not actually enabled. In addition to this, this process required
per-driver changes which were spread throughout the kernel.

The new process relies on a database that contains information on the status of
a device. In order to disable a device the database must first be updated with
the information. The database contains a utility to update the code which is
then directly copied into the kernel as a Merge Request.

As part of this change, the code is updated to have two main calling points to
examine devices and drivers. The kernel module loading code is updated to
check the status of a driver before loading it, and the PCI core driver code
was updated to to check the status of a device before binding it to a driver.

There is dead and existing code that is removed from the source code before any
changes are made. I verified that the entries in the drivers match those in
the database.

hardware-support-removal README: https://gitlab.com/redhat/rhel/src/kernel/hardware-removal-support
Use hrs-generate.py to auto-generate kernel/rh_messages.h

Signed-off-by: Prarit Bhargava prarit@redhat.com
Signed-off-by: Scott Weaver scweaver@redhat.com

Edited by Scott Weaver

Merge request reports