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)
Thu, Jul 4, 7:08 AM
Unknown Object (File)
Wed, Jul 3, 3:26 PM
Unknown Object (File)
Tue, Jul 2, 3:35 PM
Unknown Object (File)
Mon, Jun 24, 12:18 PM
Unknown Object (File)
May 27 2024, 1:35 PM
Unknown Object (File)
May 8 2024, 11:35 AM
Unknown Object (File)
May 8 2024, 11:30 AM
Unknown Object (File)
May 8 2024, 9:25 AM

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.