HomeFreeBSD

linuxkpi: Split <linux/compiler.h>

Description

linuxkpi: Split <linux/compiler.h>

On Linux, they split the content into three headers:

  1. <linux/compiler.h>
  2. <linux/compiler_types.h>
  3. <linux/compiler_attributes.h>

The first includes the second, which includes the third.

<linux/compiler_types.h> is also included on the compiler command line
by default! I added that to the compilation flags of the DRM drivers.
This allowed me to drop at least one:

#ifdef __FreeBSD
#include <linux/compiler.h>
#endif

Note that our copy of <linux/compiler.h> contains definitions which are
not defined by Linux' <linux/compiler.h>. I left them alone.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54495

Details

Provenance
dumbbellAuthored on Aug 17 2025, 11:10 AM
Reviewer
emaste
Differential Revision
D54495: linuxkpi: Split <linux/compiler.h>
Parents
rG65d7e9033439: linuxkpi: Add a dummy <linux/kdebug.h>
Branches
Unknown
Tags
Unknown