Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp400463ybb; Wed, 1 Apr 2020 02:12:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsB+vxTeu76gN6GtsCIvoJrCZcgk0BFZJWXYMUa8RYcP1OpeXOec7pGd7BACCKulwhHjaD6 X-Received: by 2002:a9d:6ad9:: with SMTP id m25mr16751301otq.160.1585732352384; Wed, 01 Apr 2020 02:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585732352; cv=none; d=google.com; s=arc-20160816; b=SvzqG/wsR72VoFPq6k+GznfG5ad2gADQHS6Rp6xWgRvEmnRqtiI/sEM7TeA05M68aN /36zLAtLXDLPnVFzNUtF0B8mFC4tkBluJz2s+/9E38Z/bIN/4YFDaFIZv1R6gdZd0nnU ot/UATWPncnYXjt+nJy4u+wTkNsL5O+YNHt+hwstcjNrGoKj6KYw/Q4WeieOB6eaKMNF SADGoBS+EIDwuaoRxopB29GHwLeKF0xfqMpMTd4JErvBHerwqAP0VHJFcRjqRTo0vF8v Sn1kQwncW3HKWD7D/Hl4Q0SwW/pRNAC5SVNdDMMfYKpaYduCjWOqBjCeJXXzp0AJfxj0 CzXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=VsX9b0jdMMwhXQFEGYuMkZY3E62lwQ5QItg3/i4As6Q=; b=thDnD5RWiXY8MAwUJ8crmJQRSzjNUm3bPMpjrRwt2XRo7ZMGYzJCjZKeCcjTUCr/c8 gJoxjAfYyfBrTVLM8GdZt+d7f3S7kf5d0UTO1y0zeXQGHZOfqL9qOMC/yOy+qxkmCUzO eC5tb8kJ8stFajA24HqD7mJqh4Q5RBEGN3Fihn1UDVftlLu7lBWCZvSpobV/KKDCnEx4 kgFMCptZe/7K9RDZ2ItnMGYuW6MMyh+4ESRMYjjecQdFNeG4vZvQ5PoCjBt+TGpAKS8F BI8O0sz4cf2HWfpFMzaIQT+NK4sGxBo9bCzS2STLIQbDUZggd+FZeuG0B3P1JpjHMqI9 R2Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18si625711oie.242.2020.04.01.02.12.20; Wed, 01 Apr 2020 02:12:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731680AbgDAJMB (ORCPT + 99 others); Wed, 1 Apr 2020 05:12:01 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:45510 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727627AbgDAJMA (ORCPT ); Wed, 1 Apr 2020 05:12:00 -0400 Received: by mail-oi1-f195.google.com with SMTP id l22so21514935oii.12; Wed, 01 Apr 2020 02:12:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VsX9b0jdMMwhXQFEGYuMkZY3E62lwQ5QItg3/i4As6Q=; b=EpRKCXChXu9cif7haQceMnd2PzbiyHPC3fQXaSIPqWrSgmjP88JDaQWD9NQl38raMC i6g1md6jQFkDta49p+M6xeGpbLcB8ujMneRY+/PSqDdlehApTJmLJyjnVfHtvf5g1cuh opHyhp8vJrlJ3ZbTS8xcyu4LyKyKTiKvKn/5ocy/pUgU261gKGbflEiB3ol2OJ4Tdz6e E5x0/QBIZaznM+9jbO8EoAIWHYPxs/buw7ytmKIbTAuQCYKKZu9dnEMeWuleLJgOcP9+ 61AZFmeubCE6ugyqEPfE3lULFqWYRU/8YMf84d0hPTUG1UymmztTKAC3JnlW8J3ekD11 96ug== X-Gm-Message-State: AGi0PuYWhsCYrP4BreqHRIi/yQcbogokJ9Hs2dZwoD7F6/E8h0gbmfRg dfEmvE+VgceIuf8yL18asYIjs4ppEEfAZoY1c4s= X-Received: by 2002:aca:f07:: with SMTP id 7mr2015406oip.68.1585732319951; Wed, 01 Apr 2020 02:11:59 -0700 (PDT) MIME-Version: 1.0 References: <20200330085852.31328-1-jengelh@inai.de> In-Reply-To: <20200330085852.31328-1-jengelh@inai.de> From: "Rafael J. Wysocki" Date: Wed, 1 Apr 2020 11:11:48 +0200 Message-ID: Subject: Re: [PATCH] acpica: clear global_lock bits at FACS initialization To: Jan Engelhardt , Erik Kaneda , Robert Moore Cc: Rafael Wysocki , ACPI Devel Maling List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 30, 2020 at 10:58 AM Jan Engelhardt wrote: > > When the firmware ROM supplies a FACS table with garbage, and the > firmware code does not clear the global_lock field before booting to a > loader/OS, the garbage bytes in that field (like 0xffffffff) can > indicate that the lock is taken when it is not, thereby preventing > obtaining said lock even though it is otherwise perfectly usable if > the field were not prepopulated with garbage. > > Reset the lock to a known good state upon ACPI initialization. > > References: https://bugzilla.kernel.org/show_bug.cgi?id=206553 > Signed-off-by: Jan Engelhardt Bob, Erik, please let me know if you want me to apply this directly or you prefer to route it through the upstream. > --- > > drivers/acpi/acpica/tbutils.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c > index c5f0b8ec70cc..26bdbc585d7e 100644 > --- a/drivers/acpi/acpica/tbutils.c > +++ b/drivers/acpi/acpica/tbutils.c > @@ -56,6 +56,9 @@ acpi_status acpi_tb_initialize_facs(void) > &facs)); > acpi_gbl_FACS = facs; > } > + /* Clear potential garbage from the initial FACS table. */ > + if (facs != NULL) > + facs->global_lock &= ~0x3; > > /* If there is no FACS, just continue. There was already an error msg */ > > -- > 2.26.0 >