[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] acpi: Link translator to libacpica and provide RPCs
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 1/5] acpi: Link translator to libacpica and provide RPCs |
Date: |
Tue, 6 Sep 2022 00:47:58 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Damien Zammit, le dim. 04 sept. 2022 03:47:09 +0000, a ecrit:
> Provides two new acpi RPCs to sleep the machine and
> to get the irq of any pci device. ACPI mode is enabled
> by default when the translator is started.
>
> NB: Merging this commit means libacpica is a build dep.
Please then make this explicit by adding a configure.ac test, and
disabling building the acpi translator if libacpica is not found (useful
for build bootstraps).
> diff --git a/acpi/acpi.c b/acpi/acpi.c
> index 210a229e..9827232a 100644
> --- a/acpi/acpi.c
> +++ b/acpi/acpi.c
> @@ -28,7 +28,7 @@
> #include <string.h>
> #include <unistd.h>
>
> -#include "acpi.h"
> +#include "myacpi.h"
Aren't the libacpi headers in acpi/acpi.h and thus no conflict?
> diff --git a/acpi/acpi-ops.c b/acpi/acpi-ops.c
> new file mode 100644
> index 00000000..09e5cf49
> --- /dev/null
> +++ b/acpi/acpi-ops.c
> +error_t
> +S_acpi_sleep (struct protid *master,
> + int sleep_state)
> +{
> + error_t err;
> +
> + if (!master)
> + return EOPNOTSUPP;
> +
> + err = check_permissions (master, O_READ);
I don't think we want to let any user sleep/shutdown the computer?
> + if (err)
> + return err;
> +
> + /* Perform sleep */
> + acpi_enter_sleep(sleep_state);
> +
> + /* Never reached */
> + return err;
> +}
[PATCH 4/5] acpi: Remove references to /dev/mem, Damien Zammit, 2022/09/03