From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 DA7B1C2BB86 for ; Fri, 10 Apr 2020 03:48:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7D372137B for ; Fri, 10 Apr 2020 03:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586490504; bh=t6NJkxg/UoyJvKDLvCs0NmGB1mpeIXUzCQ01MywZPuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ti/xhS+UG0tNTiHuUaPp7i4uRKztd4Qk1TdfyXmgyOoCm0GRcIhSRzCgI6Mo08pPR LKP6Di2uODG3eTDSfX/ChPNBiOYe2nONcmVHf+kF0EOWSpCCC8/aAwwv1FA2ZhrNdC Xfhtk/9gN6mLmVEN2xEPnGynNSwPJVEDkIBz9FOw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbgDJDsW (ORCPT ); Thu, 9 Apr 2020 23:48:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:59738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728164AbgDJDsV (ORCPT ); Thu, 9 Apr 2020 23:48:21 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4D6902137B; Fri, 10 Apr 2020 03:48:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586490501; bh=t6NJkxg/UoyJvKDLvCs0NmGB1mpeIXUzCQ01MywZPuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FdvhQe10lSgI4+YM29HMFuJUIRPMVTySAo173DnqOqa09c5CoYbpYNOfrMyocuo0t p3kex69uqC+R9IZ0hDhNeb0eJoq8NhwPF7XiMme9KyqKOcs3Fw0rSFUm9zn0PBQasO jOw8V2I7t1XYZ5c2nOcSq2D9vaRAjNjrvFUBjq4k= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Rafael J. Wysocki" , Sasha Levin , linux-acpi@vger.kernel.org Subject: [PATCH AUTOSEL 5.5 17/56] ACPI: EC: Do not clear boot_ec_is_ecdt in acpi_ec_add() Date: Thu, 9 Apr 2020 23:47:21 -0400 Message-Id: <20200410034800.8381-17-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200410034800.8381-1-sashal@kernel.org> References: <20200410034800.8381-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit 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"); -- 2.20.1