From patchwork Thu Apr 16 13:21:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 227557 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2DD2C3815B for ; Thu, 16 Apr 2020 15:48:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A0B220732 for ; Thu, 16 Apr 2020 15:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587052091; bh=Gs1eguIB+STlCGpdeVeI2MCI/YDexRL4AJkRKfer9Ao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=azlvNL+YZnNUvSI6bZcT6yQjHefgc2suTpdrUOPM27y7DeS6Sd3tI9tDwj4wiGvvi vRN5n7rGvPsh+2bV3lIvGdULXVRKP0s9nXVN6cAGfNPqJHLjDSNStYM9Iqlf89XT5b vHIJTTw5rTiOesp5Hw1IPp+5R0DIKyteoNyAM1qM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728654AbgDPPsK (ORCPT ); Thu, 16 Apr 2020 11:48:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:44656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2896712AbgDPNd1 (ORCPT ); Thu, 16 Apr 2020 09:33:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 567AE21D91; Thu, 16 Apr 2020 13:33:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587044005; bh=Gs1eguIB+STlCGpdeVeI2MCI/YDexRL4AJkRKfer9Ao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PeeKLvCM1D7qsEeOVkprgOV5qaZzJuVT+vrBRUkU18E8OMVS+lFeRhjk8mTVcVkdw K5cNyCFFLpVYzqy5gDqBqY5dpueR+uKA5bbX1fi/kTrTBlwCb728u+Mfz32ExLjvrJ UFbScpuuPrF21MPk7Fr4FUImCDB8NG7aoS9tttrU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.5 043/257] ACPI: EC: Do not clear boot_ec_is_ecdt in acpi_ec_add() Date: Thu, 16 Apr 2020 15:21:34 +0200 Message-Id: <20200416131331.318536376@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416131325.891903893@linuxfoundation.org> References: <20200416131325.891903893@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rafael J. Wysocki [ Upstream commit 65a691f5f8f0bb63d6a82eec7b0ffd193d8d8a5f ] The reason for clearing boot_ec_is_ecdt in acpi_ec_add() (if a PNP0C09 device object matching the ECDT boot EC had been found in the namespace) was to cause acpi_ec_ecdt_start() to return early, but since the latter does not look at boot_ec_is_ecdt any more, acpi_ec_add() need not clear it. Moreover, doing that may be confusing as it may cause "DSDT" to be printed instead of "ECDT" in the EC initialization completion message, so stop doing it. While at it, split the EC initialization completion message into two messages, one regarding the boot EC and another one printed regardless of whether or not the EC at hand is the boot one. Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/ec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index bd74c78366759..f351d0711e495 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1649,7 +1649,6 @@ static int acpi_ec_add(struct acpi_device *device) if (boot_ec && ec->command_addr == boot_ec->command_addr && ec->data_addr == boot_ec->data_addr) { - boot_ec_is_ecdt = false; /* * Trust PNP0C09 namespace location rather than * ECDT ID. But trust ECDT GPE rather than _GPE @@ -1669,9 +1668,12 @@ static int acpi_ec_add(struct acpi_device *device) if (ec == boot_ec) acpi_handle_info(boot_ec->handle, - "Boot %s EC used to handle transactions and events\n", + "Boot %s EC initialization complete\n", boot_ec_is_ecdt ? "ECDT" : "DSDT"); + acpi_handle_info(ec->handle, + "EC: Used to handle transactions and events\n"); + device->driver_data = ec; ret = !!request_region(ec->data_addr, 1, "EC data");