Page MenuHomeFreeBSD

LinuxKPI: Improve sysfs support.
ClosedPublic

Authored by johalun on Sep 6 2019, 3:13 AM.
Tags
None
Referenced Files
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
Unknown Object (File)
Mar 18 2024, 3:21 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 Passed
Unit
No Test Coverage
Build Status
Buildable 26317
Build 24796: arc lint + arc unit

Event Timeline

sys/compat/linuxkpi/common/include/linux/device.h
43

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

sys/compat/linuxkpi/common/include/linux/sysfs.h
276

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

This is a duplicate.

sys/compat/linuxkpi/common/include/linux/sysfs.h
276

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.