Page MenuHomeFreeBSD

LinuxKPI: extract stringify() in their own header file
ClosedPublic

Authored by bz on May 24 2021, 7:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 27, 9:36 AM
Unknown Object (File)
Oct 29 2024, 10:27 PM
Unknown Object (File)
Oct 2 2024, 3:08 PM
Unknown Object (File)
Oct 2 2024, 11:21 AM
Unknown Object (File)
Sep 30 2024, 5:18 AM
Unknown Object (File)
Sep 30 2024, 1:05 AM
Unknown Object (File)
Sep 27 2024, 3:52 AM
Unknown Object (File)
Sep 27 2024, 3:50 AM

Details

Summary

Add linux/stringify.h as directly included by drivers. Remove the
definitions from compiler.h and include the new header in places
where the stringify macros are already used without linuxkpi.

I have adjusted the Copyright of the new file according to the commit
originaly adding the macros (99e690772adbcb78c9e8441bedcf1913d72ea72f).

Sposnored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by:
Differential Revision:

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.May 24 2021, 7:10 PM
This revision is now accepted and ready to land.May 24 2021, 7:13 PM

@manu my test build found that this will break drm-kmod ( linuxkpi/dummy/include/linux/stringify.h exists ).
How do you deal with dummy files no longer needed in 14 but still needed in 13?

In D30440#683967, @bz wrote:

@manu my test build found that this will break drm-kmod ( linuxkpi/dummy/include/linux/stringify.h exists ).
How do you deal with dummy files no longer needed in 14 but still needed in 13?

This has not happened before.
I guess it breaks because some stuff in drm-kmod uses __stringify and it's not defined anymore ?
The easiest way to solve this would be to remove the dummy file and add a new one in linuxkpi/gplv2/include/ which check FreeBSD_version and include_next if the version matches.

In D30440#683998, @manu wrote:
In D30440#683967, @bz wrote:

@manu my test build found that this will break drm-kmod ( linuxkpi/dummy/include/linux/stringify.h exists ).
How do you deal with dummy files no longer needed in 14 but still needed in 13?

This has not happened before.
I guess it breaks because some stuff in drm-kmod uses __stringify and it's not defined anymore ?
The easiest way to solve this would be to remove the dummy file and add a new one in linuxkpi/gplv2/include/ which check FreeBSD_version and include_next if the version matches.

Thank you for the quick answer! I'll prepare that (also for cpu.h) and possible other things I find and send a pull request.