Page MenuHomeFreeBSD

LinuxKPI: Improve sysfs support.
ClosedPublic

Authored by johalun on Sep 6 2019, 3:13 AM.
Tags
None
Referenced Files
F82059953: D21542.id61739.diff
Thu, Apr 25, 3:28 AM
Unknown Object (File)
Tue, Apr 16, 1:44 PM
Unknown Object (File)
Thu, Apr 11, 10:02 PM
Unknown Object (File)
Thu, Apr 11, 5:35 PM
Unknown Object (File)
Tue, Apr 9, 8:27 PM
Unknown Object (File)
Tue, Apr 9, 8:26 PM
Unknown Object (File)
Wed, Apr 3, 4:02 PM
Unknown Object (File)
Wed, Apr 3, 1:33 PM
Subscribers

Details

Summary
  • Add functions for creating and merging sysfs groups.
  • Add sysfs_streq function to compare strings ignoring newline from the sysctl userland call.
  • Add a call to sysfs_create_groups in device_add.
  • Remove duplicate header include.
  • Bump __FreeBSD_version
Test Plan

Tested OK with WIP drm driver update on i915.
mlx* drivers built and loaded OK (but without hardware).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/compat/linuxkpi/common/include/linux/device.h
43 ↗(On Diff #61713)

Why is this header file removed? Does device.h still build standalone?

sys/compat/linuxkpi/common/include/linux/sysfs.h
276 ↗(On Diff #61713)

You should test for l1 != 0 and l2 != 0

Improve strlen safety checks.

Apply reviewer suggestions

sys/compat/linuxkpi/common/include/linux/device.h
43 ↗(On Diff #61713)

This is a duplicate.

sys/compat/linuxkpi/common/include/linux/sysfs.h
276 ↗(On Diff #61713)

Good catch. Fixed.

Make sure:
make buildkernel WITH_OFED=YES

pass.

This revision is now accepted and ready to land.Sep 6 2019, 3:07 PM
This revision was automatically updated to reflect the committed changes.