Page MenuHomeFreeBSD

LinuxKPI: Add acpi_dev_present() function.
ClosedPublic

Authored by wulf on Nov 28 2023, 9:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 4:07 AM
Unknown Object (File)
Fri, Apr 26, 2:27 AM
Unknown Object (File)
Dec 24 2023, 9:40 PM
Unknown Object (File)
Dec 23 2023, 7:59 AM
Unknown Object (File)
Dec 21 2023, 10:43 PM
Unknown Object (File)
Dec 11 2023, 5:36 PM

Details

Summary

acpi_dev_present detects that a given ACPI device is present based on
Hardware ID, Unique ID and Hardware Revision of the device.

Sponsored by: Serenity Cyber Security, LLC
MFC after: 1 week

Diff Detail

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

Event Timeline

wulf requested review of this revision.Nov 28 2023, 9:38 PM
manu requested changes to this revision.Nov 29 2023, 6:21 AM
manu added inline comments.
sys/compat/linuxkpi/common/src/linux_acpi.c
318

Duplicate ?

This revision now requires changes to proceed.Nov 29 2023, 6:21 AM
wulf marked an inline comment as done.Nov 29 2023, 9:29 AM
wulf added inline comments.
sys/compat/linuxkpi/common/src/linux_acpi.c
318

this is a dummy function for !DEV_ACPI case.
Only one of lkpi_acpi_dev_present implementations is compiled depending on arch and device acpi presence.

manu added inline comments.
sys/compat/linuxkpi/common/src/linux_acpi.c
318

Oh sorry, I didn't expand the context.

This revision is now accepted and ready to land.Nov 29 2023, 10:35 AM
sys/compat/linuxkpi/common/include/acpi/acpi_bus.h
40

Is there a reason to have the re-define above and not below the function declarations? The #define is the actual implementation of the command,

sys/compat/linuxkpi/common/src/linux_acpi.c
204

In this case I'd put { } around the block; it's no extra vertical space but with the else opening a block makes it more readable.

wulf marked an inline comment as done.Dec 10 2023, 8:36 PM
wulf added inline comments.
sys/compat/linuxkpi/common/include/acpi/acpi_bus.h
40

The only reason is my own style(9). In C language #define may be placed anywhere as it is processed before other code.

This revision was automatically updated to reflect the committed changes.