Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp676065lqo; Fri, 10 May 2024 11:06:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVg8EKj8PqGsJk8XZbf1GA65bS8Y28CzaApHObieWcCw8S6yQ76s/QxCe/SNGxiUoUauwSmqCwFE+FXUIT1lh38WYSSxsn32kHVYh7wrQ== X-Google-Smtp-Source: AGHT+IG1WhU1XRECLmJTorlpdD51zcoAkcX7tMUOmEX6WTJmr0IIhX9rvI5sfSqO42bh7UQr7rEw X-Received: by 2002:a05:6e02:1d14:b0:36c:4d7d:26bf with SMTP id e9e14a558f8ab-36cc14560efmr37644725ab.1.1715364415210; Fri, 10 May 2024 11:06:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715364415; cv=pass; d=google.com; s=arc-20160816; b=CrrAGymMqcJ3Ipi2BQkGUBeofz/77e9yc4fhxTE7Y3wd3ScJxyF4zYzUpde6qTB1jK jekV2CgCs4oFUyVtRzD6MeAxVhm025OV/mHTJF53RecUWqU/N7jiEctuNcBtB5GgVLsf hlGrJ4z5d7mkTX4Np78hrXje1oVctrANWvTLoY/eSpypZ+lmi8pR9ZUmHcJ71S1bbsd8 eSyuf3duQzIQ/WWCm1i0JFEslO4MuWyVbD66/bPaiqBvLs2E/odABIeXN0NkwJ1cwEY/ OyhMp9LpBPT8vNf7+odsbEbbfA35zEcXRJqJXRztJjOJI749y1Rgp6KsTlvw4ugDWUm1 U6oA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=roxPW7rzBA6umUCY3viXtrHyaP5u2j38J8PzB1oTbm8=; fh=MeGEWN81OotQrD8DBBYq611AKXu7LV6fmo3WvgWJ6/o=; b=b8TtmIOlwiAyRptQQ/Zs/ZtFfurkXTzB4HOehWq4MYFyL9N+9lTxVTAh26sapn0k+O Nm8qWOy8Fp82XJYcsIVV5jzHyNe/P3oQuHrhlDC1CiQRR7eXj2jUI3fjmALD5ugbTdnd +MQ+uX/wKykYrpcCTMJmCSi/X0Tqel97s171BIneTiLFCBURM6UozgDCEkKa2N01Bzib eQtXbC2wXib7kNKHT+TwrbfiF7PaUJaKuUYWyo9JDYtR62wq57HZAx/IS6YDT1vIxEN/ r0hiqEPKeVSdGjNJE5DkBihyGsMSoYiJVZwiIaqHEJPUXugFWpm/wiG9lTgJq4/LSt/H R9EQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P40Vv7Vv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176075-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412e1f2dasi4047113a12.771.2024.05.10.11.06.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 11:06:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176075-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P40Vv7Vv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176075-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176075-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 17E782897AD for ; Fri, 10 May 2024 17:57:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9AF5E24B2F; Fri, 10 May 2024 17:56:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="P40Vv7Vv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C005A1C6B5; Fri, 10 May 2024 17:56:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715363817; cv=none; b=ByGiUgu7C0ERFAigKCQZONTvZ/bMtEXYEH3NHmvloLmMQaUXC8nod82AFwDFKEmqProY/Np8ggk8ITuPJ7hrP7r7HCoiWR+dkF56XktPI2ZTQSInR3DvNoXFfhFXjpG0kNDjOgsYrBNGr+QPa1OLnS7Q0xSpEEj8nnMQtkZqa1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715363817; c=relaxed/simple; bh=+w26PJ5CXkIE4/kJJPQ3AYbBbLiTeT3yUcR/oQxpC9c=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=YcGvHJ1bF/1tpVGDl7Vc1pXrMyFw2gxYNvzDiQo1OjC3b+vEAuCo6vdZYZRQkNroDWY3thMcc434e+74l/g7cHeZx7eNR3a+Z0gt7LVbdUQa6Ry53Bp8zbfanX61r55rj9pPbW7+OCtCEhMmG/B4J5uYaqOgmH5YkgXkQGHFNWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=P40Vv7Vv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A618C2BD10; Fri, 10 May 2024 17:56:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715363817; bh=+w26PJ5CXkIE4/kJJPQ3AYbBbLiTeT3yUcR/oQxpC9c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=P40Vv7VvkLNd9o/K6Sh7PCcHuY81Hb37G7ba1jWhx6Lz29N2iazNI/TpP3KMtNKfO vyb/fDZuwTOwANJ7aDToRR2UU7tEXOqMzyHyLxx95sa8ezniPORiXJGJ2gQSDh5VDh E1ver/zGMghn+dqzblyIm8JFmXe07DJupA0mU79gAgsRnTFoIWyKPOn04pRuaEch0b ug7biGJRGM+hdtdZZdFVYPFaEpHKsJ9eQjjZCX0sXzgkq8KjcovUnlfugOynnxvNAO OhIuVxYAKO8//ADT0n2slKeoO9zOly8QkYjaZdDsWgv0G+UgAk8FnKUDz9909mZSXt XevxNScn6rDwg== Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-6f035fb2b03so529356a34.3; Fri, 10 May 2024 10:56:57 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXb1h9WQnhWRc0tJtbuTsz58fEjCzFKCGWChRMBYf1XXWkO55SomV37oCkQA5CIveKU9uDLP7122uA3Bi9sgy637t/XNi1um8zpJip3XvfxK5Ptx4vb7HL8spkzN+x/QbjevOwA3E0EfA== X-Gm-Message-State: AOJu0YxFyE98qpAYPqQjRPU08awP+QByTbvqBklWc5VAiNorgCZlxX1a SDt6k7v7WKqADsdAVICRNpUQNhcZMA6icL5oKN2a64dbkXhNThn1SbH/yaMgOR8EIkGSulAtR9+ KEo/Z7/csDx3l+Rqbb9ZZIxjE66g= X-Received: by 2002:a05:6808:f03:b0:3c8:2af6:1125 with SMTP id 5614622812f47-3c997036e42mr3775699b6e.1.1715363816590; Fri, 10 May 2024 10:56:56 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <5787281.DvuYhMxLoT@kreacher> <4926735.31r3eYUQgx@kreacher> <568291fc-fd79-4f08-9eb7-aed7f5a32345@gmx.de> In-Reply-To: <568291fc-fd79-4f08-9eb7-aed7f5a32345@gmx.de> From: "Rafael J. Wysocki" Date: Fri, 10 May 2024 19:56:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/2] ACPI: EC: Install address space handler at the namespace root To: Armin Wolf Cc: "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux ACPI , LKML , Andy Shevchenko , Hans de Goede , Mario Limonciello , Heikki Krogerus Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 10, 2024 at 6:52=E2=80=AFPM Armin Wolf wrote: > > Am 10.05.24 um 18:41 schrieb Rafael J. Wysocki: > > > On Fri, May 10, 2024 at 6:10=E2=80=AFPM Armin Wolf wro= te: > >> Am 10.05.24 um 16:03 schrieb Rafael J. Wysocki: > >> > >>> From: Rafael J. Wysocki > >>> > >>> It is reported that _DSM evaluation fails in ucsi_acpi_dsm() on Lenov= o > >>> IdeaPad Pro 5 due to a missing address space handler for the EC addre= ss > >>> space: > >>> > >>> ACPI Error: No handler for Region [ECSI] (000000007b8176ee) [Embed= dedControl] (20230628/evregion-130) > >>> > >>> This happens because the EC driver only registers the EC address spac= e > >>> handler for operation regions defined in the EC device scope of the > >>> ACPI namespace while the operation region being accessed by the _DSM > >>> in question is located beyond that scope. > >>> > >>> To address this, modify the ACPI EC driver to install the EC address > >>> space handler at the root of the ACPI namespace. > >>> > >>> Note that this change is consistent with some examples in the ACPI > >>> specification in which EC operation regions located outside the EC > >>> device scope are used (for example, see Section 9.17.15 in ACPI 6.5), > >>> so the current behavior of the EC driver is arguably questionable. > >> Hi, > >> > >> the patch itself looks good to me, but i wonder what happens if multip= le > >> ACPI EC devices are present. How would we handle such a situation? > > I'm wondering if this is a theoretical question or do you have any > > existing or planned systems in mind? > > > > ec_read(), ec_write() and ec_transaction() use only the first EC that > > has been found anyway. > > Its a theoretical question, i do not know of any systems which have more = than > one ACPI EC device. > > This patch would prevent any ACPI ECs other than the first one from probi= ng, > since they would fail to register their address space handler. > I am just curious if/how we want to handle such situations. I'm not worried until I see a system where that is a problem. That said, it can be addressed by adding a first_ec check around the address space handler registration/unregistration.