linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Michael Bottini <michael.a.bottini@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	irenic.rajneesh@gmail.com,
	David Box <david.e.box@linux.intel.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <mgross@linux.intel.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Platform Driver <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH 1/2] acpi: Add acpi_init_properties to ACPI driver code
Date: Sat, 24 Jul 2021 12:51:07 +0200	[thread overview]
Message-ID: <CAJZ5v0jVA6_A+8xJPqPG1KyE8GP_ge9Angf-uCkHRSeaW3LnFw@mail.gmail.com> (raw)
In-Reply-To: <20210723202157.2425-1-michael.a.bottini@linux.intel.com>

On Fri, Jul 23, 2021 at 10:25 PM Michael Bottini
<michael.a.bottini@linux.intel.com> wrote:
>
> Some products in the field, like Intel Rocket Lake systems, contain
> AML code that can modify _DSD properties after they have been
> evaluated by ACPI init code.

That is directly against the spec.

> Therefore, there is a need for drivers
> to be able to reevaluate _DSDs so that the updated property values can
> be read. Export acpi_init_properties() for this purpose.

I'm not sure.  By the spec, the OS need not evaluate _DSD for a given
device more than once.

> Signed-off-by: Michael Bottini <michael.a.bottini@linux.intel.com>
> ---
>  drivers/acpi/property.c | 1 +
>  include/linux/acpi.h    | 6 ++++++
>  2 files changed, 7 insertions(+)
>
> diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
> index e312ebaed8db..2c1f8cf1a8f0 100644
> --- a/drivers/acpi/property.c
> +++ b/drivers/acpi/property.c
> @@ -432,6 +432,7 @@ void acpi_init_properties(struct acpi_device *adev)
>         if (!adev->data.pointer)
>                 acpi_extract_apple_properties(adev);
>  }
> +EXPORT_SYMBOL(acpi_init_properties);

EXPORT_SyMBOL_GPL(), please.

>  static void acpi_destroy_nondev_subnodes(struct list_head *list)
>  {
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 72e4f7fd268c..57defc3bc9b9 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -716,6 +716,8 @@ static inline u64 acpi_arch_get_root_pointer(void)
>
>  int acpi_get_local_address(acpi_handle handle, u32 *addr);
>
> +void acpi_init_properties(struct acpi_device *adev);
> +
>  #else  /* !CONFIG_ACPI */
>
>  #define acpi_disabled 1
> @@ -976,6 +978,10 @@ static inline int acpi_get_local_address(acpi_handle handle, u32 *addr)
>         return -ENODEV;
>  }
>
> +static inline void acpi_init_properties(struct acpi_device *adev)
> +{
> +}
> +
>  #endif /* !CONFIG_ACPI */
>
>  #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
> --
> 2.25.1
>

  parent reply	other threads:[~2021-07-24 10:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 20:21 [PATCH 1/2] acpi: Add acpi_init_properties to ACPI driver code Michael Bottini
2021-07-23 20:21 ` [PATCH 2/2] platform/x86/intel/pmc: Add PSON residency counter Michael Bottini
     [not found]   ` <CAHp75Ve2Ls9KVM0KZ2GMgbrQvc6wXvAXP1CqSLzQ4JWMTAcZ0A@mail.gmail.com>
2021-07-24 19:49     ` David E. Box
2021-07-24 20:25       ` Andy Shevchenko
2021-07-24 10:51 ` Rafael J. Wysocki [this message]
2021-07-28  9:08 ` [PATCH 1/2] acpi: Add acpi_init_properties to ACPI driver code Hans de Goede
2021-07-28  9:10   ` Hans de Goede
2021-07-28 16:57     ` David E. Box

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJZ5v0jVA6_A+8xJPqPG1KyE8GP_ge9Angf-uCkHRSeaW3LnFw@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=david.e.box@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=irenic.rajneesh@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=michael.a.bottini@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).