From patchwork Thu Feb 24 11:38:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Menzel X-Patchwork-Id: 547633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1383FC433EF for ; Thu, 24 Feb 2022 11:38:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234048AbiBXLjH (ORCPT ); Thu, 24 Feb 2022 06:39:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234042AbiBXLjD (ORCPT ); Thu, 24 Feb 2022 06:39:03 -0500 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 605541A58EA; Thu, 24 Feb 2022 03:38:33 -0800 (PST) Received: from localhost.localdomain (ip5f5aee05.dynamic.kabel-deutschland.de [95.90.238.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id CD58161EA193A; Thu, 24 Feb 2022 12:38:31 +0100 (CET) From: Paul Menzel To: Robert Moore , "Rafael J. Wysocki" , Len Brown Cc: Paul Menzel , 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 Message-Id: <20220224113807.91771-2-pmenzel@molgen.mpg.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220224113807.91771-1-pmenzel@molgen.mpg.de> References: <20220224113807.91771-1-pmenzel@molgen.mpg.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Inform users if firmware violates the ACPI specification. Signed-off-by: Paul Menzel --- 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); }