From patchwork Mon Dec 5 19:08:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 29890 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2430292wrr; Mon, 5 Dec 2022 11:14:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf4l9iFO9qMvICrLSnR29NGyGpvwRt5DIcQhs35I/MaVf7mZwzo5xFoXfpM2vuDIduPz5BIT X-Received: by 2002:a17:906:99cb:b0:7bb:7dda:7d3c with SMTP id s11-20020a17090699cb00b007bb7dda7d3cmr22359001ejn.182.1670267674347; Mon, 05 Dec 2022 11:14:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670267674; cv=none; d=google.com; s=arc-20160816; b=r9Uh5wm4MqdunY06pzNi8covQg55Zsc6gURpkS4E1NrETBWpXXLOsuBS9ZWhiFdI4X yrT2Vqqyemem4fs/uQwgaCySvZ6yS4KhvIX4Xztuuv9K2/nvx1iO5xAzGWe20V3lk2qb 6AFZYOuFDH6Hz+AqK945n9d/kBb5ZO6qfVTq2Ko8bnK4wMYtSht09I61NTh2/IqknGAw 1759vyIjfJ9LKmNexUISxPcCXvlRd30b9PvV9o1lQ50hWfOwoxkjzbFsAQhfHdnBW/XE +jPwkzt+5CFyVoW1Dirq0VmaXajlGcLQOzUEbKSJiT1br5D3yqCEZpaCGHfDqbhoqZO3 KW1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dzBM01KCLbRyuPze19sOCfYJEY4mZ+70HROFKkDOAn4=; b=Ov8Cq5tYy8ksCJeGwQhKtEZF0Fnd4PZCU6AqispR0VtXPdrl3Sumhqn/2RKrWLijcJ IAjH6HU8gHXwDxPKS0U7Oaqfv+oOMJjI4iiGnwANVyEC9dhCR4WcGla2V7XPASllld2/ PfEstb6CN2sUJvV6EHr+oscyH4Vj43nVycDxE10ogkYM9vbmFngLqBsfdk4tDmfRX7K0 S6SgqlbyZf/HqylC7a27E622PB+pOQ7shtYlOFbwyrwh2rDbvkxHMVDHR1N2DWDjFQlz wUzUOZnM0/JD6V8JAMnsFCyWbLI2xxzrtthLNXYnF+He55z/asZnGW7oplkdhnatk3oX t5Hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k14-20020a170906a38e00b007c0a7286cbesi9061515ejz.708.2022.12.05.11.14.11; Mon, 05 Dec 2022 11:14:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232490AbiLETIQ (ORCPT + 99 others); Mon, 5 Dec 2022 14:08:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230352AbiLETIP (ORCPT ); Mon, 5 Dec 2022 14:08:15 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2826DDF33; Mon, 5 Dec 2022 11:08:14 -0800 (PST) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id 517f8ee01c49655d; Mon, 5 Dec 2022 20:08:12 +0100 Received: from kreacher.localnet (unknown [213.134.188.181]) (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) by v370.home.net.pl (Postfix) with ESMTPSA id C38072801EA0; Mon, 5 Dec 2022 20:08:11 +0100 (CET) Authentication-Results: v370.home.net.pl; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: v370.home.net.pl; spf=fail smtp.mailfrom=rjwysocki.net From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linux PM , Zhang Rui , Srinivas Pandruvada Subject: [PATCH v1 5/5] ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return value Date: Mon, 05 Dec 2022 20:08:00 +0100 Message-ID: <21694351.EfDdHjke4D@kreacher> In-Reply-To: <1836012.tdWV9SEqCh@kreacher> References: <1836012.tdWV9SEqCh@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.188.181 X-CLIENT-HOSTNAME: 213.134.188.181 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudeggdduvdduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppedvudefrddufeegrddukeekrddukedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudekkedrudekuddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohephedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthht ohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751402596850662648?= X-GMAIL-MSGID: =?utf-8?q?1751402596850662648?= From: Rafael J. Wysocki Avoid returning a confusing error code from acpi_processor_notify_smm() if it is called for the second time in the case when SMM notification regarding P-state control is not supported. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/processor_perflib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Index: linux-pm/drivers/acpi/processor_perflib.c =================================================================== --- linux-pm.orig/drivers/acpi/processor_perflib.c +++ linux-pm/drivers/acpi/processor_perflib.c @@ -475,10 +475,12 @@ int acpi_processor_notify_smm(struct mod result = acpi_processor_pstate_control(); if (result <= 0) { - if (!result) + if (result) { + is_done = result; + } else { pr_debug("No SMI port or pstate_control\n"); - - is_done = -EIO; + is_done = 1; + } goto out_put; }