All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Robert Moore <robert.moore@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <lenb@kernel.org>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	linux-acpi@vger.kernel.org, devel@acpica.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] acpi: exsystem: Inform users about ACPI spec violation
Date: Thu, 24 Feb 2022 12:38:04 +0100	[thread overview]
Message-ID: <20220224113807.91771-2-pmenzel@molgen.mpg.de> (raw)
In-Reply-To: <20220224113807.91771-1-pmenzel@molgen.mpg.de>

Inform users if firmware violates the ACPI specification.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 drivers/acpi/acpica/exsystem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c
index 6bc5b46e6927..00f66af31ffa 100644
--- a/drivers/acpi/acpica/exsystem.c
+++ b/drivers/acpi/acpica/exsystem.c
@@ -137,6 +137,9 @@ acpi_status acpi_ex_system_do_stall(u32 how_long_us)
 			    "Time parameter is too large (%u)", how_long_us));
 		status = AE_AML_OPERAND_VALUE;
 	} else {
+		if (how_long_us > 100)	/* 100 microseconds */
+			ACPI_WARNING((AE_INFO,
+				      "Time parameter %u us > 100 us violating ACPI spec, please fix the firmware.", how_long_us));
 		acpi_os_stall(how_long_us);
 	}
 
-- 
2.35.1


  reply	other threads:[~2022-02-24 11:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 11:38 [PATCH 1/4] acpi: exsystem: Add units to time variable names Paul Menzel
2022-02-24 11:38 ` Paul Menzel [this message]
2022-02-24 11:38 ` [PATCH 3/4] acpi: exsystem: Warn about sleeps greater than 50 ms Paul Menzel
2022-02-24 16:19   ` Moore, Robert
2022-02-24 16:19     ` [Devel] " Moore, Robert
2022-02-25  7:38     ` Paul Menzel
2022-02-25 15:39   ` Rafael J. Wysocki
2022-02-25 15:39     ` [Devel] " Rafael J. Wysocki
2022-02-24 11:38 ` [PATCH 4/4] acpi: exsystem: Decrease sleep warning threshold to 10 ms Paul Menzel
2022-03-01 19:40 ` [PATCH 1/4] acpi: exsystem: Add units to time variable names Rafael J. Wysocki
2022-03-01 19:40   ` [Devel] " Rafael J. Wysocki
2022-03-02  8:06   ` Paul Menzel

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=20220224113807.91771-2-pmenzel@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=devel@acpica.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.