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)
Dec 20 2023, 3:20 AM
Unknown Object (File)
Dec 14 2023, 10:23 PM
Unknown Object (File)
Dec 13 2023, 4:04 AM
Unknown Object (File)
Nov 30 2023, 7:06 AM
Unknown Object (File)
Nov 12 2023, 11:32 PM
Unknown Object (File)
Oct 12 2023, 3:42 PM
Unknown Object (File)
Aug 16 2023, 9:55 AM
Unknown Object (File)
Jun 24 2023, 8:31 PM

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.